Skip to content

Commit

Permalink
fix: Revert default simulator versions and dependent round_trip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ltnln committed Jun 26, 2024
1 parent e39941d commit 7b3ebf3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
29 changes: 0 additions & 29 deletions test/unit_tests/braket/circuits/test_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ commands =
deps =
# If you need to test on a certain branch, add @<branch-name> 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

0 comments on commit 7b3ebf3

Please sign in to comment.