Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove openqasm reserved names in tests #184

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading