Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Quantum polar codes for arbitrary channels

Definition
QAlgorithms_Papers_Independent_Intakethird100_P23

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

prove2quantum

The objects the formalized statements of Quantum polar codes for arbitrary channels (arXiv:1201.2906) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • polarMatrixEntry: Entry of G_N = B_N F^{⊗n}, F = [[1,0],[1,1]], with row vectors and bit reversal B_N. The bit condition is j ⊆ reverse(i) (p.2).
  • polarEncode: The actual Arikan binary transform u ↦ u G_N (pp.2–3).
  • binaryCharacter: Character (-1)^{x·z} of the binary group (Eq.(8), p.3).
  • amplitudeVector: Purified output on B^N E^N of the coherent encoder followed by U^{⊗N} on amplitude input u; U has computational-basis columns (pp.1,3).
  • amplitudeBlock: Bob's actual amplitude output; the environment is traced out (Eqs.(1),(5), pp.1–2).
  • environmentBlock: Eve's amplitude output, from the SAME purification and encoder (pp.2,8).
  • phaseVector: Eq.(8), p.3, in register order (B^N,C^N),E^N. The C coordinate is z, while the input to U^{⊗N} is z G_N. This retains the coherent C-register transformation that appears when using G_N^T on phase labels.
  • phaseBlock: Physical phase output on B^N C^N, with E^N inaccessible (Eq.(8), p.3).
  • splitChannel: Combining and splitting of an ACTUAL block ensemble W. Conditional on u_i, all N-1 other bits are uniform, with the known history retained classically. Off-diagonal history entries vanish. The inline mask retains j<i in amplitude and i<j in phase, padding all other wires by false. Eqs.(5)–(6), p.2; reverse version p.3.
  • symmetricInformation: Symmetric Holevo information in bits of a binary uniform ensemble (p.2).
  • channelRootFidelity: Root channel fidelity; the paper's F is its square. On the physical normalized states this equals sqrt(F) (p.2).
  • threshold: The fixed-exponent polarization threshold 2^{-N^beta} (Eq.(7), p.2).
  • amplitudeSplit: Bob's synthesized amplitude channels, forward histories (pp.2–3).
  • phaseSplit: Bob's synthesized phase channels, reverse histories and all C^N QSI (p.3).
  • environmentSplit: Eve's synthesized amplitude channels, forward histories (pp.8–9).
  • goodSet: Strict good-set rule; the bad set is exactly its complement (Eq.(7), p.2).
  • goodAmplitude: Amplitude-good indices, Eq.(7) and I.C, pp.2–3.
  • goodPhase: Phase-good indices, Eq.(7) and I.C, pp.2–3.
  • goodEnvironment: Eve-amplitude-good indices, Appendix C, p.9.
  • informationSet: Information-ebit positions A (p.3).
  • consumedSet: Consumed-ebit positions B, doubly bad (p.3).
  • indexRate: Index-set rate; N=2^n is always positive, including n=0 (p.6).
  • amplitudeInformation: Single-use symmetric amplitude information (pp.2–3).
  • phaseInformation: Single-use symmetric phase information, including C (pp.2–3).
  • symmetricCoherentInformation: H(B)-H(E) on the maximally mixed qubit input, equal to H(B)-H(AB) on its purification. This is symmetric coherent information, with no maximization (p.3).
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Basic
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67

/-!
Statements from Wilde–Renes, arXiv:1201.2906v2. All page numbers are PDF pages.
The local definitions below construct the physical channels, rather than accepting
unrelated synthesized channels or their asymptotic properties as data.
-/

namespace QAlgorithms.Papers.Independent.Intakethird100.P23

open scoped BigOperators ComplexConjugate Matrix
open Filter
open QAlgorithms (Qubits)
open QAlgorithms.Papers.Independent.Information100.P67 (IsDegradable)

attribute [local instance] Classical.propDecidable

/-- Entry of G_N = B_N F^{⊗n}, F = [[1,0],[1,1]], with row vectors
and bit reversal B_N. The bit condition is j ⊆ reverse(i) (p.2). -/
def polarMatrixEntry (n : ℕ) (i j : Fin (2 ^ n)) : Bool :=
  decide (∀ k : Fin n,
    (j.val / 2 ^ k.val) % 2 ≤ (i.val / 2 ^ (n - 1 - k.val)) % 2)

/-- The actual Arikan binary transform u ↦ u G_N (pp.2–3). -/
def polarEncode (n : ℕ) (u : Qubits (2 ^ n)) : Qubits (2 ^ n) :=
  fun j => decide ((∑ i : Fin (2 ^ n),
    if polarMatrixEntry n i j then (if u i then 1 else 0 : ℕ) else 0) % 2 = 1)

/-- The N=1 generator is the identity (p.2); no history bits exist. -/
example : polarMatrixEntry 0 0 0 = true := by
  simp [polarMatrixEntry]

/-- Character (-1)^{x·z} of the binary group (Eq.(8), p.3). -/
def binaryCharacter {N : ℕ} (x z : Qubits N) : ℂ :=
  (-1 : ℂ) ^ (∑ i, if x i ∧ z i then 1 else 0 : ℕ)

example {N : ℕ} (z : Qubits N) : binaryCharacter (fun _ => false) z = 1 := by
  simp [binaryCharacter]

