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 rzz parameter validation on Qiskit 1.1 #1986

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions qiskit_ibm_runtime/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ def _is_isa_circuit_helper(circuit: QuantumCircuit, target: Target, qubit_map: D
# errors (beyond pi/2 does not trigger an error down the stack, only may become less
# accurate).
if name == "rzz" and (
instruction.params[0] < 0.0 or instruction.params[0] > 1.001 * np.pi / 2
yaelbh marked this conversation as resolved.
Show resolved Hide resolved
instruction.operation.params[0] < 0.0
or instruction.operation.params[0] > 1.001 * np.pi / 2
):
return f"The instruction {name} on qubits {qargs} is supported only for angles in the \
range [0, pi/2], but an angle of {instruction.params[0]} has been provided."
range [0, pi/2], but an angle of {instruction.operation.params[0]} has been provided."

if isinstance(operation, ControlFlowOp):
for sub_circ in operation.blocks:
Expand Down