From b3c9dd3c896646a0c459634fd496d57db0c99399 Mon Sep 17 00:00:00 2001 From: Bram Evert Date: Fri, 28 Jan 2022 16:27:41 -0800 Subject: [PATCH] Update matrices.py Moved native gates to the top of the QUANTUM_GATES dictionary. --- pyquil/simulation/matrices.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyquil/simulation/matrices.py b/pyquil/simulation/matrices.py index 80816a30b..88660532a 100644 --- a/pyquil/simulation/matrices.py +++ b/pyquil/simulation/matrices.py @@ -218,6 +218,12 @@ def BARENCO(alpha: float, phi: float, theta: float) -> np.ndarray: QUANTUM_GATES = { + "RZ": RZ, + "RX": RX, + "RY": RY, + "CZ": CZ, + "XY": XY, + "CPHASE": CPHASE, "I": I, "X": X, "Y": Y, @@ -226,22 +232,16 @@ def BARENCO(alpha: float, phi: float, theta: float) -> np.ndarray: "S": S, "T": T, "PHASE": PHASE, - "RX": RX, - "RY": RY, - "RZ": RZ, "CNOT": CNOT, "CCNOT": CCNOT, "CPHASE00": CPHASE00, "CPHASE01": CPHASE01, "CPHASE10": CPHASE10, - "CPHASE": CPHASE, "SWAP": SWAP, "CSWAP": CSWAP, "ISWAP": ISWAP, "PSWAP": PSWAP, "BARENCO": BARENCO, - "CZ": CZ, - "XY": XY, }