/-- Purified output on B^N E^N of the coherent encoder followed by U^{⊗N}
on amplitude input u; U has computational-basis columns (pp.1,3). -/
noncomputable def amplitudeVector {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (u : Qubits (2 ^ n)) :
    EuclideanSpace ℂ ((Fin (2 ^ n) → Fin b) × (Fin (2 ^ n) → Fin e)) :=
  WithLp.toLp 2 fun p => ∏ k, U (p.1 k, p.2 k) (polarEncode n u k)

/-- Bob's actual amplitude output; the environment is traced out (Eqs.(1),(5), pp.1–2). -/
noncomputable def amplitudeBlock {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (u : Qubits (2 ^ n)) :=
  QAlgorithms.traceRight (QAlgorithms.pureDensity (amplitudeVector U n u))

/-- Eve's amplitude output, from the SAME purification and encoder (pp.2,8). -/
noncomputable def environmentBlock {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (u : Qubits (2 ^ n)) :=
  QAlgorithms.traceLeft (QAlgorithms.pureDensity (amplitudeVector U n u))

/-- Eq.(8), p.3, in register order (B^N,C^N),E^N. The C coordinate
is z, while the input to U^{⊗N} is z G_N. This retains the coherent
C-register transformation that appears when using G_N^T on phase labels. -/
noncomputable def phaseVector {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (x : Qubits (2 ^ n)) :
    EuclideanSpace ℂ (((Fin (2 ^ n) → Fin b) × Qubits (2 ^ n)) ×
      (Fin (2 ^ n) → Fin e)) :=
  WithLp.toLp 2 fun p =>
    ((Real.sqrt ((2 : ℝ) ^ (2 ^ n)))⁻¹ : ℂ) * binaryCharacter x p.1.2 *
      ∏ k, U (p.1.1 k, p.2 k) (polarEncode n p.1.2 k)

/-- Physical phase output on B^N C^N, with E^N inaccessible (Eq.(8), p.3). -/
noncomputable def phaseBlock {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (x : Qubits (2 ^ n)) :=
  QAlgorithms.traceRight (QAlgorithms.pureDensity (phaseVector U n x))

/-- Combining and splitting of an ACTUAL block ensemble W. Conditional on u_i,
all N-1 other bits are uniform, with the known history retained classically.
Off-diagonal history entries vanish. The inline mask retains j<i in amplitude
and i<j in phase, padding all other wires by false. Eqs.(5)–(6), p.2;
reverse version p.3. -/
noncomputable def splitChannel {N : ℕ} {O : Type*} [Fintype O]
    (W : Qubits N → Matrix O O ℂ) (reverse : Bool) (i : Fin N) (a : Bool) :
    Matrix (Qubits N × O) (Qubits N × O) ℂ :=
  fun p q => if p.1 = q.1 then
    (((2 : ℝ) ^ (N - 1))⁻¹ : ℂ) * ∑ u : Qubits N,
      if u i = a ∧
        (fun j : Fin N =>
          if (if reverse then i.val < j.val else j.val < i.val) then u j else false) = p.1
      then W u p.2 q.2 else 0
  else 0

/-- Symmetric Holevo information in bits of a binary uniform ensemble (p.2). -/
noncomputable def symmetricInformation {O : Type*} [Fintype O] [DecidableEq O]
    (W : Bool → Matrix O O ℂ) : ℝ :=
  QAlgorithms.vnEntropy (((1 / 2 : ℝ) : ℂ) • (W false + W true)) -
    (QAlgorithms.vnEntropy (W false) + QAlgorithms.vnEntropy (W true)) / 2

/-- Root channel fidelity; the paper's F is its square. On the physical
normalized states this equals sqrt(F) (p.2). -/
noncomputable def channelRootFidelity {O : Type*} [Fintype O] [DecidableEq O]
    (W : Bool → Matrix O O ℂ) : ℝ :=
  QAlgorithms.rootFidelity (W false) (W true)

/-- The fixed-exponent polarization threshold 2^{-N^beta} (Eq.(7), p.2). -/
noncomputable def threshold (n : ℕ) (beta : ℝ) : ℝ :=
  (2 : ℝ) ^ (-(((2 ^ n : ℕ) : ℝ) ^ beta))

/-- Bob's synthesized amplitude channels, forward histories (pp.2–3). -/
noncomputable def amplitudeSplit {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (i : Fin (2 ^ n)) :=
  splitChannel (amplitudeBlock U n) false i

/-- Bob's synthesized phase channels, reverse histories and all C^N QSI (p.3). -/
noncomputable def phaseSplit {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (i : Fin (2 ^ n)) :=
  splitChannel (phaseBlock U n) true i

/-- Eve's synthesized amplitude channels, forward histories (pp.8–9). -/
noncomputable def environmentSplit {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (i : Fin (2 ^ n)) :=
  splitChannel (environmentBlock U n) false i

/-- Strict good-set rule; the bad set is exactly its complement (Eq.(7), p.2). -/
noncomputable def goodSet {N : ℕ} {O : Type*} [Fintype O] [DecidableEq O]
    (W : Fin N → Bool → Matrix O O ℂ) (t : ℝ) : Finset (Fin N) :=
  Finset.univ.filter fun i => channelRootFidelity (W i) < t

/-- Amplitude-good indices, Eq.(7) and I.C, pp.2–3. -/
noncomputable def goodAmplitude {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (beta : ℝ) := goodSet (amplitudeSplit U n) (threshold n beta)

/-- Phase-good indices, Eq.(7) and I.C, pp.2–3. -/
noncomputable def goodPhase {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (beta : ℝ) := goodSet (phaseSplit U n) (threshold n beta)

/-- Eve-amplitude-good indices, Appendix C, p.9. -/
noncomputable def goodEnvironment {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (beta : ℝ) := goodSet (environmentSplit U n) (threshold n beta)

/-- Information-ebit positions A (p.3). -/
noncomputable def informationSet {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (beta : ℝ) := goodAmplitude U n beta ∩ goodPhase U n beta

/-- Consumed-ebit positions B, doubly bad (p.3). -/
noncomputable def consumedSet {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ)
    (n : ℕ) (beta : ℝ) := (goodAmplitude U n beta ∪ goodPhase U n beta)ᶜ

/-- Index-set rate; N=2^n is always positive, including n=0 (p.6). -/
noncomputable def indexRate {n : ℕ} (S : Finset (Fin (2 ^ n))) : ℝ :=
  (S.card : ℝ) / (2 ^ n : ℕ)

/-- Single-use symmetric amplitude information (pp.2–3). -/
noncomputable def amplitudeInformation {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ) :=
  symmetricInformation (fun a => amplitudeBlock U 0 (fun _ => a))

/-- Single-use symmetric phase information, including C (pp.2–3). -/
noncomputable def phaseInformation {b e : ℕ} (U : Matrix (Fin b × Fin e) Bool ℂ) :=
  symmetricInformation (fun a => phaseBlock U 0 (fun _ => a))

/-- H(B)-H(E) on the maximally mixed qubit input, equal to H(B)-H(AB)
on its purification. This is symmetric coherent information, with no maximization (p.3). -/
noncomputable def symmetricCoherentInformation {b e : ℕ}
    (U : Matrix (Fin b × Fin e) Bool ℂ) : ℝ :=
  QAlgorithms.vnEntropy (((1 / 2 : ℝ) : ℂ) •
    (amplitudeBlock U 0 (fun _ => false) + amplitudeBlock U 0 (fun _ => true))) -
  QAlgorithms.vnEntropy (((1 / 2 : ℝ) : ℂ) •
    (environmentBlock U 0 (fun _ => false) + environmentBlock U 0 (fun _ => true)))

end QAlgorithms.Papers.Independent.Intakethird100.P23
Source
Quantum polar codes for arbitrary channels, arXiv:1201.2906v2, https://arxiv.org/abs/1201.2906v2
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P23.amplitudeBlock

For arbitrary natural numbers b,e,nb,e,nb,e,n, an arbitrary complex matrix UUU with rows (r,q)∈{0,…,b−1}×{0,…,e−1}(r,q)\in\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}(r,q)∈{0,…,b−1}×{0,…,e−1} and Boolean columns, and a Boolean string uuu of length N=2nN=2^nN=2n, this defines a complex matrix indexed by sequences s,s′∈{0,…,b−1}Ns,s'\in\{0,\ldots,b-1\}^Ns,s′∈{0,…,b−1}N:

As,s′=∑t∈{0,…,e−1}N(∏k=0N−1U(sk,tk), ck(u))(∏k=0N−1U(sk′,tk), ck(u))‾.A_{s,s'}= \sum_{t\in\{0,\ldots,e-1\}^N} \left(\prod_{k=0}^{N-1}U_{(s_k,t_k),\,c_k(u)}\right) \overline{\left(\prod_{k=0}^{N-1}U_{(s'_k,t_k),\,c_k(u)}\right)}.As,s′​=t∈{0,…,e−1}N∑​(k=0∏N−1​U(sk​,tk​),ck​(u)​)(k=0∏N−1​U(sk′​,tk​),ck​(u)​)​.

The Boolean ck(u)c_k(u)ck​(u) is the parity of the number of true coordinates uℓu_\elluℓ​ satisfying (⌊k/2r⌋ mod 2)≤(⌊ℓ/2n−1−r⌋ mod 2)(\lfloor k/2^r\rfloor\bmod2)\le(\lfloor\ell/2^{n-1-r}\rfloor\bmod2)(⌊k/2r⌋mod2)≤(⌊ℓ/2n−1−r⌋mod2) for every 0≤r<n0\le r<n0≤r<n. This formula forms the vector’s outer product with its complex conjugate and sums over the second sequence coordinate. There is no normalization hypothesis on UUU. When n=0n=0n=0, N=1N=1N=1 and c0(u)=u0c_0(u)=u_0c0​(u)=u0​; when e=0e=0e=0, the sum is empty and the matrix is zero, and when b=0b=0b=0, the matrix has an empty index set.

QAlgorithms.Papers.Independent.Intakethird100.P23.amplitudeInformation

For any natural numbers b,eb,eb,e and any complex matrix UUU with row index (r,h)∈{0,…,b−1}×{0,…,e−1}(r,h)\in\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}(r,h)∈{0,…,b−1}×{0,…,e−1} and Boolean column index aaa, define the two b×bb\times bb×b matrices

Ra(r,s)=∑h=0e−1U(r,h),aU(s,h),a‾(a=0,1).R_a(r,s)=\sum_{h=0}^{e-1}U_{(r,h),a}\overline{U_{(s,h),a}} \qquad(a=0,1).Ra​(r,s)=h=0∑e−1​U(r,h),a​U(s,h),a​​(a=0,1).

Writing

H(M)=−Re⁡tr⁡(cfc⁡(x↦xlog⁡2x)(M)),H(M)=-\operatorname{Re}\operatorname{tr}\bigl(\operatorname{cfc}(x\mapsto x\log_2x)(M)\bigr),H(M)=−Retr(cfc(x↦xlog2​x)(M)),

where cfc⁡\operatorname{cfc}cfc denotes continuous functional calculus, this declaration defines

H ⁣(R0+R12)−H(R0)+H(R1)2.H\!\left(\frac{R_0+R_1}{2}\right) -\frac{H(R_0)+H(R_1)}{2}.H(2R0​+R1​​)−2H(R0​)+H(R1​)​.

The function x↦xlog⁡2xx\mapsto x\log_2xx↦xlog2​x takes value zero at x=0x=0x=0 under the total real-logarithm convention. No normalization or isometry condition is imposed on UUU, so the matrices RaR_aRa​ are not required to have trace one. Both b=0b=0b=0 and e=0e=0e=0 are included, and either case gives value zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.amplitudeSplit

For any natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU with rows indexed by {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and columns indexed by Boolean values, and any i∈{0,…,2n−1}i\in\{0,\ldots,2^n-1\}i∈{0,…,2n−1}, this defines a Boolean-indexed family of matrices as follows. Put N=2nN=2^nN=2n, identify Boolean values with 0,10,10,1, and write Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Define the encoding En:Q→QE_n:Q\to QEn​:Q→Q by

En(u)j=(∑0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)uh) mod 2,E_n(u)_j= \left(\sum_{\substack{0\le h<N\\ \forall\,0\le k<n,\; (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2)}}u_h\right)\bmod2,En​(u)j​=​0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)​∑​uh​​mod2,

and put vu(r,h)=∏k=0N−1U(rk,hk),En(u)kv_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}vu​(r,h)=∏k=0N−1​U(rk​,hk​),En​(u)k​​ for r∈Br\in\mathcal Br∈B, h∈Eh\in\mathcal Eh∈E. Let pi(u)∈Qp_i(u)\in Qpi​(u)∈Q have coordinate uju_juj​ when j<ij<ij<i, and 000 otherwise. For each Boolean input aaa, the defined matrix AiaA_i^aAia​, indexed by Q×BQ\times\mathcal BQ×B, has entries

Aia((p,r),(q,s))={2−(N−1)∑u∈Qui=a,pi(u)=p∑h∈Evu(r,h)vu(s,h)‾,p=q,0,p≠q.A_i^a((p,r),(q,s))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{h\in\mathcal E}v_u(r,h)\overline{v_u(s,h)},&p=q,\\ 0,&p\ne q. \end{cases}Aia​((p,r),(q,s))=⎩⎨⎧​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​h∈E∑​vu​(r,h)vu​(s,h)​,0,​p=q,p=q.​

There is no normalization or isometry hypothesis on UUU. The parameters b,e,nb,e,nb,e,n may be zero; when n=0n=0n=0, N=1N=1N=1, the encoding is the identity, the prefix is always zero, and the factor 2−(N−1)2^{-(N-1)}2−(N−1) is 111.

QAlgorithms.Papers.Independent.Intakethird100.P23.amplitudeVector

For arbitrary natural numbers b,e,nb,e,nb,e,n, an arbitrary complex matrix UUU with rows indexed by {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and columns indexed by Booleans, and a Boolean string uuu of length N=2nN=2^nN=2n, this defines a vector in the complex Euclidean space indexed by pairs of sequences s∈{0,…,b−1}Ns\in\{0,\ldots,b-1\}^Ns∈{0,…,b−1}N and t∈{0,…,e−1}Nt\in\{0,\ldots,e-1\}^Nt∈{0,…,e−1}N, with coordinates

v(s,t)=∏k=0N−1U(sk,tk), ck(u).v(s,t)=\prod_{k=0}^{N-1}U_{(s_k,t_k),\,c_k(u)}.v(s,t)=k=0∏N−1​U(sk​,tk​),ck​(u)​.

Here ck(u)c_k(u)ck​(u) is true exactly when the number of indices ℓ\ellℓ for which uℓu_\elluℓ​ is true and

∀ 0≤r<n,(⌊k/2r⌋ mod 2)≤(⌊ℓ/2n−1−r⌋ mod 2)\forall\,0\le r<n,\qquad (\lfloor k/2^r\rfloor\bmod2) \le(\lfloor\ell/2^{n-1-r}\rfloor\bmod2)∀0≤r<n,(⌊k/2r⌋mod2)≤(⌊ℓ/2n−1−r⌋mod2)

is odd. No isometry or normalization hypothesis is imposed on UUU. The case n=0n=0n=0 has N=1N=1N=1 and c0(u)=u0c_0(u)=u_0c0​(u)=u0​; if b=0b=0b=0 or e=0e=0e=0, the vector’s index set is empty and the vector is zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.binaryCharacter

For every natural number NNN, including N=0N=0N=0, and Boolean strings x,zx,zx,z of length NNN, this defines the complex number

(−1) ∣{i:0≤i<N, xi=true and zi=true}∣.(-1)^{\,|\{i:0\le i<N,\ x_i=\mathrm{true}\ \text{and}\ z_i=\mathrm{true}\}|}.(−1)∣{i:0≤i<N, xi​=true and zi​=true}∣.

It is 111 when the number of coordinates where both strings are true is even and −1-1−1 when that number is odd. For N=0N=0N=0, the exponent is the empty sum 000, so the value is 111.

QAlgorithms.Papers.Independent.Intakethird100.P23.channelRootFidelity

For every finite type OOO equipped with decidable equality and every assignment WWW of a complex O×OO\times OO×O matrix to each Boolean, this defines

Re⁡tr⁡ ⁣(cfc⁡[t] ⁣(cfc⁡[t](W(false)) W(true) cfc⁡[t](W(false)))).\operatorname{Re}\operatorname{tr}\!\left( \operatorname{cfc}[\sqrt{\phantom t}]\!\left( \operatorname{cfc}[\sqrt{\phantom t}](W(\mathrm{false})) \,W(\mathrm{true})\, \operatorname{cfc}[\sqrt{\phantom t}](W(\mathrm{false})) \right)\right).Retr(cfc[t​](cfc[t​](W(false))W(true)cfc[t​](W(false)))).

Each occurrence of cfc⁡[t]\operatorname{cfc}[\sqrt{\phantom t}]cfc[t​] denotes the real continuous functional calculus for the total real square-root function, which is zero on negative inputs. No positivity or trace-one assumption is imposed on either matrix. The type OOO may be empty, in which case the trace and the defined value are zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.consumedSet

For arbitrary natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU with rows indexed by {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and Boolean columns, and any real β\betaβ, put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Define En(u)jE_n(u)_jEn​(u)j​ as the parity of the sum of uhu_huh​ over h<Nh<Nh<N satisfying

∀ 0≤k<n,(⌊j/2k⌋ mod 2)≤(⌊h/2n−1−k⌋ mod 2),\forall\,0\le k<n,\qquad (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2),∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2),

and set

vu(r,h)=∏k=0N−1U(rk,hk),En(u)k,wx(r,z,h)=2−N/2(−1)∑k=0N−1xkzkvz(r,h).v_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}, \qquad w_x(r,z,h)=2^{-N/2}(-1)^{\sum_{k=0}^{N-1}x_kz_k}v_z(r,h).vu​(r,h)=k=0∏N−1​U(rk​,hk​),En​(u)k​​,wx​(r,z,h)=2−N/2(−1)∑k=0N−1​xk​zk​vz​(r,h).

Let pi(u)j=ujp_i(u)_j=u_jpi​(u)j​=uj​ for j<ij<ij<i and zero otherwise, and let si(x)j=xjs_i(x)_j=x_jsi​(x)j​=xj​ for i<ji<ji<j and zero otherwise. For each Boolean aaa, form matrices

Aia((p,r),(q,s))=1p=q 2−(N−1)∑u∈Qui=a,pi(u)=p∑h∈Evu(r,h)vu(s,h)‾,Pia((p,(r,z)),(q,(s,z′)))=1p=q 2−(N−1)∑x∈Qxi=a,si(x)=p∑h∈Ewx(r,z,h)wx(s,z′,h)‾.\begin{aligned} A_i^a((p,r),(q,s)) &=\mathbf1_{p=q}\,2^{-(N-1)} \sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{h\in\mathcal E}v_u(r,h)\overline{v_u(s,h)},\\ P_i^a((p,(r,z)),(q,(s,z'))) &=\mathbf1_{p=q}\,2^{-(N-1)} \sum_{\substack{x\in Q\\x_i=a,\;s_i(x)=p}} \sum_{h\in\mathcal E}w_x(r,z,h)\overline{w_x(s,z',h)}. \end{aligned}Aia​((p,r),(q,s))Pia​((p,(r,z)),(q,(s,z′)))​=1p=q​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​h∈E∑​vu​(r,h)vu​(s,h)​,=1p=q​2−(N−1)x∈Qxi​=a,si​(x)=p​∑​h∈E∑​wx​(r,z,h)wx​(s,z′,h)​.​

With f(ρ,σ)=Re⁡tr⁡ρ σ ρf(\rho,\sigma)=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt{\rho}\,\sigma\,\sqrt{\rho}}f(ρ,σ)=Retrρ​σρ​​, using continuous functional calculus, this defines

{i<N:2−Nβ≤f(Ai0,Ai1) and 2−Nβ≤f(Pi0,Pi1)}.\left\{i<N: 2^{-N^\beta}\le f(A_i^0,A_i^1) \ \text{and}\ 2^{-N^\beta}\le f(P_i^0,P_i^1) \right\}.{i<N:2−Nβ≤f(Ai0​,Ai1​) and 2−Nβ≤f(Pi0​,Pi1​)}.

Thus equality with the threshold is included in each condition. There is no normalization or isometry hypothesis on UUU, and β\betaβ is any real number. Zero values of b,e,nb,e,nb,e,n are allowed; when n=0n=0n=0, N=1N=1N=1, the encoding is the identity, the prefix and suffix strings are zero, and the threshold is 1/21/21/2.

QAlgorithms.Papers.Independent.Intakethird100.P23.environmentBlock

For arbitrary natural numbers b,e,nb,e,nb,e,n, an arbitrary complex matrix UUU with rows (r,q)∈{0,…,b−1}×{0,…,e−1}(r,q)\in\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}(r,q)∈{0,…,b−1}×{0,…,e−1} and Boolean columns, and a Boolean string uuu of length N=2nN=2^nN=2n, this defines a complex matrix indexed by sequences t,t′∈{0,…,e−1}Nt,t'\in\{0,\ldots,e-1\}^Nt,t′∈{0,…,e−1}N:

Et,t′=∑s∈{0,…,b−1}N(∏k=0N−1U(sk,tk), ck(u))(∏k=0N−1U(sk,tk′), ck(u))‾.E_{t,t'}= \sum_{s\in\{0,\ldots,b-1\}^N} \left(\prod_{k=0}^{N-1}U_{(s_k,t_k),\,c_k(u)}\right) \overline{\left(\prod_{k=0}^{N-1}U_{(s_k,t'_k),\,c_k(u)}\right)}.Et,t′​=s∈{0,…,b−1}N∑​(k=0∏N−1​U(sk​,tk​),ck​(u)​)(k=0∏N−1​U(sk​,tk′​),ck​(u)​)​.

The Boolean ck(u)c_k(u)ck​(u) is the parity of the number of true coordinates uℓu_\elluℓ​ satisfying (⌊k/2r⌋ mod 2)≤(⌊ℓ/2n−1−r⌋ mod 2)(\lfloor k/2^r\rfloor\bmod2)\le(\lfloor\ell/2^{n-1-r}\rfloor\bmod2)(⌊k/2r⌋mod2)≤(⌊ℓ/2n−1−r⌋mod2) for every 0≤r<n0\le r<n0≤r<n. This formula forms the vector’s outer product with its complex conjugate and sums over the first sequence coordinate. There is no normalization hypothesis on UUU. When n=0n=0n=0, N=1N=1N=1 and c0(u)=u0c_0(u)=u_0c0​(u)=u0​; when b=0b=0b=0, the sum is empty and the matrix is zero, and when e=0e=0e=0, the matrix has an empty index set.

QAlgorithms.Papers.Independent.Intakethird100.P23.environmentSplit

For any natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU with row index (r,h)∈{0,…,b−1}×{0,…,e−1}(r,h)\in\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}(r,h)∈{0,…,b−1}×{0,…,e−1} and Boolean column index, and any i<2ni<2^ni<2n, this defines a Boolean-indexed family of matrices. Put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Interpret Boolean values as 0,10,10,1, and define

En(u)j=(∑0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)uh) mod 2,vu(r,h)=∏k=0N−1U(rk,hk),En(u)k.E_n(u)_j= \left(\sum_{\substack{0\le h<N\\ \forall\,0\le k<n,\; (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2)}}u_h\right)\bmod2, \qquad v_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}.En​(u)j​=​0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)​∑​uh​​mod2,vu​(r,h)=k=0∏N−1​U(rk​,hk​),En​(u)k​​.

