Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yaelbh committed Feb 6, 2025
1 parent aa29a71 commit b50a77a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qiskit_ibm_runtime/transpiler/passes/basis/fold_rzz_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,19 @@ def convert_to_rzz_valid_pub(

for idx, row in enumerate(projected_arr):
angle = float(param_exp.bind(dict(zip(param_exp.parameters, row))))
#rint("angle:", angle, angle % pi, pi / 2)

if (angle + pi / 2) % (2 * pi) >= pi:
rz_angles[idx] = pi
else:
rz_angles[idx] = 0

if angle % pi >= pi / 2:
rx_angles[idx] = 0
else:
rx_angles[idx] = pi
else:
rx_angles[idx] = 0

#print("rx angles:", rx_angles)
rzz_count += 1
param_prefix = f"rzz_{rzz_count}_"
qubits = instruction.qubits
Expand Down

0 comments on commit b50a77a

Please sign in to comment.