Definitions for Polar codes for classical-quantum channels
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P14The objects the formalized statements of Polar codes for classical-quantum channels (arXiv:1109.2591) are stated in. Each was checked against the paper by a blind read-back and a moderator.
Bit: PDF p.3: the two classical letters, with addition equal to XOR.OutputCoefficients: PDF p.3: unrestricted coefficients in a complete orthonormal basis.IsBinaryCqChannel: PDF p.3: binary cq channels; only this validity predicate is an input hypothesis. All synthesized channels are computed from the input channel.basisKet: PDF p.3: the basis vector at i in the completed Hilbert space.coefficientOperator: PDF p.3: bounded operators reconstructed from their coefficients. The unique matching operator is chosen whenever it exists. The zero fallback is only for arrays that are not bounded operators; all density, tensor, mixture, and split kernels occurring in the statements have a matching operator.cqOperatorCoefficients: PDF p.3: coefficients of an actual bounded operator.basisTrace: PDF p.3: basis trace, used on trace-class operators and their bounded products. Its series is absolutely convergent on every use in a theorem.positiveBoundedRoot: PDF p.3: the unique positive bounded square root, chosen by its defining identity. On positive bounded operators a positive root exists and is unique; only operators outside that domain can reach the zero fallback. This avoids requiring a functional-calculus instance as an additional channel hypothesis.densitySqrt: PDF p.3: positive square root of the reconstructed density operator.cqRootFidelity: PDF p.3: ROOT fidelity Tr sqrt(sqrt(rho_0) rho_1 sqrt(rho_0)), on the full completed output Hilbert space.squaredCqFidelity: PDF p.3: the paper's SQUARED fidelity F(W).uniformMixture: PDF p.3: uniform output mixture, constructed from the two outputs.cqRelativeEntropyBits: PDF p.3: extended Umegaki relative entropy in bits via finite orthogonal compressions. Copied from accepted Dependency50.P13.relativeEntropy and Support50.P44.compressedRelativeEntropy. The generalized trace correction inside qRelEntropy is essential on subnormalized compressions; the support guard retains infinity. No difference of infinite entropies is taken.symmetricInformation: PDF p.3: intrinsic uniform-prior Holevo information, in bits. Extended values are retained; on every channel it is at most one. This avoids infinity minus infinity when individual output entropies are infinite.PolarWire: PDF p.4: N=2^n wires, indexed from zero.reverseWire: PDF p.4: the numerical n-bit reversal, B_N; the modulo makes this a total Fin-valued definition without assuming a separately supplied permutation.polarKernel: PDF p.4: the two-by-two polar kernel F, with row-vector convention.polarMatrix: PDF p.4, (5): G_N=B_N F^(tensor n), F=[[1,0],[1,1]], acting on ROW vectors. A tensor-kernel entry is one exactly when every 1 column digit is a 1 row digit. Bit reversal is applied to the row index before that test.polarEncode: PDF pp.4–5, (5),(10): the actual binary linear encoding map uG_N.EncodingGate: PDF pp.1–2,4: primitive classical XOR and swap gates, each charged once.EncodingGate.apply: PDF p.4: gate interpretation, with both old values read before a swap.runEncoder: PDF pp.1–2,4: cost is the length of the interpreted gate list.toggleWire: PDF p.4: flip address digit k, keeping the other wire-address digits.recursivePolarEncoder: PDF pp.1–2,4: explicit circuit for B_N followed by the n butterfly layers. Each bit-reversal pair is swapped once, and each zero-address-digit wire receives one XOR from its partner in that layer.combinedOutput: PDF p.4: combined channel W_N from (5).filledWord: PDF p.4, (8): fill known history and current bit. Dummy coordinates of v are ignored where history or the current bit has already fixed the value.futureAverage: PDF p.4, (8): uniform average over future bits. Averaging a full dummy word gives precisely the same average: each unused coordinate cancels a factor of two in the denominator. No frozen future bits are conditioned on.SplitLabel: PDF p.4, (6)–(7): previous bits are an actual classical output register.splitChannel: PDF p.4, (6)–(8): the synthesized split channel, including its uniform classical history flag.channelMinus: PDF p.7, (14): the computed bad channel.channelPlus: PDF p.7, (15): the computed good channel, with the uniformly random previous bit retained as an output flag.childIndex: PDF pp.7–8: children 2i and 2i+1 in zero-based indexing.parentLabels: PDF p.7, (16)–(17): pull a child label back to the two old histories. The histories are (odd XOR even, even), and the physical outputs are the first and second N-use blocks. The newly exposed odd bit is omitted from this map.plusLabel: PDF p.7: the retained new odd-bit flag in the plus recursion.negativeCompactProjection: PDF p.5: negative spectral subspace of a compact self-adjoint difference of square roots. The closed span of all strictly negative eigenvectors includes all negative spectrum for this compact operator. Its orthogonal complement assigns the entire zero eigenspace to outcome zero.bitProjector: PDF p.5, (11)–(12): prescribed root-density bit test on the full output.previousBits: PDF p.5: restriction to the already decoded history.decodingBranch: PDF pp.5–6: correct-branch Kraus operator, in chronological measurement order. Frozen positions apply identity; the other tests use previous outcomes. All branches of the adaptive decoder are specified by allowing arbitrary u.decodingEffect: PDF p.6, (13): the actual palindromic POVM effect K-adjoint K. For a fixed frozen vector its branches are indexed by information messages.decodingSuccess: PDF p.6, (13): probability of decoding the whole transmitted word u correctly, as the actual POVM trace pairing.InformationWord: PDF pp.5–6: information messages and frozen vectors have their actual coordinate domains, including the unique empty message when A is empty.Frozen: PDF pp.5–6: frozen coordinates, known to the receiver.cosetWord: PDF p.5, (10): assemble the message and the specified frozen vector.frozenError: PDF p.6: block error averaged uniformly over information messages.ensembleError: PDF p.6: further uniform average over all frozen vectors, not maximum error.PolarRule: PDF p.6, Definition 5: minimal-fidelity information set at rate R; all choices among ties are allowed.polarDecay: PDF pp.5–6,9: reference decay, with real beta and N=2^n.branchIndex: PDF p.8: index of a branch after n fair bits, using i-1 in the source's one-based indexing. Array entry B 0 represents the source's B_1.fidelityProcess: PDF p.8: root-fidelity process of the constructed channel tree.informationProcess: PDF p.8: information process. The lemma explicitly concludes finiteness of the extended information before using its real conversion.bitFiltration: PDF p.8: exactly the sigma algebra of the first n bits; time zero is trivial. No extra bit is exposed at time n.PureOutputs: PDF pp.9–10: pure outputs on an arbitrary physical Hilbert space.BinaryBlockCode: PDF pp.9–10: unrestricted finite-message classical code for N uses of the fixed binary-alphabet cq channel. The decoder is an actual bounded POVM; message count is positive even for zero rate.BinaryBlockCode.error: PDF pp.9–10: uniform-message error of an arbitrary physical block code.BinaryAchievableRate: PDF pp.9–10: operational achievability, independently of the information formula, at all sufficiently large positive blocklengths.binaryOperationalCapacity: PDF pp.9–10: full classical capacity of the fixed binary-input channel, not a bosonic capacity optimized over arbitrary input alphabets or energies.PolarAchieves: PDF pp.6,9–10: polar attainment at a fixed rate by actual ensemble-error families. One family is chosen before beta, with all tied polar choices allowed by PolarRule. Theorem 6 separately quantifies every such family.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_RealLabelRegisters
import Definitions.Def_QAlgorithms_Defs_SDP
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P13
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Renew46_P44
/-!
Wilde and Guha, arXiv:1109.2591v3. All citations are PDF pages.
Pinned accepted Dependency50.P13/P33 and Renew46.P44 definitions are imported
under the independent-paper workflow override. Exact density, compression, and
memoryless-output definitions are reused without redeclaration. Other
coefficient-coordinate interfaces below retain arbitrary output dimension. Completed output Hilbert
spaces are l2 of arbitrary basis labels. There is no finite-dimensional cutoff.
Compilation and independent moderation are pending the batch handoff.
-/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intakethird100.P14
open Filter MeasureTheory
open scoped ENNReal NNReal ComplexOrder BigOperators
open QAlgorithms.RealRegisters (Hilbert)
open QAlgorithms.Papers.Independent.Dependency50.P33 (IsDensity)
open QAlgorithms.Papers.Independent.Dependency50.P13 (compression)
open QAlgorithms.Papers.Independent.Renew46.P44 (wordOutput)
attribute [local instance] Classical.propDecidable Classical.decEq
/-- PDF p.3: the two classical letters, with addition equal to XOR. -/
abbrev Bit := ZMod 2
/-- PDF p.3: unrestricted coefficients in a complete orthonormal basis. -/
abbrev OutputCoefficients (I : Type) := Matrix I I ℂ
/-- PDF p.3: binary cq channels; only this validity predicate is an input
hypothesis. All synthesized channels are computed from the input channel. -/
def IsBinaryCqChannel {I : Type} (W : Bit → OutputCoefficients I) : Prop := ∀ b, IsDensity (W b)
/-- PDF p.3: the basis vector at i in the completed Hilbert space. -/
def basisKet {I : Type} (i : I) : Hilbert I := lp.single 2 i 1
/-- PDF p.3: bounded operators reconstructed from their coefficients. The
unique matching operator is chosen whenever it exists. The zero fallback is
only for arrays that are not bounded operators; all density, tensor, mixture,
and split kernels occurring in the statements have a matching operator. -/
def coefficientOperator {I : Type} (X : OutputCoefficients I) : Hilbert I →L[ℂ] Hilbert I :=
if h : ∃ T : Hilbert I →L[ℂ] Hilbert I, ∀ i j, T (basisKet j) i = X i j then
h.choose
else 0
/-- PDF p.3: coefficients of an actual bounded operator. -/
def cqOperatorCoefficients {I : Type} (T : Hilbert I →L[ℂ] Hilbert I) : OutputCoefficients I :=
fun i j => T (basisKet j) i
/-- PDF p.3: basis trace, used on trace-class operators and their bounded
products. Its series is absolutely convergent on every use in a theorem. -/
def basisTrace {I : Type} (T : Hilbert I →L[ℂ] Hilbert I) : ℂ :=
∑' i, T (basisKet i) i
/-- PDF p.3: the unique positive bounded square root, chosen by its defining
identity. On positive bounded operators a positive root exists and is unique;
only operators outside that domain can reach the zero fallback. This avoids
requiring a functional-calculus instance as an additional channel hypothesis. -/
def positiveBoundedRoot {I : Type} (T : Hilbert I →L[ℂ] Hilbert I) :
Hilbert I →L[ℂ] Hilbert I :=
if h : ∃ S : Hilbert I →L[ℂ] Hilbert I, S.IsPositive ∧ S.comp S = T then
h.choose
else 0
/-- PDF p.3: positive square root of the reconstructed density operator. -/
def densitySqrt {I : Type} (X : OutputCoefficients I) : Hilbert I →L[ℂ] Hilbert I :=
positiveBoundedRoot (coefficientOperator X)
/-- PDF p.3: ROOT fidelity Tr sqrt(sqrt(rho_0) rho_1 sqrt(rho_0)),
on the full completed output Hilbert space. -/
def cqRootFidelity {I : Type} (W : Bit → OutputCoefficients I) : ℝ :=
(basisTrace (positiveBoundedRoot
((densitySqrt (W 0)).comp ((coefficientOperator (W 1)).comp (densitySqrt (W 0)))))).re
/-- PDF p.3: the paper's SQUARED fidelity F(W). -/
def squaredCqFidelity {I : Type} (W : Bit → OutputCoefficients I) : ℝ := (cqRootFidelity W) ^ 2
/-- PDF p.3: uniform output mixture, constructed from the two outputs. -/
def uniformMixture {I : Type} (W : Bit → OutputCoefficients I) : OutputCoefficients I :=
(1 / 2 : ℂ) • (W 0 + W 1)
/-- PDF p.3: extended Umegaki relative entropy in bits via finite orthogonal
compressions. Copied from accepted Dependency50.P13.relativeEntropy and
Support50.P44.compressedRelativeEntropy. The generalized trace correction
inside qRelEntropy is essential on subnormalized compressions; the support
guard retains infinity. No difference of infinite entropies is taken. -/
def cqRelativeEntropyBits {I : Type} (X Y : OutputCoefficients I) : ℝ≥0∞ :=
⨆ n : ℕ, ⨆ v : {v : Fin n → Hilbert I // Orthonormal ℂ v},
if LinearMap.ker (compression v.val (coefficientOperator Y)).mulVecLin ≤
LinearMap.ker (compression v.val (coefficientOperator X)).mulVecLin then
ENNReal.ofReal (QAlgorithms.qRelEntropy
(compression v.val (coefficientOperator X)) (compression v.val (coefficientOperator Y)) / Real.log 2)
else ⊤
/-- PDF p.3: intrinsic uniform-prior Holevo information, in bits. Extended
values are retained; on every channel it is at most one. This avoids infinity
minus infinity when individual output entropies are infinite. -/
def symmetricInformation {I : Type} (W : Bit → OutputCoefficients I) : ℝ≥0∞ :=
(cqRelativeEntropyBits (W 0) (uniformMixture W) +
cqRelativeEntropyBits (W 1) (uniformMixture W)) / 2
/-- PDF p.4: N=2^n wires, indexed from zero. -/
abbrev PolarWire (n : ℕ) := Fin (2 ^ n)
/-- PDF p.4: the numerical n-bit reversal, B_N; the modulo makes this a total
Fin-valued definition without assuming a separately supplied permutation. -/
def reverseWire (n : ℕ) (i : PolarWire n) : PolarWire n :=
⟨(∑ k : Fin n, if i.val.testBit k.val then 2 ^ (n - 1 - k.val) else 0) % 2 ^ n,
Nat.mod_lt _ (pow_pos (by decide) _)⟩
/-- PDF p.4: the two-by-two polar kernel F, with row-vector convention. -/
def polarKernel : Matrix Bit Bit Bit := fun r c => if c = 0 then 1 else r
/-- PDF p.4, (5): G_N=B_N F^(tensor n), F=[[1,0],[1,1]], acting on ROW
vectors. A tensor-kernel entry is one exactly when every 1 column digit is a
1 row digit. Bit reversal is applied to the row index before that test. -/
def polarMatrix (n : ℕ) : Matrix (PolarWire n) (PolarWire n) Bit :=
fun r c => ∏ k : Fin n,
polarKernel (if (reverseWire n r).val.testBit k.val then 1 else 0)
(if c.val.testBit k.val then 1 else 0)
/-- PDF pp.4–5, (5),(10): the actual binary linear encoding map uG_N. -/
def polarEncode (n : ℕ) (u : PolarWire n → Bit) : PolarWire n → Bit :=
fun c => ∑ r, u r * polarMatrix n r c
/-- PDF pp.1–2,4: primitive classical XOR and swap gates, each charged once. -/
inductive EncodingGate (n : ℕ) where
| xor (source target : PolarWire n)
| swap (a b : PolarWire n)
/-- PDF p.4: gate interpretation, with both old values read before a swap. -/
def EncodingGate.apply {n : ℕ} (g : EncodingGate n) (u : PolarWire n → Bit) :
PolarWire n → Bit :=
match g with
| .xor s t => Function.update u t (u t + u s)
| .swap a b => Function.update (Function.update u a (u b)) b (u a)
/-- PDF pp.1–2,4: cost is the length of the interpreted gate list. -/
def runEncoder {n : ℕ} (gates : List (EncodingGate n)) (u : PolarWire n → Bit) :
PolarWire n → Bit := gates.foldl (fun v g => g.apply v) u
/-- PDF p.4: flip address digit k, keeping the other wire-address digits. -/
def toggleWire (n : ℕ) (k : Fin n) (i : PolarWire n) : PolarWire n :=
⟨(Nat.xor i.val (2 ^ k.val)) % 2 ^ n, Nat.mod_lt _ (pow_pos (by decide) _)⟩
/-- PDF pp.1–2,4: explicit circuit for B_N followed by the n butterfly layers.
Each bit-reversal pair is swapped once, and each zero-address-digit wire
receives one XOR from its partner in that layer. -/
def recursivePolarEncoder (n : ℕ) : List (EncodingGate n) :=
((Finset.univ.filter (fun i : PolarWire n => i.val < (reverseWire n i).val)).toList.map
(fun i => EncodingGate.swap i (reverseWire n i))) ++
(List.finRange n).flatMap (fun k =>
((Finset.univ.filter (fun i : PolarWire n => ¬ i.val.testBit k.val)).toList.map
(fun i => EncodingGate.xor (toggleWire n k i) i)))
/-- PDF p.4: combined channel W_N from (5). -/
def combinedOutput {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (u : PolarWire n → Bit) :
OutputCoefficients (PolarWire n → I) := wordOutput W (polarEncode n u)
/-- PDF p.4, (8): fill known history and current bit. Dummy coordinates of v
are ignored where history or the current bit has already fixed the value. -/
def filledWord {n : ℕ} (i : PolarWire n) (h : Fin i.val → Bit) (b : Bit)
(v : PolarWire n → Bit) : PolarWire n → Bit :=
fun j => if hj : j.val < i.val then h ⟨j.val, hj⟩ else if j = i then b else v j
/-- PDF p.4, (8): uniform average over future bits. Averaging a full dummy
word gives precisely the same average: each unused coordinate cancels a factor
of two in the denominator. No frozen future bits are conditioned on. -/
def futureAverage {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (i : PolarWire n)
(h : Fin i.val → Bit) (b : Bit) : OutputCoefficients (PolarWire n → I) :=
((Fintype.card (PolarWire n → Bit) : ℂ)⁻¹) •
∑ v : PolarWire n → Bit, combinedOutput W n (filledWord i h b v)
/-- PDF p.4, (6)–(7): previous bits are an actual classical output register. -/
abbrev SplitLabel (I : Type) (n : ℕ) (i : PolarWire n) :=
(Fin i.val → Bit) × (PolarWire n → I)
/-- PDF p.4, (6)–(8): the synthesized split channel, including its uniform
classical history flag. -/
def splitChannel {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (i : PolarWire n) :
Bit → OutputCoefficients (SplitLabel I n i) :=
fun b p q => if p.1 = q.1 then
((2 : ℂ) ^ i.val)⁻¹ * futureAverage W n i p.1 b p.2 q.2 else 0
/-- PDF p.7, (14): the computed bad channel. -/
def channelMinus {I : Type} (W : Bit → OutputCoefficients I) : Bit → OutputCoefficients (I × I) :=
fun b p q => (1 / 2 : ℂ) * ∑ c : Bit, W (b + c) p.1 q.1 * W c p.2 q.2
/-- PDF p.7, (15): the computed good channel, with the uniformly random
previous bit retained as an output flag. -/
def channelPlus {I : Type} (W : Bit → OutputCoefficients I) : Bit → OutputCoefficients (Bit × (I × I)) :=
fun c p q => if p.1 = q.1 then
(1 / 2 : ℂ) * W (p.1 + c) p.2.1 q.2.1 * W c p.2.2 q.2.2 else 0
/-- PDF pp.7–8: children 2i and 2i+1 in zero-based indexing. -/
def childIndex {n : ℕ} (i : PolarWire n) (good : Bool) : PolarWire (n + 1) :=
⟨2 * i.val + (if good then 1 else 0), by
have hi := i.isLt
simp only [pow_succ]
split <;> omega⟩
/-- PDF p.7, (16)–(17): pull a child label back to the two old histories.
The histories are (odd XOR even, even), and the physical outputs are the first
and second N-use blocks. The newly exposed odd bit is omitted from this map. -/
def parentLabels {I : Type} {n : ℕ} (i : PolarWire n) (good : Bool)
(p : SplitLabel I (n + 1) (childIndex i good)) :
SplitLabel I n i × SplitLabel I n i :=
(((fun k => p.1 ⟨2 * k.val, by
have hk := k.isLt
simp only [childIndex]
split <;> omega⟩ +
p.1 ⟨2 * k.val + 1, by
have hk := k.isLt
simp only [childIndex]
split <;> omega⟩),
fun j => p.2 ⟨j.val, by have hj := j.isLt; simp only [pow_succ]; omega⟩),
((fun k => p.1 ⟨2 * k.val + 1, by
have hk := k.isLt
simp only [childIndex]
split <;> omega⟩),
fun j => p.2 ⟨2 ^ n + j.val, by
have hj := j.isLt; simp only [pow_succ]; omega⟩))
/-- PDF p.7: the retained new odd-bit flag in the plus recursion. -/
def plusLabel {I : Type} {n : ℕ} (i : PolarWire n)
(p : SplitLabel I (n + 1) (childIndex i true)) :
Bit × (SplitLabel I n i × SplitLabel I n i) :=
(p.1 ⟨2 * i.val, by simp [childIndex]⟩, parentLabels i true p)
/-- PDF p.5: negative spectral subspace of a compact self-adjoint difference
of square roots. The closed span of all strictly negative eigenvectors includes
all negative spectrum for this compact operator. Its orthogonal complement
assigns the entire zero eigenspace to outcome zero. -/
def negativeCompactProjection {J : Type} (T : Hilbert J →L[ℂ] Hilbert J) :
Hilbert J →L[ℂ] Hilbert J :=
((Submodule.span ℂ {v : Hilbert J | ∃ a : ℝ, a < 0 ∧ T v = (a : ℂ) • v}).topologicalClosure).starProjection
/-- PDF p.5, (11)–(12): prescribed root-density bit test on the full output. -/
def bitProjector {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (i : PolarWire n)
(h : Fin i.val → Bit) (b : Bit) :
Hilbert (PolarWire n → I) →L[ℂ] Hilbert (PolarWire n → I) :=
let P := negativeCompactProjection
(densitySqrt (futureAverage W n i h 0) - densitySqrt (futureAverage W n i h 1))
if b = 0 then 1 - P else P
/-- PDF p.5: restriction to the already decoded history. -/
def previousBits {n : ℕ} (i : PolarWire n) (u : PolarWire n → Bit) : Fin i.val → Bit :=
fun k => u ⟨k.val, lt_trans k.isLt i.isLt⟩
/-- PDF pp.5–6: correct-branch Kraus operator, in chronological measurement
order. Frozen positions apply identity; the other tests use previous outcomes.
All branches of the adaptive decoder are specified by allowing arbitrary u. -/
def decodingBranch {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ)
(A : Finset (PolarWire n)) (u : PolarWire n → Bit) :
Hilbert (PolarWire n → I) →L[ℂ] Hilbert (PolarWire n → I) :=
(List.finRange (2 ^ n)).foldl (fun K i =>
(if i ∈ A then bitProjector W n i (previousBits i u) (u i) else 1).comp K) 1
/-- PDF p.6, (13): the actual palindromic POVM effect K-adjoint K.
For a fixed frozen vector its branches are indexed by information messages. -/
def decodingEffect {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ)
(A : Finset (PolarWire n)) (u : PolarWire n → Bit) :
Hilbert (PolarWire n → I) →L[ℂ] Hilbert (PolarWire n → I) :=
let K := decodingBranch W n A u
K.adjoint.comp K
/-- PDF p.6, (13): probability of decoding the whole transmitted word u
correctly, as the actual POVM trace pairing. -/
def decodingSuccess {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ)
(A : Finset (PolarWire n)) (u : PolarWire n → Bit) : ℝ :=
(basisTrace ((decodingEffect W n A u).comp
(coefficientOperator (combinedOutput W n u)))).re
/-- PDF pp.5–6: information messages and frozen vectors have their actual
coordinate domains, including the unique empty message when A is empty. -/
abbrev InformationWord (n : ℕ) (A : Finset (PolarWire n)) := {i : PolarWire n // i ∈ A} → Bit
/-- PDF pp.5–6: frozen coordinates, known to the receiver. -/
abbrev Frozen (n : ℕ) (A : Finset (PolarWire n)) := {i : PolarWire n // i ∉ A} → Bit
/-- PDF p.5, (10): assemble the message and the specified frozen vector. -/
def cosetWord {n : ℕ} {A : Finset (PolarWire n)} (m : InformationWord n A) (f : Frozen n A) :
PolarWire n → Bit := fun i => if hi : i ∈ A then m ⟨i, hi⟩ else f ⟨i, hi⟩
/-- PDF p.6: block error averaged uniformly over information messages. -/
def frozenError {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (A : Finset (PolarWire n))
(f : Frozen n A) : ℝ :=
1 - (∑ m : InformationWord n A, decodingSuccess W n A (cosetWord m f)) /
(Fintype.card (InformationWord n A) : ℝ)
/-- PDF p.6: further uniform average over all frozen vectors, not maximum error. -/
def ensembleError {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (A : Finset (PolarWire n)) : ℝ :=
(∑ f : Frozen n A, frozenError W n A f) / (Fintype.card (Frozen n A) : ℝ)
/-- PDF p.6, Definition 5: minimal-fidelity information set at rate R;
all choices among ties are allowed. -/
def PolarRule {I : Type} (W : Bit → OutputCoefficients I) (n : ℕ) (R : ℝ)
(A : Finset (PolarWire n)) : Prop :=
A.card = ⌊(2 ^ n : ℕ) * R⌋₊ ∧
∀ i ∈ A, ∀ j, j ∉ A →
squaredCqFidelity (splitChannel W n i) ≤ squaredCqFidelity (splitChannel W n j)
/-- PDF pp.5–6,9: reference decay, with real beta and N=2^n. -/
def polarDecay (beta : ℝ) (scale : ℝ) (n : ℕ) : ℝ :=
Real.rpow 2 (-scale * Real.rpow (2 ^ n : ℕ) beta)
/-- PDF p.8: index of a branch after n fair bits, using i-1 in the source's
one-based indexing. Array entry B 0 represents the source's B_1. -/
def branchIndex {Omega : Type} (B : ℕ → Omega → Bool) (n : ℕ) (w : Omega) : PolarWire n :=
⟨(∑ k : Fin n, if B k.val w then 2 ^ (n - 1 - k.val) else 0) % 2 ^ n,
Nat.mod_lt _ (pow_pos (by decide) _)⟩
/-- PDF p.8: root-fidelity process of the constructed channel tree. -/
def fidelityProcess {I Omega : Type} (W : Bit → OutputCoefficients I)
(B : ℕ → Omega → Bool) (n : ℕ) (w : Omega) : ℝ :=
Real.sqrt (squaredCqFidelity (splitChannel W n (branchIndex B n w)))
/-- PDF p.8: information process. The lemma explicitly concludes finiteness
of the extended information before using its real conversion. -/
def informationProcess {I Omega : Type} (W : Bit → OutputCoefficients I)
(B : ℕ → Omega → Bool) (n : ℕ) (w : Omega) : ℝ :=
(symmetricInformation (splitChannel W n (branchIndex B n w))).toReal
/-- PDF p.8: exactly the sigma algebra of the first n bits; time zero is
trivial. No extra bit is exposed at time n. -/
def bitFiltration {Omega : Type} [m : MeasurableSpace Omega]
(B : ℕ → Omega → Bool) (hB : ∀ k, Measurable (B k)) : Filtration ℕ m where
seq n := ⨆ k : Fin n, MeasurableSpace.comap (B k.val) inferInstance
mono' := by
intro n m hnm
refine iSup_le fun k => ?_
exact le_iSup_of_le (⟨k.val, lt_of_lt_of_le k.isLt hnm⟩ : Fin m) le_rfl
le' := by
intro n
exact iSup_le fun k => (hB k.val).comap_le
/-- PDF pp.9–10: pure outputs on an arbitrary physical Hilbert space. -/
def PureOutputs {I : Type} (W : Bit → OutputCoefficients I) : Prop :=
∀ b, ∃ v : Hilbert I, ‖v‖ = 1 ∧ W b = fun i j => v i * star (v j)
/-- PDF pp.9–10: unrestricted finite-message classical code for N uses of
the fixed binary-alphabet cq channel. The decoder is an actual bounded POVM;
message count is positive even for zero rate. -/
structure BinaryBlockCode (I : Type) (N : ℕ) where
messages : ℕ
positive : 0 < messages
encode : Fin messages → Fin N → Bit
decode : Fin messages → Hilbert (Fin N → I) →L[ℂ] Hilbert (Fin N → I)
nonnegative : ∀ m, (decode m).IsPositive
complete : ∑ m, decode m = 1
/-- PDF pp.9–10: uniform-message error of an arbitrary physical block code. -/
def BinaryBlockCode.error {I : Type} {N : ℕ} (C : BinaryBlockCode I N)
(W : Bit → OutputCoefficients I) : ℝ :=
1 - (∑ m, (basisTrace
((C.decode m).comp (coefficientOperator (wordOutput W (C.encode m))))).re) / C.messages
/-- PDF pp.9–10: operational achievability, independently of the information
formula, at all sufficiently large positive blocklengths. -/
def BinaryAchievableRate {I : Type} (W : Bit → OutputCoefficients I) (R : ℝ≥0) : Prop :=
∀ e : ℝ, 0 < e → ∀ d : ℝ, 0 < d → ∃ N0 : ℕ, 0 < N0 ∧
∀ N ≥ N0, ∃ C : BinaryBlockCode I N,
(R : ℝ) - d ≤ Real.logb 2 C.messages / N ∧ C.error W ≤ e
/-- PDF pp.9–10: full classical capacity of the fixed binary-input channel,
not a bosonic capacity optimized over arbitrary input alphabets or energies. -/
def binaryOperationalCapacity {I : Type} (W : Bit → OutputCoefficients I) : ℝ≥0∞ :=
⨆ R : {R : ℝ≥0 // BinaryAchievableRate W R}, (R.val : ℝ≥0∞)
/-- PDF pp.6,9–10: polar attainment at a fixed rate by actual ensemble-error
families. One family is chosen before beta, with all tied polar choices allowed
by PolarRule. Theorem 6 separately quantifies every such family. -/
def PolarAchieves {I : Type} (W : Bit → OutputCoefficients I) (R : ℝ) : Prop :=
∃ A : (n : ℕ) → Finset (PolarWire n), (∀ n, PolarRule W n R (A n)) ∧
∀ beta : ℝ, beta < 1 / 2 →
Asymptotics.IsLittleO atTop (fun n => ensembleError W n (A n)) (polarDecay beta (1 / 2))
/-! Sanity examples test definitions only; all source theorems remain admitted. -/
example {I : Type} (T : Hilbert I →L[ℂ] Hilbert I)
(h : ∃ S : Hilbert I →L[ℂ] Hilbert I, S.IsPositive ∧ S.comp S = T) :
(positiveBoundedRoot T).IsPositive ∧
(positiveBoundedRoot T).comp (positiveBoundedRoot T) = T := by
simpa only [positiveBoundedRoot, dif_pos h] using h.choose_spec
example {I : Type} : ¬ IsDensity (0 : OutputCoefficients I) := by
simp [IsDensity, QAlgorithms.Papers.Independent.Dependency50.P33.IsTraceClass]
example {I : Type} (T : Hilbert I →L[ℂ] Hilbert I) (i j : I) :
cqOperatorCoefficients T i j = T (basisKet j) i := rfl
example {I : Type} (T : Hilbert I →L[ℂ] Hilbert I) :
∀ i j, coefficientOperator (cqOperatorCoefficients T) (basisKet j) i = cqOperatorCoefficients T i j := by
have h : ∃ S : Hilbert I →L[ℂ] Hilbert I,
∀ i j, S (basisKet j) i = cqOperatorCoefficients T i j := ⟨T, fun _ _ => rfl⟩
simp only [coefficientOperator, dif_pos h]
exact h.choose_spec
example {I : Type} : basisTrace (0 : Hilbert I →L[ℂ] Hilbert I) = 0 := by
simp [basisTrace]
example {I : Type} : uniformMixture (fun _ : Bit => (0 : OutputCoefficients I)) = 0 := by
simp [uniformMixture]
example {I : Type} (W : Bit → OutputCoefficients I) : squaredCqFidelity W = (cqRootFidelity W) ^ 2 := rfl
example : polarKernel 0 1 = 0 ∧ polarKernel 1 0 = 1 := by
norm_num [polarKernel]
example : polarMatrix 0 = (fun _ _ => (1 : Bit)) := by
funext r c
simp [polarMatrix]
example {n : ℕ} (u : PolarWire n → Bit) : runEncoder [] u = u := rfl
example {n : ℕ} (a b : PolarWire n) (u : PolarWire n → Bit) :
(EncodingGate.swap a b).apply u a = u b := by
by_cases h : a = b
· subst b; simp [EncodingGate.apply]
· simp [EncodingGate.apply, h]
example {I : Type} (W : Bit → OutputCoefficients I) (x : Fin 0 → Bit) :
wordOutput W x = fun _ _ => 1 := by
funext a b
simp [wordOutput]
example {n : ℕ} (i : PolarWire n)
(h : Fin i.val → Bit) (v : PolarWire n → Bit) (b : Bit) : filledWord i h b v i = b := by
simp [filledWord]
example {I : Type} (W : Bit → OutputCoefficients I) (b : Bit)
(p q : Bit × (I × I)) (hpq : p.1 ≠ q.1) : channelPlus W b p q = 0 := by
simp [channelPlus, hpq]
example {n : ℕ} (A : Finset (PolarWire n)) (m : InformationWord n A) (f : Frozen n A)
(i : PolarWire n) (hi : i ∉ A) : cosetWord m f i = f ⟨i, hi⟩ := by
simp [cosetWord, hi]
example (beta : ℝ) (n : ℕ) : polarDecay beta 0 n = 1 := by
simp [polarDecay]
end QAlgorithms.Papers.Independent.Intakethird100.P14
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P14.BinaryAchievableRate
For any type , any , and any nonnegative real , this proposition means that for every real and every real , there is a natural number such that for every natural there exist , encoding words , and positive bounded operators on summing to the identity, for which
Here is a chosen bounded complex linear operator having coefficient array , if one exists, and zero otherwise; is the coordinate unit vector, and a nonsummable complex sum is assigned zero. Codes may depend on , and their encoding functions need not be injective. No density or countability assumption on or is imposed. The quantifier over block lengths requires codes at every sufficiently large integer length, with no requirement at length zero.
QAlgorithms.Papers.Independent.Intakethird100.P14.BinaryBlockCode.error
For any type , , a block code with messages, binary words , and positive bounded decoding operators on summing to the identity, and any , this defines
For an array , is a chosen bounded complex linear operator with , if such an operator exists, and is zero otherwise; is the coordinate unit vector in . A nonsummable complex sum has value zero. There is no assumption that consists of density arrays, and no assertion here that this real number lies in . The case is included, with the product defining equal to one.
QAlgorithms.Papers.Independent.Intakethird100.P14.BinaryBlockCode
For any type and any , a value of this structure consists of a natural number , an encoding function assigning each message a word , and bounded complex linear operators on , satisfying
Here positivity is positivity of the bounded operator. The encoding function need not be injective. The structure imposes no channel or output-state data, and allows and arbitrary, possibly empty or uncountable, ; for , the word types each have a single element.
QAlgorithms.Papers.Independent.Intakethird100.P14.Bit
denotes the field , whose elements are and .
QAlgorithms.Papers.Independent.Intakethird100.P14.EncodingGate.apply
For every , an instruction of either kind described below, and a word , this defines the updated word. An XOR instruction with source and target replaces coordinate by and leaves all other coordinates unchanged. A swap instruction with indices first replaces coordinate by the original value , then replaces coordinate by the original value . Repeated indices are allowed: XOR with sets that coordinate to , while swap with leaves the word unchanged. These rules also apply when , when the word has one coordinate.
QAlgorithms.Papers.Independent.Intakethird100.P14.EncodingGate
For each , this inductive type has two kinds of elements: an XOR instruction carrying a source and a target in , and a swap instruction carrying two indices in that same set. Neither constructor requires its two indices to be distinct. When , the sole index is , so both kinds of instruction still exist with both indices equal to .
QAlgorithms.Papers.Independent.Intakethird100.P14.Frozen
For every natural number and finite subset of the indices , this denotes the type of all functions from the complement of among those indices to . Thus it assigns one binary value to each index outside and has elements. If contains all indices, it consists of the single empty function. When , there is one available index.
QAlgorithms.Papers.Independent.Intakethird100.P14.InformationWord
For every natural number and finite subset of the indices , this denotes the type of all functions : a word assigning one binary value to each index belonging to . It has elements. In particular, if , it contains exactly the empty function. The case is included, with one available index.
QAlgorithms.Papers.Independent.Intakethird100.P14.IsBinaryCqChannel
For any type and any map , this predicate requires each array , for every , to satisfy all of the following: there exist sequences such that is summable and for every ; for every finite subset and every function , the number has imaginary part zero and nonnegative real part; and the family is summable with sum . No countability or nonemptiness assumption on is supplied; when is empty, the required diagonal sum cannot equal .
QAlgorithms.Papers.Independent.Intakethird100.P14.OutputCoefficients
For any type , is the space of all complex arrays . The index type may be empty or infinite; no boundedness, summability, positivity, or normalization condition is imposed.
QAlgorithms.Papers.Independent.Intakethird100.P14.PolarAchieves
For any type , any , and any real , this proposition asserts the existence, for every , of a subset with , such that every selected index has squared fidelity at most that of every unselected index, and the decoding error defined below is as , for every real , including zero and negative . To specify these quantities, put , let be bit , set , and define over , with . For , write . For index , prefix , and bit , let
For any array , is a chosen bounded operator on the corresponding complex space with coefficients , if one exists, and zero otherwise; is a chosen positive bounded square root of , if one exists, and zero otherwise; and . The squared fidelity used for selection is
For each , let be the orthogonal projection onto the closure of the complex span of all vectors satisfying
For a full word , define when , when , and otherwise. Put . The error in the little- assertion is
Thus the asymptotic condition means that for every and every , eventually . The natural-number floor is zero for negative arguments, and no nonnegativity assumption on , channel-validity assumption on , or countability assumption on is included. The case and all zero-operator fallbacks are included; nonsummable complex sums defining are zero.
QAlgorithms.Papers.Independent.Intakethird100.P14.PolarRule
For any type , arbitrary coefficient matrices indexed by , natural number , real number , and finite subset of the wire indices, this property means
The natural-number floor is zero for a negative argument. The numbers are defined as follows. With if and otherwise, set
where the transform uses arithmetic in , reverses binary digits, and digit indices start at the least significant digit. For a prefix of length , bit , and full word , let use before , at , and after , and put . Define two matrices on the label set
by
For any matrix , let be a chosen bounded operator on the corresponding space realizing its coefficients if one exists, and zero otherwise; for a bounded operator , let be a chosen bounded positive square root if one exists, and zero otherwise. Writing and using standard coordinate vectors , the value being compared is
The complex sum is totalized to zero if it is not summable. No density condition on , countability condition on , or range condition on is assumed. Ties in the comparison are allowed; its quantified part is vacuous when is empty or contains all wires. If , the cardinality condition cannot hold. The case has one wire.
QAlgorithms.Papers.Independent.Intakethird100.P14.PolarWire
For every natural number , this is the finite index type . In particular, when , it contains the single index .
QAlgorithms.Papers.Independent.Intakethird100.P14.PureOutputs
For any type and any function , this proposition means that for each there exists such that and
The vector may depend on ; it is not asserted to be unique. No countability or nonemptiness assumption on is supplied, although the required unit vectors cannot exist when is empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.SplitLabel
For any type , any , and any index , this is an abbreviation for the set of pairs , where is a bit history and is an -valued word. When , the history has a unique empty value; when , the index is necessarily and the -valued word has length one. No finiteness, countability, or nonemptiness assumption is made on .
QAlgorithms.Papers.Independent.Intakethird100.P14.basisKet
For any type and any , this defines the vector whose coordinate at is and whose coordinates at every other index are . Supplying requires an element of ; there is no such argument when is empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.basisTrace
For any type and any bounded complex-linear operator on , this defines the complex number , where is at coordinate and elsewhere. This is the unconditional sum over , with value when the family is not summable; summability is not assumed. For empty , the sum is .
QAlgorithms.Papers.Independent.Intakethird100.P14.binaryOperationalCapacity
For any type and any , this defines an extended nonnegative real number as the supremum of all nonnegative real satisfying the following condition: for every , there exists with such that for every integer there are , words , and positive bounded decoding operators on summing to the identity, such that
Here is a chosen bounded complex linear operator with coefficient array , if such an operator exists, and zero otherwise; is the coordinate unit vector, and a nonsummable complex sum is zero. The supremum is taken in , so it is zero if no rate satisfies the condition and may be infinite. No density, countability, or nonemptiness assumption is imposed.
QAlgorithms.Papers.Independent.Intakethird100.P14.bitFiltration
For any type equipped with a measurable space , and any sequence of functions that are each measurable for and the discrete measurable space on the Booleans, this constructs the filtration
Precisely, is the supremum of the pullback measurable spaces along , for . These measurable spaces increase with and are contained in . In particular, is the trivial measurable space. No probability measure or independence assumptions are included.
QAlgorithms.Papers.Independent.Intakethird100.P14.bitProjector
For any type , any pair of complex matrices indexed by , any , index , history , and bit , this defines a bounded complex-linear operator on as follows. For and , let for , , and for ; using binary digits , set
and define matrices
For each , choose a bounded complex-linear operator whose matrix coefficients in the coordinate basis are , if such an operator exists, and otherwise set . Choose a positive bounded operator satisfying , if one exists, and otherwise set . Let be the orthogonal projection onto the norm-closed complex span of all satisfying for some real . The defined operator is when , and when . No positivity or normalization assumptions are imposed on , so the zero fallbacks are part of the definition. Empty , empty histories at , and are included; for , the matrices reduce to under the identification of length-one words with their entries.
QAlgorithms.Papers.Independent.Intakethird100.P14.branchIndex
For any type , sequence of Boolean-valued functions , natural number , and point , this defines an index in with numerical value
Thus supplies the most significant of the binary digits and the least significant. No measurability or probabilistic assumptions on or are required. For , the sum is empty and the result is the sole index in .
QAlgorithms.Papers.Independent.Intakethird100.P14.channelMinus
For any type and any function assigning a complex matrix indexed by to each bit , this defines a function assigning to a complex matrix indexed by . For row and column , its entry is
where is addition modulo two. No positivity or normalization assumptions are made on , and may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.channelPlus
For any type and any function assigning a complex matrix indexed by to each bit , this defines a function assigning to an input bit a complex matrix indexed by . Its entries are
with bit addition taken modulo two. No positivity or normalization assumptions are imposed on , and may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.childIndex
For every , every index , and every Boolean flag , this defines the index
which lies in . The flag carries no additional hypothesis. The case is included: the parent index is , and the child is or , respectively.
QAlgorithms.Papers.Independent.Intakethird100.P14.coefficientOperator
For any type and any complex array , this defines an operator on as follows: if there exists a bounded complex-linear operator satisfying for every , where has coordinate at and elsewhere, it returns a classically chosen such operator; otherwise it returns the zero operator. The input array is unrestricted, so the zero fallback applies whenever no bounded operator has the prescribed coefficients.
QAlgorithms.Papers.Independent.Intakethird100.P14.combinedOutput
For any type , any function assigning a complex matrix to each bit , any , and any bit word of length , this defines a complex matrix indexed by . To describe its entries, let denote binary digit of a natural number , define
Then, for ,
There is no positivity or normalization assumption on , and may be empty. The case has , empty binary-digit conditions, and .
QAlgorithms.Papers.Independent.Intakethird100.P14.cosetWord
For every natural number , finite subset , assignment , and assignment on the complement within these indices, this defines the full word by
If is empty, the result is on every index; if contains all indices, it is on every index. The definition includes , when the full word has one position.
QAlgorithms.Papers.Independent.Intakethird100.P14.cqOperatorCoefficients
For any type and any bounded complex-linear operator , this defines the complex array with entries for every , where is at coordinate and elsewhere. No positivity or trace condition on is required.
QAlgorithms.Papers.Independent.Intakethird100.P14.cqRelativeEntropyBits
For any type and any complex coefficient arrays , let . For an array , let be a chosen bounded complex-linear operator satisfying for every , if such an operator exists, and let otherwise; here is the coordinate unit vector. The definition takes the supremum over every natural number , including , and every orthonormal family in . For each such family, form the matrices and . Its contribution is if ; otherwise its contribution is the nonnegative part of
where and use the library’s continuous functional calculus. The supremum lies in . No positivity, normalization, trace-class, countability, or nonemptiness assumption is imposed on ; the operator-selection fallback and the total functional-calculus expressions therefore remain part of the definition. The contribution is .
QAlgorithms.Papers.Independent.Intakethird100.P14.cqRootFidelity
For any type and any map , let be a classically chosen bounded complex-linear operator on with coefficients for all , if such an operator exists, and set otherwise; here is the coordinate unit vector. Let be a classically chosen bounded positive square root of , or if none exists, and let be a classically chosen bounded positive square root of , or if none exists. The defined real number is , using the unconditional complex sum, which is if its terms are not summable. No assumption that either output of is a density array is imposed; empty gives value .
QAlgorithms.Papers.Independent.Intakethird100.P14.decodingBranch
For any type , natural number , arbitrary assignment , finite set with , and binary word on these indices, this defines a bounded complex linear operator on . Its construction is as follows. Let be the integer obtained by reversing the binary digits of , and set if and otherwise, for . Define
where the bits are read from the least significant end and the sum defining is in . For a prefix of length and bit , let agree with before , equal at , and agree with after , and define
For a coefficient matrix on any label set, let be a chosen bounded operator with matrix coefficients in the standard basis if such an operator exists, and zero otherwise. For a bounded operator , let be a chosen bounded positive operator satisfying if one exists, and zero otherwise. Let be the orthogonal projection onto the closed complex linear span of all vectors satisfying
Put and define to be the identity if , if and , and if and . The resulting operator is
so the factors are applied in increasing index order. No density or channel condition is assumed on , and need not be finite or countable. If is empty, is the identity. The case has one wire and one factor.
QAlgorithms.Papers.Independent.Intakethird100.P14.decodingEffect
For any type , arbitrary coefficient matrices indexed by , natural number , finite set where , and word , this defines the operator on by the following construction of . With for and for , define the binary transform and coefficient matrices by
where reverses the binary digits and reads the th least significant bit. For each , prefix of length , and bit , let use before , at , and after , and put , the sum running over all -bit words. Let be a chosen bounded operator realizing the coefficients , or zero if none exists, and let be a chosen bounded positive square root of , or zero if none exists. Let project onto the closed complex span of the eigenvectors of with strictly negative real eigenvalues. For , set when , when and , and when and . Then
There are no normalization assumptions on or finiteness or countability assumptions on . For this is the identity; is included and gives .
QAlgorithms.Papers.Independent.Intakethird100.P14.decodingSuccess
For any type , arbitrary matrices indexed by , natural number , finite set of the wire indices, and word , this defines the real number
where is the standard unit coordinate vector in . Here, with if and otherwise,
The map reverses binary digits, the digit indices are counted from the least significant end, and is computed over . For a prefix of length , let equal before , at , and after , and put . For any matrix , is a chosen bounded operator realizing its standard-basis coefficients if one exists, and zero otherwise; is a chosen bounded positive square root of if one exists, and zero otherwise. Let be the orthogonal projection onto the closed complex span of the eigenvectors of having strictly negative real eigenvalues. Using , put if , if and , and if and , and set . The displayed sum is the totalized complex sum, which is zero if the family is not summable. Neither density assumptions on nor a bound between zero and one are part of this definition. The type may be empty, finite, or uncountable, and gives one wire.
QAlgorithms.Papers.Independent.Intakethird100.P14.densitySqrt
For any type and any complex array , first let be a classically chosen bounded complex-linear operator on satisfying for every , if one exists, and let otherwise, where is the coordinate unit vector. This definition then returns a classically chosen bounded positive operator with , if one exists, and returns otherwise. No density, positivity, normalization, or summability hypothesis is required of .
QAlgorithms.Papers.Independent.Intakethird100.P14.ensembleError
For any type , arbitrary matrices indexed by , natural number , and finite subset of the wire indices, this defines the real number
Here
Its ingredients are specified as follows. Put when and otherwise, and set
where uses arithmetic in , reverses binary digits, and reads the th least significant digit. For a prefix of length and bit , let use before , at , and thereafter, and put , averaging over all -bit words. Let be a chosen bounded operator with coefficient matrix if one exists, and zero otherwise; let be a chosen bounded positive square root of if one exists, and zero otherwise. Let project onto the closed complex span of the eigenvectors of with strictly negative real eigenvalues. For , define outside , at selected zero bits, and at selected one bits, and let . The vectors are the standard basis of , and a nonsummable complex family in the displayed sum has totalized sum zero. Both averaging denominators are positive, including when either assignment domain is empty. No density or channel hypothesis on or range bound on the resulting real number is imposed. The case has one wire.
QAlgorithms.Papers.Independent.Intakethird100.P14.fidelityProcess
For arbitrary types , a function , Boolean functions , , and , this defines a real number as follows. Put and
Write for bit of , let , and set , where and . The binary output array , indexed by labels , is
where is computed over . For any coefficient array on a label type , let be a chosen bounded complex linear operator on satisfying , if such an operator exists, and zero otherwise; is the coordinate unit vector. Let be a chosen positive bounded operator satisfying , if one exists, and zero otherwise, and let . The defined value is
The square root is the nonnegative real square root, so this is the absolute value of the displayed real trace. There are no density, countability, measurability, or randomness assumptions on . The case is included: , the branch index is zero, and the products defining are empty products. The complex sum defining has value zero if it is not summable.
QAlgorithms.Papers.Independent.Intakethird100.P14.filledWord
For every , put . Given an index , a history , a bit , and a word , this defines the word by
Thus the coordinates of at indices at most do not affect the result. The history is empty when , and no coordinates from are used when . The case is included: then , , and the resulting word consists solely of .
QAlgorithms.Papers.Independent.Intakethird100.P14.frozenError
For any type , arbitrary matrices indexed by , natural number , finite set with , and fixed assignment , this defines
The number is defined by
To specify its ingredients, let for and otherwise, and define
using arithmetic in , -digit binary reversal, and digit indices counted from the least significant end. For a prefix of length , form by replacing the coordinates before by and coordinate by , retaining thereafter, and put , summing over all -bit words. For any coefficient matrix , is a chosen bounded operator realizing , or zero if none exists; is a chosen bounded positive square root of , or zero if none exists. Let project onto the closed complex span of the eigenvectors of having strictly negative real eigenvalues. With , let be outside , for a selected zero bit, and for a selected one bit, and set . Here is the standard basis vector, and the complex sum defining is zero if it is not summable. The denominator is always positive; for the outer sum has one term. No density assumption on or restriction of this real value to is imposed, and is allowed.
QAlgorithms.Papers.Independent.Intakethird100.P14.futureAverage
For any type , any pair of complex matrices indexed by , with , any , index , history , and bit , this defines a complex matrix indexed by . For each , let for , , and for . Write for binary digit , put
For , the entry is
The sum includes all coordinates of , even though its first coordinates are overwritten. No density-matrix assumptions are imposed on , and may be empty. When , this is the matrix with entries .
QAlgorithms.Papers.Independent.Intakethird100.P14.informationProcess
For arbitrary types , , Boolean functions , , and , put and . Define over , where is bit , , and . Define arrays , with labels , by
For an array on , denotes a chosen bounded operator on with coefficients , if one exists, and zero otherwise. For arrays , define as the supremum over all , including zero, and all orthonormal families , of
where , , , and matrix functions mean continuous functional calculus. With , the defined value is the real conversion of
Real conversion leaves finite values unchanged and sends to zero. No validity, countability, measurability, or probabilistic assumptions are imposed. The case , and the zero-operator fallbacks in , are included.
QAlgorithms.Papers.Independent.Intakethird100.P14.negativeCompactProjection
For any type and any bounded complex-linear operator , this defines the orthogonal projection onto
The closure is in the Hilbert-space norm. Neither compactness nor self-adjointness of is assumed. If there are no nonzero vectors satisfying the displayed condition, the resulting projection is zero. The type may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.parentLabels
For any type , any , any index , and any Boolean flag , put if the flag is true and otherwise. Given a pair , where and , this defines two pairs by
where addition is modulo two. When the flag is true, the last history bit is unused by this map. When , both resulting histories are empty. The case and arbitrary, possibly empty, are included.
QAlgorithms.Papers.Independent.Intakethird100.P14.plusLabel
For any type , any , and any index , an input label is a pair with and . This defines the triple, grouped as one bit and a pair of labels,
where
and bit addition is modulo two. Thus each inner label belongs to . When , the inner histories are empty and the separate output bit is ; this includes , for which . No assumptions are imposed on .
QAlgorithms.Papers.Independent.Intakethird100.P14.polarDecay
For arbitrary real numbers and and every natural number , this defines the real value
where both powers with real exponents are real powers. There are no sign restrictions on or . In particular, at the value is , and for it is for every .
QAlgorithms.Papers.Independent.Intakethird100.P14.polarEncode
For every and every word , this returns the word whose coordinate is , with sums and products in . To specify , write for bit of , counted from the least significant bit, and put ; then is the product over of if , and otherwise. When , the word has one coordinate and is returned unchanged.
QAlgorithms.Papers.Independent.Intakethird100.P14.polarKernel
This is the matrix over , with rows and columns indexed by , whose entry at row and column is if , and otherwise. With row and column order , it is .
QAlgorithms.Papers.Independent.Intakethird100.P14.polarMatrix
For every , this defines a matrix over . For row and column in , let , where is bit of , counted from the least significant bit. The entry is the product, in , over of when , and when . For , the product is empty, so the sole matrix entry is .
QAlgorithms.Papers.Independent.Intakethird100.P14.positiveBoundedRoot
For any type and any bounded complex-linear operator on , this returns a classically chosen bounded positive operator satisfying , if such an operator exists, and returns the zero operator otherwise. Here positivity is positivity as an operator on the complex Hilbert space. No positivity assumption on is imposed.
QAlgorithms.Papers.Independent.Intakethird100.P14.previousBits
For every natural number , let and identify the wire indices with . Given an index and a word , this defines the word of length whose value at is . Thus it retains every bit strictly before , regardless of any choice of information positions. For its domain is empty. The case is included: there is one wire, indexed by , and its preceding word is empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.recursivePolarEncoder
For every , this defines a finite list of instructions on indices . Write for bit of , counted from the least significant bit, and . The list first contains one swap of and for every index satisfying , in the enumeration order obtained by converting that filtered finite set to a list. It then concatenates stages for in increasing order; stage contains, for every index with , an XOR instruction with source and target , again in the enumeration order obtained from the filtered finite set. An XOR instruction adds the source value to the target value in , and a swap exchanges its two values. When , both portions are empty, so the resulting list is empty.
QAlgorithms.Papers.Independent.Intakethird100.P14.reverseWire
For every and every index , this returns the index whose value is
where bit is the least significant bit. Thus the formula reverses the binary digits and explicitly reduces the result modulo . The exponent subtraction is natural-number subtraction; for the displayed summation indices it does not truncate a negative value. When , the sum is empty and the result is .
QAlgorithms.Papers.Independent.Intakethird100.P14.runEncoder
For every , every finite ordered list of instructions, and every word , this returns the result of applying the instructions successively from the beginning of the list to its end, starting with . An XOR instruction from to replaces the current target value by the sum of the current target and source values in ; a swap exchanges the current values at its two indices. Equal source and target are permitted and set that coordinate to ; equal swap indices have no effect. An empty list returns , and is allowed, giving a one-coordinate word.
QAlgorithms.Papers.Independent.Intakethird100.P14.splitChannel
For any type , any function assigning a complex matrix indexed by to each , any , and index , this defines a matrix-valued function of an input bit , with rows and columns indexed by pairs . For a history , let when , when , and when . Define
where subscripts denote binary digits. Its entries are
There are no positivity or normalization hypotheses on , and may be empty. For , the histories are empty and the entries reduce to .
QAlgorithms.Papers.Independent.Intakethird100.P14.squaredCqFidelity
For any type and any map , form by choosing a bounded complex-linear operator on satisfying for every , or taking if no such operator exists, where is the coordinate unit vector. Choose a bounded positive square root of , taking if none exists, and choose a bounded positive square root of , taking if none exists. This defines , where a nonsummable unconditional complex sum is assigned value . No density or normalization assumption is required, and empty gives value .
QAlgorithms.Papers.Independent.Intakethird100.P14.symmetricInformation
For any type and any pair of complex coefficient arrays , indexed by , put . The definition is , with arithmetic in . Here is defined as follows: on , choose for each array a bounded complex-linear operator with coordinate matrix , or use if none exists; for every and every orthonormal family , form and ; take the supremum of when , and otherwise of the nonnegative part of , where and matrix functions use continuous functional calculus. The empty family contributes . There is no assumption that either is a density array, and no countability or nonemptiness assumption on .
QAlgorithms.Papers.Independent.Intakethird100.P14.toggleWire
For every , every , and every , this returns the index with value , where the XOR is bitwise XOR of natural numbers. This toggles bit , counted from the least significant bit, and explicitly reduces modulo . For , there is no possible argument .
QAlgorithms.Papers.Independent.Intakethird100.P14.uniformMixture
For any type and any map , this defines the complex array with entries for every . No positivity, normalization, summability, or nonemptiness assumption is imposed.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.