Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Polar codes for classical-quantum channels

Definition
QAlgorithms_Papers_Independent_Intakethird100_P14

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The 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.
Definition code
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
Source
Polar codes for classical-quantum channels, arXiv:1109.2591v3, https://arxiv.org/abs/1109.2591v3
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Intakethird100.P14.BinaryAchievableRate

For any type III, any W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, and any nonnegative real RRR, this proposition means that for every real e>0e>0e>0 and every real d>0d>0d>0, there is a natural number N0>0N_0>0N0​>0 such that for every natural N≥N0N\ge N_0N≥N0​ there exist M>0M>0M>0, encoding words cm∈Z2Nc_m\in\mathbb Z_2^Ncm​∈Z2N​, and positive bounded operators DmD_mDm​ on ℓ2(IN;C)\ell^2(I^N;\mathbb C)ℓ2(IN;C) summing to the identity, for which

R−d≤log⁡2MN,1−1M∑m<MRe⁡∑x∈IN′(DmOXmex)x≤e,(Xm)xy=∏t<NW(cm(t))xt,yt.R-d\le\frac{\log_2 M}{N}, \qquad 1-\frac1M\sum_{m<M}\operatorname{Re} \sum'_{x\in I^N}(D_mO_{X_m}e_x)_x\le e, \quad (X_m)_{xy}=\prod_{t<N}W(c_m(t))_{x_t,y_t}.R−d≤Nlog2​M​,1−M1​m<M∑​Rex∈IN∑′​(Dm​OXm​​ex​)x​≤e,(Xm​)xy​=t<N∏​W(cm​(t))xt​,yt​​.

Here OXO_XOX​ is a chosen bounded complex linear operator having coefficient array XXX, if one exists, and zero otherwise; exe_xex​ is the coordinate unit vector, and a nonsummable complex sum is assigned zero. Codes may depend on e,d,Ne,d,Ne,d,N, and their encoding functions need not be injective. No density or countability assumption on WWW or III 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 III, N∈NN\in\mathbb NN∈N, a block code with M>0M>0M>0 messages, binary words cm∈Z2Nc_m\in\mathbb Z_2^Ncm​∈Z2N​, and positive bounded decoding operators DmD_mDm​ on ℓ2(IN;C)\ell^2(I^N;\mathbb C)ℓ2(IN;C) summing to the identity, and any W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, this defines

1−1M∑m=0M−1Re⁡∑x∈IN′(DmOXmex)x,(Xm)xy=∏t=0N−1W(cm(t))xt,yt.1-\frac1M\sum_{m=0}^{M-1} \operatorname{Re}\sum'_{x\in I^N} \bigl(D_m O_{X_m}e_x\bigr)_x, \qquad (X_m)_{xy}=\prod_{t=0}^{N-1}W(c_m(t))_{x_t,y_t}.1−M1​m=0∑M−1​Rex∈IN∑′​(Dm​OXm​​ex​)x​,(Xm​)xy​=t=0∏N−1​W(cm​(t))xt​,yt​​.

For an array XXX, OXO_XOX​ is a chosen bounded complex linear operator with (OXey)x=Xxy(O_Xe_y)_x=X_{xy}(OX​ey​)x​=Xxy​, if such an operator exists, and is zero otherwise; exe_xex​ is the coordinate unit vector in ℓ2(IN;C)\ell^2(I^N;\mathbb C)ℓ2(IN;C). A nonsummable complex sum ∑′\sum'∑′ has value zero. There is no assumption that WWW consists of density arrays, and no assertion here that this real number lies in [0,1][0,1][0,1]. The case N=0N=0N=0 is included, with the product defining XmX_mXm​ equal to one.

QAlgorithms.Papers.Independent.Intakethird100.P14.BinaryBlockCode

For any type III and any N∈NN\in\mathbb NN∈N, a value of this structure consists of a natural number M>0M>0M>0, an encoding function assigning each message m∈{0,…,M−1}m\in\{0,\ldots,M-1\}m∈{0,…,M−1} a word cm∈Z2Nc_m\in\mathbb Z_2^Ncm​∈Z2N​, and bounded complex linear operators DmD_mDm​ on ℓ2(IN;C)\ell^2(I^N;\mathbb C)ℓ2(IN;C), satisfying

Dm≥0for every m,∑m=0M−1Dm=id.D_m\ge0\quad\text{for every }m,\qquad \sum_{m=0}^{M-1}D_m=\mathrm{id}.Dm​≥0for every m,m=0∑M−1​Dm​=id.

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 N=0N=0N=0 and arbitrary, possibly empty or uncountable, III; for N=0N=0N=0, the word types each have a single element.

QAlgorithms.Papers.Independent.Intakethird100.P14.Bit

Bit\mathrm{Bit}Bit denotes the field Z/2Z\mathbb Z/2\mathbb ZZ/2Z, whose elements are 000 and 111.

QAlgorithms.Papers.Independent.Intakethird100.P14.EncodingGate.apply

For every n∈Nn\in\mathbb Nn∈N, an instruction ggg of either kind described below, and a word u:{0,…,2n−1}→Z/2Zu:\{0,\ldots,2^n-1\}\to\mathbb Z/2\mathbb Zu:{0,…,2n−1}→Z/2Z, this defines the updated word. An XOR instruction with source sss and target ttt replaces coordinate ttt by ut+usu_t+u_sut​+us​ and leaves all other coordinates unchanged. A swap instruction with indices a,ba,ba,b first replaces coordinate aaa by the original value ubu_bub​, then replaces coordinate bbb by the original value uau_aua​. Repeated indices are allowed: XOR with s=ts=ts=t sets that coordinate to 000, while swap with a=ba=ba=b leaves the word unchanged. These rules also apply when n=0n=0n=0, when the word has one coordinate.

QAlgorithms.Papers.Independent.Intakethird100.P14.EncodingGate

For each n∈Nn\in\mathbb Nn∈N, this inductive type has two kinds of elements: an XOR instruction carrying a source and a target in {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}, and a swap instruction carrying two indices in that same set. Neither constructor requires its two indices to be distinct. When n=0n=0n=0, the sole index is 000, so both kinds of instruction still exist with both indices equal to 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.Frozen

