The explicit five-qubit code and six-qubit perfect state
OpenQAlgorithms.Papers.Independent.Intakenext100.P95.five_qubit_code_and_six_qubit_perfect_stateLet be the joint eigenspace of , in that physical wire order. Let be the product of their four spectral projectors, set , and set . The encoder is isometric with range , which is an code of distance exactly three. Every normalized codeword has maximally mixed marginals on at most two physical qubits. Moreover,
is a normalized six-qubit perfect state. It is fixed with eigenvalue by the four code checks extended by identity, by , and by , and every marginal on at most three qubits is maximally mixed. This names the source’s explicit example and retains stabilizer signs.
The four generators commute and their ordered product is . The all- and all- operators act on the displayed logical basis as Pauli and , respectively. On every vector in , the operator and each of its five cyclic shifts have the same action as . Thus the signed weight-three representatives in (A.4) are included explicitly.
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P95
namespace QAlgorithms.Papers.Independent.Intakenext100.P95
open scoped Matrix ComplexConjugate
noncomputable section
local instance (p : Prop) : Decidable p := Classical.propDecidable p
/-- PDF pp.43–45, Appendix A.1: the named five-qubit code has distance three,
its small codeword marginals are uniform, and its explicit normalized purification
is the six-qubit perfect state fixed by the six signed +1 checks in (A.5).
The logical X/Z actions and all cyclic signed weight-three X representatives from
(A.3)–(A.4) are included. Printed: |0tilde>|0> + |1tilde>|1>.
Changed: divide this tensor by sqrt(2) to obtain sixQubitState.
Why: the two codewords are orthonormal, so the printed tensor has squared norm 2;
this only chooses the unit-state representative of the source tensor up to scale. -/
theorem five_qubit_code_and_six_qubit_perfect_state :
fiveEncoderᴴ * fiveEncoder = 1 ∧
LinearMap.range (Matrix.toEuclideanLin fiveEncoder) = fiveCode ∧
IsQCode 5 1 3 fiveCode ∧ HasDistance fiveCode 3 ∧
(∀ i j : Fin 4, fiveGenerator i * fiveGenerator j = fiveGenerator j * fiveGenerator i) ∧
fiveGenerator 0 * fiveGenerator 1 * fiveGenerator 2 * fiveGenerator 3 =
pauliOps ![.Z, .Z, .X, .I, .X] ∧
act (pauliOps (fun _ : Fin 5 => Stabilizer.Pauli.X)) fiveLogicalZero = fiveLogicalOne ∧
act (pauliOps (fun _ : Fin 5 => Stabilizer.Pauli.X)) fiveLogicalOne = fiveLogicalZero ∧
act (pauliOps (fun _ : Fin 5 => Stabilizer.Pauli.Z)) fiveLogicalZero = fiveLogicalZero ∧
act (pauliOps (fun _ : Fin 5 => Stabilizer.Pauli.Z)) fiveLogicalOne = -fiveLogicalOne ∧
(∀ r : Fin 5, ∀ psi ∈ fiveCode,
act (-pauliOps (fun q : Fin 5 =>
(![.Z, .X, .Z, .I, .I] : Fin 5 → Stabilizer.Pauli) (q + r))) psi =
act (pauliOps (fun _ : Fin 5 => Stabilizer.Pauli.X)) psi) ∧
(∀ psi : EuclideanSpace ℂ (Qubits 5), psi ∈ fiveCode → IsState psi →
∀ A : Finset (Fin 5), A.card ≤ 2 →
subsetDensity A (pureDensity psi) = ((Fintype.card (SubsetConfig Bool A) : ℂ)⁻¹ • 1)) ∧
IsState sixQubitState ∧ IsPerfect sixQubitState ∧
(∀ j, act (sixGenerator j) sixQubitState = sixQubitState) ∧
(∀ A : Finset (Fin 6), A.card ≤ 3 →
subsetDensity A (pureDensity sixQubitState) = ((Fintype.card (SubsetConfig Bool A) : ℂ)⁻¹ • 1)) := by sorry
end
end QAlgorithms.Papers.Independent.Intakenext100.P95
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
Write for the tensor product specified by a string of the usual Pauli matrices , with no additional phase, and define
Set , with the factors in increasing index order, , , and let be the matrix with columns , indexed respectively by the Boolean values false and true. The declaration asserts all of the following conjunction: , the range of is , and ; every complex matrix acting on at most two qubits is detectable on , and there exists a matrix acting on at most three qubits that is not detectable on . Here a matrix is detectable on precisely when there exists such that for every with . Acting on at most qubits means that there exist a set of at most positions, a natural number , an injection with image contained in , and a complex matrix on -bit configurations such that when agree outside the image of , and otherwise; is allowed. The four matrices commute pairwise, and
For every and every , without a normalization requirement, , where . Every unit vector also satisfies, for every subset of the five positions with ,
where are Boolean configurations on , and is their merged configuration. Finally, define the six-qubit vector by . Then , , and is perfect in the following explicit sense: its number of positions is even, and for every subset with , the matrix , whose rows are configurations on the complement and columns are configurations on , satisfies for some real . The vector is fixed by each of the six matrices , with the additional identity factor on position . For every subset of the six positions with , its reduced matrix , defined by the same sum over complementary configurations, equals . Both reduced-matrix assertions include the empty subset.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.