Class CNOTGate

java.lang.Object
com.quantum4j.core.gates.TwoQubitGate
com.quantum4j.core.gates.CNOTGate
All Implemented Interfaces:
Gate

public final class CNOTGate extends TwoQubitGate
CNOT (Controlled-NOT) quantum gate.

A fundamental two-qubit gate where the target qubit is flipped (X gate) if the control qubit is |1⟩. It is the quantum equivalent of the classical XOR operation. The gate matrix implements: |00⟩ → |00⟩, |10⟩ → |11⟩, |01⟩ → |01⟩, |11⟩ → |10⟩.

  • Constructor Details

    • CNOTGate

      public CNOTGate()
  • Method Details

    • name

      public String name()
      Description copied from interface: Gate
      Get the name of this gate (e.g., "H", "X", "CNOT").
      Returns:
      the gate name