Let pi(u)j=ujp_i(u)_j=u_jpi​(u)j​=uj​ when j<ij<ij<i, and 000 otherwise. For each Boolean aaa, the defined matrix FiaF_i^aFia​, indexed by Q×EQ\times\mathcal EQ×E, has entries

Fia((p,h),(q,h′))={2−(N−1)∑u∈Qui=a,pi(u)=p∑r∈Bvu(r,h)vu(r,h′)‾,p=q,0,p≠q.F_i^a((p,h),(q,h'))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{r\in\mathcal B}v_u(r,h)\overline{v_u(r,h')},&p=q,\\ 0,&p\ne q. \end{cases}Fia​((p,h),(q,h′))=⎩⎨⎧​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​r∈B∑​vu​(r,h)vu​(r,h′)​,0,​p=q,p=q.​

The matrix UUU is arbitrary, with no normalization or isometry assumption. Zero values of b,e,nb,e,nb,e,n are included; for n=0n=0n=0, N=1N=1N=1, the encoding is the identity, the prefix is zero, and the splitting factor is 111.

QAlgorithms.Papers.Independent.Intakethird100.P23.goodAmplitude

For arbitrary natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU indexed by ({0,…,b−1}×{0,…,e−1})×{0,1}(\{0,\ldots,b-1\}\times\{0,\ldots,e-1\})\times\{0,1\}({0,…,b−1}×{0,…,e−1})×{0,1}, and any real β\betaβ, this defines the following set of indices. Put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Define En(u)jE_n(u)_jEn​(u)j​ as the parity of the sum of uhu_huh​ over those h<Nh<Nh<N satisfying

∀ 0≤k<n,(⌊j/2k⌋ mod 2)≤(⌊h/2n−1−k⌋ mod 2),\forall\,0\le k<n,\qquad (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2),∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2),

