Skip to content

Commit

Permalink
locally things work so maybe this will fix it?
Browse files Browse the repository at this point in the history
  • Loading branch information
Coull committed Aug 15, 2024
1 parent 412f1bd commit ad4b55f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,42 +442,42 @@ def test_simulator_fails_samples_0_shots():
@pytest.mark.parametrize(
"result_types,expected",
[
(
[
"""
#pragma braket result expectation x(q[1])
#pragma braket result variance x(q[1])
""",
[0, 1],
),
(
],
[
"""
#pragma braket result expectation x all
#pragma braket result variance x(q[1])
""",
[[0, 0], 1],
),
(
],
[
"""
#pragma braket result expectation hermitian([[0, 1], [1, 0]]) q[1]
#pragma braket result variance hermitian([[0, 1], [1, 0]]) q[1]
""",
[0, 1],
),
(
],
[
"""
#pragma braket result expectation x(q[0]) @ hermitian([[0, 1], [1, 0]]) q[1]
#pragma braket result expectation x(q[0]) @ hermitian([[0, 1], [1, 0]]) q[1]
""",
[1, 1],
),
(
],
[
"""
#pragma braket result variance x(q[1])
#pragma braket result expectation x all
#pragma braket result expectation x(q[0]) @ hermitian([[0, 1], [1, 0]]) q[1]
""",
[1, [0, 0], 1],
),
],
],
)
def test_simulator_valid_observables_qasm(result_types, expected, caplog):
Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/braket/simulator_v2/test_pennylane.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_valid_local_device_for_noise_model(backend, noise_model):

@pytest.mark.parametrize(
"backend, device_name",
[("braket_sv_v2", "StateVectorSimulatorV2")],
[["braket_sv_v2", "StateVectorSimulatorV2"]],
)
def test_invalid_local_device_for_noise_model(backend, device_name, noise_model):
with pytest.raises(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def test_simulator_run_result_types_shots_basis_rotation_gates(caplog):
@pytest.mark.parametrize(
"ir, qubit_count",
[
(
[
OpenQASMProgram(
source="""
qubit[2] q;
Expand All @@ -705,7 +705,7 @@ def test_simulator_run_result_types_shots_basis_rotation_gates(caplog):
"""
),
None,
),
],
],
)
def test_simulator_run_observable_references_invalid_qubit(ir, qubit_count):
Expand Down

0 comments on commit ad4b55f

Please sign in to comment.