Named gates #
The standard named gates as Components (concrete instances built on the
Core gate framework LeanPool.LeanQuantumAlg.Gate). Raw matrices are first stated as
HilbertOperators, then bundled into Gates with their unitarity proofs.
Pauli, Hadamard, and CNOT #
Raw Hadamard operator H = (1/sqrt 2) [[1, 1], [1, -1]].
Equations
- QuantumAlg.Gate.HOp = QuantumAlg.PureState.invSqrt2 • !![1, 1; 1, -1]
Instances For
The Hadamard gate.
Equations
Instances For
The Pauli-X (NOT) gate, as the basis permutation |0> ↔ |1>.
Equations
Instances For
Raw Pauli-Y operator [[0, -i], [i, 0]].
Equations
- QuantumAlg.Gate.YOp = !![0, -Complex.I; Complex.I, 0]
Instances For
The Pauli-Y gate.
Equations
Instances For
The Pauli-Z gate.
Equations
Instances For
The controlled-NOT gate on two qubits, control = qubit 0.
Equations
Instances For
H |0> = |+>.
H |1> = |->.
CNOT permutes the basis by swapping |10> ↔ |11> (indices 2 ↔ 3).
X |0> = |1>.
X |1> = |0>.
Z |0> = |0>.
Raw-vector form of Z |1> = -|1>.
H |+> = |0>.
H |-> = |1>.
Rotation gates (QSP / QNN conventions) #
Raw processing rotation e^{i phi Z}.
Equations
- QuantumAlg.rotZOp phi = !![Complex.exp (↑phi * Complex.I), 0; 0, Complex.exp (-(↑phi * Complex.I))]
Instances For
The processing rotation e^{i phi Z}.
Equations
- QuantumAlg.rotZ phi = QuantumAlg.Gate.ofUnitary (QuantumAlg.rotZOp phi) ⋯
Instances For
Raw standard R_Y(theta).
Equations
Instances For
The standard R_Y(theta) gate.
Equations
- QuantumAlg.rotY theta = QuantumAlg.Gate.ofUnitary (QuantumAlg.rotYOp theta) ⋯
Instances For
The standard R_Z(phi) = e^{-i phi Z/2}.
Equations
- QuantumAlg.rotZStd phi = QuantumAlg.rotZ (-(phi / 2))