From 7b3ebf3ffab8e442e0c87d60c003d46cc664b227 Mon Sep 17 00:00:00 2001 From: Nagji Date: Wed, 26 Jun 2024 12:02:05 -0700 Subject: [PATCH] fix: Revert default simulator versions and dependent round_trip tests --- setup.py | 3 +- .../braket/circuits/test_circuit.py | 29 ------------------- tox.ini | 2 +- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/setup.py b/setup.py index ca5b0f943..43d2c52ad 100644 --- a/setup.py +++ b/setup.py @@ -28,8 +28,7 @@ package_dir={"": "src"}, install_requires=[ "amazon-braket-schemas>=1.21.3", - "amazon-braket-default-simulator @ \ - git+https://github.com/Altanali/amazon-braket-default-simulator-python.git@main", + "amazon-braket-default-simulator>=1.21.4", "oqpy~=0.3.5", "backoff", "boltons", diff --git a/test/unit_tests/braket/circuits/test_circuit.py b/test/unit_tests/braket/circuits/test_circuit.py index a126768ee..71eecd1f1 100644 --- a/test/unit_tests/braket/circuits/test_circuit.py +++ b/test/unit_tests/braket/circuits/test_circuit.py @@ -891,35 +891,6 @@ def test_from_ir_round_trip_transformation(): assert circuit.to_ir("OPENQASM") == Circuit.from_ir(ir).to_ir("OPENQASM") -def test_from_ir_round_trip_transformation_with_targeted_measurements(): - circuit = ( - Circuit() - .h(0) - .cnot(0, 1) - .add_instruction(Instruction(Measure(index=2), 1)) - .add_instruction(Instruction(Measure(index=1), 2)) - .add_instruction(Instruction(Measure(index=0), 0)) - ) - ir = OpenQasmProgram( - source="\n".join( - [ - "OPENQASM 3.0;", - "bit[3] b;", - "qubit[3] q;", - "h q[0];", - "cnot q[0], q[1];", - "b[2] = measure q[1];", - "b[1] = measure q[2];", - "b[0] = measure q[0];", - ] - ), - inputs={}, - ) - - assert Circuit.from_ir(ir) == Circuit.from_ir(circuit.to_ir("OPENQASM")) - assert circuit.to_ir("OPENQASM") == Circuit.from_ir(ir).to_ir("OPENQASM") - - def test_add_with_instruction_with_default(cnot_instr): circ = Circuit().add(cnot_instr) assert circ == Circuit().add_instruction(cnot_instr) diff --git a/tox.ini b/tox.ini index 39ef86dd5..95c862106 100644 --- a/tox.ini +++ b/tox.ini @@ -130,4 +130,4 @@ commands = deps = # If you need to test on a certain branch, add @ after .git git+https://github.com/amazon-braket/amazon-braket-schemas-python.git - git+https://github.com/Altanali/amazon-braket-default-simulator-python.git@main + git+https://github.com/amazon-braket/amazon-braket-default-simulator-python.git