and set vu(r,h)=∏k=0N−1U(rk,hk),En(u)kv_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}vu​(r,h)=∏k=0N−1​U(rk​,hk​),En​(u)k​​. For i<Ni<Ni<N, let pi(u)j=ujp_i(u)_j=u_jpi​(u)j​=uj​ if j<ij<ij<i, and 000 otherwise, and define matrices on Q×BQ\times\mathcal BQ×B by

Aia((p,r),(q,s))={2−(N−1)∑u∈Qui=a,pi(u)=p∑h∈Evu(r,h)vu(s,h)‾,p=q,0,p≠q.A_i^a((p,r),(q,s))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{h\in\mathcal E}v_u(r,h)\overline{v_u(s,h)},&p=q,\\ 0,&p\ne q. \end{cases}Aia​((p,r),(q,s))=⎩⎨⎧​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​h∈E∑​vu​(r,h)vu​(s,h)​,0,​p=q,p=q.​

The resulting finite set is

{i<N:Re⁡tr⁡Ai0 Ai1 Ai0<2−Nβ},\left\{i<N: \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{A_i^0}\,A_i^1\,\sqrt{A_i^0}} <2^{-N^\beta}\right\},{i<N:RetrAi0​​Ai1​Ai0​​​<2−Nβ},

where the matrix square roots are given by continuous functional calculus. No isometry or normalization is assumed for UUU, and β\betaβ is unrestricted. The parameters b,e,nb,e,nb,e,n may be zero; when n=0n=0n=0, N=1N=1N=1, the encoding is the identity and the threshold is 1/21/21/2.

