Skip to content

Commit

Permalink
Add Ryy to Rxx equivalence
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelishman committed Jun 20, 2023
1 parent 09d340f commit 6431dd7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qiskit/circuit/library/standard_gates/equivalence_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,20 @@
ryy_to_rzz.append(inst, qargs, cargs)
_sel.add_equivalence(RYYGate(theta), ryy_to_rzz)

# RYY to RXX
q = QuantumRegister(2, "q")
theta = Parameter("theta")
ryy_to_rxx = QuantumCircuit(q)
for inst, qargs, cargs in [
(SdgGate(), [q[0]], []),
(SdgGate(), [q[1]], []),
(RXXGate(theta), [q[0], q[1]], []),
(SGate(), [q[0]], []),
(SGate(), [q[1]], []),
]:
ryy_to_rxx.append(inst, qargs, cargs)
_sel.add_equivalence(RYYGate(theta), ryy_to_rxx)

# RZGate
# global phase: -ϴ/2
# ┌───────┐ ┌───────┐
Expand Down

0 comments on commit 6431dd7

Please sign in to comment.