Skip to content

Commit

Permalink
fix: remove openqasm reserved names in tests (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
yitchen-tim authored Jul 1, 2024
1 parent 99bad32 commit 16b3298
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/providers/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,13 @@ def test_parameter_expression(self):
"""Tests ParameterExpression translation."""
qiskit_circuit = QuantumCircuit(1)
v = ParameterVector("v", 2)
qiskit_circuit.rx(Parameter("a") + 2 * Parameter("b"), 0)
qiskit_circuit.rx(Parameter("angle_1") + 2 * Parameter("angle_2"), 0)
qiskit_circuit.ry(v[0] - 2 * v[1], 0)
braket_circuit = to_braket(qiskit_circuit)

expected_braket_circuit = (
Circuit()
.rx(0, FreeParameter("a") + 2 * FreeParameter("b"))
.rx(0, FreeParameter("angle_1") + 2 * FreeParameter("angle_2"))
.ry(0, FreeParameter("v_0") - 2 * FreeParameter("v_1"))
)
assert braket_circuit == expected_braket_circuit
Expand Down Expand Up @@ -548,7 +548,11 @@ def test_all_standard_gates(self):
# pytest.mark.parametrize is incompatible with TestCase
param_sets = [
[0.1, 0.2, 0.3],
[FreeParameter("a"), FreeParameter("b"), FreeParameter("c")],
[
FreeParameter("angle_1"),
FreeParameter("angle_2"),
FreeParameter("angle_3"),
],
]

for gate_name in gate_set:
Expand Down

0 comments on commit 16b3298

Please sign in to comment.