[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -40,6 +40,7 @@ def build_observable_dict(nqubits):
|
|||||||
|
|
||||||
return {"terms": terms}
|
return {"terms": terms}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.parametrize("nqubits", [1, 2, 5, 10])
|
@pytest.mark.parametrize("nqubits", [1, 2, 5, 10])
|
||||||
def test_eval(nqubits: int, dtype="complex128"):
|
def test_eval(nqubits: int, dtype="complex128"):
|
||||||
@@ -81,6 +82,7 @@ def test_eval(nqubits: int, dtype="complex128"):
|
|||||||
result_sv_cp, result_tn.statevector.flatten()
|
result_sv_cp, result_tn.statevector.flatten()
|
||||||
), "Resulting dense vectors do not match"
|
), "Resulting dense vectors do not match"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.parametrize("nqubits", [2, 5, 10])
|
@pytest.mark.parametrize("nqubits", [2, 5, 10])
|
||||||
def test_mps(nqubits: int, dtype="complex128"):
|
def test_mps(nqubits: int, dtype="complex128"):
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ def build_observable_dict(nqubits):
|
|||||||
|
|
||||||
return {"terms": terms}
|
return {"terms": terms}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.mpi
|
@pytest.mark.mpi
|
||||||
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
||||||
@@ -86,6 +87,7 @@ def test_eval_mpi(nqubits: int, dtype="complex128"):
|
|||||||
and result_tn_cp.item() == 0
|
and result_tn_cp.item() == 0
|
||||||
), f"Rank {backend.rank}: result_tn_cp should be scalar/array with 0, got {result_tn_cp}"
|
), f"Rank {backend.rank}: result_tn_cp should be scalar/array with 0, got {result_tn_cp}"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.mpi
|
@pytest.mark.mpi
|
||||||
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
||||||
@@ -177,6 +179,7 @@ def test_expectation_mpi(nqubits: int, dtype="complex128"):
|
|||||||
and result_tn.item() == 0
|
and result_tn.item() == 0
|
||||||
), f"Rank {backend.rank}: expected int array [0], got {result_tn}"
|
), f"Rank {backend.rank}: expected int array [0], got {result_tn}"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.mpi
|
@pytest.mark.mpi
|
||||||
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
||||||
@@ -217,6 +220,7 @@ def test_eval_nccl(nqubits: int, dtype="complex128"):
|
|||||||
and result_tn_cp.item() == 0
|
and result_tn_cp.item() == 0
|
||||||
), f"Rank {backend.rank}: result_tn_cp should be scalar/array with 0, got {result_tn_cp}"
|
), f"Rank {backend.rank}: result_tn_cp should be scalar/array with 0, got {result_tn_cp}"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gpu
|
@pytest.mark.gpu
|
||||||
@pytest.mark.mpi
|
@pytest.mark.mpi
|
||||||
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
@pytest.mark.parametrize("nqubits", [1, 2, 5, 7, 10])
|
||||||
|
|||||||
Reference in New Issue
Block a user