QAlgorithms.Papers.Independent.Intakethird100.P23.goodEnvironment

For arbitrary natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU indexed by ({0,…,b−1}×{0,…,e−1})×{0,1}(\{0,\ldots,b-1\}\times\{0,\ldots,e-1\})\times\{0,1\}({0,…,b−1}×{0,…,e−1})×{0,1}, and any real β\betaβ, put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Define En(u)jE_n(u)_jEn​(u)j​ to be the parity of the sum of uhu_huh​ over indices h<Nh<Nh<N satisfying

∀ 0≤k<n,(⌊j/2k⌋ mod 2)≤(⌊h/2n−1−k⌋ mod 2),\forall\,0\le k<n,\qquad (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2),∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2),

and write vu(r,h)=∏k=0N−1U(rk,hk),En(u)kv_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}vu​(r,h)=∏k=0N−1​U(rk​,hk​),En​(u)k​​. Let pi(u)j=ujp_i(u)_j=u_jpi​(u)j​=uj​ for j<ij<ij<i, and 000 otherwise. Define matrices indexed by Q×EQ\times\mathcal EQ×E by

Fia((p,h),(q,h′))={2−(N−1)∑u∈Qui=a,pi(u)=p∑r∈Bvu(r,h)vu(r,h′)‾,p=q,0,p≠q.F_i^a((p,h),(q,h'))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{r\in\mathcal B}v_u(r,h)\overline{v_u(r,h')},&p=q,\\ 0,&p\ne q. \end{cases}Fia​((p,h),(q,h′))=⎩⎨⎧​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​r∈B∑​vu​(r,h)vu​(r,h′)​,0,​p=q,p=q.​

The defined finite set is

{i<N:Re⁡tr⁡Fi0 Fi1 Fi0<2−Nβ},\left\{i<N: \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{F_i^0}\,F_i^1\,\sqrt{F_i^0}} <2^{-N^\beta}\right\},{i<N:RetrFi0​​Fi1​Fi0​​​<2−Nβ},

where matrix square roots use continuous functional calculus. The matrix UUU need not be an isometry or normalized, and β\betaβ is any real number. The values b,e,n=0b,e,n=0b,e,n=0 are included; when n=0n=0n=0, N=1N=1N=1, the encoding is the identity, the prefix is zero, and the threshold is 1/21/21/2.

QAlgorithms.Papers.Independent.Intakethird100.P23.goodPhase

For any natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU with rows indexed by {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and Boolean columns, and any real β\betaβ, put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. With Boolean values identified with 0,10,10,1, let En(z)jE_n(z)_jEn​(z)j​ be the parity of the sum of zhz_hzh​ over h<Nh<Nh<N satisfying

∀ 0≤k<n,(⌊j/2k⌋ mod 2)≤(⌊h/2n−1−k⌋ mod 2),\forall\,0\le k<n,\qquad (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2),∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2),

and define

wx(r,z,h)=2−N/2(−1)∑k=0N−1xkzk∏k=0N−1U(rk,hk),En(z)k.w_x(r,z,h)=2^{-N/2}(-1)^{\sum_{k=0}^{N-1}x_kz_k} \prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(z)_k}.wx​(r,z,h)=2−N/2(−1)∑k=0N−1​xk​zk​k=0∏N−1​U(rk​,hk​),En​(z)k​​.

For i<Ni<Ni<N, set si(x)j=xjs_i(x)_j=x_jsi​(x)j​=xj​ when i<ji<ji<j, and 000 otherwise. For Boolean aaa, define matrices indexed by Q×(B×Q)Q\times(\mathcal B\times Q)Q×(B×Q) by

Pia((p,(r,z)),(q,(s,z′)))={2−(N−1)∑x∈Qxi=a,si(x)=p∑h∈Ewx(r,z,h)wx(s,z′,h)‾,p=q,0,p≠q.P_i^a((p,(r,z)),(q,(s,z')))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{x\in Q\\x_i=a,\;s_i(x)=p}} \sum_{h\in\mathcal E}w_x(r,z,h)\overline{w_x(s,z',h)},&p=q,\\ 0,&p\ne q. \end{cases}Pia​((p,(r,z)),(q,(s,z′)))=⎩⎨⎧​2−(N−1)x∈Qxi​=a,si​(x)=p​∑​h∈E∑​wx​(r,z,h)wx​(s,z′,h)​,0,​p=q,p=q.​

The declaration defines the finite set

{i<N:Re⁡tr⁡Pi0 Pi1 Pi0<2−Nβ},\left\{i<N: \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{P_i^0}\,P_i^1\,\sqrt{P_i^0}} <2^{-N^\beta}\right\},{i<N:RetrPi0​​Pi1​Pi0​​​<2−Nβ},

using continuous functional calculus for matrix square roots. There is no normalization or isometry requirement on UUU, and no restriction on β\betaβ. Zero values of b,e,nb,e,nb,e,n are allowed; n=0n=0n=0 gives N=1N=1N=1, identity encoding, a zero suffix, and threshold 1/21/21/2.

QAlgorithms.Papers.Independent.Intakethird100.P23.goodSet

For any natural number NNN, any finite type OOO equipped with decidable equality, any family WiaW_i^aWia​ of complex O×OO\times OO×O matrices indexed by i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1} and Boolean aaa, and any real number ttt, this defines the finite set

