Sequential decoder effects and independently sampled finite codebooks
DefinitionGaoQuantumUnion_DecodingThe rejection prefix at position is , with empty prefix . The accepting Kraus operator is , and its effect is . A codebook is a function , including repeated codewords; its independent sampling weight is . Its average decoding error uses the uniform average over the message positions and the trace of each accepting branch. The coding theorem explicitly requires , avoiding the total-definition value at zero.
import Definitions.Def_GaoQuantumUnion_Model
import Definitions.Def_WildeQIT_Gentle_averageState
noncomputable section
open Matrix WildeQIT
open scoped MatrixOrder ComplexOrder ComplexConjugate
set_option autoImplicit false
namespace GaoQuantumUnion
variable {ι J : Type} [Fintype ι] [DecidableEq ι]
def rejectPrefix {M : ℕ} (Q : Fin M → Matrix ι ι ℂ) (m : Fin M) : Matrix ι ι ℂ :=
((List.ofFn (fun i => 1-Q i)).take m.val).foldl (fun K P => P*K) 1
def decoderK {M : ℕ} (P : Matrix ι ι ℂ) (Q : Fin M → Matrix ι ι ℂ) (m : Fin M) : Matrix ι ι ℂ :=
Q m*rejectPrefix Q m*P
def decoderEffect {M : ℕ} (P : Matrix ι ι ℂ) (Q : Fin M → Matrix ι ι ℂ) (m : Fin M) : Matrix ι ι ℂ :=
(decoderK P Q m)ᴴ*decoderK P Q m
def codeWeight [Fintype J] {M : ℕ} (p : FinDist J) (C : Fin M → J) : ℝ :=
∏ m, p.prob (C m)
def codeError {M : ℕ} (ρ : J → Matrix ι ι ℂ) (P : Matrix ι ι ℂ)
(Q : J → Matrix ι ι ℂ) (C : Fin M → J) : ℝ :=
1-(1/(M : ℝ))*∑ m, ((decoderK P (Q ∘ C) m)*ρ (C m)*(decoderK P (Q ∘ C) m)ᴴ).trace.re
end GaoQuantumUnion
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent blind read-back agent)
GaoQuantumUnion.rejectPrefix: For every finite type equipped with decidable equality, every natural number , every family , and every index , this defines a matrix by starting with the identity matrix and, for in increasing order, replacing the current matrix by . Thus and, for , , with the factor having the largest index on the left; is excluded. The entries of the matrices are unrestricted. The case has no permitted index and hence no value at an index. The finite type may be empty, in which case the identity and every matrix here are the unique empty matrix.
GaoQuantumUnion.decoderK: For every finite type equipped with decidable equality, every natural number , every matrix , every family , and every index , this defines , where and for . In particular , and the ordered product for is . Neither nor any is subject to a Hermitian, projector, or positivity hypothesis. If , there is no index ; if is empty, the output is the unique empty matrix.
GaoQuantumUnion.decoderEffect: For every finite type equipped with decidable equality, every natural number , every matrix , every family , and every index , this defines , where denotes conjugate transpose, , , and for . Consequently the complete factor order is , with both strings of rejection factors absent when , giving . The inputs and are unrestricted complex matrices. For there is no permitted ; for empty the output is the unique empty matrix.
GaoQuantumUnion.codeWeight: For every finite type , every natural number , every distribution consisting of a real-valued function on with for every and , and every function , this defines the real number . The product includes one factor for every index, including repeated factors if takes the same value more than once; no injectivity condition is imposed on . When , the product is empty and equals . If any factor is zero for , the product equals zero. If is empty, no distribution satisfies the required normalization, even when . No matrix index type or decidable-equality assumption on is an argument of this definition.
GaoQuantumUnion.codeError: For every finite type equipped with decidable equality, every type (with no finiteness or decidable-equality assumption), every natural number , every family , every matrix , every family , and every function , this defines the real number , where is cast to a real number, , , and for . Thus each summand has matrix factors in the order , where and both rejection strings are empty for . The trace is the sum of the diagonal entries indexed by , and its real part is taken after the matrix multiplication and trace. All matrices are unrestricted; no density-operator, normalization, Hermitian, projector, or positivity hypothesis is imposed, and may repeat values. Real division is total, with : when , the sum is empty, equals zero, and this definition gives . If is empty, all traces vanish and the result is for every permitted input. If is empty and , no function exists; if is empty and , its empty function exists and the result is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.