Empirical/QM: Multi-qubit gates (Toffoli, Fredkin) #
Category: 3-Local (promotion-ready to 2-Framework on demand).
Universal classical reversible logic via Toffoli (CCNOT) and Fredkin
(CSWAP) gates on three qubits. Both are 8×8 real symmetric permutation
matrices — Hermitian and involutive, hence unitary. Each qmG_hermitian
(Gᴴ = G) combines with the involutive qmG_mul_self to give the unitarity
qmG_unitary (Gᴴ * G = 1), now proved for both gates.
Contents #
qmToffoli(CCNOT): flips qubit 2 iff qubits 0 and 1 are both 1; Hermitian, unitary.qmFredkin(CSWAP): swaps qubits 1 and 2 iff qubit 0 is 1; Hermitian, unitary.
Basis order: |000⟩, |001⟩, ..., |111⟩ = Fin 8.
Function-based matrix definitions (the !! notation fails to
propagate ℂ elaboration cleanly for 8×8 sparse permutations).
Toffoli (CCNOT) gate on Fin 8. Permutes |110⟩ ↔ |111⟩,
acts as identity elsewhere. Basis order: bit 0 high, bit 2 low, so
|110⟩ = Fin 6 and |111⟩ = Fin 7.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Toffoli is Hermitian (real symmetric {0,1} permutation matrix): Toffoliᴴ = Toffoli.
Toffoli is unitary: Toffoliᴴ * Toffoli = 1 (Hermitian + involutive).
Fredkin is Hermitian (real symmetric {0,1} permutation matrix): Fredkinᴴ = Fredkin.
Fredkin is unitary: Fredkinᴴ * Fredkin = 1 (Hermitian + involutive).