{i<N:Re⁡tr⁡R ⁣(R(Wi0) Wi1 R(Wi0))<t},\left\{i<N: \operatorname{Re}\operatorname{tr} \mathcal R\!\left(\mathcal R(W_i^0)\,W_i^1\,\mathcal R(W_i^0)\right)<t \right\},{i<N:RetrR(R(Wi0​)Wi1​R(Wi0​))<t},

where R(M)\mathcal R(M)R(M) means applying the real function x↦xx\mapsto\sqrt{x}x↦x​ to MMM using the total continuous functional calculus. The comparison is strictly <t<t<t, and no positivity, trace, or normalization condition is imposed on the matrices. The threshold ttt is unrestricted, OOO may be empty, and when N=0N=0N=0 the resulting set is empty.

QAlgorithms.Papers.Independent.Intakethird100.P23.indexRate

For every natural number nnn and every finite subset S⊆{0,…,2n−1}S\subseteq\{0,\ldots,2^n-1\}S⊆{0,…,2n−1}, this defines the real number

∣S∣2n,\frac{|S|}{2^n},2n∣S∣​,

with both numerator and denominator interpreted as real numbers. The empty set is allowed and gives 000. The denominator is always positive, including when n=0n=0n=0; in that case the ambient index set has one element, so the value is 000 or 111.

QAlgorithms.Papers.Independent.Intakethird100.P23.informationSet

For any natural numbers b,e,nb,e,nb,e,n, any complex matrix UUU indexed by ({0,…,b−1}×{0,…,e−1})×{0,1}(\{0,\ldots,b-1\}\times\{0,\ldots,e-1\})\times\{0,1\}({0,…,b−1}×{0,…,e−1})×{0,1}, and any real β\betaβ, this defines a finite set as follows. Put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N. Let En(u)jE_n(u)_jEn​(u)j​ be the parity of the sum of uhu_huh​ over h<Nh<Nh<N for which

∀ 0≤k<n,(⌊j/2k⌋ mod 2)≤(⌊h/2n−1−k⌋ mod 2).\forall\,0\le k<n,\qquad (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2).∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2).

Define

vu(r,h)=∏k=0N−1U(rk,hk),En(u)k,wx(r,z,h)=2−N/2(−1)∑k=0N−1xkzkvz(r,h).v_u(r,h)=\prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(u)_k}, \qquad w_x(r,z,h)=2^{-N/2}(-1)^{\sum_{k=0}^{N-1}x_kz_k}v_z(r,h).vu​(r,h)=k=0∏N−1​U(rk​,hk​),En​(u)k​​,wx​(r,z,h)=2−N/2(−1)∑k=0N−1​xk​zk​vz​(r,h).

Let pi(u)p_i(u)pi​(u) retain uju_juj​ for j<ij<ij<i and set all other coordinates to zero, and let si(x)s_i(x)si​(x) retain xjx_jxj​ for i<ji<ji<j and set all other coordinates to zero. For Boolean aaa, define

Aia((p,r),(q,s))=1p=q 2−(N−1)∑u∈Qui=a,pi(u)=p∑h∈Evu(r,h)vu(s,h)‾,Pia((p,(r,z)),(q,(s,z′)))=1p=q 2−(N−1)∑x∈Qxi=a,si(x)=p∑h∈Ewx(r,z,h)wx(s,z′,h)‾.\begin{aligned} A_i^a((p,r),(q,s)) &=\mathbf1_{p=q}\,2^{-(N-1)} \sum_{\substack{u\in Q\\u_i=a,\;p_i(u)=p}} \sum_{h\in\mathcal E}v_u(r,h)\overline{v_u(s,h)},\\ P_i^a((p,(r,z)),(q,(s,z'))) &=\mathbf1_{p=q}\,2^{-(N-1)} \sum_{\substack{x\in Q\\x_i=a,\;s_i(x)=p}} \sum_{h\in\mathcal E}w_x(r,z,h)\overline{w_x(s,z',h)}. \end{aligned}Aia​((p,r),(q,s))Pia​((p,(r,z)),(q,(s,z′)))​=1p=q​2−(N−1)u∈Qui​=a,pi​(u)=p​∑​h∈E∑​vu​(r,h)vu​(s,h)​,=1p=q​2−(N−1)x∈Qxi​=a,si​(x)=p​∑​h∈E∑​wx​(r,z,h)wx​(s,z′,h)​.​

Writing f(ρ,σ)=Re⁡tr⁡ρ σ ρf(\rho,\sigma)=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt{\rho}\,\sigma\,\sqrt{\rho}}f(ρ,σ)=Retrρ​σρ​​, with square roots given by continuous functional calculus, the defined set is

{i<N:f(Ai0,Ai1)<2−Nβ and f(Pi0,Pi1)<2−Nβ}.\left\{i<N: f(A_i^0,A_i^1)<2^{-N^\beta} \ \text{and}\ f(P_i^0,P_i^1)<2^{-N^\beta} \right\}.{i<N:f(Ai0​,Ai1​)<2−Nβ and f(Pi0​,Pi1​)<2−Nβ}.

No isometry or normalization is required of UUU; β\betaβ is unrestricted, and b,e,nb,e,nb,e,n may be zero. For n=0n=0n=0, N=1N=1N=1, the encoding is the identity, both retained-coordinate strings are zero, and the threshold is 1/21/21/2.

QAlgorithms.Papers.Independent.Intakethird100.P23.phaseBlock

