The tensor product over blocks #
Category: 1-Mathlib (CSD-free; staged for upstream). BACKLOG #86, step (a) of its route: the layer a concatenated code needs, where a register is a family of blocks and an operator is one operator per block.
blockKron M is the matrix on the label space β → L whose entry at (k, l) is the product
∏_b (M b) (k b) (l b). It is the β-fold tensor product written on function labels instead of
through Matrix.kron, which keeps the label space of a k-fold concatenation literally recursive
(Fin 7 → Fin 7 → ⋯ → Fin 2) instead of a tower of reindexings.
blockKron_one, ★blockKron_mul,blockKron_conjTranspose,blockKron_smul— the algebra. Multiplicativity and the expansion below are bothFintype.prod_sum: a product of sums over the blocks is a sum over the functions choosing one summand per block;- ★
blockKron_sum— multilinearity: expanding each block over a finite family expands the tensor over the function space of choices. This is what lets an arbitrary operator per block be written in a fixed finite family (Matrix.matrix_eq_sum_singleat the leaves); - ★★
blockKron_replace_eq_gateOf_mul— error propagation: a fault at one block is a single-block error after the ideal tensor; - ★
blockKron_single_eq_gateOf— the family with one slot filled and the identity elsewhere is #83's single-qubit gategateOf b₀ Gon a qubit register, which ties the layer back to the controlled-gate vocabulary.
Honest scope #
⚠️ No Matrix.kron bridge: blockKron is not identified with an iterated Kronecker product here.
Nothing in the concatenation needs that identification, and stating it would need the reindexing
(β → L) ≃ β × L-style equivalences this layer exists to avoid.
⚠️ Unitarity of blockKron M for unitary blocks is not proved here (it follows from
blockKron_mul and blockKron_conjTranspose where it is wanted).
Source #
M. Nielsen, I. Chuang, Quantum Computation and Quantum Information §10.6.1 (concatenated codes);
QuantumInfo/ControlledSingle.lean (#84), QuantumInfo/ControlledGate.lean (#83);
specs/BACKLOG.md #86; specs/steane-plan.md; specs/future-work.md.
★ The tensor over blocks is multiplicative: a product of sums over the blocks is a sum over
the functions choosing one summand per block (Fintype.prod_sum).
★ Multilinearity: expanding every block over a finite family expands the tensor over the functions choosing one index per block.
The same expansion with coefficients, the form the concatenation uses: an arbitrary operator per block is a combination of a fixed finite family.
★★ Error propagation through a transversal gadget: replacing the factor at one block by
E * A b₀ — a fault at that location, acting after the ideal single-qubit gate — is the ideal
gadget followed by the single-block error E. One faulty location of a transversal gadget is a
weight-one error, which is the reason transversal gadgets are fault-tolerant at all.