Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Polar codes for private classical communication

Definition
QAlgorithms_Papers_Independent_Intakethird100_P74

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

prove2quantum

The objects the formalized statements of Polar codes for private classical communication (arXiv:1203.5794) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • WiretapData: PDF p.2: fixed isometric extension (output B,E,S2) and input purifications on A'S1.
  • WiretapData.Valid: PDF p.2: isometry and normalized purifications; tracing S2 defines the same wiretap map.
  • purifiedWiretapSignal: PDF p.2, Eq.(2): purified output in order B,E,S1,S2.
  • bobMap: PDF p.2: Bob's marginal of the channel fixed by V, on all operators.
  • eveMap: PDF pp.2,5: Eve's marginal traces B and S2, excluding both shields.
  • amplitudeBob: PDF p.2, Eq.(1): amplitude cq channel to Bob.
  • amplitudeEve: PDF p.2, Eq.(8): amplitude cq channel to Eve.
  • bitSign: The phase (-1)^b.
  • phaseVector: PDF p.2, Eq.(6): normalized phase pure output, C first and Eve last.
  • phaseBob: PDF p.2, Eq.(5): virtual phase output C,B,S1,S2; only E is traced out.
  • uniformHolevo: PDF p.1: Holevo information in bits for equiprobable finite labels. Uses below have nonempty labels and normalized states by the physical construction.
  • symmetricPrivateInformation: PDF p.4: fixed-ensemble symmetric private information; signed, with no optimization.
  • polarEntry: PDF p.3: Arikan G_N=B_N F^(tensor n), F=[[1,0],[1,1]]. Index digits are least significant first; B_N reverses the row's n digits.
  • polarEncode: PDF pp.3–4: row multiplication by G_N (false) or G_N^T (true), over F_2.
  • dotParity: PDF p.3: the binary inner product used in the phase exponent.
  • polarSideIndices: PDF pp.3–4: previous amplitude bits or future phase bits as side information.
  • splitOutput: PDF pp.3–4, Eqs.(10)–(11): the other N-1 bits are uniform, the polarSideIndices bits are revealed classically, and the opposite side is averaged. Phase uses G_N^T.
  • goodIndices: PDF p.3, Eq.(12): strictly less than threshold, applied to ROOT fidelity.
  • decodedIndices: PDF p.4: A union X, exactly the amplitude-good indices.
  • phaseGoodIndices: PDF p.4: phase-good indices of the virtual channel with both shields.
  • privateIndices: PDF p.4: A, good in both amplitude and phase.
  • keyIndices: PDF p.4: Bbad, bad in both variables.
  • randomIndices: PDF p.4: X, independent uniform local random bits.
  • frozenIndices: PDF p.4: Z, uniform frozen bits shared with Bob.
  • netRate: PDF p.4: signed net rate; cast both cardinalities before subtracting.
  • keyRate: PDF pp.5–7: consumed secret-key bits per channel use.
  • encodedPhaseVector: PDF p.3: the displayed coherent output, with exponent x dot z and purifiedWiretapSignal z G_N. Output order is (C,B,S1,S2)^N followed by E^N.
  • encodedPhaseOutput: PDF p.3: trace only Eve from the displayed coherent output.
  • referenceEncoder: PDF p.3: the extra polar encoder U_E on C^N, identity on B^N S1^N S2^N.
  • actualPhaseSplit: PDF p.4: split the actual phase output, revealing future bits, averaging past bits.
  • PolarDecoderEffects: PDF p.4: POVMs depend on the known frozen/key bits; outcomes contain all A union X. No measurement depends on the unknown private or randomized bits.
  • IsSuccessiveCancellation: PDF pp.3–4: a successive cancellation decoder performs a binary projective test for each index in A union X, in increasing order; a test uses the previous decisions and the known frozen/key bits, and frozen indices require no measurement. Outcomes are the sequential effects K^dagger K, not an unconstrained family of message-dependent POVMs.
  • decoderError: PDF pp.3–4: average error over the independent uniform bits in A,X,Z,Bbad.
  • reliabilityBound: PDF p.4: sqrt(2 times the sum of ROOT fidelities), exactly the printed radical.
  • decayHalf: PDF p.4: 2^(-N^beta/2), where N=2^n.
  • privateMessageEveState: PDF p.4: actual conditional Eve state for a uniform private message. Average X,Z,Bbad independently; the real normalization 2^|A|/2^N avoids truncated natural subtraction.
  • privateMessageLeakageBits: PDF p.4, Theorem 2: unconditional uniform-message Holevo leakage I(U_A;E^N), in bits.
  • EveDegradable: PDF p.5: Bob simulates Eve E, not the larger complementary register E S2.
  • classicalEmbedding: PDF p.6, Appendix A, Eq.(14): measure the input basis then prepare the classical joint output; every off-diagonal input entry is discarded.
  • classicalKraus: PDF p.6, Appendix A: Kraus operator sqrt(p(y,z|x)) |y,z><x|.
  • classicalDilation: PDF p.6, Appendix A: the explicit dilation stores (x,y,z) in S2. The physical output is only (y,z); S2 is not appended to Eve.
  • bscProbability: PDF p.7, Appendix C.A: BSC transition probability; inequality of bits is XOR.
  • bscOutput: PDF p.7: computational-basis output states of a BSC.
  • independentBsc: PDF p.7, Eq.(17): independent BSC outputs conditioned on the same input bit.
  • erasureData: PDF pp.9–10: erasure dilation |a> -> sqrt(1-eps)|a,e>+sqrt(eps)|e,a>. Both shields are trivial, and symbol 2 is the orthogonal erasure flag.
  • dampingMap: PDF p.10: the accepted qubit amplitude-damping channel with loss probability 1-eta. Its Kraus labels are reversed relative to the source; the summed channel is the same.
  • dampingAmplitude: PDF p.10: the actual amplitude-channel output for a computational-basis input.
  • binaryPhaseBellVector: PDF p.10: phase-modulated Bell vector with reference C first and Bob's input second.
  • dampingPhaseOutput: PDF pp.10–11: apply the same amplitude-damping channel to half of the Bell state.
  • cbIndex: Computational order |00>, |01>, |10>, |11>, C first.
  • dampingPhaseMatrix: PDF p.11: the exact displayed matrix, including loss at |10><10|.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Independent2_P01

/-! Wilde–Renes, arXiv:1203.5794v1. All registers are finite dimensional. The virtual
phase receiver retains both shields. Index i denotes the source's i+1. No theorem is
registered for the three source-ambiguous nodes in HARD.md.
The accepted product channel is used at length 2^n. Accepted damping uses loss
probability 1-eta; its Kraus labels are the reverse of the source labels. -/

namespace QAlgorithms.Papers.Independent.Intakethird100.P74

open QAlgorithms
open scoped ComplexConjugate Matrix

noncomputable section

local instance (p : Prop) : Decidable p := Classical.propDecidable p

/-- PDF p.2: fixed isometric extension (output B,E,S2) and input purifications on A'S1. -/
structure WiretapData (B E S1 S2 : Type) where
  V : Matrix (B × E × S2) Bool ℂ
  psi : Bool → EuclideanSpace ℂ (Bool × S1)

variable {B E S1 S2 : Type}
variable [Fintype B] [Fintype E] [Fintype S1] [Fintype S2]
variable [DecidableEq B] [DecidableEq E] [DecidableEq S1] [DecidableEq S2]

/-- PDF p.2: isometry and normalized purifications; tracing S2 defines the same wiretap map. -/
def WiretapData.Valid (d : WiretapData B E S1 S2) : Prop :=
  d.Vᴴ * d.V = 1 ∧ ∀ z, ‖d.psi z‖ = 1

/-- PDF p.2, Eq.(2): purified output in order B,E,S1,S2. -/
def purifiedWiretapSignal (d : WiretapData B E S1 S2) (z : Bool) :
    EuclideanSpace ℂ (B × E × S1 × S2) :=
  WithLp.toLp 2 fun o => ∑ a : Bool, d.V (o.1, o.2.1, o.2.2.2) a * d.psi z (a, o.2.2.1)

/-- PDF p.2: Bob's marginal of the channel fixed by V, on all operators. -/
def bobMap (d : WiretapData B E S1 S2) : Superop Bool B :=
  fun rho => traceRight (d.V * rho * d.Vᴴ)

/-- PDF pp.2,5: Eve's marginal traces B and S2, excluding both shields. -/
def eveMap (d : WiretapData B E S1 S2) : Superop Bool E :=
  fun rho => Matrix.of fun e f => ∑ b : B, ∑ s : S2,
    (d.V * rho * d.Vᴴ) (b, e, s) (b, f, s)

/-- PDF p.2, Eq.(1): amplitude cq channel to Bob. -/
def amplitudeBob (d : WiretapData B E S1 S2) (z : Bool) :=
  bobMap d (traceRight (pureDensity (d.psi z)))

/-- PDF p.2, Eq.(8): amplitude cq channel to Eve. -/
def amplitudeEve (d : WiretapData B E S1 S2) (z : Bool) :=
  eveMap d (traceRight (pureDensity (d.psi z)))

/-- The phase (-1)^b. -/
def bitSign (b : Bool) : ℂ := if b then -1 else 1

/-- PDF p.2, Eq.(6): normalized phase pure output, C first and Eve last. -/
def phaseVector (d : WiretapData B E S1 S2) (x : Bool) :
    EuclideanSpace ℂ ((Bool × B × S1 × S2) × E) :=
  WithLp.toLp 2 fun o => (Real.sqrt 2 : ℂ)⁻¹ * bitSign (x && o.1.1) *
    purifiedWiretapSignal d o.1.1 (o.1.2.1, o.2, o.1.2.2.1, o.1.2.2.2)

/-- PDF p.2, Eq.(5): virtual phase output C,B,S1,S2; only E is traced out. -/
def phaseBob (d : WiretapData B E S1 S2) (x : Bool) :=
  traceRight (pureDensity (phaseVector d x))

/-- PDF p.1: Holevo information in bits for equiprobable finite labels.
Uses below have nonempty labels and normalized states by the physical construction. -/
def uniformHolevo {L O : Type} [Fintype L] [Fintype O] [DecidableEq O]
    (W : L → Matrix O O ℂ) : ℝ :=
  vnEntropy ((Fintype.card L : ℂ)⁻¹ • ∑ l, W l) -
    (Fintype.card L : ℝ)⁻¹ * ∑ l, vnEntropy (W l)

/-- PDF p.4: fixed-ensemble symmetric private information; signed, with no optimization. -/
def symmetricPrivateInformation (d : WiretapData B E S1 S2) : ℝ :=
  uniformHolevo (amplitudeBob d) - uniformHolevo (amplitudeEve d)

/-- PDF p.3: Arikan G_N=B_N F^(tensor n), F=[[1,0],[1,1]].
Index digits are least significant first; B_N reverses the row's n digits. -/
def polarEntry (n : ℕ) (i j : Fin (2 ^ n)) : Bool :=
  decide (∀ k : Fin n, Nat.testBit j.val k.val = true →
    Nat.testBit i.val (n - 1 - k.val) = true)

/-- PDF pp.3–4: row multiplication by G_N (false) or G_N^T (true), over F_2. -/
def polarEncode (n : ℕ) (reverse : Bool) (u : Qubits (2 ^ n)) : Qubits (2 ^ n) :=
  fun j => decide ((∑ i : Fin (2 ^ n), (u i).toNat *
    (if reverse then polarEntry n j i else polarEntry n i j).toNat) % 2 = 1)

/-- PDF p.3: the binary inner product used in the phase exponent. -/
def dotParity {n : ℕ} (x z : Qubits (2 ^ n)) : Bool :=
  decide ((∑ i, (x i).toNat * (z i).toNat) % 2 = 1)

/-- PDF pp.3–4: previous amplitude bits or future phase bits as side information. -/
abbrev polarSideIndices (n : ℕ) (reverse : Bool) (i : Fin (2 ^ n)) :=
  {j : Fin (2 ^ n) // if reverse then i.val < j.val else j.val < i.val}

/-- PDF pp.3–4, Eqs.(10)–(11): the other N-1 bits are uniform, the polarSideIndices bits are
revealed classically, and the opposite side is averaged. Phase uses G_N^T. -/
def splitOutput {O : Type} [Fintype O] [DecidableEq O] (n : ℕ) (reverse : Bool)
    (W : Bool → Matrix O O ℂ) (i : Fin (2 ^ n)) (b : Bool) :
    Matrix ((polarSideIndices n reverse i → Bool) × (Fin (2 ^ n) → O))
      ((polarSideIndices n reverse i → Bool) × (Fin (2 ^ n) → O)) ℂ :=
  Matrix.of fun p q => if p.1 = q.1 then
    (((2 : ℝ) ^ (2 ^ n - 1))⁻¹ : ℂ) *
      ∑ u ∈ Finset.univ.filter (fun u : Qubits (2 ^ n) => u i = b ∧
        ∀ j : polarSideIndices n reverse i, u j.val = p.1 j),
        QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) W (polarEncode n reverse u) p.2 q.2
    else 0

/-- PDF p.3, Eq.(12): strictly less than threshold, applied to ROOT fidelity. -/
def goodIndices {O : Type} [Fintype O] [DecidableEq O] (n : ℕ) (reverse : Bool)
    (W : Bool → Matrix O O ℂ) (beta : ℝ) : Finset (Fin (2 ^ n)) :=
  Finset.univ.filter fun i =>
    rootFidelity (splitOutput n reverse W i false) (splitOutput n reverse W i true) <
      Real.rpow 2 (-Real.rpow ((2 : ℝ) ^ n) beta)

/-- PDF p.4: A union X, exactly the amplitude-good indices. -/
def decodedIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  goodIndices n false (amplitudeBob d) beta

/-- PDF p.4: phase-good indices of the virtual channel with both shields. -/
def phaseGoodIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  goodIndices n true (phaseBob d) beta

/-- PDF p.4: A, good in both amplitude and phase. -/
def privateIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  decodedIndices d beta n ∩ phaseGoodIndices d beta n

/-- PDF p.4: Bbad, bad in both variables. -/
def keyIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  Finset.univ \ (decodedIndices d beta n ∪ phaseGoodIndices d beta n)

/-- PDF p.4: X, independent uniform local random bits. -/
def randomIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  decodedIndices d beta n \ phaseGoodIndices d beta n