For arbitrary natural numbers b,e,nb,e,nb,e,n, an arbitrary complex matrix UUU with rows in {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and Boolean columns, and a Boolean string xxx of length N=2nN=2^nN=2n, this defines a complex matrix indexed by pairs (s,u)(s,u)(s,u), where s∈{0,…,b−1}Ns\in\{0,\ldots,b-1\}^Ns∈{0,…,b−1}N and uuu is a Boolean string of length NNN, as

P(s,u),(s′,u′)=2−N(−1)h(x,u)+h(x,u′)∑t∈{0,…,e−1}N(∏k=0N−1U(sk,tk), ck(u))(∏k=0N−1U(sk′,tk), ck(u′))‾.P_{(s,u),(s',u')}= 2^{-N}(-1)^{h(x,u)+h(x,u')} \sum_{t\in\{0,\ldots,e-1\}^N} \left(\prod_{k=0}^{N-1}U_{(s_k,t_k),\,c_k(u)}\right) \overline{\left(\prod_{k=0}^{N-1}U_{(s'_k,t_k),\,c_k(u')}\right)}.P(s,u),(s′,u′)​=2−N(−1)h(x,u)+h(x,u′)t∈{0,…,e−1}N∑​(k=0∏N−1​U(sk​,tk​),ck​(u)​)(k=0∏N−1​U(sk′​,tk​),ck​(u′)​)​.

Here h(x,u)h(x,u)h(x,u) counts coordinates where both strings are true, and ck(u)c_k(u)ck​(u) is the parity of the number of true coordinates uℓu_\elluℓ​ satisfying (⌊k/2r⌋ mod 2)≤(⌊ℓ/2n−1−r⌋ mod 2)(\lfloor k/2^r\rfloor\bmod2)\le(\lfloor\ell/2^{n-1-r}\rfloor\bmod2)(⌊k/2r⌋mod2)≤(⌊ℓ/2n−1−r⌋mod2) for every 0≤r<n0\le r<n0≤r<n. Thus the definition takes the phase vector’s outer product and sums over its final sequence coordinate. No normalization hypothesis is imposed on UUU. For n=0n=0n=0, N=1N=1N=1 and c0(u)=u0c_0(u)=u_0c0​(u)=u0​; for e=0e=0e=0 the sum is empty and the matrix is zero, and for b=0b=0b=0 its index set is empty.

QAlgorithms.Papers.Independent.Intakethird100.P23.phaseInformation

For arbitrary natural numbers b,eb,eb,e and any complex matrix UUU indexed by ({0,…,b−1}×{0,…,e−1})×{0,1}(\{0,\ldots,b-1\}\times\{0,\ldots,e-1\})\times\{0,1\}({0,…,b−1}×{0,…,e−1})×{0,1}, define, for Boolean aaa, a matrix PaP_aPa​ indexed by {0,…,b−1}×{0,1}\{0,\ldots,b-1\}\times\{0,1\}{0,…,b−1}×{0,1} through

Pa((r,z),(s,z′))=12(−1)az+az′∑h=0e−1U(r,h),zU(s,h),z′‾,P_a((r,z),(s,z'))= \frac12(-1)^{az+az'} \sum_{h=0}^{e-1}U_{(r,h),z}\overline{U_{(s,h),z'}},Pa​((r,z),(s,z′))=21​(−1)az+az′h=0∑e−1​U(r,h),z​U(s,h),z′​​,

where Boolean values in the exponent are interpreted as integers 0,10,10,1. Let

H(M)=−Re⁡tr⁡(cfc⁡(x↦xlog⁡2x)(M)),H(M)=-\operatorname{Re}\operatorname{tr}\bigl(\operatorname{cfc}(x\mapsto x\log_2x)(M)\bigr),H(M)=−Retr(cfc(x↦xlog2​x)(M)),

using continuous functional calculus and value zero for xlog⁡2xx\log_2xxlog2​x at x=0x=0x=0. The defined real number is

H ⁣(P0+P12)−H(P0)+H(P1)2.H\!\left(\frac{P_0+P_1}{2}\right) -\frac{H(P_0)+H(P_1)}{2}.H(2P0​+P1​​)−2H(P0​)+H(P1​)​.

There is no normalization or isometry assumption on UUU, and the matrices PaP_aPa​ need not have trace one. The parameters b,eb,eb,e may be zero; either zero case gives value zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.phaseSplit

For arbitrary natural numbers b,e,nb,e,nb,e,n, a complex matrix UUU indexed by ({0,…,b−1}×{0,…,e−1})×{0,1}(\{0,\ldots,b-1\}\times\{0,\ldots,e-1\})\times\{0,1\}({0,…,b−1}×{0,…,e−1})×{0,1}, and i∈{0,…,2n−1}i\in\{0,\ldots,2^n-1\}i∈{0,…,2n−1}, this defines a Boolean-indexed matrix family. Put N=2nN=2^nN=2n, Q={0,1}NQ=\{0,1\}^NQ={0,1}N, B={0,…,b−1}N\mathcal B=\{0,\ldots,b-1\}^NB={0,…,b−1}N, and E={0,…,e−1}N\mathcal E=\{0,\ldots,e-1\}^NE={0,…,e−1}N, with Boolean values interpreted as integers 0,10,10,1. For u∈Qu\in Qu∈Q, define

En(u)j=(∑0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)uh) mod 2.E_n(u)_j= \left(\sum_{\substack{0\le h<N\\ \forall\,0\le k<n,\; (\lfloor j/2^k\rfloor\bmod2)\le (\lfloor h/2^{n-1-k}\rfloor\bmod2)}}u_h\right)\bmod2.En​(u)j​=​0≤h<N∀0≤k<n,(⌊j/2k⌋mod2)≤(⌊h/2n−1−k⌋mod2)​∑​uh​​mod2.

For x,z∈Qx,z\in Qx,z∈Q, r∈Br\in\mathcal Br∈B, and h∈Eh\in\mathcal Eh∈E, set

wx(r,z,h)=2−N/2(−1)∑k=0N−1xkzk∏k=0N−1U(rk,hk),En(z)k.w_x(r,z,h)=2^{-N/2}(-1)^{\sum_{k=0}^{N-1}x_kz_k} \prod_{k=0}^{N-1}U_{(r_k,h_k),E_n(z)_k}.wx​(r,z,h)=2−N/2(−1)∑k=0N−1​xk​zk​k=0∏N−1​U(rk​,hk​),En​(z)k​​.

Let si(x)j=xjs_i(x)_j=x_jsi​(x)j​=xj​ for i<ji<ji<j, and si(x)j=0s_i(x)_j=0si​(x)j​=0 otherwise. For each Boolean aaa, the defined matrix PiaP_i^aPia​, indexed by Q×(B×Q)Q\times(\mathcal B\times Q)Q×(B×Q), is

Pia((p,(r,z)),(q,(s,z′)))={2−(N−1)∑x∈Qxi=a,si(x)=p∑h∈Ewx(r,z,h)wx(s,z′,h)‾,p=q,0,p≠q.P_i^a((p,(r,z)),(q,(s,z')))= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{x\in Q\\x_i=a,\;s_i(x)=p}} \sum_{h\in\mathcal E}w_x(r,z,h)\overline{w_x(s,z',h)},&p=q,\\ 0,&p\ne q. \end{cases}Pia​((p,(r,z)),(q,(s,z′)))=⎩⎨⎧​2−(N−1)x∈Qxi​=a,si​(x)=p​∑​h∈E∑​wx​(r,z,h)wx​(s,z′,h)​,0,​p=q,p=q.​

No isometry or normalization condition is imposed on UUU, and b,e,nb,e,nb,e,n may be zero. In particular, n=0n=0n=0 gives N=1N=1N=1, identity encoding, an always-zero suffix, and splitting factor 111.

QAlgorithms.Papers.Independent.Intakethird100.P23.phaseVector

For arbitrary natural numbers b,e,nb,e,nb,e,n, an arbitrary complex matrix UUU with rows in {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and Boolean columns, and a Boolean string xxx of length N=2nN=2^nN=2n, this defines a complex Euclidean vector indexed by triples (s,u,t)(s,u,t)(s,u,t), where s∈{0,…,b−1}Ns\in\{0,\ldots,b-1\}^Ns∈{0,…,b−1}N, uuu is a Boolean string of length NNN, and t∈{0,…,e−1}Nt\in\{0,\ldots,e-1\}^Nt∈{0,…,e−1}N, by

vx((s,u),t)=(−1) ∣{k:xk=true, uk=true}∣2N∏k=0N−1U(sk,tk), ck(u).v_x((s,u),t)= \frac{(-1)^{\,|\{k:x_k=\mathrm{true},\ u_k=\mathrm{true}\}|}}{\sqrt{2^N}} \prod_{k=0}^{N-1}U_{(s_k,t_k),\,c_k(u)}.vx​((s,u),t)=2N​(−1)∣{k:xk​=true, uk​=true}∣​k=0∏N−1​U(sk​,tk​),ck​(u)​.

Here ck(u)c_k(u)ck​(u) is true exactly when the number of indices ℓ\ellℓ with uℓ=trueu_\ell=\mathrm{true}uℓ​=true and (⌊k/2r⌋ mod 2)≤(⌊ℓ/2n−1−r⌋ mod 2)(\lfloor k/2^r\rfloor\bmod2)\le(\lfloor\ell/2^{n-1-r}\rfloor\bmod2)(⌊k/2r⌋mod2)≤(⌊ℓ/2n−1−r⌋mod2) for every 0≤r<n0\le r<n0≤r<n is odd. No normalization or isometry hypothesis is imposed on UUU. For n=0n=0n=0, N=1N=1N=1 and c0(u)=u0c_0(u)=u_0c0​(u)=u0​; if b=0b=0b=0 or e=0e=0e=0, the vector’s index set is empty and the vector is zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.polarEncode

For every natural number nnn and Boolean string uuu indexed by {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}, this defines another Boolean string on the same index set. Its coordinate jjj is true exactly when the following natural-number sum is odd:

∑0≤i<2n∀0≤k<n:(⌊j/2k⌋mod2)≤(⌊i/2n−1−k⌋mod2)1{ui=true}.\sum_{\substack{0\le i<2^n\\ \forall\,0\le k<n:\; (\lfloor j/2^k\rfloor\bmod2) \le(\lfloor i/2^{n-1-k}\rfloor\bmod2)}} \mathbf1_{\{u_i=\mathrm{true}\}}.0≤i<2n∀0≤k<n:(⌊j/2k⌋mod2)≤(⌊i/2n−1−k⌋mod2)​∑​1{ui​=true}​.

Here 1\mathbf11 is 111 when its condition holds and 000 otherwise. In particular, n=0n=0n=0 gives a string of length one, and the output equals that input string.

QAlgorithms.Papers.Independent.Intakethird100.P23.polarMatrixEntry

For every natural number nnn and indices 0≤i,j<2n0\le i,j<2^n0≤i,j<2n, this defines a Boolean value that is true exactly when

∀k∈{0,…,n−1},⌊j2k⌋ mod 2  ≤  ⌊i2n−1−k⌋ mod 2.\forall k\in\{0,\ldots,n-1\},\qquad \left\lfloor\frac{j}{2^k}\right\rfloor\bmod 2 \;\le\; \left\lfloor\frac{i}{2^{n-1-k}}\right\rfloor\bmod 2.∀k∈{0,…,n−1},⌊2kj​⌋mod2≤⌊2n−1−ki​⌋mod2.

Thus each binary digit of jjj is compared with the oppositely positioned binary digit of iii. When n=0n=0n=0, the only indices are i=j=0i=j=0i=j=0, the condition has no instances, and the value is true.

QAlgorithms.Papers.Independent.Intakethird100.P23.splitChannel

For every natural number NNN, every finite type OOO with its supplied finite enumeration, every assignment WWW of a complex O×OO\times OO×O matrix to each Boolean string of length NNN, every Boolean reverse\mathrm{reverse}reverse, every index 0≤i<N0\le i<N0≤i<N, and every Boolean aaa, this defines a matrix indexed by (v,o)(v,o)(v,o) with vvv a Boolean string of length NNN and o∈Oo\in Oo∈O:

S(v,o),(v′,o′)={2−(N−1)∑u:{0,…,N−1}→Boolui=a, Ri(u)=v(W(u))o,o′,v=v′,0,v≠v′.S_{(v,o),(v',o')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u:\{0,\ldots,N-1\}\to\mathrm{Bool}\\ u_i=a,\ R_i(u)=v}}(W(u))_{o,o'},&v=v',\\ 0,&v\ne v'. \end{cases}S(v,o),(v′,o′)​=⎩⎨⎧​2−(N−1)u:{0,…,N−1}→Boolui​=a, Ri​(u)=v​∑​(W(u))o,o′​,0,​v=v′,v=v′.​

If reverse\mathrm{reverse}reverse is false, Ri(u)j=ujR_i(u)_j=u_jRi​(u)j​=uj​ for j<ij<ij<i and is false elsewhere; if reverse\mathrm{reverse}reverse is true, Ri(u)j=ujR_i(u)_j=u_jRi​(u)j​=uj​ for i<ji<ji<j and is false elsewhere. The exponent N−1N-1N−1 uses natural-number subtraction. Supplying iii requires N≥1N\ge1N≥1, so there are no inputs to this definition with N=0N=0N=0. The type OOO may be empty, yielding an empty matrix. No positivity or trace condition is required of W(u)W(u)W(u).

QAlgorithms.Papers.Independent.Intakethird100.P23.symmetricCoherentInformation

For any natural numbers b,eb,eb,e, including zero, and any complex matrix UUU with rows indexed by {0,…,b−1}×{0,…,e−1}\{0,\ldots,b-1\}\times\{0,\ldots,e-1\}{0,…,b−1}×{0,…,e−1} and columns indexed by the two Boolean values, define matrices BaB_aBa​ and EaE_aEa​, for a∈{0,1}a\in\{0,1\}a∈{0,1}, by

(Ba)r,s=∑z=0e−1U(r,z),aU(s,z),a‾,(Ea)z,w=∑r=0b−1U(r,z),aU(r,w),a‾.(B_a)_{r,s}=\sum_{z=0}^{e-1}U_{(r,z),a}\overline{U_{(s,z),a}}, \qquad (E_a)_{z,w}=\sum_{r=0}^{b-1}U_{(r,z),a}\overline{U_{(r,w),a}}.(Ba​)r,s​=z=0∑e−1​U(r,z),a​U(s,z),a​​,(Ea​)z,w​=r=0∑b−1​U(r,z),a​U(r,w),a​​.

Here the one-coordinate function indices occurring in the code have been identified with their single coordinates. For a square complex matrix KKK, put S(K)=−Re⁡tr⁡(f(K))S(K)=-\operatorname{Re}\operatorname{tr}(f(K))S(K)=−Retr(f(K)), where f(x)=xlog⁡2xf(x)=x\log_2xf(x)=xlog2​x is applied through the real continuous functional calculus, using the total real logarithm with log⁡20=0\log_2 0=0log2​0=0. The declaration defines the real number

S ⁣(B0+B12)−S ⁣(E0+E12).S\!\left(\frac{B_0+B_1}{2}\right) - S\!\left(\frac{E_0+E_1}{2}\right).S(2B0​+B1​​)−S(2E0​+E1​​).

There is no assumption that U†U=IU^\dagger U=IU†U=I, or that these matrices have trace one. Empty index sets are allowed; if b=0b=0b=0 or e=0e=0e=0, the displayed expression is zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.symmetricInformation

For every finite type OOO equipped with decidable equality and every assignment WWW of a complex O×OO\times OO×O matrix to each Boolean, this defines the real number

H ⁣(W(false)+W(true)2)−H(W(false))+H(W(true))2,H(M)=−Re⁡tr⁡(cfc⁡[t↦tlog⁡2t](M)).H\!\left(\frac{W(\mathrm{false})+W(\mathrm{true})}{2}\right) -\frac{H(W(\mathrm{false}))+H(W(\mathrm{true}))}{2}, \qquad H(M)=-\operatorname{Re}\operatorname{tr} \left(\operatorname{cfc}[t\mapsto t\log_2 t](M)\right).H(2W(false)+W(true)​)−2H(W(false))+H(W(true))​,H(M)=−Retr(cfc[t↦tlog2​t](M)).

Here cfc⁡\operatorname{cfc}cfc is the real continuous functional calculus on matrices, and the real logarithm is the total real logarithm used in the supplied definition, with log⁡20=0\log_2 0=0log2​0=0. The matrices are arbitrary: positive semidefiniteness and trace one are not hypotheses. The type OOO may be empty, in which case the traces and the resulting value are zero.

QAlgorithms.Papers.Independent.Intakethird100.P23.threshold

For every natural number nnn and every real number β\betaβ, this defines the real number

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

where the inner 2n2^n2n is first computed as a natural number and then regarded as a real number, and the powers with real exponents are real powers. There is no restriction on β\betaβ. When n=0n=0n=0, the value is 12\tfrac1221​ for every β\betaβ.

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