Package com.quantum4j.core.gates
Class CNOTGate
java.lang.Object
com.quantum4j.core.gates.TwoQubitGate
com.quantum4j.core.gates.CNOTGate
- All Implemented Interfaces:
Gate
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⟩.
-
Field Summary
Fields inherited from class com.quantum4j.core.gates.TwoQubitGate
matrix -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.quantum4j.core.gates.TwoQubitGate
apply, arity
-
Constructor Details
-
CNOTGate
public CNOTGate()
-
-
Method Details
-
name
Description copied from interface:GateGet the name of this gate (e.g., "H", "X", "CNOT").- Returns:
- the gate name
-