/-- PDF p.4: Z, uniform frozen bits shared with Bob. -/
def frozenIndices (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  phaseGoodIndices d beta n \ decodedIndices d beta n

/-- PDF p.4: signed net rate; cast both cardinalities before subtracting. -/
def netRate (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
  (((privateIndices d beta n).card : ℝ) - ((keyIndices d beta n).card : ℝ)) / (2 : ℝ) ^ n

/-- PDF pp.5–7: consumed secret-key bits per channel use. -/
def keyRate (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
  (keyIndices d beta n).card / (2 : ℝ) ^ n

/-- PDF p.3: the displayed coherent output, with exponent x dot z and purifiedWiretapSignal z G_N.
Output order is (C,B,S1,S2)^N followed by E^N. -/
def encodedPhaseVector (d : WiretapData B E S1 S2) (n : ℕ) (x : Qubits (2 ^ n)) :
    EuclideanSpace ℂ ((Fin (2 ^ n) → Bool × B × S1 × S2) × (Fin (2 ^ n) → E)) :=
  WithLp.toLp 2 fun p =>
    let z : Qubits (2 ^ n) := fun i => (p.1 i).1
    (Real.sqrt ((2 : ℝ) ^ (2 ^ n)) : ℂ)⁻¹ * bitSign (dotParity x z) *
      ∏ i, purifiedWiretapSignal d (polarEncode n false z i)
        ((p.1 i).2.1, p.2 i, (p.1 i).2.2.1, (p.1 i).2.2.2)

/-- PDF p.3: trace only Eve from the displayed coherent output. -/
def encodedPhaseOutput (d : WiretapData B E S1 S2) (n : ℕ) (x : Qubits (2 ^ n)) :=
  traceRight (pureDensity (encodedPhaseVector d n x))

/-- PDF p.3: the extra polar encoder U_E on C^N, identity on B^N S1^N S2^N. -/
def referenceEncoder (d : WiretapData B E S1 S2) (n : ℕ) :
    Matrix (Fin (2 ^ n) → Bool × B × S1 × S2)
      (Fin (2 ^ n) → Bool × B × S1 × S2) ℂ :=
  Matrix.of fun y z => if (∀ i, (y i).2 = (z i).2) ∧
    (fun i => (y i).1) = polarEncode n false (fun i => (z i).1) then 1 else 0

/-- PDF p.4: split the actual phase output, revealing future bits, averaging past bits. -/
def actualPhaseSplit (d : WiretapData B E S1 S2) (n : ℕ) (i : Fin (2 ^ n)) (b : Bool) :=
  Matrix.of fun p q : (polarSideIndices n true i → Bool) ×
      (Fin (2 ^ n) → Bool × B × S1 × S2) =>
    if p.1 = q.1 then (((2 : ℝ) ^ (2 ^ n - 1))⁻¹ : ℂ) *
      ∑ x ∈ Finset.univ.filter (fun x : Qubits (2 ^ n) => x i = b ∧
        ∀ j : polarSideIndices n true i, x j.val = p.1 j), encodedPhaseOutput d n x p.2 q.2
    else 0

/-- PDF p.4: POVMs depend on the known frozen/key bits; outcomes contain all A union X.
No measurement depends on the unknown private or randomized bits. -/
abbrev PolarDecoderEffects (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) :=
  ({i : Fin (2 ^ n) // i ∉ decodedIndices d beta n} → Bool) →
  ({i : Fin (2 ^ n) // i ∈ decodedIndices d beta n} → Bool) →
  Matrix (Fin (2 ^ n) → B) (Fin (2 ^ n) → B) ℂ

/-- PDF pp.3–4: a successive cancellation decoder performs a binary projective test
for each index in A union X, in increasing order; a test uses the previous decisions and
the known frozen/key bits, and frozen indices require no measurement. Outcomes are the
sequential effects K^dagger K, not an unconstrained family of message-dependent POVMs. -/
def IsSuccessiveCancellation (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
    (M : PolarDecoderEffects d beta n) : Prop :=
  ∃ T : ({i : Fin (2 ^ n) // i ∉ decodedIndices d beta n} → Bool) →
      (i : Fin (2 ^ n)) → (polarSideIndices n false i → Bool) →
        Matrix (Fin (2 ^ n) → B) (Fin (2 ^ n) → B) ℂ,
    (∀ k i v, IsEffect (T k i v) ∧ T k i v * T k i v = T k i v) ∧
    ∀ k m,
      let u : Qubits (2 ^ n) := fun i => if h : i ∈ decodedIndices d beta n then m ⟨i, h⟩
        else k ⟨i, h⟩
      let steps := List.ofFn (fun i : Fin (2 ^ n) =>
        if i ∈ decodedIndices d beta n then
          let P := T k i (fun j => u j.val)
          if u i then 1 - P else P
        else 1)
      let K := steps.foldl (fun K P => P * K) 1
      M k m = Kᴴ * K

/-- PDF pp.3–4: average error over the independent uniform bits in A,X,Z,Bbad. -/
def decoderError (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
    (M : PolarDecoderEffects d beta n) : ℝ :=
  ((2 : ℝ) ^ (2 ^ n))⁻¹ * ∑ u : Qubits (2 ^ n),
    (1 - effectProb (M (fun i => u i.val) (fun i => u i.val))
      (QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) (amplitudeBob d) (polarEncode n false u)))

/-- PDF p.4: sqrt(2 times the sum of ROOT fidelities), exactly the printed radical. -/
def reliabilityBound (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
  Real.sqrt (2 * ∑ i ∈ decodedIndices d beta n,
    rootFidelity (splitOutput n false (amplitudeBob d) i false)
      (splitOutput n false (amplitudeBob d) i true))

/-- PDF p.4: 2^(-N^beta/2), where N=2^n. -/
def decayHalf (beta : ℝ) (n : ℕ) : ℝ :=
  Real.rpow 2 (-Real.rpow ((2 : ℝ) ^ n) beta / 2)

/-- PDF p.4: actual conditional Eve state for a uniform private message. Average X,Z,Bbad
independently; the real normalization 2^|A|/2^N avoids truncated natural subtraction. -/
def privateMessageEveState (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ)
    (m : {i : Fin (2 ^ n) // i ∈ privateIndices d beta n} → Bool) :
    Matrix (Fin (2 ^ n) → E) (Fin (2 ^ n) → E) ℂ :=
  (((2 : ℝ) ^ (privateIndices d beta n).card / (2 : ℝ) ^ (2 ^ n) : ℝ) : ℂ) •
    ∑ u ∈ Finset.univ.filter (fun u : Qubits (2 ^ n) =>
      ∀ i : {i : Fin (2 ^ n) // i ∈ privateIndices d beta n}, u i.val = m i),
      QAlgorithms.Papers.Independent.Information100.P56.productOutput (2 ^ n) (amplitudeEve d) (polarEncode n false u)

/-- PDF p.4, Theorem 2: unconditional uniform-message Holevo leakage I(U_A;E^N), in bits. -/
def privateMessageLeakageBits (d : WiretapData B E S1 S2) (beta : ℝ) (n : ℕ) : ℝ :=
  uniformHolevo (privateMessageEveState d beta n)

/-- PDF p.5: Bob simulates Eve E, not the larger complementary register E S2. -/
def EveDegradable (d : WiretapData B E S1 S2) : Prop :=
  ∃ D : Superop B E, IsChannel D ∧ ∀ rho, D (bobMap d rho) = eveMap d rho

/-- Sanity: phase signs. -/
example : bitSign false = 1 ∧ bitSign true = -1 := by
  simp [bitSign]

/-- Sanity: G_1 is the identity entry. -/
example : polarEntry 0 0 0 = true := by
  simp [polarEntry]

/-- PDF p.6, Appendix A, Eq.(14): measure the input basis then prepare the classical
joint output; every off-diagonal input entry is discarded. -/
def classicalEmbedding {X Y Z : Type} [Fintype X] [Fintype Y] [Fintype Z]
    (p : X → Y → Z → ℝ) : Superop X (Y × Z) :=
  fun rho => Matrix.of fun a b => if a = b then
    ∑ x, rho x x * (p x a.1 a.2 : ℂ) else 0

/-- PDF p.6, Appendix A: Kraus operator sqrt(p(y,z|x)) |y,z><x|. -/
def classicalKraus {X Y Z : Type} (p : X → Y → Z → ℝ)
    (s : X × Y × Z) : Matrix (Y × Z) X ℂ :=
  Matrix.of fun o a => if o = (s.2.1, s.2.2) ∧ a = s.1 then
    (Real.sqrt (p s.1 s.2.1 s.2.2) : ℂ) else 0

/-- PDF p.6, Appendix A: the explicit dilation stores (x,y,z) in S2.
The physical output is only (y,z); S2 is not appended to Eve. -/
def classicalDilation {X Y Z : Type} (p : X → Y → Z → ℝ) :
    Matrix ((Y × Z) × (X × Y × Z)) X ℂ :=
  Matrix.of fun o a => if o.1 = (o.2.2.1, o.2.2.2) ∧ a = o.2.1 then
    (Real.sqrt (p o.2.1 o.2.2.1 o.2.2.2) : ℂ) else 0

/-- PDF p.7, Appendix C.A: BSC transition probability; inequality of bits is XOR. -/
def bscProbability (p : ℝ) (x y : Bool) : ℝ := if x = y then 1 - p else p

/-- PDF p.7: computational-basis output states of a BSC. -/
def bscOutput (p : ℝ) (x : Bool) : Matrix Bool Bool ℂ :=
  Matrix.of fun y z => if y = z then (bscProbability p x y : ℂ) else 0

/-- PDF p.7, Eq.(17): independent BSC outputs conditioned on the same input bit. -/
def independentBsc (pB pE : ℝ) (x y z : Bool) : ℝ :=
  bscProbability pB x y * bscProbability pE x z

/-- PDF pp.9–10: erasure dilation |a> -> sqrt(1-eps)|a,e>+sqrt(eps)|e,a>.
Both shields are trivial, and symbol 2 is the orthogonal erasure flag. -/
def erasureData (eps : ℝ) : WiretapData (Fin 3) (Fin 3) Unit Unit where
  V := Matrix.of fun o a =>
    if o.1.val = a.toNat ∧ o.2.1 = 2 then (Real.sqrt (1 - eps) : ℂ)
    else if o.1 = 2 ∧ o.2.1.val = a.toNat then (Real.sqrt eps : ℂ) else 0
  psi := fun z => ket (z, ())

/-- PDF p.10: the accepted qubit amplitude-damping channel with loss probability 1-eta.
Its Kraus labels are reversed relative to the source; the summed channel is the same. -/
def dampingMap (eta : ℝ) : Superop Bool Bool := QAlgorithms.Papers.Independent.Independent2.P01.damping (1 - eta)

/-- PDF p.10: the actual amplitude-channel output for a computational-basis input. -/
def dampingAmplitude (eta : ℝ) (z : Bool) :=
  dampingMap eta (pureDensity (ket z))

/-- PDF p.10: phase-modulated Bell vector with reference C first and Bob's input second. -/
def binaryPhaseBellVector (x : Bool) : EuclideanSpace ℂ (Bool × Bool) :=
  WithLp.toLp 2 fun p => if p.1 = p.2 then
    bitSign (x && p.1) / (Real.sqrt 2 : ℂ) else 0

/-- PDF pp.10–11: apply the same amplitude-damping channel to half of the Bell state. -/
def dampingPhaseOutput (eta : ℝ) (x : Bool) :=
  idTensorSuperop (dampingMap eta) (pureDensity (binaryPhaseBellVector x))

/-- Computational order |00>, |01>, |10>, |11>, C first. -/
def cbIndex (p : Bool × Bool) : Fin 4 :=
  if p.1 then (if p.2 then 3 else 2) else (if p.2 then 1 else 0)

/-- PDF p.11: the exact displayed matrix, including loss at |10><10|. -/
def dampingPhaseMatrix (eta : ℝ) (x : Bool) : Matrix (Fin 4) (Fin 4) ℂ :=
  !![1 / 2, 0, 0, bitSign x * (Real.sqrt eta : ℂ) / 2;
     0, 0, 0, 0;
     0, 0, (1 - (eta : ℂ)) / 2, 0;
     bitSign x * (Real.sqrt eta : ℂ) / 2, 0, 0, (eta : ℂ) / 2]

/-- Sanity: a classical channel discards every off-diagonal output entry. -/
example {X Y Z : Type} [Fintype X] [Fintype Y] [Fintype Z]
    (p : X → Y → Z → ℝ) (rho : Matrix X X ℂ) (a b : Y × Z) (h : a ≠ b) :
    classicalEmbedding p rho a b = 0 := by
  simp [classicalEmbedding, h]

/-- Sanity: a noiseless BSC has no bit-flip transition. -/
example (x : Bool) : bscProbability 0 x x = 1 := by
  simp [bscProbability]

/-- Sanity: at eta=1 the loss Kraus operator is zero on every entry. -/
example : QAlgorithms.Papers.Independent.Independent2.P01.dampingKraus (1 - (1 : ℝ)) true = 0 := by
  ext b a
  simp [QAlgorithms.Papers.Independent.Independent2.P01.dampingKraus]

/-- Sanity: C first puts the loss basis vector |10> at matrix index 2. -/
example : cbIndex (true, false) = 2 := by
  rfl

/-- Sanity: tracing the purification gives the usual matrix contraction over S1. -/
example (d : WiretapData B E S1 S2) (z a b : Bool) :
    (traceRight (pureDensity (d.psi z))) a b = ∑ s : S1, d.psi z (a, s) * conj (d.psi z (b, s)) := by
  rfl

/-- Sanity: zero input bits remain zero under either linear encoder. -/
example (n : ℕ) (reverse : Bool) :
    polarEncode n reverse (fun _ => false) = fun _ => false := by
  funext j
  simp [polarEncode]

/-- Sanity: a singleton input label carries zero Holevo information. -/
example {O : Type} [Fintype O] [DecidableEq O] (rho : Matrix O O ℂ) :
    uniformHolevo (fun _ : Unit => rho) = 0 := by
  simp [uniformHolevo]

/-- Sanity: erasure endpoints transmit to Bob or to Eve with unit amplitude. -/
example : (erasureData 0).V (0, 2, ()) false = 1 ∧
    (erasureData 1).V (2, 0, ()) false = 1 := by
  simp [erasureData]

end

end QAlgorithms.Papers.Independent.Intakethird100.P74
Source
Polar codes for private classical communication, arXiv:1203.5794v1, https://arxiv.org/abs/1203.5794v1
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P74.EveDegradable

For the finite index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with the equality decisions required by the constructions, let d=(V,ψ)d=(V,\psi)d=(V,ψ) be data consisting of a matrix V:C2→CB×E×S2V:\mathbb C^2\to\mathbb C^{B\times E\times S_2}V:C2→CB×E×S2​ and two vectors ψz∈C{0,1}×S1\psi_z\in\mathbb C^{\{0,1\}\times S_1}ψz​∈C{0,1}×S1​. The proposition says that there exists a function DDD from complex B×BB\times BB×B matrices to complex E×EE\times EE×E matrices having a finite Kraus representation: for some natural number rrr and matrices Kj:CB→CEK_j:\mathbb C^B\to\mathbb C^EKj​:CB→CE, 0≤j<r0\le j<r0≤j<r,

∑j<rKj∗Kj=IB,D(X)=∑j<rKjXKj∗for every complex B×B matrix X.\sum_{j<r}K_j^*K_j=I_B,\qquad D(X)=\sum_{j<r}K_jXK_j^*\quad\text{for every complex }B\times B\text{ matrix }X.j<r∑​Kj∗​Kj​=IB​,D(X)=j<r∑​Kj​XKj∗​for every complex B×B matrix X.

It must satisfy, for every complex 2×22\times22×2 matrix ρ\rhoρ,

D ⁣(Tr⁡E×S2(VρV∗))=[∑b∈B∑s∈S2(VρV∗)(b,e,s),(b,f,s)]e,f∈E.D\!\left(\operatorname{Tr}_{E\times S_2}(V\rho V^*)\right) = \left[\sum_{b\in B}\sum_{s\in S_2} (V\rho V^*)_{(b,e,s),(b,f,s)}\right]_{e,f\in E}.D(TrE×S2​​(VρV∗))=[b∈B∑​s∈S2​∑​(VρV∗)(b,e,s),(b,f,s)​]e,f∈E​.

The universal quantifier over ρ\rhoρ includes matrices that are not density matrices. No validity condition on ddd is imposed, and its vectors ψz\psi_zψz​ do not enter this proposition.

QAlgorithms.Papers.Independent.Intakethird100.P74.IsSuccessiveCancellation

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), β∈R\beta\in\mathbb Rβ∈R, n∈Nn\in\mathbb Nn∈N, and a matrix family M(k,m)M(k,m)M(k,m) on BNB^NBN, where N=2nN=2^nN=2n, define

Ψz(b,e,s,t)=∑aV(b,e,t),aψz(a,s),W(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾.\Psi_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s), \qquad W(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)}.Ψz​(b,e,s,t)=a∑​V(b,e,t),a​ψz​(a,s),W(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​.

Here a,za,za,z are bits. Let Grj=1G_{rj}=1Grj​=1 exactly when every 111 in binary position k<nk<nk<n of jjj implies a 111 in position n−1−kn-1-kn−1−k of rrr, and otherwise let it be 000, and set c(u)j=∑rurGrj(mod2)c(u)_j=\sum_r u_rG_{rj}\pmod2c(u)j​=∑r​ur​Grj​(mod2). For v,wv,wv,w assigning bits to indices preceding iii, define

Si(b)(v,y),(w,y′)={2−(N−1)∑ui=buj=vj (j<i)∏r<NW(c(u)r)yr,yr′,v=w,0,v≠w,D={i:Re⁡tr⁡Si(0)Si(1)Si(0)<2−Nβ},S_i(b)_{(v,y),(w,y')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u_i=b\\u_j=v_j\ (j<i)}}\prod_{r<N}W(c(u)_r)_{y_r,y'_r},&v=w,\\ 0,&v\ne w, \end{cases} \qquad D=\left\{i:\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{S_i(0)}S_i(1)\sqrt{S_i(0)}}<2^{-N^\beta}\right\},Si​(b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)ui​=buj​=vj​ (j<i)​∑​r<N∏​W(c(u)r​)yr​,yr′​​,0,​v=w,v=w,​D={i:RetrSi​(0)​Si​(1)Si​(0)​​<2−Nβ},

where the sum runs over all length-NNN bit strings satisfying the displayed conditions and square roots use continuous functional calculus. The arguments k,mk,mk,m of MMM range over bit assignments on Dc,DD^c,DDc,D, respectively. The predicate says that there exists a family T(k,i,v)T(k,i,v)T(k,i,v) of matrices on BNB^NBN, defined for every such kkk, every i<Ni<Ni<N, and every assignment vvv on {j:j<i}\{j:j<i\}{j:j<i}, such that T(k,i,v)T(k,i,v)T(k,i,v) and I−T(k,i,v)I-T(k,i,v)I−T(k,i,v) are positive semidefinite and T(k,i,v)2=T(k,i,v)T(k,i,v)^2=T(k,i,v)T(k,i,v)2=T(k,i,v). For every k,mk,mk,m, combine them into uuu by ui=miu_i=m_iui​=mi​ on DDD and ui=kiu_i=k_iui​=ki​ on DcD^cDc, and set

Pi={T(k,i,u∣{j:j<i}),i∈D, ui=0,I−T(k,i,u∣{j:j<i}),i∈D, ui=1,I,i∉D.P_i= \begin{cases} T(k,i,u|_{\{j:j<i\}}),&i\in D,\ u_i=0,\\ I-T(k,i,u|_{\{j:j<i\}}),&i\in D,\ u_i=1,\\ I,&i\notin D. \end{cases}Pi​=⎩⎨⎧​T(k,i,u∣{j:j<i}​),I−T(k,i,u∣{j:j<i}​),I,​i∈D, ui​=0,i∈D, ui​=1,i∈/D.​

It requires precisely

M(k,m)=K†K,K=PN−1⋯P1P0.M(k,m)=K^\dagger K,\qquad K=P_{N-1}\cdots P_1P_0.M(k,m)=K†K,K=PN−1​⋯P1​P0​.

The conditions on TTT also apply at indices outside DDD, although those matrices are replaced by III in the product. No validity assumption on ddd is included; n=0n=0n=0 gives a one-factor product, and empty assignment domains carry their unique assignment.

QAlgorithms.Papers.Independent.Intakethird100.P74.PolarDecoderEffects

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, and any n∈Nn\in\mathbb Nn∈N, put N=2nN=2^nN=2n. Define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),W(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾.\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)}.Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),W(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​.

Let Grj=1G_{rj}=1Grj​=1 exactly when every binary digit k<nk<nk<n of jjj equal to 111 forces digit n−1−kn-1-kn−1−k of rrr to equal 111, and otherwise let Grj=0G_{rj}=0Grj​=0; write c(u)j=∑rurGrj(mod2)c(u)_j=\sum_r u_rG_{rj}\pmod2c(u)j​=∑r​ur​Grj​(mod2). For assignments v,wv,wv,w on {j:j<i}\{j:j<i\}{j:j<i} and strings y,y′∈BNy,y'\in B^Ny,y′∈BN, set

Si(b)(v,y),(w,y′)={2−(N−1)∑u∈{0,1}Nui=b, u∣{j:j<i}=v∏r<NW(c(u)r)yr,yr′,v=w,0,v≠w.S_i(b)_{(v,y),(w,y')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^N\\u_i=b,\ u|_{\{j:j<i\}}=v}} \prod_{r<N}W(c(u)_r)_{y_r,y'_r},&v=w,\\ 0,&v\ne w. \end{cases}Si​(b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Nui​=b, u∣{j:j<i}​=v​∑​r<N∏​W(c(u)r​)yr​,yr′​​,0,​v=w,v=w.​

Using matrix square roots from continuous functional calculus, let

D={i:Re⁡tr⁡Si(0) Si(1) Si(0)<2−Nβ}.D=\left\{i: \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{S_i(0)}\,S_i(1)\,\sqrt{S_i(0)}} <2^{-N^\beta}\right\}.D={i:RetrSi​(0)​Si​(1)Si​(0)​​<2−Nβ}.

The abbreviation denotes the type of all functions assigning a complex matrix on BNB^NBN to each pair consisting of a bit assignment kkk on Dc={0,…,N−1}∖DD^c=\{0,\ldots,N-1\}\setminus DDc={0,…,N−1}∖D and a bit assignment mmm on DDD. It imposes no positivity, normalization, or measurement condition on these matrices. Empty assignment domains have their unique empty assignment, and n=0n=0n=0, hence N=1N=1N=1, is included.

QAlgorithms.Papers.Independent.Intakethird100.P74.WiretapData.Valid

For a datum d=(V,ψ)d=(V,\psi)d=(V,ψ) on finite index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, validity means exactly that V†V=IV^\dagger V=IV†V=I and ∥ψz∥2=1\|\psi_z\|_2=1∥ψz​∥2​=1 for every Boolean zzz; explicitly, for all Booleans a,a′a,a'a,a′,

∑b∈B∑e∈E∑s2∈S2V(b,e,s2),a‾V(b,e,s2),a′={1a=a′,0a≠a′,∑a∑s1∈S1∣ψz(a,s1)∣2=1.\sum_{b\in B}\sum_{e\in E}\sum_{s_2\in S_2} \overline{V_{(b,e,s_2),a}}V_{(b,e,s_2),a'} =\begin{cases}1&a=a',\\0&a\ne a',\end{cases} \qquad \sum_{a}\sum_{s_1\in S_1}|\psi_z(a,s_1)|^2=1.b∈B∑​e∈E∑​s2​∈S2​∑​V(b,e,s2​),a​​V(b,e,s2​),a′​={10​a=a′,a=a′,​a∑​s1​∈S1​∑​∣ψz​(a,s1​)∣2=1.

These conditions cannot hold if any of B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​ is empty.

QAlgorithms.Papers.Independent.Intakethird100.P74.WiretapData

For arbitrary types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, a wiretap datum consists of a complex matrix VVV, whose rows are indexed by B×E×S2B\times E\times S_2B×E×S2​ and columns by {false,true}\{\mathrm{false},\mathrm{true}\}{false,true}, and two complex vectors ψz\psi_zψz​, one for each Boolean zzz, with coordinates indexed by {false,true}×S1\{\mathrm{false},\mathrm{true}\}\times S_1{false,true}×S1​. The structure itself imposes no isometry, normalization, positivity, finiteness, or nonemptiness requirements.

QAlgorithms.Papers.Independent.Intakethird100.P74.actualPhaseSplit

For arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ) on types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with EEE finite for the partial trace, any n∈Nn\in\mathbb Nn∈N, an index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, and a bit bbb, let Ji={j:i<j<N}J_i=\{j:i<j<N\}Ji​={j:i<j<N}. The definition gives a matrix indexed by pairs (v,y)(v,y)(v,y), where v:Ji→{0,1}v:J_i\to\{0,1\}v:Ji​→{0,1} and yr=(zr,br,sr,tr)∈{0,1}×B×S1×S2y_r=(z_r,b_r,s_r,t_r)\in\{0,1\}\times B\times S_1\times S_2yr​=(zr​,br​,sr​,tr​)∈{0,1}×B×S1​×S2​. Define Grj=1G_{rj}=1Grj​=1 exactly when every 111 in binary position k<nk<nk<n of jjj implies a 111 in position n−1−kn-1-kn−1−k of rrr, and otherwise let it be 000; put cj(z)=∑rzrGrj(mod2)c_j(z)=\sum_r z_rG_{rj}\pmod2cj​(z)=∑r​zr​Grj​(mod2) and

Ψa(b,e,s,t)=∑α∈{0,1}V(b,e,t),αψa(α,s).\Psi_a(b,e,s,t)=\sum_{\alpha\in\{0,1\}}V_{(b,e,t),\alpha}\psi_a(\alpha,s).Ψa​(b,e,s,t)=α∈{0,1}∑​V(b,e,t),α​ψa​(α,s).

For each bit string xxx, define

Rx(y,y′)=2−N(−1)∑r<Nxr(zr+zr′)∑e∈EN∏r<NΨcr(z)(br,er,sr,tr)Ψcr(z′)(br′,er,sr′,tr′)‾.R_x(y,y') = 2^{-N}(-1)^{\sum_{r<N}x_r(z_r+z'_r)} \sum_{e\in E^N}\prod_{r<N} \Psi_{c_r(z)}(b_r,e_r,s_r,t_r) \overline{\Psi_{c_r(z')}(b'_r,e_r,s'_r,t'_r)}.Rx​(y,y′)=2−N(−1)∑r<N​xr​(zr​+zr′​)e∈EN∑​r<N∏​Ψcr​(z)​(br​,er​,sr​,tr​)Ψcr​(z′)​(br′​,er​,sr′​,tr′​)​.

The defined matrix has entries

A(v,y),(w,y′)={2−(N−1)∑x∈{0,1}Nxi=b, x∣Ji=vRx(y,y′),v=w,0,v≠w.A_{(v,y),(w,y')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{x\in\{0,1\}^N\\x_i=b,\ x|_{J_i}=v}}R_x(y,y'),&v=w,\\ 0,&v\ne w. \end{cases}A(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)x∈{0,1}Nxi​=b, x∣Ji​​=v​∑​Rx​(y,y′),0,​v=w,v=w.​

The prefactor is 2−(N−1)2^{-(N-1)}2−(N−1), regardless of the number of later indices. No validity or normalization condition on ddd is assumed. For n=0n=0n=0, there is one bit and no later index, the prefactor is 111, and the sum contains the single string x0=bx_0=bx0​=b.

QAlgorithms.Papers.Independent.Intakethird100.P74.amplitudeBob

For index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with E,S1,S2E,S_1,S_2E,S1​,S2​ finite, a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), and a Boolean zzz, this definition gives the complex BBB-indexed matrix with entries

(ρzB)b,b′=∑e∈E∑s2∈S2∑s1∈S1∑a,a′∈{false,true}V(b,e,s2),aψz(a,s1)ψz(a′,s1)‾V(b′,e,s2),a′‾.(\rho^B_z)_{b,b'} =\sum_{e\in E}\sum_{s_2\in S_2}\sum_{s_1\in S_1} \sum_{a,a'\in\{\mathrm{false},\mathrm{true}\}} V_{(b,e,s_2),a}\psi_z(a,s_1) \overline{\psi_z(a',s_1)} \overline{V_{(b',e,s_2),a'}}.(ρzB​)b,b′​=e∈E∑​s2​∈S2​∑​s1​∈S1​∑​a,a′∈{false,true}∑​V(b,e,s2​),a​ψz​(a,s1​)ψz​(a′,s1​)​V(b′,e,s2​),a′​​.

Thus the Boolean input matrix has entries ∑s1ψz(a,s1)ψz(a′,s1)‾\sum_{s_1}\psi_z(a,s_1)\overline{\psi_z(a',s_1)}∑s1​​ψz​(a,s1​)ψz​(a′,s1​)​, is conjugated by VVV, and is then summed over matching EEE and S2S_2S2​ coordinates. No validity assumption is imposed; empty summed index types give zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.amplitudeEve

For index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with B,S1,S2B,S_1,S_2B,S1​,S2​ finite, a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), and a Boolean zzz, this definition gives the complex EEE-indexed matrix with entries

(ρzE)e,f=∑b∈B∑s2∈S2∑s1∈S1∑a,a′∈{false,true}V(b,e,s2),aψz(a,s1)ψz(a′,s1)‾V(b,f,s2),a′‾.(\rho^E_z)_{e,f} =\sum_{b\in B}\sum_{s_2\in S_2}\sum_{s_1\in S_1} \sum_{a,a'\in\{\mathrm{false},\mathrm{true}\}} V_{(b,e,s_2),a}\psi_z(a,s_1) \overline{\psi_z(a',s_1)} \overline{V_{(b,f,s_2),a'}}.(ρzE​)e,f​=b∈B∑​s2​∈S2​∑​s1​∈S1​∑​a,a′∈{false,true}∑​V(b,e,s2​),a​ψz​(a,s1​)ψz​(a′,s1​)​V(b,f,s2​),a′​​.

Thus the Boolean input matrix has entries ∑s1ψz(a,s1)ψz(a′,s1)‾\sum_{s_1}\psi_z(a,s_1)\overline{\psi_z(a',s_1)}∑s1​​ψz​(a,s1​)ψz​(a′,s1​)​, is conjugated by VVV, and is then summed over matching BBB and S2S_2S2​ coordinates. No validity assumption is imposed; empty summed index types give zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.binaryPhaseBellVector

For every Boolean value xxx, this defines a vector indexed by pairs of Boolean values by

∣Φx⟩=∣false,false⟩+(−1)xnat∣true,true⟩2,|\Phi_x\rangle =\frac{|\mathrm{false},\mathrm{false}\rangle +(-1)^{x_{\mathrm{nat}}}|\mathrm{true},\mathrm{true}\rangle}{\sqrt2},∣Φx​⟩=2​∣false,false⟩+(−1)xnat​∣true,true⟩​,

where xnat=0x_{\mathrm{nat}}=0xnat​=0 for false and 111 for true, and each ket is the corresponding coordinate vector. Equivalently, its amplitude is zero at unequal Boolean pairs, 1/21/\sqrt21/2​ at (false,false)(\mathrm{false},\mathrm{false})(false,false), and either 1/21/\sqrt21/2​ or −1/2-1/\sqrt2−1/2​ at (true,true)(\mathrm{true},\mathrm{true})(true,true) according as xxx is false or true.

QAlgorithms.Papers.Independent.Intakethird100.P74.bitSign

For a Boolean bbb, this definition gives the complex number −1-1−1 when b=trueb=\mathrm{true}b=true, and 111 when b=falseb=\mathrm{false}b=false.

QAlgorithms.Papers.Independent.Intakethird100.P74.bobMap

For index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with E,S2E,S_2E,S2​ finite, and a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), this definition gives a function from complex Boolean-indexed square matrices ρ\rhoρ to complex BBB-indexed square matrices, defined for all b,b′∈Bb,b'\in Bb,b′∈B by

Bd(ρ)b,b′=∑e∈E∑s2∈S2(VρV†)(b,e,s2),(b′,e,s2)=∑e,s2∑a,a′V(b,e,s2),aρa,a′V(b′,e,s2),a′‾.\mathcal B_d(\rho)_{b,b'} =\sum_{e\in E}\sum_{s_2\in S_2} (V\rho V^\dagger)_{(b,e,s_2),(b',e,s_2)} =\sum_{e,s_2}\sum_{a,a'} V_{(b,e,s_2),a}\rho_{a,a'} \overline{V_{(b',e,s_2),a'}}.Bd​(ρ)b,b′​=e∈E∑​s2​∈S2​∑​(VρV†)(b,e,s2​),(b′,e,s2​)​=e,s2​∑​a,a′∑​V(b,e,s2​),a​ρa,a′​V(b′,e,s2​),a′​​.

Here a,a′a,a'a,a′ range over the two Booleans. The vector family ψ\psiψ is unused; neither validity of ddd nor a density-matrix condition on ρ\rhoρ is assumed. An empty summed index type makes the output zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.bscOutput

For every real number ppp and Boolean value xxx, this defines a complex matrix with Boolean row and column indices by

Wp(x)y,z={1−p,y=z=x,p,y=z≠x,0,y≠z.W_p(x)_{y,z}= \begin{cases} 1-p,&y=z=x,\\ p,&y=z\ne x,\\ 0,&y\ne z. \end{cases}Wp​(x)y,z​=⎩⎨⎧​1−p,p,0,​y=z=x,y=z=x,y=z.​

Thus, in the order (false,true)(\mathrm{false},\mathrm{true})(false,true), Wp(false)=diag⁡(1−p,p)W_p(\mathrm{false})=\operatorname{diag}(1-p,p)Wp​(false)=diag(1−p,p) and Wp(true)=diag⁡(p,1−p)W_p(\mathrm{true})=\operatorname{diag}(p,1-p)Wp​(true)=diag(p,1−p). The definition imposes no restriction on ppp.

QAlgorithms.Papers.Independent.Intakethird100.P74.bscProbability

For every real number ppp and Boolean values x,yx,yx,y, the real-valued function is defined by

bscProbability⁡(p,x,y)={1−p,x=y,p,x≠y.\operatorname{bscProbability}(p,x,y)= \begin{cases} 1-p,&x=y,\\ p,&x\ne y. \end{cases}bscProbability(p,x,y)={1−p,p,​x=y,x=y.​

There is no assumption that p∈[0,1]p\in[0,1]p∈[0,1], so the definition also includes values outside the probability range.

QAlgorithms.Papers.Independent.Intakethird100.P74.cbIndex

For a pair of Boolean values ppp, this defines an index c(p)∈{0,1,2,3}c(p)\in\{0,1,2,3\}c(p)∈{0,1,2,3} by

c(false,false)=0,c(false,true)=1,c(true,false)=2,c(true,true)=3.c(\mathrm{false},\mathrm{false})=0,\qquad c(\mathrm{false},\mathrm{true})=1,\qquad c(\mathrm{true},\mathrm{false})=2,\qquad c(\mathrm{true},\mathrm{true})=3.c(false,false)=0,c(false,true)=1,c(true,false)=2,c(true,true)=3.

QAlgorithms.Papers.Independent.Intakethird100.P74.classicalDilation

For arbitrary types X,Y,ZX,Y,ZX,Y,Z and any function p:X×Y×Z→Rp:X\times Y\times Z\to\mathbb Rp:X×Y×Z→R, this defines a complex matrix VpV_pVp​ with rows indexed by (Y×Z)×(X×Y×Z)(Y\times Z)\times(X\times Y\times Z)(Y×Z)×(X×Y×Z) and columns indexed by XXX, by

(Vp)((y′,z′),(x,y,z)),a={p(x,y,z),(y′,z′)=(y,z) and a=x,0,otherwise.(V_p)_{((y',z'),(x,y,z)),a}= \begin{cases} \sqrt{p(x,y,z)},&(y',z')=(y,z)\ \text{and }a=x,\\ 0,&\text{otherwise}. \end{cases}(Vp​)((y′,z′),(x,y,z)),a​={p(x,y,z)​,0,​(y′,z′)=(y,z) and a=x,otherwise.​

The square root is the real square root, embedded into C\mathbb CC, so negative values of ppp give zero in the indicated entry. There are no finiteness or probability assumptions, and the definition itself imposes no isometry condition.

QAlgorithms.Papers.Independent.Intakethird100.P74.classicalEmbedding

For any finite types X,Y,ZX,Y,ZX,Y,Z and any real-valued function p:X×Y×Z→Rp:X\times Y\times Z\to\mathbb Rp:X×Y×Z→R, this defines a function Φp\Phi_pΦp​ from complex X×XX\times XX×X matrices to complex (Y×Z)×(Y×Z)(Y\times Z)\times(Y\times Z)(Y×Z)×(Y×Z) matrices by

[Φp(ρ)](y,z),(y′,z′)={∑x∈Xρx,x p(x,y,z),(y,z)=(y′,z′),0,(y,z)≠(y′,z′).[\Phi_p(\rho)]_{(y,z),(y',z')}= \begin{cases} \displaystyle\sum_{x\in X}\rho_{x,x}\,p(x,y,z),&(y,z)=(y',z'),\\ 0,&(y,z)\ne(y',z'). \end{cases}[Φp​(ρ)](y,z),(y′,z′)​=⎩⎨⎧​x∈X∑​ρx,x​p(x,y,z),0,​(y,z)=(y′,z′),(y,z)=(y′,z′).​

The real coefficients are regarded as complex scalars. There is no assumption that ppp is nonnegative or normalized, or that ρ\rhoρ is a density matrix, and no assertion here that Φp\Phi_pΦp​ is a channel. Empty finite types are allowed; in particular, an empty input index type gives an empty sum and hence zero output entries.

QAlgorithms.Papers.Independent.Intakethird100.P74.classicalKraus

For arbitrary types X,Y,ZX,Y,ZX,Y,Z, any function p:X×Y×Z→Rp:X\times Y\times Z\to\mathbb Rp:X×Y×Z→R, and any triple s=(x,y,z)∈X×Y×Zs=(x,y,z)\in X\times Y\times Zs=(x,y,z)∈X×Y×Z, this defines a complex matrix KsK_sKs​ with rows indexed by Y×ZY\times ZY×Z and columns indexed by XXX, with entries

(K(x,y,z))(y′,z′),a={p(x,y,z),(y′,z′)=(y,z) and a=x,0,otherwise.(K_{(x,y,z)})_{(y',z'),a}= \begin{cases} \sqrt{p(x,y,z)},&(y',z')=(y,z)\ \text{and }a=x,\\ 0,&\text{otherwise}. \end{cases}(K(x,y,z)​)(y′,z′),a​={p(x,y,z)​,0,​(y′,z′)=(y,z) and a=x,otherwise.​

The square root is the real square root, embedded into C\mathbb CC, and equals zero when its real argument is negative. No finiteness, nonnegativity, normalization, or Kraus-completeness hypothesis is part of this definition.

QAlgorithms.Papers.Independent.Intakethird100.P74.dampingAmplitude

For every real number η\etaη and Boolean value zzz, let ∣z⟩|z\rangle∣z⟩ be the Boolean coordinate vector, and define

ρη,z=K0∣z⟩⟨z∣K0†+K1∣z⟩⟨z∣K1†,K0=diag⁡(1,η),K1=1−η ∣false⟩⟨true∣.\rho_{\eta,z} =K_0|z\rangle\langle z|K_0^\dagger +K_1|z\rangle\langle z|K_1^\dagger, \qquad K_0=\operatorname{diag}(1,\sqrt{\eta}),\quad K_1=\sqrt{1-\eta}\,|\mathrm{false}\rangle\langle\mathrm{true}|.ρη,z​=K0​∣z⟩⟨z∣K0†​+K1​∣z⟩⟨z∣K1†​,K0​=diag(1,η​),K1​=1−η​∣false⟩⟨true∣.

This is the matrix defined by dampingAmplitude. There is no hypothesis restricting η\etaη; real square roots of negative arguments are zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.dampingMap

For every real number η\etaη, this defines a function from complex Boolean-indexed matrices to matrices of the same size by

Dη(X)=K0XK0†+K1XK1†,K0=(100η),K1=(01−η00),\mathcal D_\eta(X)=K_0XK_0^\dagger+K_1XK_1^\dagger, \qquad K_0=\begin{pmatrix}1&0\\0&\sqrt{\eta}\end{pmatrix}, \qquad K_1=\begin{pmatrix}0&\sqrt{1-\eta}\\0&0\end{pmatrix},Dη​(X)=K0​XK0†​+K1​XK1†​,K0​=(10​0η​​),K1​=(00​1−η​0​),

with Boolean indices ordered as (false,true)(\mathrm{false},\mathrm{true})(false,true). The argument XXX is arbitrary and need not be a density matrix. No restriction on η\etaη is imposed; the real square roots are zero when their inputs are negative.

QAlgorithms.Papers.Independent.Intakethird100.P74.dampingPhaseMatrix

For every real number η\etaη and Boolean value xxx, let sx=1s_x=1sx​=1 if x=falsex=\mathrm{false}x=false and sx=−1s_x=-1sx​=−1 if x=truex=\mathrm{true}x=true. This defines the complex matrix, with rows and columns indexed in the order 0,1,2,30,1,2,30,1,2,3, by

Mη,x=(1200sxη20000001−η20sxη200η2).M_{\eta,x}= \begin{pmatrix} \frac12&0&0&\frac{s_x\sqrt{\eta}}2\\ 0&0&0&0\\ 0&0&\frac{1-\eta}2&0\\ \frac{s_x\sqrt{\eta}}2&0&0&\frac{\eta}2 \end{pmatrix}.Mη,x​=​21​002sx​η​​​0000​0021−η​0​2sx​η​​002η​​​.

There is no restriction on η\etaη in this definition; the real square root used here is zero when η<0\eta<0η<0.

QAlgorithms.Papers.Independent.Intakethird100.P74.dampingPhaseOutput

For every real number η\etaη and Boolean value xxx, define ∣Φx⟩=(∣false,false⟩+(−1)xnat∣true,true⟩)/2|\Phi_x\rangle=(|\mathrm{false},\mathrm{false}\rangle+(-1)^{x_{\mathrm{nat}}}|\mathrm{true},\mathrm{true}\rangle)/\sqrt2∣Φx​⟩=(∣false,false⟩+(−1)xnat​∣true,true⟩)/2​, where xnatx_{\mathrm{nat}}xnat​ is 000 or 111 according as xxx is false or true. This declaration defines the complex matrix

∑j=01(I⊗Kj)∣Φx⟩⟨Φx∣(I⊗Kj)†,K0=diag⁡(1,η),K1=1−η ∣false⟩⟨true∣,\sum_{j=0}^1 (I\otimes K_j)|\Phi_x\rangle\langle\Phi_x| (I\otimes K_j)^\dagger, \qquad K_0=\operatorname{diag}(1,\sqrt\eta),\quad K_1=\sqrt{1-\eta}\,|\mathrm{false}\rangle\langle\mathrm{true}|,j=0∑1​(I⊗Kj​)∣Φx​⟩⟨Φx​∣(I⊗Kj​)†,K0​=diag(1,η​),K1​=1−η​∣false⟩⟨true∣,

so the matrix transformation acts on the second Boolean factor and leaves the first factor unchanged. No restriction on η\etaη is imposed; real square roots of negative arguments are zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.decayHalf

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

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

where both powers with real exponents are real powers. There is no restriction on β\betaβ, and n=0n=0n=0 is included, giving 2−1/22^{-1/2}2−1/2 for every β\betaβ.

QAlgorithms.Papers.Independent.Intakethird100.P74.decodedIndices

Let B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​ be finite types, with decidable equality on BBB, and let ddd consist of an arbitrary complex matrix VVV with rows indexed by B×E×S2B\times E\times S_2B×E×S2​ and columns by Booleans, together with arbitrary vectors ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​ for Boolean zzz. For every real β\betaβ and natural number nnn, put N=2nN=2^nN=2n, define

fz(b,e,s,t)=∑a∈{false,true}V(b,e,t),aψz(a,s),Wz(b,b′)=∑e,s,tfz(b,e,s,t)fz(b′,e,s,t)‾,f_z(b,e,s,t)=\sum_{a\in\{\text{false},\text{true}\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W_z(b,b')=\sum_{e,s,t}f_z(b,e,s,t)\overline{f_z(b',e,s,t)},fz​(b,e,s,t)=a∈{false,true}∑​V(b,e,t),a​ψz​(a,s),Wz​(b,b′)=e,s,t∑​fz​(b,e,s,t)fz​(b′,e,s,t)​,

and, for each i<Ni<Ni<N, let Si={j:j<i}S_i=\{j:j<i\}Si​={j:j<i} and define

Σib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Si=s∏a=0N−1Wv(u)a(ya,ya′),\Sigma_i^b\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i}=s}} \prod_{a=0}^{N-1}W_{v(u)_a}(y_a,y'_a),Σib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Si​​=s​∑​a=0∏N−1​Wv(u)a​​(ya​,ya′​),

with y,y′∈BNy,y'\in B^Ny,y′∈BN. Here v(u)av(u)_av(u)a​ is the parity of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​, where tha=1t_{ha}=1tha​=1 exactly when each set bit k<nk<nk<n of aaa implies a set bit n−1−kn-1-kn−1−k of hhh. This declaration defines the set of i<Ni<Ni<N satisfying

Re⁡tr⁡ΣifalseΣitrueΣifalse<2−Nβ,\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_i^{\text{false}}}\Sigma_i^{\text{true}}\sqrt{\Sigma_i^{\text{false}}}} <2^{-N^\beta},RetrΣifalse​​Σitrue​Σifalse​​​<2−Nβ,

using continuous functional calculus for the matrix roots. It imposes no isometry condition on VVV, no normalization condition on ψz\psi_zψz​, and no restriction on β\betaβ; n=0n=0n=0 and empty index types are included.

QAlgorithms.Papers.Independent.Intakethird100.P74.decoderError

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, n∈Nn\in\mathbb Nn∈N, and a matrix family MMM, put N=2nN=2^nN=2n, define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),W(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾,\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)},Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),W(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​,

and let Grj=1G_{rj}=1Grj​=1 exactly when every 111 in binary position k<nk<nk<n of jjj forces a 111 in position n−1−kn-1-kn−1−k of rrr, taking Grj=0G_{rj}=0Grj​=0 otherwise. Write c(u)j=∑rurGrj(mod2)c(u)_j=\sum_r u_rG_{rj}\pmod2c(u)j​=∑r​ur​Grj​(mod2) and

W(N)(u)y,y′=∏r<NW(c(u)r)yr,yr′.W^{(N)}(u)_{y,y'}=\prod_{r<N}W(c(u)_r)_{y_r,y'_r}.W(N)(u)y,y′​=r<N∏​W(c(u)r​)yr​,yr′​​.

For preceding-bit assignments v,wv,wv,w, define Si(b)(v,y),(w,y′)=0S_i(b)_{(v,y),(w,y')}=0Si​(b)(v,y),(w,y′)​=0 when v≠wv\ne wv=w, and otherwise define it as 2−(N−1)∑ui=b, u∣{j:j<i}=vW(N)(u)y,y′2^{-(N-1)}\sum_{u_i=b,\ u|_{\{j:j<i\}}=v}W^{(N)}(u)_{y,y'}2−(N−1)∑ui​=b, u∣{j:j<i}​=v​W(N)(u)y,y′​. Let

D={i:Re⁡tr⁡Si(0)Si(1)Si(0)<2−Nβ},D=\left\{i: \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{S_i(0)}S_i(1)\sqrt{S_i(0)}}<2^{-N^\beta}\right\},D={i:RetrSi​(0)​Si​(1)Si​(0)​​<2−Nβ},

with matrix square roots interpreted by continuous functional calculus, and take M(k,m)M(k,m)M(k,m) to be an arbitrary complex matrix on BNB^NBN for each bit assignment kkk on DcD^cDc and mmm on DDD. The definition returns

2−N∑u∈{0,1}N[1−Re⁡tr⁡(M(u∣Dc,u∣D) W(N)(u))].2^{-N}\sum_{u\in\{0,1\}^N} \left[ 1-\operatorname{Re}\operatorname{tr} \left(M(u|_{D^c},u|_D)\,W^{(N)}(u)\right) \right].2−Nu∈{0,1}N∑​[1−Retr(M(u∣Dc​,u∣D​)W(N)(u))].

Neither validity of ddd nor any effect or successive-cancellation condition on MMM is assumed, so this definition alone does not constrain the result to [0,1][0,1][0,1]. The case n=0n=0n=0 averages over the two one-bit strings, and restrictions to empty index sets are the unique empty assignments.

QAlgorithms.Papers.Independent.Intakethird100.P74.dotParity

For every natural number nnn and Boolean vectors x,zx,zx,z of length 2n2^n2n, this defines a Boolean that is true exactly when

∑i=02n−11{xi=true}1{zi=true}\sum_{i=0}^{2^n-1}\mathbf1_{\{x_i=\text{true}\}}\mathbf1_{\{z_i=\text{true}\}}i=0∑2n−1​1{xi​=true}​1{zi​=true}​

is odd. Thus it records the parity of the number of coordinates at which both vectors are true. The case n=0n=0n=0 has one coordinate, rather than an empty vector, and the result is true exactly when both values at that coordinate are true.

QAlgorithms.Papers.Independent.Intakethird100.P74.encodedPhaseOutput

For wiretap data d=(V,ψ)d=(V,\psi)d=(V,ψ) on types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with EEE finite for the partial trace, any n∈Nn\in\mathbb Nn∈N, and any Boolean string xxx of length N=2nN=2^nN=2n, this defines a matrix indexed by strings yi=(zi,bi,si,ti)∈{0,1}×B×S1×S2y_i=(z_i,b_i,s_i,t_i)\in\{0,1\}\times B\times S_1\times S_2yi​=(zi​,bi​,si​,ti​)∈{0,1}×B×S1​×S2​. Let Grj=1G_{rj}=1Grj​=1 exactly when every 111 in binary position k<nk<nk<n of jjj is accompanied by a 111 in position n−1−kn-1-kn−1−k of rrr, and let it be 000 otherwise; set ci(z)=∑rzrGri(mod2)c_i(z)=\sum_r z_rG_{ri}\pmod2ci​(z)=∑r​zr​Gri​(mod2) and

Ψc(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψc(a,s).\Psi_c(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_c(a,s).Ψc​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψc​(a,s).

Then the matrix entries are

Rx(y,y′)=2−N(−1)∑i<Nxi(zi+zi′)∑e∈EN∏i<NΨci(z)(bi,ei,si,ti) Ψci(z′)(bi′,ei,si′,ti′)‾.R_x(y,y') = 2^{-N}(-1)^{\sum_{i<N}x_i(z_i+z'_i)} \sum_{e\in E^N} \prod_{i<N} \Psi_{c_i(z)}(b_i,e_i,s_i,t_i)\, \overline{\Psi_{c_i(z')}(b'_i,e_i,s'_i,t'_i)}.Rx​(y,y′)=2−N(−1)∑i<N​xi​(zi​+zi′​)e∈EN∑​i<N∏​Ψci​(z)​(bi​,ei​,si​,ti​)Ψci​(z′)​(bi′​,ei​,si′​,ti′​)​.

Equivalently, it forms the outer product ΦxΦx†\Phi_x\Phi_x^\daggerΦx​Φx†​ of the vector with coordinates 2−N/2(−1)∑ixizi∏iΨci(z)(bi,ei,si,ti)2^{-N/2}(-1)^{\sum_i x_i z_i}\prod_i\Psi_{c_i(z)}(b_i,e_i,s_i,t_i)2−N/2(−1)∑i​xi​zi​∏i​Ψci​(z)​(bi​,ei​,si​,ti​), then sums over the same ENE^NEN index on its two sides. No validity or normalization assumption on ddd is included, so trace 111 is not asserted. The definition includes n=0n=0n=0, when the strings have length 111, and an empty EEE makes the displayed sum empty.

QAlgorithms.Papers.Independent.Intakethird100.P74.encodedPhaseVector

For types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any n∈Nn\in\mathbb Nn∈N, and any Boolean string xxx of length N=2nN=2^nN=2n, this defines a complex Euclidean vector indexed by pairs (y,e)(y,e)(y,e), where yi=(zi,bi,si,ti)∈{0,1}×B×S1×S2y_i=(z_i,b_i,s_i,t_i)\in\{0,1\}\times B\times S_1\times S_2yi​=(zi​,bi​,si​,ti​)∈{0,1}×B×S1​×S2​ and ei∈Ee_i\in Eei​∈E. Define Grj=1G_{rj}=1Grj​=1 exactly when every binary position k<nk<nk<n at which jjj has digit 111 has digit 111 at position n−1−kn-1-kn−1−k of rrr; otherwise Grj=0G_{rj}=0Grj​=0. Writing

cj=∑r<NzrGrj(mod2),Ψc(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψc(a,s),c_j=\sum_{r<N}z_rG_{rj}\pmod2, \qquad \Psi_c(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_c(a,s),cj​=r<N∑​zr​Grj​(mod2),Ψc​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψc​(a,s),

the coordinate of the defined vector is

Φx(y,e)=2−N/2(−1)∑i<Nxizi∏i<NΨci(bi,ei,si,ti).\Phi_x(y,e) = 2^{-N/2}(-1)^{\sum_{i<N}x_i z_i} \prod_{i<N}\Psi_{c_i}(b_i,e_i,s_i,t_i).Φx​(y,e)=2−N/2(−1)∑i<N​xi​zi​i<N∏​Ψci​​(bi​,ei​,si​,ti​).

The sign is 111 for even parity and −1-1−1 for odd parity of the indicated sum. Neither V†V=IV^\dagger V=IV†V=I nor unit norm of either ψc\psi_cψc​ is assumed, so the definition itself imposes no unit-norm condition on Φx\Phi_xΦx​. It includes n=0n=0n=0, for which N=1N=1N=1, the condition defining G00G_{00}G00​ is vacuous, c0=z0c_0=z_0c0​=z0​, and the prefactor is 1/21/\sqrt21/2​.

QAlgorithms.Papers.Independent.Intakethird100.P74.erasureData

For every real number ε\varepsilonε, this defines data consisting of a complex matrix VVV from a Boolean input index to output indices (b,e,s2)∈{0,1,2}×{0,1,2}×{∗}(b,e,s_2)\in\{0,1,2\}\times\{0,1,2\}\times\{\ast\}(b,e,s2​)∈{0,1,2}×{0,1,2}×{∗}, and two vectors ψz\psi_zψz​ indexed by Bool×{∗}\mathrm{Bool}\times\{\ast\}Bool×{∗}. Identifying false and true with 000 and 111, respectively, and writing ∣i⟩|i\rangle∣i⟩ for the coordinate vector at iii, these are

V∣a⟩=1−ε ∣a,2,∗⟩+ε ∣2,a,∗⟩,ψz=∣z,∗⟩.V|a\rangle =\sqrt{1-\varepsilon}\,|a,2,\ast\rangle +\sqrt{\varepsilon}\,|2,a,\ast\rangle, \qquad \psi_z=|z,\ast\rangle.V∣a⟩=1−ε​∣a,2,∗⟩+ε​∣2,a,∗⟩,ψz​=∣z,∗⟩.

All other matrix entries are zero. No restriction on ε\varepsilonε or assertion of validity accompanies the definition; real square roots of negative inputs are defined to be zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.eveMap

For index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with B,S2B,S_2B,S2​ finite, and a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), this definition gives a function from complex Boolean-indexed square matrices ρ\rhoρ to complex EEE-indexed square matrices, defined for all e,f∈Ee,f\in Ee,f∈E by

Ed(ρ)e,f=∑b∈B∑s2∈S2(VρV†)(b,e,s2),(b,f,s2)=∑b,s2∑a,a′V(b,e,s2),aρa,a′V(b,f,s2),a′‾.\mathcal E_d(\rho)_{e,f} =\sum_{b\in B}\sum_{s_2\in S_2} (V\rho V^\dagger)_{(b,e,s_2),(b,f,s_2)} =\sum_{b,s_2}\sum_{a,a'} V_{(b,e,s_2),a}\rho_{a,a'} \overline{V_{(b,f,s_2),a'}}.Ed​(ρ)e,f​=b∈B∑​s2​∈S2​∑​(VρV†)(b,e,s2​),(b,f,s2​)​=b,s2​∑​a,a′∑​V(b,e,s2​),a​ρa,a′​V(b,f,s2​),a′​​.

Here a,a′a,a'a,a′ range over the two Booleans. The vector family ψ\psiψ is unused; neither validity of ddd nor a density-matrix condition on ρ\rhoρ is assumed. An empty summed index type makes the output zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.frozenIndices

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality on B,S1,S2B,S_1,S_2B,S1​,S2​, arbitrary matrix V∈C(B×E×S2)×{false,true}V\in\mathbb C^{(B\times E\times S_2)\times\{\text{false},\text{true}\}}V∈C(B×E×S2​)×{false,true}, arbitrary vectors ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​, real β\betaβ, and natural nnn, let N=2nN=2^nN=2n, define fz(b,e,s,t)=∑aV(b,e,t),aψz(a,s)f_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s)fz​(b,e,s,t)=∑a​V(b,e,t),a​ψz​(a,s) with Boolean aaa, and put

WzA(b,b′)=∑e,s,tfz(b,e,s,t)fz(b′,e,s,t)‾,WxP((z,b,s,t),(z′,b′,s′,t′))=χ(x,z)χ(x,z′)2∑efz(b,e,s,t)fz′(b′,e,s′,t′)‾,W_z^{A}(b,b')=\sum_{e,s,t}f_z(b,e,s,t)\overline{f_z(b',e,s,t)},\qquad W_x^{P}((z,b,s,t),(z',b',s',t')) =\frac{\chi(x,z)\chi(x,z')}{2} \sum_e f_z(b,e,s,t)\overline{f_{z'}(b',e,s',t')},WzA​(b,b′)=e,s,t∑​fz​(b,e,s,t)fz​(b′,e,s,t)​,WxP​((z,b,s,t),(z′,b′,s′,t′))=2χ(x,z)χ(x,z′)​e∑​fz​(b,e,s,t)fz′​(b′,e,s′,t′)​,

where χ(x,z)\chi(x,z)χ(x,z) equals −1-1−1 if both arguments are true and 111 otherwise. For r=A,Pr=A,Pr=A,P, set SiA={j:j<i}S_i^A=\{j:j<i\}SiA​={j:j<i}, SiP={j:i<j<N}S_i^P=\{j:i<j<N\}SiP​={j:i<j<N}, and

Σr,ib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Sir=s∏a=0N−1Wvr(u)ar(ya,ya′).\Sigma_{r,i}^{b}\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i^r}=s}} \prod_{a=0}^{N-1}W^r_{v^r(u)_a}(y_a,y'_a).Σr,ib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Sir​​=s​∑​a=0∏N−1​Wvr(u)a​r​(ya​,ya′​).

The sequences y,y′y,y'y,y′ take values in BBB for AAA, and in {false,true}×B×S1×S2\{\text{false},\text{true}\}\times B\times S_1\times S_2{false,true}×B×S1​×S2​ for PPP. Define tab=1t_{ab}=1tab​=1 exactly when each set bit k<nk<nk<n of bbb implies a set bit n−1−kn-1-kn−1−k of aaa; the Boolean vA(u)av^A(u)_avA(u)a​ is the parity of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​, and vP(u)av^P(u)_avP(u)a​ is the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​. Finally, with continuous-functional-calculus roots, put

Fr,i=Re⁡tr⁡Σr,ifalseΣr,itrueΣr,ifalse.F_{r,i}=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_{r,i}^{\text{false}}}\Sigma_{r,i}^{\text{true}}\sqrt{\Sigma_{r,i}^{\text{false}}}}.Fr,i​=RetrΣr,ifalse​​Σr,itrue​Σr,ifalse​​​.

The defined set contains exactly those i<Ni<Ni<N satisfying FP,i<2−NβF_{P,i}<2^{-N^\beta}FP,i​<2−Nβ and 2−Nβ≤FA,i2^{-N^\beta}\le F_{A,i}2−Nβ≤FA,i​. No isometry or normalization hypothesis is imposed on V,ψV,\psiV,ψ, β\betaβ is unrestricted, and both n=0n=0n=0 and empty finite index types are included.

QAlgorithms.Papers.Independent.Intakethird100.P74.goodIndices

For any finite type OOO with decidable equality, natural number nnn, Boolean rrr, arbitrary matrices Wb∈CO×OW_b\in\mathbb C^{O\times O}Wb​∈CO×O for Boolean bbb, and arbitrary real β\betaβ, this defines the finite set of indices 0≤i<N=2n0\le i<N=2^n0≤i<N=2n for which

Re⁡tr⁡Σir,false Σir,true Σir,false<2−Nβ,\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_i^{r,\text{false}}}\, \Sigma_i^{r,\text{true}}\, \sqrt{\Sigma_i^{r,\text{false}}}} <2^{-N^\beta},RetrΣir,false​​Σir,true​Σir,false​​​<2−Nβ,

where each matrix square root is formed using continuous functional calculus. Here SirS_i^rSir​ consists of indices strictly greater than iii when rrr is true and strictly less than iii otherwise, and

Σir,b((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Sir=s∏a=0N−1Wvr(u)a(ya,ya′).\Sigma_i^{r,b}\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i^r}=s}} \prod_{a=0}^{N-1}W_{v^r(u)_a}(y_a,y'_a).Σir,b​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Sir​​=s​∑​a=0∏N−1​Wvr(u)a​​(ya​,ya′​).

The row and column indices have s,s′∈{false,true}Sirs,s'\in\{\text{false},\text{true}\}^{S_i^r}s,s′∈{false,true}Sir​ and y,y′∈ONy,y'\in O^Ny,y′∈ON. To define vrv^rvr, put tab=1t_{ab}=1tab​=1 exactly when every set bit k<nk<nk<n of bbb implies a set bit n−1−kn-1-kn−1−k of aaa; then vr(u)av^r(u)_avr(u)a​ is the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​ when rrr is true and of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​ otherwise. No density-matrix hypothesis on WWW, nonemptiness hypothesis on OOO, or restriction on β\betaβ is imposed. The case n=0n=0n=0, hence N=1N=1N=1, is included, and the displayed comparison is strict.

QAlgorithms.Papers.Independent.Intakethird100.P74.independentBsc

For all real numbers pB,pEp_B,p_EpB​,pE​ and Boolean values x,y,zx,y,zx,y,z, this defines

independentBsc⁡(pB,pE,x,y,z)={1−pB,x=y,pB,x≠y  ⋅  {1−pE,x=z,pE,x≠z.\operatorname{independentBsc}(p_B,p_E,x,y,z) = \begin{cases}1-p_B,&x=y,\\p_B,&x\ne y\end{cases} \;\cdot\; \begin{cases}1-p_E,&x=z,\\p_E,&x\ne z.\end{cases}independentBsc(pB​,pE​,x,y,z)={1−pB​,pB​,​x=y,x=y​⋅{1−pE​,pE​,​x=z,x=z.​

Neither real parameter is required to lie in [0,1][0,1][0,1].

QAlgorithms.Papers.Independent.Intakethird100.P74.keyIndices

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality on B,S1,S2B,S_1,S_2B,S1​,S2​, arbitrary V∈C(B×E×S2)×{false,true}V\in\mathbb C^{(B\times E\times S_2)\times\{\text{false},\text{true}\}}V∈C(B×E×S2​)×{false,true}, arbitrary vectors ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​, real β\betaβ, and natural nnn, put N=2nN=2^nN=2n, fz(b,e,s,t)=∑aV(b,e,t),aψz(a,s)f_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s)fz​(b,e,s,t)=∑a​V(b,e,t),a​ψz​(a,s), and

WzA(b,b′)=∑e,s,tfz(b,e,s,t)fz(b′,e,s,t)‾,WxP((z,b,s,t),(z′,b′,s′,t′))=χ(x,z)χ(x,z′)2∑efz(b,e,s,t)fz′(b′,e,s′,t′)‾,W_z^{A}(b,b')=\sum_{e,s,t}f_z(b,e,s,t)\overline{f_z(b',e,s,t)},\qquad W_x^{P}((z,b,s,t),(z',b',s',t')) =\frac{\chi(x,z)\chi(x,z')}{2} \sum_e f_z(b,e,s,t)\overline{f_{z'}(b',e,s',t')},WzA​(b,b′)=e,s,t∑​fz​(b,e,s,t)fz​(b′,e,s,t)​,WxP​((z,b,s,t),(z′,b′,s′,t′))=2χ(x,z)χ(x,z′)​e∑​fz​(b,e,s,t)fz′​(b′,e,s′,t′)​,

where aaa ranges over Booleans and χ(x,z)\chi(x,z)χ(x,z) is −1-1−1 when both arguments are true and 111 otherwise. For r=A,Pr=A,Pr=A,P, set SiA={j:j<i}S_i^A=\{j:j<i\}SiA​={j:j<i}, SiP={j:i<j<N}S_i^P=\{j:i<j<N\}SiP​={j:i<j<N}, and

Σr,ib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Sir=s∏a=0N−1Wvr(u)ar(ya,ya′).\Sigma_{r,i}^{b}\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i^r}=s}} \prod_{a=0}^{N-1}W^r_{v^r(u)_a}(y_a,y'_a).Σr,ib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Sir​​=s​∑​a=0∏N−1​Wvr(u)a​r​(ya​,ya′​).

The output indices yyy lie in BNB^NBN for AAA, and in ({false,true}×B×S1×S2)N(\{\text{false},\text{true}\}\times B\times S_1\times S_2)^N({false,true}×B×S1​×S2​)N for PPP. Define tab=1t_{ab}=1tab​=1 exactly when every set bit k<nk<nk<n of bbb implies a set bit n−1−kn-1-kn−1−k of aaa; then vA(u)av^A(u)_avA(u)a​ is the parity of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​, and vP(u)av^P(u)_avP(u)a​ is the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​. With

Fr,i=Re⁡tr⁡Σr,ifalseΣr,itrueΣr,ifalse,F_{r,i}=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_{r,i}^{\text{false}}}\Sigma_{r,i}^{\text{true}}\sqrt{\Sigma_{r,i}^{\text{false}}}},Fr,i​=RetrΣr,ifalse​​Σr,itrue​Σr,ifalse​​​,

where roots use continuous functional calculus, the defined set consists exactly of indices i<Ni<Ni<N satisfying both 2−Nβ≤FA,i2^{-N^\beta}\le F_{A,i}2−Nβ≤FA,i​ and 2−Nβ≤FP,i2^{-N^\beta}\le F_{P,i}2−Nβ≤FP,i​; equality with the threshold is included. No isometry or normalization condition on the data is imposed, β\betaβ is arbitrary, n=0n=0n=0 is included, and the finite types may be empty.

QAlgorithms.Papers.Independent.Intakethird100.P74.keyRate

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, and any n∈Nn\in\mathbb Nn∈N, let N=2nN=2^nN=2n, represent Boolean values by 0,10,10,1, and define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),WB(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾,\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W_B(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)},Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),WB​(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​, WP(x)(z,b,s,t),(z′,b′,s′,t′)=(−1)x(z+z′)2∑eΨz(b,e,s,t)Ψz′(b′,e,s′,t′)‾.W_P(x)_{(z,b,s,t),(z',b',s',t')} =\frac{(-1)^{x(z+z')}}2 \sum_e\Psi_z(b,e,s,t)\overline{\Psi_{z'}(b',e,s',t')}.WP​(x)(z,b,s,t),(z′,b′,s′,t′)​=2(−1)x(z+z′)​e∑​Ψz​(b,e,s,t)Ψz′​(b′,e,s′,t′)​.

The latter matrices are indexed by {0,1}×B×S1×S2\{0,1\}\times B\times S_1\times S_2{0,1}×B×S1​×S2​. Let Grj=1G_{rj}=1Grj​=1 exactly when, for every k<nk<nk<n, a 111 in binary position kkk of jjj implies a 111 in position n−1−kn-1-kn−1−k of rrr, and otherwise let Grj=0G_{rj}=0Grj​=0. Set E0(u)j=∑rurGrj(mod2)E_0(u)_j=\sum_r u_rG_{rj}\pmod2E0​(u)j​=∑r​ur​Grj​(mod2) and E1(u)j=∑rurGjr(mod2)E_1(u)_j=\sum_r u_rG_{jr}\pmod2E1​(u)j​=∑r​ur​Gjr​(mod2). For Ji0={j:j<i}J_i^0=\{j:j<i\}Ji0​={j:j<i} and Ji1={j:i<j}J_i^1=\{j:i<j\}Ji1​={j:i<j}, define

Siε(W,b)(v,y),(w,y′)={2−(N−1)∑u∈{0,1}Nui=b, u∣Jiε=v∏j<NW(Eε(u)j)yj,yj′,v=w,0,v≠w,S_i^\varepsilon(W,b)_{(v,y),(w,y')} = \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^N\\u_i=b,\ u|_{J_i^\varepsilon}=v}} \prod_{j<N}W(E_\varepsilon(u)_j)_{y_j,y'_j},&v=w,\\ 0,&v\ne w, \end{cases}Siε​(W,b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Nui​=b, u∣Jiε​​=v​∑​j<N∏​W(Eε​(u)j​)yj​,yj′​​,0,​v=w,v=w,​

where v,wv,wv,w assign bits to JiεJ_i^\varepsilonJiε​, and y,y′y,y'y,y′ are output strings of WWW. With

F(A,B)=Re⁡tr⁡A B A,D={i:F(Si0(WB,0),Si0(WB,1))<2−Nβ},P={i:F(Si1(WP,0),Si1(WP,1))<2−Nβ},F(A,B)=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt A\,B\,\sqrt A}, \quad D=\{i:F(S_i^0(W_B,0),S_i^0(W_B,1))<2^{-N^\beta}\}, \quad P=\{i:F(S_i^1(W_P,0),S_i^1(W_P,1))<2^{-N^\beta}\},F(A,B)=RetrA​BA​​,D={i:F(Si0​(WB​,0),Si0​(WB​,1))<2−Nβ},P={i:F(Si1​(WP​,0),Si1​(WP​,1))<2−Nβ},

using continuous functional calculus for matrix square roots, the definition returns

∣{0,…,N−1}∖(D∪P)∣N.\frac{|\{0,\ldots,N-1\}\setminus(D\cup P)|}{N}.N∣{0,…,N−1}∖(D∪P)∣​.

No validity assumption on V,ψV,\psiV,ψ, or restriction on β\betaβ, is part of this definition. The case n=0n=0n=0 is included: there is one index, no side bits, and denominator 111. An empty set in the numerator gives rate 000.

QAlgorithms.Papers.Independent.Intakethird100.P74.netRate

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary wiretap data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, and any n∈Nn\in\mathbb Nn∈N, put N=2nN=2^nN=2n and identify Boolean values with 0,10,10,1. Here VVV has entries V(b,e,t),aV_{(b,e,t),a}V(b,e,t),a​, and ψz\psi_zψz​ has entries ψz(a,s)\psi_z(a,s)ψz​(a,s); no isometry or normalization assumption is imposed on these data. Define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),WB(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾.\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W_B(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)}.Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),WB​(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​.

On the alphabet O={0,1}×B×S1×S2O=\{0,1\}\times B\times S_1\times S_2O={0,1}×B×S1​×S2​, define

WP(x)(z,b,s,t),(z′,b′,s′,t′)=(−1)x(z+z′)2∑eΨz(b,e,s,t)Ψz′(b′,e,s′,t′)‾.W_P(x)_{(z,b,s,t),(z',b',s',t')} =\frac{(-1)^{x(z+z')}}2 \sum_e\Psi_z(b,e,s,t)\overline{\Psi_{z'}(b',e,s',t')}.WP​(x)(z,b,s,t),(z′,b′,s′,t′)​=2(−1)x(z+z′)​e∑​Ψz​(b,e,s,t)Ψz′​(b′,e,s′,t′)​.

Let Grj∈{0,1}G_{rj}\in\{0,1\}Grj​∈{0,1}, for 0≤r,j<N0\le r,j<N0≤r,j<N, equal 111 exactly when every binary digit k<nk<nk<n of jjj that equals 111 has the binary digit n−1−kn-1-kn−1−k of rrr equal to 111. For a bit string uuu, set E0(u)j=∑rurGrj(mod2)E_0(u)_j=\sum_r u_rG_{rj}\pmod2E0​(u)j​=∑r​ur​Grj​(mod2) and E1(u)j=∑rurGjr(mod2)E_1(u)_j=\sum_r u_rG_{jr}\pmod2E1​(u)j​=∑r​ur​Gjr​(mod2). For either ε=0,1\varepsilon=0,1ε=0,1, let Ji0={j:j<i}J_i^0=\{j:j<i\}Ji0​={j:j<i}, Ji1={j:i<j}J_i^1=\{j:i<j\}Ji1​={j:i<j}, and define the matrices

Siε(W,b)(v,y),(w,y′)={2−(N−1)∑u∈{0,1}Nui=b, u∣Jiε=v∏j<NW(Eε(u)j)yj,yj′,v=w,0,v≠w.S_i^\varepsilon(W,b)_{(v,y),(w,y')} = \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^N\\u_i=b,\ u|_{J_i^\varepsilon}=v}} \prod_{j<N}W(E_\varepsilon(u)_j)_{y_j,y'_j},&v=w,\\ 0,&v\ne w. \end{cases}Siε​(W,b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Nui​=b, u∣Jiε​​=v​∑​j<N∏​W(Eε​(u)j​)yj​,yj′​​,0,​v=w,v=w.​

Here v,wv,wv,w are assignments on JiεJ_i^\varepsilonJiε​, and y,y′y,y'y,y′ are NNN-tuples of output symbols of WWW. Write

F(A,B)=Re⁡tr⁡A B A,F(A,B)=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt A\,B\,\sqrt A},F(A,B)=RetrA​BA​​,

where matrix square roots use continuous functional calculus. Define

D={i:F(Si0(WB,0),Si0(WB,1))<2−Nβ},P={i:F(Si1(WP,0),Si1(WP,1))<2−Nβ}.D=\{i:F(S_i^0(W_B,0),S_i^0(W_B,1))<2^{-N^\beta}\}, \qquad P=\{i:F(S_i^1(W_P,0),S_i^1(W_P,1))<2^{-N^\beta}\}.D={i:F(Si0​(WB​,0),Si0​(WB​,1))<2−Nβ},P={i:F(Si1​(WP​,0),Si1​(WP​,1))<2−Nβ}.

The definition returns

∣D∩P∣−∣{0,…,N−1}∖(D∪P)∣N.\frac{|D\cap P|-|\{0,\ldots,N-1\}\setminus(D\cup P)|}{N}.N∣D∩P∣−∣{0,…,N−1}∖(D∪P)∣​.

Thus the numerator subtracts the number of indices failing both strict tests from the number passing both. The definition includes n=0n=0n=0, when N=1N=1N=1, all side-index sets are empty, and the denominator is 111; the returned real number is not required to be nonnegative.

QAlgorithms.Papers.Independent.Intakethird100.P74.phaseBob

For index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with EEE finite, a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), and a Boolean xxx, this definition gives a complex square matrix indexed by {false,true}×B×S1×S2\{\mathrm{false},\mathrm{true}\}\times B\times S_1\times S_2{false,true}×B×S1​×S2​. For r=(z,b,s1,s2)r=(z,b,s_1,s_2)r=(z,b,s1​,s2​) and r′=(z′,b′,s1′,s2′)r'=(z',b',s'_1,s'_2)r′=(z′,b′,s1′​,s2′​), its entries are

(ρxphase)r,r′=σ(x,z)σ(x,z′)2∑e∈E∑a,a′∈{false,true}V(b,e,s2),aψz(a,s1)V(b′,e,s2′),a′ψz′(a′,s1′)‾,(\rho^{\mathrm{phase}}_x)_{r,r'} =\frac{\sigma(x,z)\sigma(x,z')}{2} \sum_{e\in E}\sum_{a,a'\in\{\mathrm{false},\mathrm{true}\}} V_{(b,e,s_2),a}\psi_z(a,s_1) \overline{V_{(b',e,s'_2),a'}\psi_{z'}(a',s'_1)},(ρxphase​)r,r′​=2σ(x,z)σ(x,z′)​e∈E∑​a,a′∈{false,true}∑​V(b,e,s2​),a​ψz​(a,s1​)V(b′,e,s2′​),a′​ψz′​(a′,s1′​)​,

where σ(x,z)=−1\sigma(x,z)=-1σ(x,z)=−1 exactly when both Booleans are true, and is 111 otherwise. No validity assumption is required; if EEE is empty, the matrix is zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.phaseGoodIndices

Let B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​ be finite types, with decidable equality on B,S1,S2B,S_1,S_2B,S1​,S2​, and let ddd consist of an arbitrary matrix V∈C(B×E×S2)×{false,true}V\in\mathbb C^{(B\times E\times S_2)\times\{\text{false},\text{true}\}}V∈C(B×E×S2​)×{false,true} and arbitrary vectors ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​. For real β\betaβ and natural nnn, put N=2nN=2^nN=2n, O={false,true}×B×S1×S2O=\{\text{false},\text{true}\}\times B\times S_1\times S_2O={false,true}×B×S1​×S2​, and

fz(b,e,s,t)=∑aV(b,e,t),aψz(a,s),Wx((z,b,s,t),(z′,b′,s′,t′))=χ(x,z)χ(x,z′)2∑efz(b,e,s,t)fz′(b′,e,s′,t′)‾,f_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s),\qquad W_x((z,b,s,t),(z',b',s',t')) =\frac{\chi(x,z)\chi(x,z')}{2} \sum_e f_z(b,e,s,t)\overline{f_{z'}(b',e,s',t')},fz​(b,e,s,t)=a∑​V(b,e,t),a​ψz​(a,s),Wx​((z,b,s,t),(z′,b′,s′,t′))=2χ(x,z)χ(x,z′)​e∑​fz​(b,e,s,t)fz′​(b′,e,s′,t′)​,

where the sum over aaa is over Booleans and χ(x,z)=−1\chi(x,z)=-1χ(x,z)=−1 if both x,zx,zx,z are true, and 111 otherwise. For i<Ni<Ni<N, set Si={j:i<j<N}S_i=\{j:i<j<N\}Si​={j:i<j<N} and

Σib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Si=s∏a=0N−1Wv(u)a(ya,ya′),\Sigma_i^b\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i}=s}} \prod_{a=0}^{N-1}W_{v(u)_a}(y_a,y'_a),Σib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Si​​=s​∑​a=0∏N−1​Wv(u)a​​(ya​,ya′​),

where y,y′∈ONy,y'\in O^Ny,y′∈ON, and v(u)av(u)_av(u)a​ is the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​, with tah=1t_{ah}=1tah​=1 exactly when every set bit k<nk<nk<n of hhh implies a set bit n−1−kn-1-kn−1−k of aaa. The defined set consists of precisely those i<Ni<Ni<N for which

Re⁡tr⁡ΣifalseΣitrueΣifalse<2−Nβ,\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_i^{\text{false}}}\Sigma_i^{\text{true}}\sqrt{\Sigma_i^{\text{false}}}} <2^{-N^\beta},RetrΣifalse​​Σitrue​Σifalse​​​<2−Nβ,

with matrix roots interpreted by continuous functional calculus. No isometry or normalization condition on ddd is assumed; β\betaβ is unrestricted, n=0n=0n=0 is allowed, and the finite types need not be nonempty.

QAlgorithms.Papers.Independent.Intakethird100.P74.phaseVector

For arbitrary index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), and a Boolean xxx, this definition gives a complex vector indexed by ({false,true}×B×S1×S2)×E(\{\mathrm{false},\mathrm{true}\}\times B\times S_1\times S_2)\times E({false,true}×B×S1​×S2​)×E, with coordinate

Fx((z,b,s1,s2),e)=σ(x,z)2∑a∈{false,true}V(b,e,s2),aψz(a,s1),σ(x,z)={−1x=z=true,1otherwise.F_x((z,b,s_1,s_2),e) =\frac{\sigma(x,z)}{\sqrt2} \sum_{a\in\{\mathrm{false},\mathrm{true}\}} V_{(b,e,s_2),a}\psi_z(a,s_1), \qquad \sigma(x,z)= \begin{cases}-1&x=z=\mathrm{true},\\1&\text{otherwise}.\end{cases}Fx​((z,b,s1​,s2​),e)=2​σ(x,z)​a∈{false,true}∑​V(b,e,s2​),a​ψz​(a,s1​),σ(x,z)={−11​x=z=true,otherwise.​

No validity or normalization assumption on ddd is required.

QAlgorithms.Papers.Independent.Intakethird100.P74.polarEncode

For every natural number nnn, Boolean rrr, and Boolean vector uuu of length N=2nN=2^nN=2n, this defines a Boolean vector vvv of length NNN. For 0≤a,b<N0\le a,b<N0≤a,b<N, let tab∈{0,1}t_{ab}\in\{0,1\}tab​∈{0,1} equal 111 exactly when every set bit in position k<nk<nk<n of bbb corresponds to a set bit in position n−1−kn-1-kn−1−k of aaa. Interpreting false and true as 000 and 111, respectively, the output is specified by

vj=true⟺{∑i=0N−1ui tji≡1(mod2),r=true,∑i=0N−1ui tij≡1(mod2),r=false.v_j=\text{true} \quad\Longleftrightarrow\quad \begin{cases} \displaystyle\sum_{i=0}^{N-1}u_i\,t_{ji}\equiv1\pmod2,&r=\text{true},\\[2mm] \displaystyle\sum_{i=0}^{N-1}u_i\,t_{ij}\equiv1\pmod2,&r=\text{false}. \end{cases}vj​=true⟺⎩⎨⎧​i=0∑N−1​ui​tji​≡1(mod2),i=0∑N−1​ui​tij​≡1(mod2),​r=true,r=false.​

Both choices of rrr are allowed. When n=0n=0n=0, N=1N=1N=1, the bit condition defining t00t_{00}t00​ is vacuous, and the output equals the one-coordinate input.

QAlgorithms.Papers.Independent.Intakethird100.P74.polarEntry

For every natural number nnn and integers 0≤i,j<2n0\le i,j<2^n0≤i,j<2n, this defines a Boolean that is true exactly when, for every k∈{0,…,n−1}k\in\{0,\ldots,n-1\}k∈{0,…,n−1}, a set bit in position kkk of jjj implies a set bit in position n−1−kn-1-kn−1−k of iii, where bit position 000 is the least significant position. The subtraction is natural-number subtraction; these bounds on kkk ensure that n−1−kn-1-kn−1−k is the indicated reflected position. When n=0n=0n=0, the only possible indices are i=j=0i=j=0i=j=0, the condition has no instances, and the result is true.

QAlgorithms.Papers.Independent.Intakethird100.P74.polarSideIndices

For every natural number nnn, Boolean rrr, and index 0≤i<2n0\le i<2^n0≤i<2n, this defines the type of indices j∈{0,…,2n−1}j\in\{0,\ldots,2^n-1\}j∈{0,…,2n−1} satisfying i<ji<ji<j when r=truer=\text{true}r=true, and satisfying j<ij<ij<i when r=falser=\text{false}r=false. The inequalities are strict, so iii itself is excluded. This type is empty when r=falser=\text{false}r=false and i=0i=0i=0, or when r=truer=\text{true}r=true and i=2n−1i=2^n-1i=2n−1; in particular it is empty for both choices when n=0n=0n=0.

QAlgorithms.Papers.Independent.Intakethird100.P74.privateIndices

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality on B,S1,S2B,S_1,S_2B,S1​,S2​, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ) consisting of V∈C(B×E×S2)×{false,true}V\in\mathbb C^{(B\times E\times S_2)\times\{\text{false},\text{true}\}}V∈C(B×E×S2​)×{false,true} and vectors ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​, real β\betaβ, and natural nnn, put N=2nN=2^nN=2n and define fz(b,e,s,t)=∑aV(b,e,t),aψz(a,s)f_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s)fz​(b,e,s,t)=∑a​V(b,e,t),a​ψz​(a,s), summing over Boolean aaa. Define two matrix families by

WzA(b,b′)=∑e,s,tfz(b,e,s,t)fz(b′,e,s,t)‾,WxP((z,b,s,t),(z′,b′,s′,t′))=χ(x,z)χ(x,z′)2∑efz(b,e,s,t)fz′(b′,e,s′,t′)‾,W_z^{A}(b,b')=\sum_{e,s,t}f_z(b,e,s,t)\overline{f_z(b',e,s,t)},\qquad W_x^{P}((z,b,s,t),(z',b',s',t')) =\frac{\chi(x,z)\chi(x,z')}{2} \sum_e f_z(b,e,s,t)\overline{f_{z'}(b',e,s',t')},WzA​(b,b′)=e,s,t∑​fz​(b,e,s,t)fz​(b′,e,s,t)​,WxP​((z,b,s,t),(z′,b′,s′,t′))=2χ(x,z)χ(x,z′)​e∑​fz​(b,e,s,t)fz′​(b′,e,s′,t′)​,

where χ(x,z)=−1\chi(x,z)=-1χ(x,z)=−1 when both arguments are true and is 111 otherwise. For r∈{A,P}r\in\{A,P\}r∈{A,P}, take SiA={j:j<i}S_i^A=\{j:j<i\}SiA​={j:j<i}, SiP={j:i<j<N}S_i^P=\{j:i<j<N\}SiP​={j:i<j<N}, and define matrices

Σr,ib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Sir=s∏a=0N−1Wvr(u)ar(ya,ya′).\Sigma_{r,i}^{b}\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i^r}=s}} \prod_{a=0}^{N-1}W^r_{v^r(u)_a}(y_a,y'_a).Σr,ib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Sir​​=s​∑​a=0∏N−1​Wvr(u)a​r​(ya​,ya′​).

Here yyy ranges over BNB^NBN for r=Ar=Ar=A and over ({false,true}×B×S1×S2)N(\{\text{false},\text{true}\}\times B\times S_1\times S_2)^N({false,true}×B×S1​×S2​)N for r=Pr=Pr=P; writing tab=1t_{ab}=1tab​=1 exactly when each set bit k<nk<nk<n of bbb implies a set bit n−1−kn-1-kn−1−k of aaa, vA(u)av^A(u)_avA(u)a​ is the parity of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​, and vP(u)av^P(u)_avP(u)a​ is the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​. Put

Fr,i=Re⁡tr⁡Σr,ifalseΣr,itrueΣr,ifalse,F_{r,i}=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_{r,i}^{\text{false}}}\Sigma_{r,i}^{\text{true}}\sqrt{\Sigma_{r,i}^{\text{false}}}},Fr,i​=RetrΣr,ifalse​​Σr,itrue​Σr,ifalse​​​,

using continuous functional calculus for roots. This declaration defines precisely the indices i<Ni<Ni<N satisfying both FA,i<2−NβF_{A,i}<2^{-N^\beta}FA,i​<2−Nβ and FP,i<2−NβF_{P,i}<2^{-N^\beta}FP,i​<2−Nβ. No validity condition on ddd, restriction on β\betaβ, or positivity of nnn is required; n=0n=0n=0 gives N=1N=1N=1, and empty index types are permitted.

QAlgorithms.Papers.Independent.Intakethird100.P74.privateMessageEveState

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, and n∈Nn\in\mathbb Nn∈N, put N=2nN=2^nN=2n and define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s),Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s), WB(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾,WE(z)e,e′=∑b,s,tΨz(b,e,s,t)Ψz(b,e′,s,t)‾,W_B(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)}, \qquad W_E(z)_{e,e'}=\sum_{b,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b,e',s,t)},WB​(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​,WE​(z)e,e′​=b,s,t∑​Ψz​(b,e,s,t)Ψz​(b,e′,s,t)​, WP(x)(z,b,s,t),(z′,b′,s′,t′)=(−1)x(z+z′)2∑eΨz(b,e,s,t)Ψz′(b′,e,s′,t′)‾.W_P(x)_{(z,b,s,t),(z',b',s',t')} =\frac{(-1)^{x(z+z')}}2 \sum_e\Psi_z(b,e,s,t)\overline{\Psi_{z'}(b',e,s',t')}.WP​(x)(z,b,s,t),(z′,b′,s′,t′)​=2(−1)x(z+z′)​e∑​Ψz​(b,e,s,t)Ψz′​(b′,e,s′,t′)​.

Let Grj=1G_{rj}=1Grj​=1 exactly when every binary position k<nk<nk<n at which jjj has digit 111 has digit 111 at position n−1−kn-1-kn−1−k of rrr, and otherwise let it be 000. Set E0(u)j=∑rurGrj(mod2)E_0(u)_j=\sum_r u_rG_{rj}\pmod2E0​(u)j​=∑r​ur​Grj​(mod2), E1(u)j=∑rurGjr(mod2)E_1(u)_j=\sum_r u_rG_{jr}\pmod2E1​(u)j​=∑r​ur​Gjr​(mod2), Ji0={j:j<i}J_i^0=\{j:j<i\}Ji0​={j:j<i}, and Ji1={j:i<j}J_i^1=\{j:i<j\}Ji1​={j:i<j}. Define

Siε(W,b)(v,y),(w,y′)={2−(N−1)∑u∈{0,1}Nui=b, u∣Jiε=v∏j<NW(Eε(u)j)yj,yj′,v=w,0,v≠w,S_i^\varepsilon(W,b)_{(v,y),(w,y')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^N\\u_i=b,\ u|_{J_i^\varepsilon}=v}} \prod_{j<N}W(E_\varepsilon(u)_j)_{y_j,y'_j},&v=w,\\ 0,&v\ne w, \end{cases}Siε​(W,b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Nui​=b, u∣Jiε​​=v​∑​j<N∏​W(Eε​(u)j​)yj​,yj′​​,0,​v=w,v=w,​

where v,wv,wv,w are assignments on the indicated side-index set and y,y′y,y'y,y′ are output strings of WWW. With F(A,B)=Re⁡tr⁡A B AF(A,B)=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt A\,B\,\sqrt A}F(A,B)=RetrA​BA​​, using continuous functional calculus, let

D={i:F(Si0(WB,0),Si0(WB,1))<2−Nβ},P={i:F(Si1(WP,0),Si1(WP,1))<2−Nβ},I=D∩P.D=\{i:F(S_i^0(W_B,0),S_i^0(W_B,1))<2^{-N^\beta}\}, \quad P=\{i:F(S_i^1(W_P,0),S_i^1(W_P,1))<2^{-N^\beta}\}, \quad I=D\cap P.D={i:F(Si0​(WB​,0),Si0​(WB​,1))<2−Nβ},P={i:F(Si1​(WP​,0),Si1​(WP​,1))<2−Nβ},I=D∩P.

For every message m:I→{0,1}m:I\to\{0,1\}m:I→{0,1}, the definition gives a complex matrix on ENE^NEN with entries

ρm(e,e′)=2∣I∣−N∑u∈{0,1}Nu∣I=m∏j<NWE(E0(u)j)ej,ej′.\rho_m(e,e') = 2^{|I|-N} \sum_{\substack{u\in\{0,1\}^N\\u|_I=m}} \prod_{j<N}W_E(E_0(u)_j)_{e_j,e'_j}.ρm​(e,e′)=2∣I∣−Nu∈{0,1}Nu∣I​=m​∑​j<N∏​WE​(E0​(u)j​)ej​,ej′​​.

No validity assumption on ddd is imposed, so the declaration does not assert that this matrix has trace 111. If III is empty, there is one empty message and the formula averages over all 2N2^N2N strings; if III contains every index, the sum has one term and prefactor 111. The case n=0n=0n=0, when N=1N=1N=1, is included.

QAlgorithms.Papers.Independent.Intakethird100.P74.privateMessageLeakageBits

For finite index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required by the constructions, let d=(V,ψ)d=(V,\psi)d=(V,ψ) consist of a complex matrix VVV with rows indexed by B×E×S2B\times E\times S_2B×E×S2​ and columns indexed by {0,1}\{0,1\}{0,1}, and vectors ψz∈C{0,1}×S1\psi_z\in\mathbb C^{\{0,1\}\times S_1}ψz​∈C{0,1}×S1​ for z∈{0,1}z\in\{0,1\}z∈{0,1}. For any real β\betaβ and natural number nnn, put N=2nN=2^nN=2n and I={0,…,N−1}I=\{0,\ldots,N-1\}I={0,…,N−1}. Identify Boolean values with 0,10,10,1, and define the binary matrix GGG by Gij=1G_{ij}=1Gij​=1 precisely when, for every k<nk<nk<n, a 111 in bit kkk of jjj implies a 111 in bit n−1−kn-1-kn−1−k of iii. Define

e−(u)j=∑i∈IuiGij(mod2),e+(u)j=∑i∈IuiGji(mod2).e_-(u)_j=\sum_{i\in I}u_iG_{ij}\pmod2,\qquad e_+(u)_j=\sum_{i\in I}u_iG_{ji}\pmod2.e−​(u)j​=i∈I∑​ui​Gij​(mod2),e+​(u)j​=i∈I∑​ui​Gji​(mod2).

Set

sz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),φx((z,b,s,t),e)=2−1/2(−1)xzsz(b,e,s,t),s_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s),\qquad \varphi_x((z,b,s,t),e)=2^{-1/2}(-1)^{xz}s_z(b,e,s,t),sz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),φx​((z,b,s,t),e)=2−1/2(−1)xzsz​(b,e,s,t),

and let WzA=Tr⁡E,S1,S2(szsz∗)W^A_z=\operatorname{Tr}_{E,S_1,S_2}(s_zs_z^*)WzA​=TrE,S1​,S2​​(sz​sz∗​), WzE=Tr⁡B,S1,S2(szsz∗)W^E_z=\operatorname{Tr}_{B,S_1,S_2}(s_zs_z^*)WzE​=TrB,S1​,S2​​(sz​sz∗​), and WxP=Tr⁡E(φxφx∗)W^P_x=\operatorname{Tr}_E(\varphi_x\varphi_x^*)WxP​=TrE​(φx​φx∗​). For a binary matrix-valued family WWW, define its split matrices Σi,bW,±\Sigma^{W,\pm}_{i,b}Σi,bW,±​, whose indices are pairs (h,y)(h,y)(h,y), by

[Σi,bW,±](h,y),(h′,y′)={2−(N−1)∑u∈{0,1}Iui=b, u∣Ji±=h∏ℓ∈IWe±(u)ℓ(yℓ,yℓ′),h=h′,0,h≠h′,Ji−={j:j<i},Ji+={j:i<j}.[\Sigma^{W,\pm}_{i,b}]_{(h,y),(h',y')} = \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^I\\u_i=b,\ u|_{J_i^\pm}=h}} \prod_{\ell\in I}W_{e_\pm(u)_\ell}(y_\ell,y'_\ell),&h=h',\\ 0,&h\ne h', \end{cases} \qquad J_i^-=\{j:j<i\},\quad J_i^+=\{j:i<j\}.[Σi,bW,±​](h,y),(h′,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Iui​=b, u∣Ji±​​=h​∑​ℓ∈I∏​We±​(u)ℓ​​(yℓ​,yℓ′​),0,​h=h′,h=h′,​Ji−​={j:j<i},Ji+​={j:i<j}.

Here the minus sign uses e−e_-e−​, and the plus sign uses e+e_+e+​. Write F(R,S)=Re⁡tr⁡R SRF(R,S)=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt R\,S\sqrt R}F(R,S)=RetrR​SR​​, with matrix square roots given by real square-root continuous functional calculus, and put

D={i:F(Σi,0WA,−,Σi,1WA,−)<2−Nβ},P={i:F(Σi,0WP,+,Σi,1WP,+)<2−Nβ},A=D∩P.D=\{i:F(\Sigma^{W^A,-}_{i,0},\Sigma^{W^A,-}_{i,1})<2^{-N^\beta}\},\quad P=\{i:F(\Sigma^{W^P,+}_{i,0},\Sigma^{W^P,+}_{i,1})<2^{-N^\beta}\},\quad A=D\cap P.D={i:F(Σi,0WA,−​,Σi,1WA,−​)<2−Nβ},P={i:F(Σi,0WP,+​,Σi,1WP,+​)<2−Nβ},A=D∩P.

For every assignment m:A→{0,1}m:A\to\{0,1\}m:A→{0,1}, define

ρm=2∣A∣−N∑u∈{0,1}Iu∣A=m⨂ℓ∈IWe−(u)ℓE.\rho_m=2^{|A|-N} \sum_{\substack{u\in\{0,1\}^I\\u|_A=m}} \bigotimes_{\ell\in I}W^E_{e_-(u)_\ell}.ρm​=2∣A∣−Nu∈{0,1}Iu∣A​=m​∑​ℓ∈I⨂​We−​(u)ℓ​E​.

The declared real number is

S2 ⁣(2−∣A∣∑mρm)−2−∣A∣∑mS2(ρm),S2(R)=−Re⁡tr⁡(cfc⁡[r↦rlog⁡2r](R)).S_2\!\left(2^{-|A|}\sum_m\rho_m\right) -2^{-|A|}\sum_m S_2(\rho_m), \qquad S_2(R)=-\operatorname{Re}\operatorname{tr} \bigl(\operatorname{cfc}[r\mapsto r\log_2 r](R)\bigr).S2​(2−∣A∣m∑​ρm​)−2−∣A∣m∑​S2​(ρm​),S2​(R)=−Retr(cfc[r↦rlog2​r](R)).

There is no validity assumption on ddd, no restriction on β\betaβ, and n=0n=0n=0 is included. The set AAA may be empty; then there is one assignment mmm, and this expression is zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.purifiedWiretapSignal

For arbitrary index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), and a Boolean zzz, this definition gives the complex vector on B×E×S1×S2B\times E\times S_1\times S_2B×E×S1​×S2​ whose coordinate at (b,e,s1,s2)(b,e,s_1,s_2)(b,e,s1​,s2​) is

∑a∈{false,true}V(b,e,s2),a ψz(a,s1).\sum_{a\in\{\mathrm{false},\mathrm{true}\}} V_{(b,e,s_2),a}\,\psi_z(a,s_1).a∈{false,true}∑​V(b,e,s2​),a​ψz​(a,s1​).

No validity or normalization assumption on ddd is required.

QAlgorithms.Papers.Independent.Intakethird100.P74.randomIndices

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality on B,S1,S2B,S_1,S_2B,S1​,S2​, arbitrary data V∈C(B×E×S2)×{false,true}V\in\mathbb C^{(B\times E\times S_2)\times\{\text{false},\text{true}\}}V∈C(B×E×S2​)×{false,true} and ψz∈C{false,true}×S1\psi_z\in\mathbb C^{\{\text{false},\text{true}\}\times S_1}ψz​∈C{false,true}×S1​, real β\betaβ, and natural nnn, put N=2nN=2^nN=2n, fz(b,e,s,t)=∑aV(b,e,t),aψz(a,s)f_z(b,e,s,t)=\sum_aV_{(b,e,t),a}\psi_z(a,s)fz​(b,e,s,t)=∑a​V(b,e,t),a​ψz​(a,s), summing over Boolean aaa, and define

WzA(b,b′)=∑e,s,tfz(b,e,s,t)fz(b′,e,s,t)‾,WxP((z,b,s,t),(z′,b′,s′,t′))=χ(x,z)χ(x,z′)2∑efz(b,e,s,t)fz′(b′,e,s′,t′)‾,W_z^{A}(b,b')=\sum_{e,s,t}f_z(b,e,s,t)\overline{f_z(b',e,s,t)},\qquad W_x^{P}((z,b,s,t),(z',b',s',t')) =\frac{\chi(x,z)\chi(x,z')}{2} \sum_e f_z(b,e,s,t)\overline{f_{z'}(b',e,s',t')},WzA​(b,b′)=e,s,t∑​fz​(b,e,s,t)fz​(b′,e,s,t)​,WxP​((z,b,s,t),(z′,b′,s′,t′))=2χ(x,z)χ(x,z′)​e∑​fz​(b,e,s,t)fz′​(b′,e,s′,t′)​,

where χ(x,z)=−1\chi(x,z)=-1χ(x,z)=−1 if both arguments are true and 111 otherwise. Set SiA={j:j<i}S_i^A=\{j:j<i\}SiA​={j:j<i}, SiP={j:i<j<N}S_i^P=\{j:i<j<N\}SiP​={j:i<j<N}, and, for r=A,Pr=A,Pr=A,P, define

Σr,ib((s,y),(s′,y′))=1{s=s′} 2−(N−1)∑u∈{false,true}Nui=b, u∣Sir=s∏a=0N−1Wvr(u)ar(ya,ya′).\Sigma_{r,i}^{b}\bigl((s,y),(s',y')\bigr) =\mathbf1_{\{s=s'\}}\,2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\u_i=b,\ u|_{S_i^r}=s}} \prod_{a=0}^{N-1}W^r_{v^r(u)_a}(y_a,y'_a).Σr,ib​((s,y),(s′,y′))=1{s=s′}​2−(N−1)u∈{false,true}Nui​=b, u∣Sir​​=s​∑​a=0∏N−1​Wvr(u)a​r​(ya​,ya′​).

Here y∈BNy\in B^Ny∈BN for AAA, while y∈({false,true}×B×S1×S2)Ny\in(\{\text{false},\text{true}\}\times B\times S_1\times S_2)^Ny∈({false,true}×B×S1​×S2​)N for PPP. For tab=1t_{ab}=1tab​=1 exactly when each set bit k<nk<nk<n of bbb implies a set bit n−1−kn-1-kn−1−k of aaa, define vA(u)av^A(u)_avA(u)a​ as the parity of ∑huhtha\sum_hu_ht_{ha}∑h​uh​tha​ and vP(u)av^P(u)_avP(u)a​ as the parity of ∑huhtah\sum_hu_ht_{ah}∑h​uh​tah​. Write

Fr,i=Re⁡tr⁡Σr,ifalseΣr,itrueΣr,ifalse,F_{r,i}=\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\Sigma_{r,i}^{\text{false}}}\Sigma_{r,i}^{\text{true}}\sqrt{\Sigma_{r,i}^{\text{false}}}},Fr,i​=RetrΣr,ifalse​​Σr,itrue​Σr,ifalse​​​,

with matrix roots formed by continuous functional calculus. This defines exactly the indices i<Ni<Ni<N for which FA,i<2−NβF_{A,i}<2^{-N^\beta}FA,i​<2−Nβ and 2−Nβ≤FP,i2^{-N^\beta}\le F_{P,i}2−Nβ≤FP,i​. There is no validity assumption on the data and no restriction on β\betaβ; n=0n=0n=0, giving N=1N=1N=1, and empty finite index types are allowed.

QAlgorithms.Papers.Independent.Intakethird100.P74.referenceEncoder

For types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, any data d:WiretapData(B,E,S1,S2)d:\mathrm{WiretapData}(B,E,S_1,S_2)d:WiretapData(B,E,S1​,S2​), and any n∈Nn\in\mathbb Nn∈N, put N=2nN=2^nN=2n. This defines a complex matrix whose row and column indices are strings in ({0,1}×B×S1×S2)N(\{0,1\}\times B\times S_1\times S_2)^N({0,1}×B×S1​×S2​)N. Let Grj=1G_{rj}=1Grj​=1 exactly when, for every k<nk<nk<n, a 111 in binary position kkk of jjj implies a 111 in position n−1−kn-1-kn−1−k of rrr, and otherwise let Grj=0G_{rj}=0Grj​=0. For row yi=(ai,bi,si,ti)y_i=(a_i,b_i,s_i,t_i)yi​=(ai​,bi​,si​,ti​) and column zi=(ci,bi′,si′,ti′)z_i=(c_i,b'_i,s'_i,t'_i)zi​=(ci​,bi′​,si′​,ti′​), the entry is

Ry,z={1,(bi,si,ti)=(bi′,si′,ti′) for every i,aj=∑r<NcrGrj(mod2) for every j,0,otherwise.R_{y,z}= \begin{cases} 1,& (b_i,s_i,t_i)=(b'_i,s'_i,t'_i)\text{ for every }i, \quad a_j=\displaystyle\sum_{r<N}c_rG_{rj}\pmod2\text{ for every }j,\\ 0,&\text{otherwise}. \end{cases}Ry,z​=⎩⎨⎧​1,0,​(bi​,si​,ti​)=(bi′​,si′​,ti′​) for every i,aj​=r<N∑​cr​Grj​(mod2) for every j,otherwise.​

The entries of VVV and ψ\psiψ in ddd, and the type EEE, do not enter this formula. No validity hypothesis on ddd is required. For n=0n=0n=0, N=1N=1N=1 and G00=1G_{00}=1G00​=1, so this is the identity matrix on the indicated one-coordinate strings.

QAlgorithms.Papers.Independent.Intakethird100.P74.reliabilityBound

For finite types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality as required, arbitrary data d=(V,ψ)d=(V,\psi)d=(V,ψ), any β∈R\beta\in\mathbb Rβ∈R, and n∈Nn\in\mathbb Nn∈N, let N=2nN=2^nN=2n, and define

Ψz(b,e,s,t)=∑a∈{0,1}V(b,e,t),aψz(a,s),W(z)b,b′=∑e,s,tΨz(b,e,s,t)Ψz(b′,e,s,t)‾.\Psi_z(b,e,s,t)=\sum_{a\in\{0,1\}}V_{(b,e,t),a}\psi_z(a,s), \qquad W(z)_{b,b'}=\sum_{e,s,t}\Psi_z(b,e,s,t)\overline{\Psi_z(b',e,s,t)}.Ψz​(b,e,s,t)=a∈{0,1}∑​V(b,e,t),a​ψz​(a,s),W(z)b,b′​=e,s,t∑​Ψz​(b,e,s,t)Ψz​(b′,e,s,t)​.

Let Grj=1G_{rj}=1Grj​=1 exactly when every 111 in binary position k<nk<nk<n of jjj implies a 111 in position n−1−kn-1-kn−1−k of rrr, taking 000 otherwise, and put c(u)j=∑rurGrj(mod2)c(u)_j=\sum_r u_rG_{rj}\pmod2c(u)j​=∑r​ur​Grj​(mod2). For assignments v,wv,wv,w on {j:j<i}\{j:j<i\}{j:j<i} and y,y′∈BNy,y'\in B^Ny,y′∈BN, define

Si(b)(v,y),(w,y′)={2−(N−1)∑u∈{0,1}Nui=b, u∣{j:j<i}=v∏r<NW(c(u)r)yr,yr′,v=w,0,v≠w.S_i(b)_{(v,y),(w,y')}= \begin{cases} 2^{-(N-1)} \displaystyle\sum_{\substack{u\in\{0,1\}^N\\u_i=b,\ u|_{\{j:j<i\}}=v}} \prod_{r<N}W(c(u)_r)_{y_r,y'_r},&v=w,\\ 0,&v\ne w. \end{cases}Si​(b)(v,y),(w,y′)​=⎩⎨⎧​2−(N−1)u∈{0,1}Nui​=b, u∣{j:j<i}​=v​∑​r<N∏​W(c(u)r​)yr​,yr′​​,0,​v=w,v=w.​

Writing Fi=Re⁡tr⁡Si(0)Si(1)Si(0)F_i=\operatorname{Re}\operatorname{tr}\sqrt{\sqrt{S_i(0)}S_i(1)\sqrt{S_i(0)}}Fi​=RetrSi​(0)​Si​(1)Si​(0)​​, with matrix square roots defined by continuous functional calculus, and D={i:Fi<2−Nβ}D=\{i:F_i<2^{-N^\beta}\}D={i:Fi​<2−Nβ}, the definition returns

 2∑i∈DFi .\sqrt{\,2\sum_{i\in D}F_i\,}.2i∈D∑​Fi​​.

This is a defined real number; the declaration itself states no inequality involving a decoder. No validity hypothesis on ddd or restriction on β\betaβ is imposed. An empty DDD gives 000, and n=0n=0n=0 is included, with one index and no preceding bits. The outer square root is the total real square-root function, which returns 000 on negative arguments.

QAlgorithms.Papers.Independent.Intakethird100.P74.splitOutput

For any finite type OOO with decidable equality, natural number nnn, Boolean rrr, arbitrary family of complex matrices Wb∈CO×OW_b\in\mathbb C^{O\times O}Wb​∈CO×O indexed by Booleans bbb, index 0≤i<N=2n0\le i<N=2^n0≤i<N=2n, and Boolean bbb, this defines a matrix indexed by pairs (s,y)(s,y)(s,y), where y∈ONy\in O^Ny∈ON and sss is a Boolean assignment on Sir={j:i<j<N}S_i^r=\{j:i<j<N\}Sir​={j:i<j<N} if r=truer=\text{true}r=true, or Sir={j:0≤j<i}S_i^r=\{j:0\le j<i\}Sir​={j:0≤j<i} otherwise. Define tab∈{0,1}t_{ab}\in\{0,1\}tab​∈{0,1} to be 111 exactly when every set bit k<nk<nk<n of bbb corresponds to a set bit n−1−kn-1-kn−1−k of aaa, and define vr(u)av^r(u)_avr(u)a​ as the parity of ∑huhtah\sum_hu_h t_{ah}∑h​uh​tah​ for r=truer=\text{true}r=true, or ∑huhtha\sum_hu_h t_{ha}∑h​uh​tha​ otherwise, interpreting Boolean values as 0,10,10,1. Its entries are

Σir,b((s,y),(s′,y′))={2−(N−1)∑u∈{false,true}Nui=b, uj=sj (j∈Sir)∏a=0N−1Wvr(u)a(ya,ya′),s=s′,0,s≠s′.\Sigma_i^{r,b}\bigl((s,y),(s',y')\bigr)= \begin{cases} \displaystyle 2^{-(N-1)} \sum_{\substack{u\in\{\text{false},\text{true}\}^N\\ u_i=b,\ u_j=s_j\ (j\in S_i^r)}} \prod_{a=0}^{N-1}W_{v^r(u)_a}(y_a,y'_a),&s=s',\\[3mm] 0,&s\ne s'. \end{cases}Σir,b​((s,y),(s′,y′))=⎩⎨⎧​2−(N−1)u∈{false,true}Nui​=b, uj​=sj​ (j∈Sir​)​∑​a=0∏N−1​Wvr(u)a​​(ya​,ya′​),0,​s=s′,s=s′.​

There is no positivity, trace, or normalization hypothesis on WWW. When n=0n=0n=0, this reduces, under the unique empty side assignment and one-coordinate output indexing, to WbW_bWb​. The type OOO may be empty, in which case the matrix has an empty index type.

QAlgorithms.Papers.Independent.Intakethird100.P74.symmetricPrivateInformation

For finite index types B,E,S1,S2B,E,S_1,S_2B,E,S1​,S2​, with decidable equality on B,EB,EB,E, and a datum d=(V,ψ)d=(V,\psi)d=(V,ψ), define, for each Boolean zzz,

Rz(a,a′)=∑s1∈S1ψz(a,s1)ψz(a′,s1)‾,Cz=VRzV†,R_z(a,a')=\sum_{s_1\in S_1}\psi_z(a,s_1)\overline{\psi_z(a',s_1)}, \qquad C_z=VR_zV^\dagger,Rz​(a,a′)=s1​∈S1​∑​ψz​(a,s1​)ψz​(a′,s1​)​,Cz​=VRz​V†,

and define matrices Bz,EzB_z,E_zBz​,Ez​ by

Bz(b,b′)=∑e∈E∑s2∈S2Cz((b,e,s2),(b′,e,s2)),Ez(e,f)=∑b∈B∑s2∈S2Cz((b,e,s2),(b,f,s2)).B_z(b,b')=\sum_{e\in E}\sum_{s_2\in S_2}C_z((b,e,s_2),(b',e,s_2)), \qquad E_z(e,f)=\sum_{b\in B}\sum_{s_2\in S_2}C_z((b,e,s_2),(b,f,s_2)).Bz​(b,b′)=e∈E∑​s2​∈S2​∑​Cz​((b,e,s2​),(b′,e,s2​)),Ez​(e,f)=b∈B∑​s2​∈S2​∑​Cz​((b,e,s2​),(b,f,s2​)).

With S(M)=−Re⁡tr⁡(cfc⁡[t↦tlog⁡2t](M))S(M)=-\operatorname{Re}\operatorname{tr}(\operatorname{cfc}[t\mapsto t\log_2 t](M))S(M)=−Retr(cfc[t↦tlog2​t](M)), the definition gives

S ⁣(Bfalse+Btrue2)−S(Bfalse)+S(Btrue)2−S ⁣(Efalse+Etrue2)+S(Efalse)+S(Etrue)2.S\!\left(\frac{B_{\mathrm{false}}+B_{\mathrm{true}}}{2}\right) -\frac{S(B_{\mathrm{false}})+S(B_{\mathrm{true}})}2 -S\!\left(\frac{E_{\mathrm{false}}+E_{\mathrm{true}}}{2}\right) +\frac{S(E_{\mathrm{false}})+S(E_{\mathrm{true}})}2.S(2Bfalse​+Btrue​​)−2S(Bfalse​)+S(Btrue​)​−S(2Efalse​+Etrue​​)+2S(Efalse​)+S(Etrue​)​.

No validity assumption on ddd is imposed; empty index types are permitted, with empty sums equal to zero.

QAlgorithms.Papers.Independent.Intakethird100.P74.uniformHolevo

For finite types L,OL,OL,O, with decidable equality on OOO, and any family WℓW_\ellWℓ​ of complex OOO-indexed square matrices, let

S(M)=−Re⁡tr⁡ ⁣(cfc⁡[t↦tlog⁡2t](M)),S(M)=-\operatorname{Re}\operatorname{tr} \!\left(\operatorname{cfc}[t\mapsto t\log_2 t](M)\right),S(M)=−Retr(cfc[t↦tlog2​t](M)),

where cfc⁡\operatorname{cfc}cfc denotes continuous functional calculus. This definition gives the real number

S ⁣(∣L∣−1∑ℓ∈LWℓ)−∣L∣−1∑ℓ∈LS(Wℓ).S\!\left(|L|^{-1}\sum_{\ell\in L}W_\ell\right) -|L|^{-1}\sum_{\ell\in L}S(W_\ell).S(∣L∣−1ℓ∈L∑​Wℓ​)−∣L∣−1ℓ∈L∑​S(Wℓ​).

No positivity, trace-one, or nonemptiness assumption is imposed. Inverses are total, so 0−1=00^{-1}=00−1=0; the value is zero if LLL or OOO is empty.

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).

  • Endorsed by mikedeng1 · Nov 8, 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