diff --git a/qiskit/circuit/library/standard_gates/equivalence_library.py b/qiskit/circuit/library/standard_gates/equivalence_library.py index 51f1688a0e7e..88afa3e54dac 100644 --- a/qiskit/circuit/library/standard_gates/equivalence_library.py +++ b/qiskit/circuit/library/standard_gates/equivalence_library.py @@ -869,29 +869,16 @@ def _cnot_rxx_decompose(plus_ry: bool = True, plus_rxx: bool = True): # « └──────────┘ └──────┘└─────────┘ └────┘└──────────┘ # q = QuantumRegister(2, "q") -def_swap_ecr = QuantumCircuit(q, global_phase=pi / 2) -def_swap_ecr.rz(pi / 2, 0) -def_swap_ecr.sx(0) -def_swap_ecr.rz(pi / 2, 1) -def_swap_ecr.sx(1) -def_swap_ecr.rz(-pi, 1) -def_swap_ecr.ecr(0, 1) -def_swap_ecr.rz(pi / 2, 1) -def_swap_ecr.sx(1) -def_swap_ecr.rz(pi / 2, 0) -def_swap_ecr.sx(0) -def_swap_ecr.rz(-pi, 0) -def_swap_ecr.ecr(0, 1) -def_swap_ecr.rz(pi / 2, 0) -def_swap_ecr.sx(0) +def_swap_ecr = QuantumCircuit(q) def_swap_ecr.rz(-pi / 2, 0) +def_swap_ecr.sx(1) def_swap_ecr.ecr(0, 1) -def_swap_ecr.rz(-pi / 2, 0) +def_swap_ecr.rz(-pi / 2, 1) def_swap_ecr.sx(0) +def_swap_ecr.ecr(1, 0) def_swap_ecr.rz(-pi / 2, 0) -def_swap_ecr.rz(pi / 2, 1) def_swap_ecr.sx(1) -def_swap_ecr.rz(-pi / 2, 1) +def_swap_ecr.ecr(0, 1) _sel.add_equivalence(SwapGate(), def_swap_ecr) # SwapGate