For every natural number nnn and finite subset AAA of the N=2nN=2^nN=2n indices {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, this denotes the type of all functions from the complement of AAA among those indices to Z/2Z\mathbb Z/2\mathbb ZZ/2Z. Thus it assigns one binary value to each index outside AAA and has 2N−∣A∣2^{N-|A|}2N−∣A∣ elements. If AAA contains all indices, it consists of the single empty function. When n=0n=0n=0, there is one available index.

QAlgorithms.Papers.Independent.Intakethird100.P14.InformationWord

For every natural number nnn and finite subset AAA of the 2n2^n2n indices {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}, this denotes the type of all functions A→Z/2ZA\to\mathbb Z/2\mathbb ZA→Z/2Z: a word assigning one binary value to each index belonging to AAA. It has 2∣A∣2^{|A|}2∣A∣ elements. In particular, if A=∅A=\varnothingA=∅, it contains exactly the empty function. The case n=0n=0n=0 is included, with one available index.

QAlgorithms.Papers.Independent.Intakethird100.P14.IsBinaryCqChannel

For any type III and any map W:Z/2Z→CI×IW:\mathbb Z/2\mathbb Z\to\mathbb C^{I\times I}W:Z/2Z→CI×I, this predicate requires each array X=W(b)X=W(b)X=W(b), for every b∈Z/2Zb\in\mathbb Z/2\mathbb Zb∈Z/2Z, to satisfy all of the following: there exist sequences un,vn∈ℓ2(I;C)u_n,v_n\in\ell^2(I;\mathbb C)un​,vn​∈ℓ2(I;C) such that ∑n∥un∥∥vn∥\sum_n\|u_n\|\|v_n\|∑n​∥un​∥∥vn​∥ is summable and Xij=∑n=0∞un(i)vn(j)‾X_{ij}=\sum_{n=0}^{\infty}u_n(i)\overline{v_n(j)}Xij​=∑n=0∞​un​(i)vn​(j)​ for every i,j∈Ii,j\in Ii,j∈I; for every finite subset s⊆Is\subseteq Is⊆I and every function z:I→Cz:I\to\mathbb Cz:I→C, the number ∑i∈s∑j∈sz(i)‾Xijz(j)\sum_{i\in s}\sum_{j\in s}\overline{z(i)}X_{ij}z(j)∑i∈s​∑j∈s​z(i)​Xij​z(j) has imaginary part zero and nonnegative real part; and the family (Re⁡Xii)i∈I(\operatorname{Re}X_{ii})_{i\in I}(ReXii​)i∈I​ is summable with sum 111. No countability or nonemptiness assumption on III is supplied; when III is empty, the required diagonal sum cannot equal 111.

QAlgorithms.Papers.Independent.Intakethird100.P14.OutputCoefficients

For any type III, OutputCoefficients(I)\mathrm{OutputCoefficients}(I)OutputCoefficients(I) is the space of all complex arrays X=(Xij)i,j∈IX=(X_{ij})_{i,j\in I}X=(Xij​)i,j∈I​. 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 III, any W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, and any real RRR, this proposition asserts the existence, for every n∈Nn\in\mathbb Nn∈N, of a subset An⊆{0,…,2n−1}A_n\subseteq\{0,\ldots,2^n-1\}An​⊆{0,…,2n−1} with ∣An∣=⌊2nR⌋+|A_n|=\lfloor2^nR\rfloor_+∣An​∣=⌊2nR⌋+​, such that every selected index has squared fidelity at most that of every unselected index, and the decoding error defined below is o(2−12(2n)β)o(2^{-\frac12(2^n)^\beta})o(2−21​(2n)β) as n→∞n\to\inftyn→∞, for every real β<12\beta<\tfrac12β<21​, including zero and negative β\betaβ. To specify these quantities, put N=2nN=2^nN=2n, let bk(r)b_k(r)bk​(r) be bit kkk, set rev⁡n(r)=(∑k<nbk(r)2n−1−k) mod N\operatorname{rev}_n(r)=(\sum_{k<n}b_k(r)2^{n-1-k})\bmod Nrevn​(r)=(∑k<n​bk​(r)2n−1−k)modN, and define Grt=∏k<nK(bk(rev⁡n(r)),bk(t))G_{rt}=\prod_{k<n}K(b_k(\operatorname{rev}_n(r)),b_k(t))Grt​=∏k<n​K(bk​(revn​(r)),bk​(t)) over Z2\mathbb Z_2Z2​, with K(a,0)=1, K(a,1)=aK(a,0)=1,\ K(a,1)=aK(a,0)=1, K(a,1)=a. For u∈Z2Nu\in\mathbb Z_2^Nu∈Z2N​, write Xu(x,y)=∏t<NW((uG)t)xt,ytX_u(x,y)=\prod_{t<N}W((uG)_t)_{x_t,y_t}Xu​(x,y)=∏t<N​W((uG)t​)xt​,yt​​. For index i<Ni<Ni<N, prefix h∈Z2ih\in\mathbb Z_2^ih∈Z2i​, and bit bbb, let

Fi(h,b)=2−(N−i−1)∑u∈Z2Nu<i=h, ui=bXu,Vi(b)(h,x),(h′,y)=1{h=h′}2−iFi(h,b)xy.F_i(h,b)=2^{-(N-i-1)} \sum_{\substack{u\in\mathbb Z_2^N\\u_{<i}=h,\ u_i=b}}X_u, \qquad V_i(b)_{(h,x),(h',y)} =\mathbf1_{\{h=h'\}}2^{-i}F_i(h,b)_{xy}.Fi​(h,b)=2−(N−i−1)u∈Z2N​u<i​=h, ui​=b​∑​Xu​,Vi​(b)(h,x),(h′,y)​=1{h=h′}​2−iFi​(h,b)xy​.

For any array XXX, OXO_XOX​ is a chosen bounded operator on the corresponding complex ℓ2\ell^2ℓ2 space with coefficients XXX, if one exists, and zero otherwise; R(T)R(T)R(T) is a chosen positive bounded square root of TTT, if one exists, and zero otherwise; and tr⁡b(T)=∑x′(Tex)x\operatorname{tr}_b(T)=\sum'_x(Te_x)_xtrb​(T)=∑x′​(Tex​)x​. The squared fidelity used for selection is

F(V)=(Re⁡tr⁡bR ⁣(R(OV(0))OV(1)R(OV(0))))2.\mathcal F(V)= \left(\operatorname{Re}\operatorname{tr}_b R\!\left(R(O_{V(0)})O_{V(1)}R(O_{V(0)})\right)\right)^2.F(V)=(Retrb​R(R(OV(0)​)OV(1)​R(OV(0)​)))2.

For each i,hi,hi,h, let Pi(h)P_i(h)Pi​(h) be the orthogonal projection onto the closure of the complex span of all vectors vvv satisfying

(R(OFi(h,0))−R(OFi(h,1)))v=avfor some real a<0.\bigl(R(O_{F_i(h,0)})-R(O_{F_i(h,1)})\bigr)v=av \quad\text{for some real }a<0.(R(OFi​(h,0)​)−R(OFi​(h,1)​))v=avfor some real a<0.

For a full word uuu, define Qi(u)=1−Pi(u<i)Q_i(u)=1-P_i(u_{<i})Qi​(u)=1−Pi​(u<i​) when i∈An, ui=0i\in A_n,\ u_i=0i∈An​, ui​=0, Qi(u)=Pi(u<i)Q_i(u)=P_i(u_{<i})Qi​(u)=Pi​(u<i​) when i∈An, ui=1i\in A_n,\ u_i=1i∈An​, ui​=1, and Qi(u)=1Q_i(u)=1Qi​(u)=1 otherwise. Put Ku=QN−1(u)⋯Q0(u)K_u=Q_{N-1}(u)\cdots Q_0(u)Ku​=QN−1​(u)⋯Q0​(u). The error in the little-ooo assertion is

en=1−2−N∑u∈Z2NRe⁡tr⁡b(Ku∗KuOXu).e_n=1-2^{-N}\sum_{u\in\mathbb Z_2^N} \operatorname{Re}\operatorname{tr}_b(K_u^*K_uO_{X_u}).en​=1−2−Nu∈Z2N​∑​Retrb​(Ku∗​Ku​OXu​​).

Thus the asymptotic condition means that for every β<12\beta<\tfrac12β<21​ and every c>0c>0c>0, eventually ∣en∣≤c 2−12(2n)β|e_n|\le c\,2^{-\frac12(2^n)^\beta}∣en​∣≤c2−21​(2n)β. The natural-number floor ⌊⋅⌋+\lfloor\cdot\rfloor_+⌊⋅⌋+​ is zero for negative arguments, and no nonnegativity assumption on RRR, channel-validity assumption on WWW, or countability assumption on III is included. The case n=0n=0n=0 and all zero-operator fallbacks are included; nonsummable complex sums defining tr⁡b\operatorname{tr}_btrb​ are zero.

QAlgorithms.Papers.Independent.Intakethird100.P14.PolarRule

For any type III, arbitrary coefficient matrices W(0),W(1)W(0),W(1)W(0),W(1) indexed by III, natural number nnn, real number RRR, and finite subset AAA of the N=2nN=2^nN=2n wire indices, this property means

∣A∣=⌊NR⌋Nand∀i∈A ∀j∉A,Fi≤Fj.|A|=\lfloor NR\rfloor_{\mathbb N} \quad\text{and}\quad \forall i\in A\ \forall j\notin A,\quad \mathcal F_i\le\mathcal F_j.∣A∣=⌊NR⌋N​and∀i∈A ∀j∈/A,Fi​≤Fj​.

The natural-number floor is zero for a negative argument. The numbers Fi\mathcal F_iFi​ are defined as follows. With Fa,b=1F_{a,b}=1Fa,b​=1 if b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a otherwise, set

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑rvrGr,c,Γv(x,y)=∏cW(E(v)c)xc,yc,G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_rv_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_cW(E(v)_c)_{x_c,y_c},Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r∑​vr​Gr,c​,Γv​(x,y)=c∏​W(E(v)c​)xc​,yc​​,

where the transform uses arithmetic in Z/2Z\mathbb Z/2\mathbb ZZ/2Z, rev⁡n\operatorname{rev}_nrevn​ reverses nnn binary digits, and digit indices start at the least significant digit. For a prefix hhh of length iii, bit bbb, and full word vvv, let vi,h,bv^{i,h,b}vi,h,b use hhh before iii, bbb at iii, and vvv after iii, and put Vi,h,b=2−N∑vΓvi,h,bV_{i,h,b}=2^{-N}\sum_v\Gamma_{v^{i,h,b}}Vi,h,b​=2−N∑v​Γvi,h,b​. Define two matrices on the label set

Li=({0,…,i−1}→Z/2Z)×({0,…,N−1}→I)L_i=(\{0,\ldots,i-1\}\to\mathbb Z/2\mathbb Z) \times(\{0,\ldots,N-1\}\to I)Li​=({0,…,i−1}→Z/2Z)×({0,…,N−1}→I)

by

Bi(b)(h,x),(h′,y)={2−iVi,h,b(x,y),h=h′,0,h≠h′.B_i(b)_{(h,x),(h',y)} =\begin{cases}2^{-i}V_{i,h,b}(x,y),&h=h',\\0,&h\ne h'.\end{cases}Bi​(b)(h,x),(h′,y)​={2−iVi,h,b​(x,y),0,​h=h′,h=h′.​

For any matrix XXX, let C(X)C(X)C(X) be a chosen bounded operator on the corresponding ℓ2\ell^2ℓ2 space realizing its coefficients if one exists, and zero otherwise; for a bounded operator TTT, let R(T)R(T)R(T) be a chosen bounded positive square root if one exists, and zero otherwise. Writing Si=R(C(Bi(0)))S_i=R(C(B_i(0)))Si​=R(C(Bi​(0))) and using standard coordinate vectors eℓe_\elleℓ​, the value being compared is

Fi=(Re⁡∑ℓ∈Li(R(Si C(Bi(1)) Si)eℓ)ℓ)2.\mathcal F_i= \left( \operatorname{Re}\sum_{\ell\in L_i} \bigl(R(S_i\,C(B_i(1))\,S_i)e_\ell\bigr)_\ell \right)^2.Fi​=(Reℓ∈Li​∑​(R(Si​C(Bi​(1))Si​)eℓ​)ℓ​)2.

The complex sum is totalized to zero if it is not summable. No density condition on WWW, countability condition on III, or range condition on RRR is assumed. Ties in the comparison are allowed; its quantified part is vacuous when AAA is empty or contains all wires. If ⌊NR⌋N>N\lfloor NR\rfloor_{\mathbb N}>N⌊NR⌋N​>N, the cardinality condition cannot hold. The case n=0n=0n=0 has one wire.

QAlgorithms.Papers.Independent.Intakethird100.P14.PolarWire

For every natural number nnn, this is the finite index type {0,1,…,2n−1}\{0,1,\ldots,2^n-1\}{0,1,…,2n−1}. In particular, when n=0n=0n=0, it contains the single index 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.PureOutputs

For any type III and any function W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, this proposition means that for each b∈Z2b\in\mathbb Z_2b∈Z2​ there exists v∈ℓ2(I;C)v\in\ell^2(I;\mathbb C)v∈ℓ2(I;C) such that ∥v∥=1\|v\|=1∥v∥=1 and

W(b)ij=vivj‾(i,j∈I).W(b)_{ij}=v_i\overline{v_j}\qquad(i,j\in I).W(b)ij​=vi​vj​​(i,j∈I).

The vector may depend on bbb; it is not asserted to be unique. No countability or nonemptiness assumption on III is supplied, although the required unit vectors cannot exist when III is empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.SplitLabel

For any type III, any n∈Nn\in\mathbb Nn∈N, and any index 0≤i<2n0\le i<2^n0≤i<2n, this is an abbreviation for the set of pairs (h,a)(h,a)(h,a), where h:{0,…,i−1}→F2h:\{0,\ldots,i-1\}\to\mathbb F_2h:{0,…,i−1}→F2​ is a bit history and a:{0,…,2n−1}→Ia:\{0,\ldots,2^n-1\}\to Ia:{0,…,2n−1}→I is an III-valued word. When i=0i=0i=0, the history has a unique empty value; when n=0n=0n=0, the index is necessarily i=0i=0i=0 and the III-valued word has length one. No finiteness, countability, or nonemptiness assumption is made on III.

QAlgorithms.Papers.Independent.Intakethird100.P14.basisKet

For any type III and any i∈Ii\in Ii∈I, this defines the vector ei∈ℓ2(I;C)e_i\in\ell^2(I;\mathbb C)ei​∈ℓ2(I;C) whose coordinate at iii is 111 and whose coordinates at every other index are 000. Supplying iii requires an element of III; there is no such argument when III is empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.basisTrace

For any type III and any bounded complex-linear operator TTT on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C), this defines the complex number ∑i∈I(Tei)(i)\sum_{i\in I}(Te_i)(i)∑i∈I​(Tei​)(i), where eie_iei​ is 111 at coordinate iii and 000 elsewhere. This is the unconditional sum over III, with value 000 when the family is not summable; summability is not assumed. For empty III, the sum is 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.binaryOperationalCapacity

For any type III and any W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, this defines an extended nonnegative real number as the supremum of all nonnegative real RRR satisfying the following condition: for every e,d>0e,d>0e,d>0, there exists N0∈NN_0\in\mathbb NN0​∈N with N0>0N_0>0N0​>0 such that for every integer N≥N0N\ge N_0N≥N0​ there are M>0M>0M>0, words cm∈Z2Nc_m\in\mathbb Z_2^Ncm​∈Z2N​, and positive bounded decoding operators DmD_mDm​ on ℓ2(IN;C)\ell^2(I^N;\mathbb C)ℓ2(IN;C) summing to the identity, such that

R−d≤log⁡2MN,1−1M∑m<MRe⁡∑x∈IN′(DmOXmex)x≤e,(Xm)xy=∏t<NW(cm(t))xt,yt.R-d\le\frac{\log_2M}{N}, \qquad 1-\frac1M\sum_{m<M}\operatorname{Re} \sum'_{x\in I^N}(D_mO_{X_m}e_x)_x\le e, \qquad (X_m)_{xy}=\prod_{t<N}W(c_m(t))_{x_t,y_t}.R−d≤Nlog2​M​,1−M1​m<M∑​Rex∈IN∑′​(Dm​OXm​​ex​)x​≤e,(Xm​)xy​=t<N∏​W(cm​(t))xt​,yt​​.

Here OXO_XOX​ is a chosen bounded complex linear operator with coefficient array XXX, if such an operator exists, and zero otherwise; exe_xex​ is the coordinate unit vector, and a nonsummable complex sum is zero. The supremum is taken in [0,∞][0,\infty][0,∞], 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 Ω\OmegaΩ equipped with a measurable space mmm, and any sequence of functions Bk:Ω→{false,true}B_k:\Omega\to\{\mathrm{false},\mathrm{true}\}Bk​:Ω→{false,true} that are each measurable for mmm and the discrete measurable space on the Booleans, this constructs the filtration

Fn=σ(B0,…,Bn−1).\mathcal F_n=\sigma(B_0,\ldots,B_{n-1}).Fn​=σ(B0​,…,Bn−1​).

Precisely, Fn\mathcal F_nFn​ is the supremum of the pullback measurable spaces along BkB_kBk​, for 0≤k<n0\le k<n0≤k<n. These measurable spaces increase with nnn and are contained in mmm. In particular, F0\mathcal F_0F0​ is the trivial measurable space. No probability measure or independence assumptions are included.

QAlgorithms.Papers.Independent.Intakethird100.P14.bitProjector

For any type III, any pair of complex matrices WbW_bWb​ indexed by III, any n∈Nn\in\mathbb Nn∈N, index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, history h∈F2ih\in\mathbb F_2^ih∈F2i​, and bit b∈F2b\in\mathbb F_2b∈F2​, this defines a bounded complex-linear operator on H=ℓ2(IN;C)\mathcal H=\ell^2(I^N;\mathbb C)H=ℓ2(IN;C) as follows. For d∈F2d\in\mathbb F_2d∈F2​ and v∈F2Nv\in\mathbb F_2^Nv∈F2N​, let x(d,v)j=hjx(d,v)_j=h_jx(d,v)j​=hj​ for j<ij<ij<i, x(d,v)i=dx(d,v)_i=dx(d,v)i​=d, and x(d,v)j=vjx(d,v)_j=v_jx(d,v)j​=vj​ for j>ij>ij>i; using binary digits rtr_trt​, set

rev⁡n(r)=(∑t=0n−1rt2n−1−t) mod N,En(x)c=∑0≤r<N∀t<n, ct=1⇒(rev⁡n(r))t=1xrin F2,\operatorname{rev}_n(r)= \left(\sum_{t=0}^{n-1}r_t2^{n-1-t}\right)\bmod N,\qquad E_n(x)_c= \sum_{\substack{0\le r<N\\ \forall t<n,\ c_t=1\Rightarrow(\operatorname{rev}_n(r))_t=1}}x_r \quad\text{in }\mathbb F_2,revn​(r)=(t=0∑n−1​rt​2n−1−t)modN,En​(x)c​=0≤r<N∀t<n, ct​=1⇒(revn​(r))t​=1​∑​xr​in F2​,

and define matrices

Ad(a,a′)=12N∑v∈F2N∏c=0N−1WEn(x(d,v))c(ac,ac′)(a,a′∈IN).A_d(a,a')=\frac1{2^N}\sum_{v\in\mathbb F_2^N} \prod_{c=0}^{N-1}W_{E_n(x(d,v))_c}(a_c,a'_c) \qquad(a,a'\in I^N).Ad​(a,a′)=2N1​v∈F2N​∑​c=0∏N−1​WEn​(x(d,v))c​​(ac​,ac′​)(a,a′∈IN).

For each ddd, choose a bounded complex-linear operator TdT_dTd​ whose matrix coefficients in the coordinate basis are AdA_dAd​, if such an operator exists, and otherwise set Td=0T_d=0Td​=0. Choose a positive bounded operator SdS_dSd​ satisfying Sd2=TdS_d^2=T_dSd2​=Td​, if one exists, and otherwise set Sd=0S_d=0Sd​=0. Let PPP be the orthogonal projection onto the norm-closed complex span of all v∈Hv\in\mathcal Hv∈H satisfying (S0−S1)v=av(S_0-S_1)v=av(S0​−S1​)v=av for some real a<0a<0a<0. The defined operator is 1−P1-P1−P when b=0b=0b=0, and PPP when b=1b=1b=1. No positivity or normalization assumptions are imposed on WWW, so the zero fallbacks are part of the definition. Empty III, empty histories at i=0i=0i=0, and n=0n=0n=0 are included; for n=0n=0n=0, the matrices AdA_dAd​ reduce to WdW_dWd​ under the identification of length-one words with their entries.

QAlgorithms.Papers.Independent.Intakethird100.P14.branchIndex

For any type Ω\OmegaΩ, sequence of Boolean-valued functions B:N→(Ω→{false,true})B:\mathbb N\to(\Omega\to\{\mathrm{false},\mathrm{true}\})B:N→(Ω→{false,true}), natural number nnn, and point w∈Ωw\in\Omegaw∈Ω, this defines an index in {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1} with numerical value

(∑k=0n−11{Bk(w)=true} 2n−1−k) mod 2n.\left(\sum_{k=0}^{n-1} \mathbf 1_{\{B_k(w)=\mathrm{true}\}}\,2^{n-1-k}\right)\bmod 2^n.(k=0∑n−1​1{Bk​(w)=true}​2n−1−k)mod2n.

Thus B0(w)B_0(w)B0​(w) supplies the most significant of the nnn binary digits and Bn−1(w)B_{n-1}(w)Bn−1​(w) the least significant. No measurability or probabilistic assumptions on Ω\OmegaΩ or BBB are required. For n=0n=0n=0, the sum is empty and the result is the sole index 000 in {0}\{0\}{0}.

QAlgorithms.Papers.Independent.Intakethird100.P14.channelMinus

For any type III and any function WWW assigning a complex matrix WbW_bWb​ indexed by III to each bit b∈F2b\in\mathbb F_2b∈F2​, this defines a function assigning to bbb a complex matrix indexed by I×II\times II×I. For row (a1,a2)(a_1,a_2)(a1​,a2​) and column (a1′,a2′)(a'_1,a'_2)(a1′​,a2′​), its entry is

Wb−((a1,a2),(a1′,a2′))=12∑c∈F2Wb+c(a1,a1′) Wc(a2,a2′),W^-_b\bigl((a_1,a_2),(a'_1,a'_2)\bigr) =\frac12\sum_{c\in\mathbb F_2} W_{b+c}(a_1,a'_1)\,W_c(a_2,a'_2),Wb−​((a1​,a2​),(a1′​,a2′​))=21​c∈F2​∑​Wb+c​(a1​,a1′​)Wc​(a2​,a2′​),

where b+cb+cb+c is addition modulo two. No positivity or normalization assumptions are made on WWW, and III may be empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.channelPlus

For any type III and any function WWW assigning a complex matrix WbW_bWb​ indexed by III to each bit b∈F2b\in\mathbb F_2b∈F2​, this defines a function assigning to an input bit ccc a complex matrix indexed by F2×(I×I)\mathbb F_2\times(I\times I)F2​×(I×I). Its entries are

Wc+((b,(a1,a2)),(b′,(a1′,a2′)))={12Wb+c(a1,a1′)Wc(a2,a2′),b=b′,0,b≠b′,W^+_c\bigl((b,(a_1,a_2)),(b',(a'_1,a'_2))\bigr)= \begin{cases} \displaystyle\frac12W_{b+c}(a_1,a'_1)W_c(a_2,a'_2),&b=b',\\ 0,&b\ne b', \end{cases}Wc+​((b,(a1​,a2​)),(b′,(a1′​,a2′​)))=⎩⎨⎧​21​Wb+c​(a1​,a1′​)Wc​(a2​,a2′​),0,​b=b′,b=b′,​

with bit addition taken modulo two. No positivity or normalization assumptions are imposed on WWW, and III may be empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.childIndex

For every n∈Nn\in\mathbb Nn∈N, every index 0≤i<2n0\le i<2^n0≤i<2n, and every Boolean flag good\mathrm{good}good, this defines the index

childIndex⁡(i,good)={2i+1,good=true,2i,good=false,\operatorname{childIndex}(i,\mathrm{good})= \begin{cases} 2i+1,&\mathrm{good}=\mathrm{true},\\ 2i,&\mathrm{good}=\mathrm{false}, \end{cases}childIndex(i,good)={2i+1,2i,​good=true,good=false,​

which lies in {0,…,2n+1−1}\{0,\ldots,2^{n+1}-1\}{0,…,2n+1−1}. The flag carries no additional hypothesis. The case n=0n=0n=0 is included: the parent index is 000, and the child is 111 or 000, respectively.

QAlgorithms.Papers.Independent.Intakethird100.P14.coefficientOperator

For any type III and any complex array X=(Xij)i,j∈IX=(X_{ij})_{i,j\in I}X=(Xij​)i,j∈I​, this defines an operator on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C) as follows: if there exists a bounded complex-linear operator TTT satisfying (Tej)(i)=Xij(Te_j)(i)=X_{ij}(Tej​)(i)=Xij​ for every i,j∈Ii,j\in Ii,j∈I, where eje_jej​ has coordinate 111 at jjj and 000 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 III, any function WWW assigning a complex matrix Wb=(Wb(a,a′))a,a′∈IW_b=(W_b(a,a'))_{a,a'\in I}Wb​=(Wb​(a,a′))a,a′∈I​ to each bit b∈F2=Z/2Zb\in\mathbb F_2=\mathbb Z/2\mathbb Zb∈F2​=Z/2Z, any n∈Nn\in\mathbb Nn∈N, and any bit word uuu of length N=2nN=2^nN=2n, this defines a complex matrix indexed by INI^NIN. To describe its entries, let rtr_trt​ denote binary digit ttt of a natural number rrr, define

rev⁡n(r)=(∑t=0n−1rt 2n−1−t) mod N,En(u)c=∑0≤r<N∀t<n, ct=1⇒(rev⁡n(r))t=1urin F2.\operatorname{rev}_n(r)= \left(\sum_{t=0}^{n-1}r_t\,2^{n-1-t}\right)\bmod N, \qquad E_n(u)_c= \sum_{\substack{0\le r<N\\ \forall t<n,\ c_t=1\Rightarrow(\operatorname{rev}_n(r))_t=1}}u_r \quad\text{in }\mathbb F_2.revn​(r)=(t=0∑n−1​rt​2n−1−t)modN,En​(u)c​=0≤r<N∀t<n, ct​=1⇒(revn​(r))t​=1​∑​ur​in F2​.

Then, for a,a′∈INa,a'\in I^Na,a′∈IN,

combinedOutput⁡(W,n,u)a,a′=∏c=0N−1WEn(u)c(ac,ac′).\operatorname{combinedOutput}(W,n,u)_{a,a'} =\prod_{c=0}^{N-1}W_{E_n(u)_c}(a_c,a'_c).combinedOutput(W,n,u)a,a′​=c=0∏N−1​WEn​(u)c​​(ac​,ac′​).

There is no positivity or normalization assumption on WWW, and III may be empty. The case n=0n=0n=0 has N=1N=1N=1, empty binary-digit conditions, and E0(u)=uE_0(u)=uE0​(u)=u.

QAlgorithms.Papers.Independent.Intakethird100.P14.cosetWord

For every natural number nnn, finite subset A⊆{0,…,2n−1}A\subseteq\{0,\ldots,2^n-1\}A⊆{0,…,2n−1}, assignment m:A→Z/2Zm:A\to\mathbb Z/2\mathbb Zm:A→Z/2Z, and assignment f:Ac→Z/2Zf:A^{\mathrm c}\to\mathbb Z/2\mathbb Zf:Ac→Z/2Z on the complement within these indices, this defines the full word u:{0,…,2n−1}→Z/2Zu:\{0,\ldots,2^n-1\}\to\mathbb Z/2\mathbb Zu:{0,…,2n−1}→Z/2Z by

ui={mi,i∈A,fi,i∉A.u_i=\begin{cases}m_i,&i\in A,\\ f_i,&i\notin A.\end{cases}ui​={mi​,fi​,​i∈A,i∈/A.​

If AAA is empty, the result is fff on every index; if AAA contains all indices, it is mmm on every index. The definition includes n=0n=0n=0, when the full word has one position.

QAlgorithms.Papers.Independent.Intakethird100.P14.cqOperatorCoefficients

For any type III and any bounded complex-linear operator T:ℓ2(I;C)→ℓ2(I;C)T:\ell^2(I;\mathbb C)\to\ell^2(I;\mathbb C)T:ℓ2(I;C)→ℓ2(I;C), this defines the complex array with entries Xij=(Tej)(i)X_{ij}=(Te_j)(i)Xij​=(Tej​)(i) for every i,j∈Ii,j\in Ii,j∈I, where eje_jej​ is 111 at coordinate jjj and 000 elsewhere. No positivity or trace condition on TTT is required.

QAlgorithms.Papers.Independent.Intakethird100.P14.cqRelativeEntropyBits

For any type III and any complex coefficient arrays X,Y:I×I→CX,Y:I\times I\to\mathbb CX,Y:I×I→C, let H=ℓ2(I;C)H=\ell^2(I;\mathbb C)H=ℓ2(I;C). For an array ZZZ, let TZ:H→HT_Z:H\to HTZ​:H→H be a chosen bounded complex-linear operator satisfying (TZej)i=Zij(T_Z e_j)_i=Z_{ij}(TZ​ej​)i​=Zij​ for every i,ji,ji,j, if such an operator exists, and let TZ=0T_Z=0TZ​=0 otherwise; here eje_jej​ is the coordinate unit vector. The definition takes the supremum over every natural number nnn, including 000, and every orthonormal family v0,…,vn−1v_0,\ldots,v_{n-1}v0​,…,vn−1​ in HHH. For each such family, form the matrices Aij=⟨vi,TXvj⟩A_{ij}=\langle v_i,T_Xv_j\rangleAij​=⟨vi​,TX​vj​⟩ and Bij=⟨vi,TYvj⟩B_{ij}=\langle v_i,T_Yv_j\rangleBij​=⟨vi​,TY​vj​⟩. Its contribution is +∞+\infty+∞ if ker⁡B⊈ker⁡A\ker B\not\subseteq\ker AkerB⊆kerA; otherwise its contribution is the nonnegative part of

Re⁡tr⁡ ⁣(f(A)−Alog⁡(B)−A+B)log⁡2,f(t)=tlog⁡t,\frac{\operatorname{Re}\operatorname{tr}\!\left(f(A)-A\log(B)-A+B\right)}{\log 2}, \qquad f(t)=t\log t,log2Retr(f(A)−Alog(B)−A+B)​,f(t)=tlogt,

where f(A)f(A)f(A) and log⁡(B)\log(B)log(B) use the library’s continuous functional calculus. The supremum lies in [0,+∞][0,+\infty][0,+∞]. No positivity, normalization, trace-class, countability, or nonemptiness assumption is imposed on I,X,YI,X,YI,X,Y; the operator-selection fallback and the total functional-calculus expressions therefore remain part of the definition. The n=0n=0n=0 contribution is 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.cqRootFidelity

For any type III and any map W:Z/2Z→CI×IW:\mathbb Z/2\mathbb Z\to\mathbb C^{I\times I}W:Z/2Z→CI×I, let AbA_bAb​ be a classically chosen bounded complex-linear operator on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C) with coefficients (Abej)(i)=W(b)ij(A_be_j)(i)=W(b)_{ij}(Ab​ej​)(i)=W(b)ij​ for all i,ji,ji,j, if such an operator exists, and set Ab=0A_b=0Ab​=0 otherwise; here eje_jej​ is the coordinate unit vector. Let SSS be a classically chosen bounded positive square root of A0A_0A0​, or 000 if none exists, and let RRR be a classically chosen bounded positive square root of S∘A1∘SS\circ A_1\circ SS∘A1​∘S, or 000 if none exists. The defined real number is Re⁡∑i∈I(Rei)(i)\operatorname{Re}\sum_{i\in I}(Re_i)(i)Re∑i∈I​(Rei​)(i), using the unconditional complex sum, which is 000 if its terms are not summable. No assumption that either output of WWW is a density array is imposed; empty III gives value 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.decodingBranch

For any type III, natural number nnn, arbitrary assignment W:Z/2Z→Mat⁡I×I(C)W:\mathbb Z/2\mathbb Z\to\operatorname{Mat}_{I\times I}(\mathbb C)W:Z/2Z→MatI×I​(C), finite set A⊆{0,…,N−1}A\subseteq\{0,\ldots,N-1\}A⊆{0,…,N−1} with N=2nN=2^nN=2n, and binary word uuu on these NNN indices, this defines a bounded complex linear operator KKK on ℓ2({0,…,N−1}→I)\ell^2(\{0,\ldots,N-1\}\to I)ℓ2({0,…,N−1}→I). Its construction is as follows. Let rev⁡n(r)\operatorname{rev}_n(r)revn​(r) be the integer obtained by reversing the nnn binary digits of rrr, and set Fa,b=1F_{a,b}=1Fa,b​=1 if b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a otherwise, for a,b∈Z/2Za,b\in\mathbb Z/2\mathbb Za,b∈Z/2Z. Define

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑r=0N−1vrGr,c,Γv(x,y)=∏c=0N−1W(E(v)c)xc,yc,G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_{r=0}^{N-1}v_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_{c=0}^{N-1}W(E(v)_c)_{x_c,y_c},Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r=0∑N−1​vr​Gr,c​,Γv​(x,y)=c=0∏N−1​W(E(v)c​)xc​,yc​​,

where the bits are read from the least significant end and the sum defining EEE is in Z/2Z\mathbb Z/2\mathbb ZZ/2Z. For a prefix hhh of length iii and bit bbb, let vi,h,bv^{i,h,b}vi,h,b agree with hhh before iii, equal bbb at iii, and agree with vvv after iii, and define

Vi,h,b=2−N∑v∈(Z/2Z)NΓvi,h,b.V_{i,h,b}=2^{-N}\sum_{v\in(\mathbb Z/2\mathbb Z)^N}\Gamma_{v^{i,h,b}}.Vi,h,b​=2−Nv∈(Z/2Z)N∑​Γvi,h,b​.

For a coefficient matrix XXX on any label set, let C(X)C(X)C(X) be a chosen bounded operator with matrix coefficients XXX in the standard ℓ2\ell^2ℓ2 basis if such an operator exists, and zero otherwise. For a bounded operator TTT, let R(T)R(T)R(T) be a chosen bounded positive operator SSS satisfying S2=TS^2=TS2=T if one exists, and zero otherwise. Let Pi,hP_{i,h}Pi,h​ be the orthogonal projection onto the closed complex linear span of all vectors vvv satisfying

(R(C(Vi,h,0))−R(C(Vi,h,1)))v=avfor some real a<0.\bigl(R(C(V_{i,h,0}))-R(C(V_{i,h,1}))\bigr)v=a v \quad\text{for some real }a<0.(R(C(Vi,h,0​))−R(C(Vi,h,1​)))v=avfor some real a<0.

Put h=u∣{0,…,i−1}h=u|_{\{0,\ldots,i-1\}}h=u∣{0,…,i−1}​ and define QiQ_iQi​ to be the identity if i∉Ai\notin Ai∈/A, 1−Pi,h1-P_{i,h}1−Pi,h​ if i∈Ai\in Ai∈A and ui=0u_i=0ui​=0, and Pi,hP_{i,h}Pi,h​ if i∈Ai\in Ai∈A and ui=1u_i=1ui​=1. The resulting operator is

K=QN−1∘⋯∘Q0,K=Q_{N-1}\circ\cdots\circ Q_0,K=QN−1​∘⋯∘Q0​,

so the factors are applied in increasing index order. No density or channel condition is assumed on WWW, and III need not be finite or countable. If AAA is empty, KKK is the identity. The case n=0n=0n=0 has one wire and one factor.

QAlgorithms.Papers.Independent.Intakethird100.P14.decodingEffect

For any type III, arbitrary coefficient matrices W(0),W(1)W(0),W(1)W(0),W(1) indexed by III, natural number nnn, finite set A⊆{0,…,N−1}A\subseteq\{0,\ldots,N-1\}A⊆{0,…,N−1} where N=2nN=2^nN=2n, and word u∈(Z/2Z)Nu\in(\mathbb Z/2\mathbb Z)^Nu∈(Z/2Z)N, this defines the operator K∗KK^*KK∗K on ℓ2({0,…,N−1}→I)\ell^2(\{0,\ldots,N-1\}\to I)ℓ2({0,…,N−1}→I) by the following construction of KKK. With Fa,b=1F_{a,b}=1Fa,b​=1 for b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a for b=1b=1b=1, define the binary transform and coefficient matrices by

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑rvrGr,c,Γv(x,y)=∏cW(E(v)c)xc,yc,G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_r v_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_c W(E(v)_c)_{x_c,y_c},Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r∑​vr​Gr,c​,Γv​(x,y)=c∏​W(E(v)c​)xc​,yc​​,

where rev⁡n\operatorname{rev}_nrevn​ reverses the nnn binary digits and bit⁡k\operatorname{bit}_kbitk​ reads the kkkth least significant bit. For each iii, prefix hhh of length iii, and bit bbb, let vi,h,bv^{i,h,b}vi,h,b use hhh before iii, bbb at iii, and vvv after iii, and put Vi,h,b=2−N∑vΓvi,h,bV_{i,h,b}=2^{-N}\sum_v\Gamma_{v^{i,h,b}}Vi,h,b​=2−N∑v​Γvi,h,b​, the sum running over all NNN-bit words. Let C(X)C(X)C(X) be a chosen bounded operator realizing the coefficients XXX, or zero if none exists, and let R(T)R(T)R(T) be a chosen bounded positive square root of TTT, or zero if none exists. Let Pi,hP_{i,h}Pi,h​ project onto the closed complex span of the eigenvectors of R(C(Vi,h,0))−R(C(Vi,h,1))R(C(V_{i,h,0}))-R(C(V_{i,h,1}))R(C(Vi,h,0​))−R(C(Vi,h,1​)) with strictly negative real eigenvalues. For h=u∣{0,…,i−1}h=u|_{\{0,\ldots,i-1\}}h=u∣{0,…,i−1}​, set Qi=1Q_i=1Qi​=1 when i∉Ai\notin Ai∈/A, Qi=1−Pi,hQ_i=1-P_{i,h}Qi​=1−Pi,h​ when i∈Ai\in Ai∈A and ui=0u_i=0ui​=0, and Qi=Pi,hQ_i=P_{i,h}Qi​=Pi,h​ when i∈Ai\in Ai∈A and ui=1u_i=1ui​=1. Then

K=QN−1∘⋯∘Q0,the defined effect=K∗∘K.K=Q_{N-1}\circ\cdots\circ Q_0, \qquad \text{the defined effect}=K^*\circ K.K=QN−1​∘⋯∘Q0​,the defined effect=K∗∘K.

There are no normalization assumptions on WWW or finiteness or countability assumptions on III. For A=∅A=\varnothingA=∅ this is the identity; n=0n=0n=0 is included and gives N=1N=1N=1.

QAlgorithms.Papers.Independent.Intakethird100.P14.decodingSuccess

For any type III, arbitrary matrices W(0),W(1)W(0),W(1)W(0),W(1) indexed by III, natural number nnn, finite set AAA of the N=2nN=2^nN=2n wire indices, and word u∈(Z/2Z)Nu\in(\mathbb Z/2\mathbb Z)^Nu∈(Z/2Z)N, this defines the real number

Re⁡∑x:{0,…,N−1}→I(Ku∗Ku C(Γu)ex)x,\operatorname{Re}\sum_{x:\{0,\ldots,N-1\}\to I} \bigl(K_u^*K_u\,C(\Gamma_u)e_x\bigr)_x,Rex:{0,…,N−1}→I∑​(Ku∗​Ku​C(Γu​)ex​)x​,

where exe_xex​ is the standard unit coordinate vector in ℓ2({0,…,N−1}→I)\ell^2(\{0,\ldots,N-1\}\to I)ℓ2({0,…,N−1}→I). Here, with Fa,b=1F_{a,b}=1Fa,b​=1 if b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a otherwise,

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑rvrGr,c,Γv(x,y)=∏cW(E(v)c)xc,yc.G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_r v_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_cW(E(v)_c)_{x_c,y_c}.Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r∑​vr​Gr,c​,Γv​(x,y)=c∏​W(E(v)c​)xc​,yc​​.

The map rev⁡n\operatorname{rev}_nrevn​ reverses nnn binary digits, the digit indices are counted from the least significant end, and EEE is computed over Z/2Z\mathbb Z/2\mathbb ZZ/2Z. For a prefix hhh of length iii, let vi,h,bv^{i,h,b}vi,h,b equal hhh before iii, bbb at iii, and vvv after iii, and put Vi,h,b=2−N∑v∈(Z/2Z)NΓvi,h,bV_{i,h,b}=2^{-N}\sum_{v\in(\mathbb Z/2\mathbb Z)^N}\Gamma_{v^{i,h,b}}Vi,h,b​=2−N∑v∈(Z/2Z)N​Γvi,h,b​. For any matrix XXX, C(X)C(X)C(X) is a chosen bounded operator realizing its standard-basis coefficients if one exists, and zero otherwise; R(T)R(T)R(T) is a chosen bounded positive square root of TTT if one exists, and zero otherwise. Let Pi,hP_{i,h}Pi,h​ be the orthogonal projection onto the closed complex span of the eigenvectors of R(C(Vi,h,0))−R(C(Vi,h,1))R(C(V_{i,h,0}))-R(C(V_{i,h,1}))R(C(Vi,h,0​))−R(C(Vi,h,1​)) having strictly negative real eigenvalues. Using h=u∣{0,…,i−1}h=u|_{\{0,\ldots,i-1\}}h=u∣{0,…,i−1}​, put Qi=1Q_i=1Qi​=1 if i∉Ai\notin Ai∈/A, Qi=1−Pi,hQ_i=1-P_{i,h}Qi​=1−Pi,h​ if i∈Ai\in Ai∈A and ui=0u_i=0ui​=0, and Qi=Pi,hQ_i=P_{i,h}Qi​=Pi,h​ if i∈Ai\in Ai∈A and ui=1u_i=1ui​=1, and set Ku=QN−1∘⋯∘Q0K_u=Q_{N-1}\circ\cdots\circ Q_0Ku​=QN−1​∘⋯∘Q0​. The displayed sum is the totalized complex sum, which is zero if the family is not summable. Neither density assumptions on WWW nor a bound between zero and one are part of this definition. The type III may be empty, finite, or uncountable, and n=0n=0n=0 gives one wire.

QAlgorithms.Papers.Independent.Intakethird100.P14.densitySqrt

For any type III and any complex array X=(Xij)i,j∈IX=(X_{ij})_{i,j\in I}X=(Xij​)i,j∈I​, first let AAA be a classically chosen bounded complex-linear operator on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C) satisfying (Aej)(i)=Xij(Ae_j)(i)=X_{ij}(Aej​)(i)=Xij​ for every i,ji,ji,j, if one exists, and let A=0A=0A=0 otherwise, where eje_jej​ is the coordinate unit vector. This definition then returns a classically chosen bounded positive operator SSS with S∘S=AS\circ S=AS∘S=A, if one exists, and returns 000 otherwise. No density, positivity, normalization, or summability hypothesis is required of XXX.

QAlgorithms.Papers.Independent.Intakethird100.P14.ensembleError

For any type III, arbitrary matrices W(0),W(1)W(0),W(1)W(0),W(1) indexed by III, natural number nnn, and finite subset AAA of the N=2nN=2^nN=2n wire indices, this defines the real number

12N−∣A∣∑f:Ac→Z/2Z(1−12∣A∣∑m:A→Z/2Zs(um,f)),uim,f={mi,i∈A,fi,i∉A.\frac{1}{2^{N-|A|}} \sum_{f:A^{\mathrm c}\to\mathbb Z/2\mathbb Z} \left(1-\frac{1}{2^{|A|}} \sum_{m:A\to\mathbb Z/2\mathbb Z}s(u^{m,f})\right), \qquad u^{m,f}_i=\begin{cases}m_i,&i\in A,\\f_i,&i\notin A.\end{cases}2N−∣A∣1​f:Ac→Z/2Z∑​​1−2∣A∣1​m:A→Z/2Z∑​s(um,f)​,uim,f​={mi​,fi​,​i∈A,i∈/A.​

Here

s(u)=Re⁡∑x:{0,…,N−1}→I(Ku∗Ku C(Γu)ex)x.s(u)=\operatorname{Re}\sum_{x:\{0,\ldots,N-1\}\to I} \bigl(K_u^*K_u\,C(\Gamma_u)e_x\bigr)_x.s(u)=Rex:{0,…,N−1}→I∑​(Ku∗​Ku​C(Γu​)ex​)x​.

Its ingredients are specified as follows. Put Fa,b=1F_{a,b}=1Fa,b​=1 when b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a otherwise, and set

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑rvrGr,c,Γv(x,y)=∏cW(E(v)c)xc,yc,G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_r v_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_c W(E(v)_c)_{x_c,y_c},Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r∑​vr​Gr,c​,Γv​(x,y)=c∏​W(E(v)c​)xc​,yc​​,

where EEE uses arithmetic in Z/2Z\mathbb Z/2\mathbb ZZ/2Z, rev⁡n\operatorname{rev}_nrevn​ reverses nnn binary digits, and bit⁡k\operatorname{bit}_kbitk​ reads the kkkth least significant digit. For a prefix hhh of length iii and bit bbb, let vi,h,bv^{i,h,b}vi,h,b use hhh before iii, bbb at iii, and vvv thereafter, and put Vi,h,b=2−N∑vΓvi,h,bV_{i,h,b}=2^{-N}\sum_v\Gamma_{v^{i,h,b}}Vi,h,b​=2−N∑v​Γvi,h,b​, averaging over all NNN-bit words. Let C(X)C(X)C(X) be a chosen bounded operator with coefficient matrix XXX if one exists, and zero otherwise; let R(T)R(T)R(T) be a chosen bounded positive square root of TTT if one exists, and zero otherwise. Let Pi,hP_{i,h}Pi,h​ project onto the closed complex span of the eigenvectors of R(C(Vi,h,0))−R(C(Vi,h,1))R(C(V_{i,h,0}))-R(C(V_{i,h,1}))R(C(Vi,h,0​))−R(C(Vi,h,1​)) with strictly negative real eigenvalues. For h=u∣{0,…,i−1}h=u|_{\{0,\ldots,i-1\}}h=u∣{0,…,i−1}​, define Qi=1Q_i=1Qi​=1 outside AAA, Qi=1−Pi,hQ_i=1-P_{i,h}Qi​=1−Pi,h​ at selected zero bits, and Qi=Pi,hQ_i=P_{i,h}Qi​=Pi,h​ at selected one bits, and let Ku=QN−1∘⋯∘Q0K_u=Q_{N-1}\circ\cdots\circ Q_0Ku​=QN−1​∘⋯∘Q0​. The vectors exe_xex​ are the standard basis of ℓ2({0,…,N−1}→I)\ell^2(\{0,\ldots,N-1\}\to I)ℓ2({0,…,N−1}→I), 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 WWW or range bound on the resulting real number is imposed. The case n=0n=0n=0 has one wire.

QAlgorithms.Papers.Independent.Intakethird100.P14.fidelityProcess

For arbitrary types I,ΩI,\OmegaI,Ω, a function W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, Boolean functions Bk:Ω→{false,true}B_k:\Omega\to\{\mathrm{false},\mathrm{true}\}Bk​:Ω→{false,true}, n∈Nn\in\mathbb Nn∈N, and w∈Ωw\in\Omegaw∈Ω, this defines a real number as follows. Put N=2nN=2^nN=2n and

i=(∑k=0n−11{Bk(w)=true}2n−1−k) mod N.i=\left(\sum_{k=0}^{n-1}\mathbf1_{\{B_k(w)=\mathrm{true}\}}2^{n-1-k}\right)\bmod N.i=(k=0∑n−1​1{Bk​(w)=true}​2n−1−k)modN.

Write bk(r)∈Z2b_k(r)\in\mathbb Z_2bk​(r)∈Z2​ for bit kkk of rrr, let rev⁡n(r)=(∑k<nbk(r)2n−1−k) mod N\operatorname{rev}_n(r)=(\sum_{k<n}b_k(r)2^{n-1-k})\bmod Nrevn​(r)=(∑k<n​bk​(r)2n−1−k)modN, and set Grt=∏k<nK(bk(rev⁡n(r)),bk(t))G_{rt}=\prod_{k<n}K(b_k(\operatorname{rev}_n(r)),b_k(t))Grt​=∏k<n​K(bk​(revn​(r)),bk​(t)), where K(a,0)=1K(a,0)=1K(a,0)=1 and K(a,1)=aK(a,1)=aK(a,1)=a. The binary output array VVV, indexed by labels (h,x)∈Z2i×IN(h,x)\in\mathbb Z_2^i\times I^N(h,x)∈Z2i​×IN, is

V(b)(h,x),(h′,y)={2−(N−1)∑u∈Z2Nu<i=h, ui=b∏t<NW((uG)t)xt,yt,h=h′,0,h≠h′,V(b)_{(h,x),(h',y)} =\begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\mathbb Z_2^N\\u_{<i}=h,\ u_i=b}} \prod_{t<N}W((uG)_t)_{x_t,y_t},&h=h',\\ 0,&h\ne h', \end{cases}V(b)(h,x),(h′,y)​=⎩⎨⎧​2−(N−1)u∈Z2N​u<i​=h, ui​=b​∑​t<N∏​W((uG)t​)xt​,yt​​,0,​h=h′,h=h′,​

where uGuGuG is computed over Z2\mathbb Z_2Z2​. For any coefficient array XXX on a label type LLL, let OXO_XOX​ be a chosen bounded complex linear operator on ℓ2(L;C)\ell^2(L;\mathbb C)ℓ2(L;C) satisfying (OXej)a=Xaj(O_Xe_j)_a=X_{aj}(OX​ej​)a​=Xaj​, if such an operator exists, and zero otherwise; eje_jej​ is the coordinate unit vector. Let R(T)R(T)R(T) be a chosen positive bounded operator satisfying R(T)2=TR(T)^2=TR(T)2=T, if one exists, and zero otherwise, and let tr⁡b(T)=∑a′(Tea)a\operatorname{tr}_b(T)=\sum'_a(Te_a)_atrb​(T)=∑a′​(Tea​)a​. The defined value is

(Re⁡tr⁡bR ⁣(R(OV(0)) OV(1) R(OV(0))))2.\sqrt{\left(\operatorname{Re}\operatorname{tr}_b R\!\left(R(O_{V(0)})\,O_{V(1)}\,R(O_{V(0)})\right)\right)^2}.(Retrb​R(R(OV(0)​)OV(1)​R(OV(0)​)))2​.

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 W,I,Ω,BW,I,\Omega,BW,I,Ω,B. The case n=0n=0n=0 is included: N=1N=1N=1, the branch index is zero, and the products defining GGG are empty products. The complex sum defining tr⁡b\operatorname{tr}_btrb​ has value zero if it is not summable.

QAlgorithms.Papers.Independent.Intakethird100.P14.filledWord

For every n∈Nn\in\mathbb Nn∈N, put N=2nN=2^nN=2n. Given an index 0≤i<N0\le i<N0≤i<N, a history h:{0,…,i−1}→F2h:\{0,\ldots,i-1\}\to\mathbb F_2h:{0,…,i−1}→F2​, a bit b∈F2b\in\mathbb F_2b∈F2​, and a word v:{0,…,N−1}→F2v:\{0,\ldots,N-1\}\to\mathbb F_2v:{0,…,N−1}→F2​, this defines the word xxx by

xj={hj,j<i,b,j=i,vj,j>i.x_j= \begin{cases} h_j,&j<i,\\ b,&j=i,\\ v_j,&j>i. \end{cases}xj​=⎩⎨⎧​hj​,b,vj​,​j<i,j=i,j>i.​

Thus the coordinates of vvv at indices at most iii do not affect the result. The history is empty when i=0i=0i=0, and no coordinates from vvv are used when i=N−1i=N-1i=N−1. The case n=0n=0n=0 is included: then N=1N=1N=1, i=0i=0i=0, and the resulting word consists solely of bbb.

QAlgorithms.Papers.Independent.Intakethird100.P14.frozenError

For any type III, arbitrary matrices W(0),W(1)W(0),W(1)W(0),W(1) indexed by III, natural number nnn, finite set A⊆{0,…,N−1}A\subseteq\{0,\ldots,N-1\}A⊆{0,…,N−1} with N=2nN=2^nN=2n, and fixed assignment f:Ac→Z/2Zf:A^{\mathrm c}\to\mathbb Z/2\mathbb Zf:Ac→Z/2Z, this defines

1−12∣A∣∑m:A→Z/2Zs(um,f),uim,f={mi,i∈A,fi,i∉A.1-\frac{1}{2^{|A|}}\sum_{m:A\to\mathbb Z/2\mathbb Z}s(u^{m,f}), \qquad u^{m,f}_i=\begin{cases}m_i,&i\in A,\\f_i,&i\notin A.\end{cases}1−2∣A∣1​m:A→Z/2Z∑​s(um,f),uim,f​={mi​,fi​,​i∈A,i∈/A.​

The number s(u)s(u)s(u) is defined by

s(u)=Re⁡∑x:{0,…,N−1}→I(Ku∗Ku C(Γu)ex)x.s(u)=\operatorname{Re}\sum_{x:\{0,\ldots,N-1\}\to I} \bigl(K_u^*K_u\,C(\Gamma_u)e_x\bigr)_x.s(u)=Rex:{0,…,N−1}→I∑​(Ku∗​Ku​C(Γu​)ex​)x​.

To specify its ingredients, let Fa,b=1F_{a,b}=1Fa,b​=1 for b=0b=0b=0 and Fa,b=aF_{a,b}=aFa,b​=a otherwise, and define

Gr,c=∏k=0n−1Fbit⁡k(rev⁡n(r)), bit⁡k(c),E(v)c=∑rvrGr,c,Γv(x,y)=∏cW(E(v)c)xc,yc,G_{r,c}=\prod_{k=0}^{n-1}F_{\operatorname{bit}_k(\operatorname{rev}_n(r)),\,\operatorname{bit}_k(c)}, \qquad E(v)_c=\sum_rv_rG_{r,c}, \qquad \Gamma_v(x,y)=\prod_cW(E(v)_c)_{x_c,y_c},Gr,c​=k=0∏n−1​Fbitk​(revn​(r)),bitk​(c)​,E(v)c​=r∑​vr​Gr,c​,Γv​(x,y)=c∏​W(E(v)c​)xc​,yc​​,

using arithmetic in Z/2Z\mathbb Z/2\mathbb ZZ/2Z, nnn-digit binary reversal, and digit indices counted from the least significant end. For a prefix hhh of length iii, form vi,h,bv^{i,h,b}vi,h,b by replacing the coordinates before iii by hhh and coordinate iii by bbb, retaining vvv thereafter, and put Vi,h,b=2−N∑vΓvi,h,bV_{i,h,b}=2^{-N}\sum_v\Gamma_{v^{i,h,b}}Vi,h,b​=2−N∑v​Γvi,h,b​, summing over all NNN-bit words. For any coefficient matrix XXX, C(X)C(X)C(X) is a chosen bounded operator realizing XXX, or zero if none exists; R(T)R(T)R(T) is a chosen bounded positive square root of TTT, or zero if none exists. Let Pi,hP_{i,h}Pi,h​ project onto the closed complex span of the eigenvectors of R(C(Vi,h,0))−R(C(Vi,h,1))R(C(V_{i,h,0}))-R(C(V_{i,h,1}))R(C(Vi,h,0​))−R(C(Vi,h,1​)) having strictly negative real eigenvalues. With h=u∣{0,…,i−1}h=u|_{\{0,\ldots,i-1\}}h=u∣{0,…,i−1}​, let QiQ_iQi​ be 111 outside AAA, 1−Pi,h1-P_{i,h}1−Pi,h​ for a selected zero bit, and Pi,hP_{i,h}Pi,h​ for a selected one bit, and set Ku=QN−1∘⋯∘Q0K_u=Q_{N-1}\circ\cdots\circ Q_0Ku​=QN−1​∘⋯∘Q0​. Here exe_xex​ is the standard ℓ2\ell^2ℓ2 basis vector, and the complex sum defining sss is zero if it is not summable. The denominator 2∣A∣2^{|A|}2∣A∣ is always positive; for A=∅A=\varnothingA=∅ the outer sum has one term. No density assumption on WWW or restriction of this real value to [0,1][0,1][0,1] is imposed, and n=0n=0n=0 is allowed.

QAlgorithms.Papers.Independent.Intakethird100.P14.futureAverage

For any type III, any pair of complex matrices WbW_bWb​ indexed by III, with b∈F2b\in\mathbb F_2b∈F2​, any n∈Nn\in\mathbb Nn∈N, index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, history h∈F2ih\in\mathbb F_2^ih∈F2i​, and bit bbb, this defines a complex matrix indexed by INI^NIN. For each v∈F2Nv\in\mathbb F_2^Nv∈F2N​, let x(v)j=hjx(v)_j=h_jx(v)j​=hj​ for j<ij<ij<i, x(v)i=bx(v)_i=bx(v)i​=b, and x(v)j=vjx(v)_j=v_jx(v)j​=vj​ for j>ij>ij>i. Write rtr_trt​ for binary digit ttt, put

rev⁡n(r)=(∑t=0n−1rt2n−1−t) mod N,En(x)c=∑0≤r<N∀t<n, ct=1⇒(rev⁡n(r))t=1xrin F2.\operatorname{rev}_n(r)= \left(\sum_{t=0}^{n-1}r_t2^{n-1-t}\right)\bmod N, \qquad E_n(x)_c= \sum_{\substack{0\le r<N\\ \forall t<n,\ c_t=1\Rightarrow(\operatorname{rev}_n(r))_t=1}}x_r \quad\text{in }\mathbb F_2.revn​(r)=(t=0∑n−1​rt​2n−1−t)modN,En​(x)c​=0≤r<N∀t<n, ct​=1⇒(revn​(r))t​=1​∑​xr​in F2​.

For a,a′∈INa,a'\in I^Na,a′∈IN, the entry is

futureAverage⁡(W,n,i,h,b)a,a′=12N∑v∈F2N∏c=0N−1WEn(x(v))c(ac,ac′).\operatorname{futureAverage}(W,n,i,h,b)_{a,a'} =\frac1{2^N}\sum_{v\in\mathbb F_2^N} \prod_{c=0}^{N-1}W_{E_n(x(v))_c}(a_c,a'_c).futureAverage(W,n,i,h,b)a,a′​=2N1​v∈F2N​∑​c=0∏N−1​WEn​(x(v))c​​(ac​,ac′​).

The sum includes all coordinates of vvv, even though its first i+1i+1i+1 coordinates are overwritten. No density-matrix assumptions are imposed on WWW, and III may be empty. When n=0n=0n=0, this is the matrix with entries Wb(a0,a0′)W_b(a_0,a'_0)Wb​(a0​,a0′​).

QAlgorithms.Papers.Independent.Intakethird100.P14.informationProcess

For arbitrary types I,ΩI,\OmegaI,Ω, W:Z2→CI×IW:\mathbb Z_2\to\mathbb C^{I\times I}W:Z2​→CI×I, Boolean functions Bk:Ω→{false,true}B_k:\Omega\to\{\mathrm{false},\mathrm{true}\}Bk​:Ω→{false,true}, n∈Nn\in\mathbb Nn∈N, and w∈Ωw\in\Omegaw∈Ω, put N=2nN=2^nN=2n and i=(∑k<n1{Bk(w)=true}2n−1−k) mod Ni=(\sum_{k<n}\mathbf1_{\{B_k(w)=\mathrm{true}\}}2^{n-1-k})\bmod Ni=(∑k<n​1{Bk​(w)=true}​2n−1−k)modN. Define Grt=∏k<nK(bk(rev⁡n(r)),bk(t))G_{rt}=\prod_{k<n}K(b_k(\operatorname{rev}_n(r)),b_k(t))Grt​=∏k<n​K(bk​(revn​(r)),bk​(t)) over Z2\mathbb Z_2Z2​, where bk(r)b_k(r)bk​(r) is bit kkk, rev⁡n(r)=(∑k<nbk(r)2n−1−k) mod N\operatorname{rev}_n(r)=(\sum_{k<n}b_k(r)2^{n-1-k})\bmod Nrevn​(r)=(∑k<n​bk​(r)2n−1−k)modN, and K(a,0)=1, K(a,1)=aK(a,0)=1,\ K(a,1)=aK(a,0)=1, K(a,1)=a. Define arrays V(b)V(b)V(b), with labels (h,x)∈Z2i×IN(h,x)\in\mathbb Z_2^i\times I^N(h,x)∈Z2i​×IN, by

V(b)(h,x),(h′,y)={2−(N−1)∑u∈Z2Nu<i=h, ui=b∏t<NW((uG)t)xt,yt,h=h′,0,h≠h′.V(b)_{(h,x),(h',y)} =\begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\mathbb Z_2^N\\u_{<i}=h,\ u_i=b}} \prod_{t<N}W((uG)_t)_{x_t,y_t},&h=h',\\ 0,&h\ne h'. \end{cases}V(b)(h,x),(h′,y)​=⎩⎨⎧​2−(N−1)u∈Z2N​u<i​=h, ui​=b​∑​t<N∏​W((uG)t​)xt​,yt​​,0,​h=h′,h=h′.​

For an array XXX on LLL, OXO_XOX​ denotes a chosen bounded operator on ℓ2(L;C)\ell^2(L;\mathbb C)ℓ2(L;C) with coefficients Xab=(OXeb)aX_{ab}=(O_Xe_b)_aXab​=(OX​eb​)a​, if one exists, and zero otherwise. For arrays X,YX,YX,Y, define D2(X∥Y)∈[0,∞]D_2(X\Vert Y)\in[0,\infty]D2​(X∥Y)∈[0,∞] as the supremum over all m∈Nm\in\mathbb Nm∈N, including zero, and all orthonormal families v0,…,vm−1∈ℓ2(L;C)v_0,\ldots,v_{m-1}\in\ell^2(L;\mathbb C)v0​,…,vm−1​∈ℓ2(L;C), of

{max⁡ ⁣{0,Re⁡tr⁡(f(A)−Alog⁡C−A+C)log⁡2},ker⁡C⊆ker⁡A,∞,otherwise,\begin{cases} \displaystyle \max\!\left\{0,\frac{\operatorname{Re}\operatorname{tr} \bigl(f(A)-A\log C-A+C\bigr)}{\log2}\right\}, &\ker C\subseteq\ker A,\\ \infty,&\text{otherwise}, \end{cases}⎩⎨⎧​max{0,log2Retr(f(A)−AlogC−A+C)​},∞,​kerC⊆kerA,otherwise,​

where Ars=⟨vr,OXvs⟩A_{rs}=\langle v_r,O_Xv_s\rangleArs​=⟨vr​,OX​vs​⟩, Crs=⟨vr,OYvs⟩C_{rs}=\langle v_r,O_Yv_s\rangleCrs​=⟨vr​,OY​vs​⟩, f(t)=tlog⁡tf(t)=t\log tf(t)=tlogt, and matrix functions mean continuous functional calculus. With V‾=(V(0)+V(1))/2\overline V=(V(0)+V(1))/2V=(V(0)+V(1))/2, the defined value is the real conversion of

I(V)=D2(V(0)∥V‾)+D2(V(1)∥V‾)2.\mathcal I(V)=\frac{D_2(V(0)\Vert\overline V)+D_2(V(1)\Vert\overline V)}2.I(V)=2D2​(V(0)∥V)+D2​(V(1)∥V)​.

Real conversion leaves finite values unchanged and sends ∞\infty∞ to zero. No validity, countability, measurability, or probabilistic assumptions are imposed. The case n=0n=0n=0, and the zero-operator fallbacks in OXO_XOX​, are included.

QAlgorithms.Papers.Independent.Intakethird100.P14.negativeCompactProjection

For any type JJJ and any bounded complex-linear operator T:ℓ2(J;C)→ℓ2(J;C)T:\ell^2(J;\mathbb C)\to\ell^2(J;\mathbb C)T:ℓ2(J;C)→ℓ2(J;C), this defines the orthogonal projection onto

span⁡C{v∈ℓ2(J;C):∃a∈R, a<0 and Tv=av}‾.\overline{\operatorname{span}_{\mathbb C} \left\{v\in\ell^2(J;\mathbb C): \exists a\in\mathbb R,\ a<0\ \text{and}\ Tv=av\right\}}.spanC​{v∈ℓ2(J;C):∃a∈R, a<0 and Tv=av}​.

The closure is in the Hilbert-space norm. Neither compactness nor self-adjointness of TTT is assumed. If there are no nonzero vectors satisfying the displayed condition, the resulting projection is zero. The type JJJ may be empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.parentLabels

For any type III, any n∈Nn\in\mathbb Nn∈N, any index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, and any Boolean flag good\mathrm{good}good, put δ=1\delta=1δ=1 if the flag is true and δ=0\delta=0δ=0 otherwise. Given a pair p=(h,y)p=(h,y)p=(h,y), where h∈F2 2i+δh\in\mathbb F_2^{\,2i+\delta}h∈F22i+δ​ and y∈I2Ny\in I^{2N}y∈I2N, this defines two pairs ((a,x),(b,z))∈(F2i×IN)2((a,x),(b,z))\in(\mathbb F_2^i\times I^N)^2((a,x),(b,z))∈(F2i​×IN)2 by

ak=h2k+h2k+1,bk=h2k+1(0≤k<i),xj=yj,zj=yN+j(0≤j<N),a_k=h_{2k}+h_{2k+1},\qquad b_k=h_{2k+1}\quad(0\le k<i), \qquad x_j=y_j,\qquad z_j=y_{N+j}\quad(0\le j<N),ak​=h2k​+h2k+1​,bk​=h2k+1​(0≤k<i),xj​=yj​,zj​=yN+j​(0≤j<N),

where addition is modulo two. When the flag is true, the last history bit h2ih_{2i}h2i​ is unused by this map. When i=0i=0i=0, both resulting histories are empty. The case n=0n=0n=0 and arbitrary, possibly empty, III are included.

QAlgorithms.Papers.Independent.Intakethird100.P14.plusLabel

For any type III, any n∈Nn\in\mathbb Nn∈N, and any index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, an input label is a pair p=(h,y)p=(h,y)p=(h,y) with h∈F2 2i+1h\in\mathbb F_2^{\,2i+1}h∈F22i+1​ and y∈I2Ny\in I^{2N}y∈I2N. This defines the triple, grouped as one bit and a pair of labels,

plusLabel⁡(i,p)=(h2i,((a,x),(b,z))),\operatorname{plusLabel}(i,p)=\bigl(h_{2i},((a,x),(b,z))\bigr),plusLabel(i,p)=(h2i​,((a,x),(b,z))),

where

ak=h2k+h2k+1,bk=h2k+1(0≤k<i),xj=yj,zj=yN+j(0≤j<N),a_k=h_{2k}+h_{2k+1},\qquad b_k=h_{2k+1}\quad(0\le k<i), \qquad x_j=y_j,\qquad z_j=y_{N+j}\quad(0\le j<N),ak​=h2k​+h2k+1​,bk​=h2k+1​(0≤k<i),xj​=yj​,zj​=yN+j​(0≤j<N),

and bit addition is modulo two. Thus each inner label belongs to F2i×IN\mathbb F_2^i\times I^NF2i​×IN. When i=0i=0i=0, the inner histories are empty and the separate output bit is h0h_0h0​; this includes n=0n=0n=0, for which N=1N=1N=1. No assumptions are imposed on III.

QAlgorithms.Papers.Independent.Intakethird100.P14.polarDecay

For arbitrary real numbers β\betaβ and scale\mathrm{scale}scale and every natural number nnn, this defines the real value

2−scale (2n)β,2^{-\mathrm{scale}\,(2^n)^\beta},2−scale(2n)β,

where both powers with real exponents are real powers. There are no sign restrictions on β\betaβ or scale\mathrm{scale}scale. In particular, at n=0n=0n=0 the value is 2−scale2^{-\mathrm{scale}}2−scale, and for scale=0\mathrm{scale}=0scale=0 it is 111 for every nnn.

QAlgorithms.Papers.Independent.Intakethird100.P14.polarEncode

For every n∈Nn\in\mathbb Nn∈N and every word u:{0,…,2n−1}→Z/2Zu:\{0,\ldots,2^n-1\}\to\mathbb Z/2\mathbb Zu:{0,…,2n−1}→Z/2Z, this returns the word whose coordinate ccc is ∑r=02n−1urPrc\sum_{r=0}^{2^n-1}u_rP_{rc}∑r=02n−1​ur​Prc​, with sums and products in Z/2Z\mathbb Z/2\mathbb ZZ/2Z. To specify PPP, write bk(j)b_k(j)bk​(j) for bit kkk of jjj, counted from the least significant bit, and put Rn(r)=(∑k=0n−1bk(r)2n−1−k) mod 2nR_n(r)=\bigl(\sum_{k=0}^{n-1}b_k(r)2^{n-1-k}\bigr)\bmod2^nRn​(r)=(∑k=0n−1​bk​(r)2n−1−k)mod2n; then PrcP_{rc}Prc​ is the product over k=0,…,n−1k=0,\ldots,n-1k=0,…,n−1 of 111 if bk(c)=0b_k(c)=0bk​(c)=0, and bk(Rn(r))b_k(R_n(r))bk​(Rn​(r)) otherwise. When n=0n=0n=0, the word has one coordinate and is returned unchanged.

QAlgorithms.Papers.Independent.Intakethird100.P14.polarKernel

This is the matrix over Z/2Z\mathbb Z/2\mathbb ZZ/2Z, with rows and columns indexed by Z/2Z\mathbb Z/2\mathbb ZZ/2Z, whose entry at row rrr and column ccc is 111 if c=0c=0c=0, and rrr otherwise. With row and column order 0,10,10,1, it is (1011)\begin{pmatrix}1&0\\1&1\end{pmatrix}(11​01​).

QAlgorithms.Papers.Independent.Intakethird100.P14.polarMatrix

For every n∈Nn\in\mathbb Nn∈N, this defines a 2n×2n2^n\times2^n2n×2n matrix over Z/2Z\mathbb Z/2\mathbb ZZ/2Z. For row rrr and column ccc in {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}, let Rn(r)=(∑k=0n−1bk(r)2n−1−k) mod 2nR_n(r)=\bigl(\sum_{k=0}^{n-1}b_k(r)2^{n-1-k}\bigr)\bmod2^nRn​(r)=(∑k=0n−1​bk​(r)2n−1−k)mod2n, where bk(j)∈{0,1}b_k(j)\in\{0,1\}bk​(j)∈{0,1} is bit kkk of jjj, counted from the least significant bit. The entry is the product, in Z/2Z\mathbb Z/2\mathbb ZZ/2Z, over k=0,…,n−1k=0,\ldots,n-1k=0,…,n−1 of 111 when bk(c)=0b_k(c)=0bk​(c)=0, and bk(Rn(r))b_k(R_n(r))bk​(Rn​(r)) when bk(c)=1b_k(c)=1bk​(c)=1. For n=0n=0n=0, the product is empty, so the sole matrix entry is 111.

QAlgorithms.Papers.Independent.Intakethird100.P14.positiveBoundedRoot

For any type III and any bounded complex-linear operator TTT on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C), this returns a classically chosen bounded positive operator SSS satisfying S∘S=TS\circ S=TS∘S=T, 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 TTT is imposed.

QAlgorithms.Papers.Independent.Intakethird100.P14.previousBits

For every natural number nnn, let N=2nN=2^nN=2n and identify the wire indices with {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}. Given an index iii and a word u:{0,…,N−1}→Z/2Zu:\{0,\ldots,N-1\}\to\mathbb Z/2\mathbb Zu:{0,…,N−1}→Z/2Z, this defines the word of length iii whose value at k<ik<ik<i is uku_kuk​. Thus it retains every bit strictly before iii, regardless of any choice of information positions. For i=0i=0i=0 its domain is empty. The case n=0n=0n=0 is included: there is one wire, indexed by 000, and its preceding word is empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.recursivePolarEncoder

For every n∈Nn\in\mathbb Nn∈N, this defines a finite list of instructions on indices {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}. Write bk(i)b_k(i)bk​(i) for bit kkk of iii, counted from the least significant bit, and Rn(i)=(∑k=0n−1bk(i)2n−1−k) mod 2nR_n(i)=\bigl(\sum_{k=0}^{n-1}b_k(i)2^{n-1-k}\bigr)\bmod2^nRn​(i)=(∑k=0n−1​bk​(i)2n−1−k)mod2n. The list first contains one swap of iii and Rn(i)R_n(i)Rn​(i) for every index satisfying i<Rn(i)i<R_n(i)i<Rn​(i), in the enumeration order obtained by converting that filtered finite set to a list. It then concatenates stages for k=0,1,…,n−1k=0,1,\ldots,n-1k=0,1,…,n−1 in increasing order; stage kkk contains, for every index iii with bk(i)=0b_k(i)=0bk​(i)=0, an XOR instruction with source (ixor2k) mod 2n(i\mathbin{\mathrm{xor}}2^k)\bmod2^n(ixor2k)mod2n and target iii, again in the enumeration order obtained from the filtered finite set. An XOR instruction adds the source value to the target value in Z/2Z\mathbb Z/2\mathbb ZZ/2Z, and a swap exchanges its two values. When n=0n=0n=0, both portions are empty, so the resulting list is empty.

QAlgorithms.Papers.Independent.Intakethird100.P14.reverseWire

For every n∈Nn\in\mathbb Nn∈N and every index i∈{0,…,2n−1}i\in\{0,\ldots,2^n-1\}i∈{0,…,2n−1}, this returns the index whose value is

(∑k=0n−11{bit k of i is 1} 2 n−1−k) mod 2n,\left(\sum_{k=0}^{n-1}\mathbf 1_{\{\text{bit }k\text{ of }i\text{ is }1\}}\,2^{\,n-1-k}\right)\bmod 2^n,(k=0∑n−1​1{bit k of i is 1}​2n−1−k)mod2n,

where bit 000 is the least significant bit. Thus the formula reverses the nnn binary digits and explicitly reduces the result modulo 2n2^n2n. The exponent subtraction is natural-number subtraction; for the displayed summation indices it does not truncate a negative value. When n=0n=0n=0, the sum is empty and the result is 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.runEncoder

For every n∈Nn\in\mathbb Nn∈N, every finite ordered list of instructions, and every word u:{0,…,2n−1}→Z/2Zu:\{0,\ldots,2^n-1\}\to\mathbb Z/2\mathbb Zu:{0,…,2n−1}→Z/2Z, this returns the result of applying the instructions successively from the beginning of the list to its end, starting with uuu. An XOR instruction from sss to ttt replaces the current target value by the sum of the current target and source values in Z/2Z\mathbb Z/2\mathbb ZZ/2Z; a swap exchanges the current values at its two indices. Equal source and target are permitted and set that coordinate to 000; equal swap indices have no effect. An empty list returns uuu, and n=0n=0n=0 is allowed, giving a one-coordinate word.

QAlgorithms.Papers.Independent.Intakethird100.P14.splitChannel

For any type III, any function assigning a complex matrix WbW_bWb​ indexed by III to each b∈F2b\in\mathbb F_2b∈F2​, any n∈Nn\in\mathbb Nn∈N, and index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, this defines a matrix-valued function of an input bit bbb, with rows and columns indexed by pairs (h,a)∈F2i×IN(h,a)\in\mathbb F_2^i\times I^N(h,a)∈F2i​×IN. For a history hhh, let x(h,b,v)j=hjx(h,b,v)_j=h_jx(h,b,v)j​=hj​ when j<ij<ij<i, bbb when j=ij=ij=i, and vjv_jvj​ when j>ij>ij>i. Define

rev⁡n(r)=(∑t=0n−1rt2n−1−t) mod N,En(x)c=∑0≤r<N∀t<n, ct=1⇒(rev⁡n(r))t=1xrin F2,\operatorname{rev}_n(r)= \left(\sum_{t=0}^{n-1}r_t2^{n-1-t}\right)\bmod N, \qquad E_n(x)_c= \sum_{\substack{0\le r<N\\ \forall t<n,\ c_t=1\Rightarrow(\operatorname{rev}_n(r))_t=1}}x_r \quad\text{in }\mathbb F_2,revn​(r)=(t=0∑n−1​rt​2n−1−t)modN,En​(x)c​=0≤r<N∀t<n, ct​=1⇒(revn​(r))t​=1​∑​xr​in F2​,

where subscripts ttt denote binary digits. Its entries are

splitChannel⁡(W,n,i)b((h,a),(h′,a′))={12i2N∑v∈F2N∏c=0N−1WEn(x(h,b,v))c(ac,ac′),h=h′,0,h≠h′.\operatorname{splitChannel}(W,n,i)_b\bigl((h,a),(h',a')\bigr)= \begin{cases} \displaystyle\frac1{2^i2^N}\sum_{v\in\mathbb F_2^N} \prod_{c=0}^{N-1}W_{E_n(x(h,b,v))_c}(a_c,a'_c), &h=h',\\[2mm] 0,&h\ne h'. \end{cases}splitChannel(W,n,i)b​((h,a),(h′,a′))=⎩⎨⎧​2i2N1​v∈F2N​∑​c=0∏N−1​WEn​(x(h,b,v))c​​(ac​,ac′​),0,​h=h′,h=h′.​

There are no positivity or normalization hypotheses on WWW, and III may be empty. For n=0n=0n=0, the histories are empty and the entries reduce to Wb(a0,a0′)W_b(a_0,a'_0)Wb​(a0​,a0′​).

QAlgorithms.Papers.Independent.Intakethird100.P14.squaredCqFidelity

For any type III and any map W:Z/2Z→CI×IW:\mathbb Z/2\mathbb Z\to\mathbb C^{I\times I}W:Z/2Z→CI×I, form AbA_bAb​ by choosing a bounded complex-linear operator on ℓ2(I;C)\ell^2(I;\mathbb C)ℓ2(I;C) satisfying (Abej)(i)=W(b)ij(A_be_j)(i)=W(b)_{ij}(Ab​ej​)(i)=W(b)ij​ for every i,ji,ji,j, or taking Ab=0A_b=0Ab​=0 if no such operator exists, where eje_jej​ is the coordinate unit vector. Choose a bounded positive square root SSS of A0A_0A0​, taking S=0S=0S=0 if none exists, and choose a bounded positive square root RRR of S∘A1∘SS\circ A_1\circ SS∘A1​∘S, taking R=0R=0R=0 if none exists. This defines (Re⁡∑i∈I(Rei)(i))2\left(\operatorname{Re}\sum_{i\in I}(Re_i)(i)\right)^2(Re∑i∈I​(Rei​)(i))2, where a nonsummable unconditional complex sum is assigned value 000. No density or normalization assumption is required, and empty III gives value 000.

QAlgorithms.Papers.Independent.Intakethird100.P14.symmetricInformation

For any type III and any pair of complex coefficient arrays Wb:I×I→CW_b:I\times I\to\mathbb CWb​:I×I→C, indexed by b∈Z/2Zb\in\mathbb Z/2\mathbb Zb∈Z/2Z, put W‾=(W0+W1)/2\overline W=(W_0+W_1)/2W=(W0​+W1​)/2. The definition is (D(W0,W‾)+D(W1,W‾))/2\bigl(D(W_0,\overline W)+D(W_1,\overline W)\bigr)/2(D(W0​,W)+D(W1​,W))/2, with arithmetic in [0,+∞][0,+\infty][0,+∞]. Here D(X,Y)D(X,Y)D(X,Y) is defined as follows: on H=ℓ2(I;C)H=\ell^2(I;\mathbb C)H=ℓ2(I;C), choose for each array ZZZ a bounded complex-linear operator TZT_ZTZ​ with coordinate matrix ZZZ, or use 000 if none exists; for every n∈Nn\in\mathbb Nn∈N and every orthonormal family v0,…,vn−1v_0,\ldots,v_{n-1}v0​,…,vn−1​, form Aij=⟨vi,TXvj⟩A_{ij}=\langle v_i,T_Xv_j\rangleAij​=⟨vi​,TX​vj​⟩ and Bij=⟨vi,TYvj⟩B_{ij}=\langle v_i,T_Yv_j\rangleBij​=⟨vi​,TY​vj​⟩; take the supremum of +∞+\infty+∞ when ker⁡B⊈ker⁡A\ker B\not\subseteq\ker AkerB⊆kerA, and otherwise of the nonnegative part of Re⁡tr⁡(f(A)−Alog⁡(B)−A+B)/log⁡2\operatorname{Re}\operatorname{tr}(f(A)-A\log(B)-A+B)/\log 2Retr(f(A)−Alog(B)−A+B)/log2, where f(t)=tlog⁡tf(t)=t\log tf(t)=tlogt and matrix functions use continuous functional calculus. The empty family n=0n=0n=0 contributes 000. There is no assumption that either WbW_bWb​ is a density array, and no countability or nonemptiness assumption on III.

QAlgorithms.Papers.Independent.Intakethird100.P14.toggleWire

For every n∈Nn\in\mathbb Nn∈N, every k∈{0,…,n−1}k\in\{0,\ldots,n-1\}k∈{0,…,n−1}, and every i∈{0,…,2n−1}i\in\{0,\ldots,2^n-1\}i∈{0,…,2n−1}, this returns the index with value (ixor2k) mod 2n(i\mathbin{\mathrm{xor}}2^k)\bmod2^n(ixor2k)mod2n, where the XOR is bitwise XOR of natural numbers. This toggles bit kkk, counted from the least significant bit, and explicitly reduces modulo 2n2^n2n. For n=0n=0n=0, there is no possible argument kkk.

QAlgorithms.Papers.Independent.Intakethird100.P14.uniformMixture

For any type III and any map W:Z/2Z→CI×IW:\mathbb Z/2\mathbb Z\to\mathbb C^{I\times I}W:Z/2Z→CI×I, this defines the complex array with entries 12(W(0)ij+W(1)ij)\frac12\bigl(W(0)_{ij}+W(1)_{ij}\bigr)21​(W(0)ij​+W(1)ij​) for every i,j∈Ii,j\in Ii,j∈I. No positivity, normalization, summability, or nonemptiness assumption is imposed.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me