Package com.quantum4j.core.gates
Interface Gate
- All Known Implementing Classes:
CCXGate,CHGate,CNOTGate,CZGate,ISWAPGate,RXGate,RYGate,RZGate,SingleQubitGate,StandardGates.CCXGate,StandardGates.CHGate,StandardGates.CNOTGate,StandardGates.CZGate,StandardGates.HGate,StandardGates.ISWAPGate,StandardGates.RXGate,StandardGates.RYGate,StandardGates.RZGate,StandardGates.SGate,StandardGates.SWAPGate,StandardGates.TGate,StandardGates.U1Gate,StandardGates.U2Gate,StandardGates.U3Gate,StandardGates.XGate,StandardGates.YGate,StandardGates.ZGate,SWAPGate,ThreeQubitGate,TwoQubitGate
public interface Gate
Interface representing a quantum gate.
A gate is a unitary operation that transforms quantum states. Every gate has a name and an arity (number of qubits it acts upon).
-
Method Summary
-
Method Details
-
name
String name()Get the name of this gate (e.g., "H", "X", "CNOT").- Returns:
- the gate name
-
arity
int arity()Get the arity (number of qubits) this gate acts upon.- Returns:
- 1 for single-qubit gates, 2 for two-qubit gates, etc.
-