Documentation

CsdLean4.Empirical.QM.Gates.MultiQubit

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 #

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 (CSWAP) gate on Fin 8. Permutes |101⟩|110⟩, acts as identity elsewhere.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Fredkin is Hermitian (real symmetric {0,1} permutation matrix): Fredkinᴴ = Fredkin.

      Fredkin is unitary: Fredkinᴴ * Fredkin = 1 (Hermitian + involutive).