Class GateMatrices

java.lang.Object
com.quantum4j.core.gates.GateMatrices

public final class GateMatrices extends Object
Pre-computed matrix representations for standard quantum gates. This class contains unitary matrices for: - Single-qubit gates - Parametric rotation gates - 2-qubit gates (CNOT, CZ, SWAP, ISWAP, CH) - 3-qubit CCX (Toffoli) NOTE: CNOT HAS BEEN FIXED to match Quantum4J's TwoQubitGate.apply() qubit-bit ordering (control=first argument, target=second).
  • Field Details

    • X

      public static final Complex[][] X
    • Y

      public static final Complex[][] Y
    • Z

      public static final Complex[][] Z
    • H

      public static final Complex[][] H
    • S

      public static final Complex[][] S
    • T

      public static final Complex[][] T
    • CNOT

      public static final Complex[][] CNOT
    • CZ

      public static final Complex[][] CZ
    • SWAP

      public static final Complex[][] SWAP
    • ISWAP

      public static final Complex[][] ISWAP
    • CH

      public static final Complex[][] CH
    • CCX

      public static final Complex[][] CCX
  • Method Details

    • RX

      public static Complex[][] RX(double theta)
    • RY

      public static Complex[][] RY(double theta)
    • RZ

      public static Complex[][] RZ(double theta)