Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Unconditional Security Of Quantum Key Distribution Over Arbitrarily Long Distances

Definition
QAlgorithms_Papers_Independent_Intakenext100_P87

by Gohan · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Unconditional Security Of Quantum Key Distribution Over Arbitrarily Long Distances (arXiv:quant-ph/9803006) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • basisPinch: PDF p.4: complete nonselective measurement in the columns of U.
  • coarseProjector: PDF p.4: spectral projector of a coarse observable diagonal in U.
  • sequentialLaw: PDF p.4: the full sequential Lueders joint law, with the first test acting first.
  • PairRegister: PDF pp.4,8: bipartite N-pair computational index, Alice register first.
  • sourceBellPaulis: PDF p.8, (1)--(3): translate the paper's phase/parity bits to the accepted phase-free Pauli labels. I,X,Z,Y correspond to 00,01,10,11. The imported Bell vector for Y is i times the paper's singlet; Bell projectors are unchanged by this phase.
  • singletKet: PDF p.4: the N-singlet vector from the accepted Bell construction. Multiplication by (-i)^N fixes the source's positive |01> amplitude per pair. This is a phase/label adapter, not a second Bell-vector definition.
  • bellPinch: PDF pp.8--10,21: virtual complete N-Bell premeasurement, with outcome forgotten.
  • singletOverlap: PDF pp.4,14--15,19: squared singlet overlap, not root fidelity.
  • OutcomePartition: PDF p.19: finite measurable coarse grainings; empty cells are allowed.
  • partitionLaw: PDF p.19: joint Born probabilities for two local generalized measurements.
  • measuredInfo: PDF p.19: Shannon information for arbitrary measurable outcomes, defined as an extended nonnegative supremum over all finite measurable coarse grainings.
  • axisEffect: PDF p.4: a measurement basis for a common spin axis, lifted to R local qubits.
  • idealKeyLaw: PDF p.4: all four local outcomes per pair and an arbitrary Eve event.
  • keyPartitionLaw: PDF pp.14--15: key/Eve joint law; Bob's outcomes are not disclosed.
  • keyLeakage: PDF pp.14--15: classical Shannon information for a fixed arbitrary Eve measurement.
  • directMissProbability: PDF p.7: exact failure event of direct sampling, one fixed nonsinglet position.
  • hashingCollisionProbability: PDF p.7: uniform independent fair (nonzero-mask) parity questions.
  • spectralContribution: PDF p.21: entropy contribution of a spectral subset of a probability vector.
  • axisPauli: PDF pp.20--21: Pauli axes x,y,z, respectively.
  • pairAxisProjector: PDF pp.20--21: coarse antiparallel/parallel projectors for one pair. The outcome true means antiparallel.
  • atPair: PDF pp.20--21: lift a two-qubit operator to a named pair, identities on other pairs.
  • pairAxisSampleLaw: PDF pp.20--21: executed sequential coarse measurements on distinct named pairs. There is exactly one axis for each sampled pair, not three counterfactual measurements.
  • singletEstimate: PDF p.21: the estimator (3k-m)/(2m), in real arithmetic and without clipping. Only m>0 is used in the estimation theorem.
  • meanSingletEstimate: PDF pp.20--21: uniform m distinct positions, independent uniform axes and Born outcomes. Ordered injections give the same sampling law as uniform subsets with an ordering.
  • meanLocalSingletWeight: PDF pp.11,20--21: expected singlet fraction, the mean of local singlet projectors.
  • bb84SignalKet: PDF pp.14,19: the four BB84 one-photon polarization states. The basis bit selects z (false) or x (true); it is independent of photon number.
  • photonPulse: PDF p.19: an already supplied n-photon identically polarized pulse. This is a tensor power of the input polarization, not a physical cloning operation.
  • extractedPulse: PDF p.19: ideal number-resolved extraction is the fixed tensor-factor split. For n+1 photons, Eve stores the first and Bob receives the remaining n.
  • matchedPolarizationProb: PDF p.19: matched-basis polarization measurement after the basis announcement.
  • poissonMass: PDF pp.14,19: Poisson photon statistics, with no finite cutoff.
  • pnsForwardRate: PDF p.19: available genuine-click rate, forwarding only multiphoton pulses. Number n+2 leaves n+1 photons at Bob, so d is evaluated at n+1.
  • pnsKeyLaw: PDF p.19: subnormalized sifted two-bit law of the explicit number-measure, extract/store, superior-channel forwarding and basis-delayed measurement attack. Blocked pulses produce no transmitted key signal. Bob's click response d is basis-independent. The classical thinning probability t is independent of polarization.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_GeneralPOVMs
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Defs_FreshCopyTomographyPrograms

/-!
Lo and Chau, arXiv:quant-ph/9803006v5. PDF page numbers throughout.
Only statements are admitted. Local definitions have complete bodies.
Deferred protocol results and cited background are recorded in HARD.md.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intakenext100.P87

open scoped Matrix ComplexConjugate
open QAlgorithms.Measurements

/-- PDF p.4: complete nonselective measurement in the columns of U. -/
def basisPinch {I : Type*} [Fintype I] [DecidableEq I]
    (U : Matrix.unitaryGroup I ℂ) (rho : Matrix I I ℂ) : Matrix I I ℂ :=
  (U : Matrix I I ℂ) *
    Matrix.diagonal (fun i => ((U : Matrix I I ℂ)ᴴ * rho * (U : Matrix I I ℂ)) i i) *
      (U : Matrix I I ℂ)ᴴ

/-- PDF p.4: spectral projector of a coarse observable diagonal in U. -/
def coarseProjector {I O : Type*} [Fintype I] [DecidableEq I] [DecidableEq O]
    (U : Matrix.unitaryGroup I ℂ) (f : I → O) (o : O) : Matrix I I ℂ :=
  (U : Matrix I I ℂ) * Matrix.diagonal (fun i => if f i = o then 1 else 0) *
    (U : Matrix I I ℂ)ᴴ

/-- PDF p.4: the full sequential Lueders joint law, with the first test acting first. -/
def sequentialLaw {I O : Type*} [Fintype I] [DecidableEq I] [DecidableEq O]
    {t : ℕ} (U : Matrix.unitaryGroup I ℂ) (rho : Matrix I I ℂ)
    (f : Fin t → I → O) (o : Fin t → O) : ℝ :=
  let K := orderedProd (fun j => coarseProjector U (f j) (o j))
  (K * rho * Kᴴ).trace.re

example {I : Type*} [Fintype I] [DecidableEq I]
    (U : Matrix.unitaryGroup I ℂ) (rho : Matrix I I ℂ) :
    sequentialLaw U rho (t := 0) (O := Bool) Fin.elim0 Fin.elim0 = rho.trace.re := by
  simp [sequentialLaw, orderedProd]

/-- PDF pp.4,8: bipartite N-pair computational index, Alice register first. -/
abbrev PairRegister (N : ℕ) := Qubits N × Qubits N

/-- PDF p.8, (1)--(3): translate the paper's phase/parity bits to the
accepted phase-free Pauli labels. I,X,Z,Y correspond to 00,01,10,11.
The imported Bell vector for Y is i times the paper's singlet; Bell projectors
are unchanged by this phase. -/
def sourceBellPaulis {N : ℕ} (w : PairRegister N) : DopedTomography.BellLabel N :=
  fun i => if w.1 i then
    (if w.2 i then Stabilizer.Pauli.Y else Stabilizer.Pauli.Z)
  else (if w.2 i then Stabilizer.Pauli.X else Stabilizer.Pauli.I)

/-- PDF p.4: the N-singlet vector from the accepted Bell construction.
Multiplication by (-i)^N fixes the source's positive |01> amplitude per pair.
This is a phase/label adapter, not a second Bell-vector definition. -/
def singletKet (N : ℕ) : EuclideanSpace ℂ (PairRegister N) :=
  (-Complex.I) ^ N • DopedTomography.bellVector (fun _ : Fin N => Stabilizer.Pauli.Y)

/-- PDF pp.8--10,21: virtual complete N-Bell premeasurement, with outcome forgotten. -/
def bellPinch {N : ℕ} (rho : Matrix (PairRegister N) (PairRegister N) ℂ) :
    Matrix (PairRegister N) (PairRegister N) ℂ :=
  ∑ w : PairRegister N, DopedTomography.bellInstrument (sourceBellPaulis w) * rho *
    DopedTomography.bellInstrument (sourceBellPaulis w)

example : sourceBellPaulis (N := 1) (fun _ => true, fun _ => true) 0 =
    Stabilizer.Pauli.Y := rfl

example : sourceBellPaulis (N := 1) (fun _ => false, fun _ => true) 0 =
    Stabilizer.Pauli.X := rfl

/-- PDF pp.4,14--15,19: squared singlet overlap, not root fidelity. -/
def singletOverlap {N : ℕ} (rho : Matrix (PairRegister N) (PairRegister N) ℂ) : ℝ :=
  effectProb (pureDensity (singletKet N)) rho

/-- PDF p.19: finite measurable coarse grainings; empty cells are allowed. -/
structure OutcomePartition (O : Type*) [MeasurableSpace O] (n : ℕ) where
  label : O → Fin n
  measurable : Measurable label

/-- PDF p.19: joint Born probabilities for two local generalized measurements. -/
def partitionLaw {A B X Y : Type*} [Fintype A] [DecidableEq A]
    [Fintype B] [DecidableEq B] [MeasurableSpace X] [MeasurableSpace Y]
    (rho : Matrix (A × B) (A × B) ℂ) (P : OperatorPOVM A X) (Q : OperatorPOVM B Y)
    {n m : ℕ} (f : OutcomePartition X n) (g : OutcomePartition Y m)
    (z : Fin n × Fin m) : ℝ :=
  effectProb (Matrix.kronecker (P.operator {x | f.label x = z.1})
    (Q.operator {y | g.label y = z.2})) rho

/-- PDF p.19: Shannon information for arbitrary measurable outcomes, defined as
an extended nonnegative supremum over all finite measurable coarse grainings. -/
def measuredInfo {A B X Y : Type*} [Fintype A] [DecidableEq A]
    [Fintype B] [DecidableEq B] [MeasurableSpace X] [MeasurableSpace Y]
    (rho : Matrix (A × B) (A × B) ℂ) (P : OperatorPOVM A X) (Q : OperatorPOVM B Y) : ENNReal :=
  ⨆ (n : ℕ) (m : ℕ) (f : OutcomePartition X n) (g : OutcomePartition Y m),
    ENNReal.ofReal (mutualInfoBits (partitionLaw rho P Q f g))

example {X : Type*} [MeasurableSpace X] :
    OutcomePartition X 1 := ⟨fun _ => 0, measurable_const⟩

/-- PDF p.4: a measurement basis for a common spin axis, lifted to R local qubits. -/
def axisEffect (R : ℕ) (U : Matrix.unitaryGroup Bool ℂ) (a : Qubits R) :
    Matrix (Qubits R) (Qubits R) ℂ :=
  fun x y => ∏ i, (U : Matrix Bool Bool ℂ) (x i) (a i) *
    conj ((U : Matrix Bool Bool ℂ) (y i) (a i))

/-- PDF p.4: all four local outcomes per pair and an arbitrary Eve event. -/
def idealKeyLaw {E Y : Type*} [Fintype E] [DecidableEq E] [MeasurableSpace Y]
    {R : ℕ} (rho : Matrix (PairRegister R × E) (PairRegister R × E) ℂ)
    (U : Matrix.unitaryGroup Bool ℂ) (Q : OperatorPOVM E Y)
    (a b : Qubits R) (S : Set Y) : ℝ :=
  effectProb (Matrix.kronecker (Matrix.kronecker (axisEffect R U a) (axisEffect R U b))
    (Q.operator S)) rho

/-- PDF pp.14--15: key/Eve joint law; Bob's outcomes are not disclosed. -/
def keyPartitionLaw {E Y : Type*} [Fintype E] [DecidableEq E] [MeasurableSpace Y]
    {R : ℕ} (rho : Matrix (PairRegister R × E) (PairRegister R × E) ℂ)
    (U : Matrix.unitaryGroup Bool ℂ) (Q : OperatorPOVM E Y)
    {m : ℕ} (g : OutcomePartition Y m) (z : Qubits R × Fin m) : ℝ :=
  effectProb (Matrix.kronecker (Matrix.kronecker (axisEffect R U z.1) 1)
    (Q.operator {y | g.label y = z.2})) rho

/-- PDF pp.14--15: classical Shannon information for a fixed arbitrary Eve measurement. -/
def keyLeakage {E Y : Type*} [Fintype E] [DecidableEq E] [MeasurableSpace Y]
    {R : ℕ} (rho : Matrix (PairRegister R × E) (PairRegister R × E) ℂ)
    (U : Matrix.unitaryGroup Bool ℂ) (Q : OperatorPOVM E Y) : ENNReal :=
  ⨆ (m : ℕ) (g : OutcomePartition Y m),
    ENNReal.ofReal (mutualInfoBits (keyPartitionLaw rho U Q g))

/-- PDF p.7: exact failure event of direct sampling, one fixed nonsinglet position. -/
def directMissProbability (N m : ℕ) (bad : Fin N) : ℝ :=
  let samples := (Finset.univ : Finset (Fin N)).powersetCard m
  ((samples.filter (fun S => bad ∉ S)).card : ℝ) / samples.card

/-- PDF p.7: uniform independent fair (nonzero-mask) parity questions. -/
def hashingCollisionProbability {N : ℕ} (m : ℕ) (x y : Qubits N) : ℝ := by
  classical
  exact (((Finset.univ : Finset (Fin m → {s : Qubits N // s ≠ fun _ => false})).filter
    (fun ss => ∀ i, dotBits x (ss i).val = dotBits y (ss i).val)).card : ℝ) /
      Fintype.card (Fin m → {s : Qubits N // s ≠ fun _ => false})

example (x y : Qubits 1) : hashingCollisionProbability 0 x y = 1 := by
  simp [hashingCollisionProbability]

/-- PDF p.21: entropy contribution of a spectral subset of a probability vector. -/
def spectralContribution {I : Type*} [Fintype I] (p : I → ℝ) (S : Finset I) : ℝ :=
  ∑ i ∈ S, -p i * Real.logb 2 (p i)

example {I : Type*} [Fintype I] (p : I → ℝ) : spectralContribution p ∅ = 0 := by
  simp [spectralContribution]

/-- PDF pp.20--21: Pauli axes x,y,z, respectively. -/
def axisPauli (k : Fin 3) : Matrix Bool Bool ℂ :=
  if k = 0 then pauliX else if k = 1 then pauliY else pauliZ

/-- PDF pp.20--21: coarse antiparallel/parallel projectors for one pair.
The outcome true means antiparallel. -/
def pairAxisProjector (k : Fin 3) (anti : Bool) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (1 / 2 : ℂ) • (1 + (if anti then (-1 : ℂ) else 1) •
    Matrix.kronecker (axisPauli k) (axisPauli k))

/-- PDF pp.20--21: lift a two-qubit operator to a named pair, identities on other pairs. -/
def atPair {N : ℕ} (i : Fin N) (P : Matrix (Bool × Bool) (Bool × Bool) ℂ) :
    Matrix (PairRegister N) (PairRegister N) ℂ := by
  classical
  exact fun x y => P (x.1 i, x.2 i) (y.1 i, y.2 i) *
    ∏ j ∈ Finset.univ.erase i,
      if x.1 j = y.1 j ∧ x.2 j = y.2 j then (1 : ℂ) else 0

/-- PDF pp.20--21: executed sequential coarse measurements on distinct named pairs.
There is exactly one axis for each sampled pair, not three counterfactual measurements. -/
def pairAxisSampleLaw {N m : ℕ} (rho : Matrix (PairRegister N) (PairRegister N) ℂ)
    (s : Fin m ↪ Fin N) (axes : Fin m → Fin 3) (anti : Qubits m) : ℝ :=
  let K := orderedProd (fun j => atPair (s j) (pairAxisProjector (axes j) (anti j)))
  (K * rho * Kᴴ).trace.re

/-- PDF p.21: the estimator (3k-m)/(2m), in real arithmetic and without clipping.
Only m>0 is used in the estimation theorem. -/
def singletEstimate (m : ℕ) (anti : Qubits m) : ℝ :=
  (3 * (Finset.univ.filter (fun j => anti j = true)).card - (m : ℝ)) / (2 * m)

/-- PDF pp.20--21: uniform m distinct positions, independent uniform axes and Born outcomes.
Ordered injections give the same sampling law as uniform subsets with an ordering. -/
def meanSingletEstimate {N : ℕ}
    (rho : Matrix (PairRegister N) (PairRegister N) ℂ) (m : ℕ) : ℝ :=
  (∑ s : Fin m ↪ Fin N, ∑ axes : Fin m → Fin 3, ∑ anti : Qubits m,
    pairAxisSampleLaw rho s axes anti * singletEstimate m anti) /
      ((Fintype.card (Fin m ↪ Fin N) : ℝ) * (3 : ℝ) ^ m)

/-- PDF pp.11,20--21: expected singlet fraction, the mean of local singlet projectors. -/
def meanLocalSingletWeight {N : ℕ}
    (rho : Matrix (PairRegister N) (PairRegister N) ℂ) : ℝ :=
  (∑ i : Fin N, effectProb (atPair i (pureDensity
    (WithLp.toLp 2 (fun x : Bool × Bool =>
      singletKet 1 (fun _ => x.1, fun _ => x.2))))) rho) / N

example : singletEstimate 1 (fun _ => false) = -(1 / 2 : ℝ) := by
  norm_num [singletEstimate]

/-- PDF pp.14,19: the four BB84 one-photon polarization states.
The basis bit selects z (false) or x (true); it is independent of photon number. -/
def bb84SignalKet (basis bit : Bool) : EuclideanSpace ℂ Bool :=
  if basis then act hadamard (ket bit) else ket bit

/-- PDF p.19: an already supplied n-photon identically polarized pulse.
This is a tensor power of the input polarization, not a physical cloning operation. -/
def photonPulse (n : ℕ) (basis bit : Bool) : EuclideanSpace ℂ (Qubits n) :=
  WithLp.toLp 2 (fun x => ∏ i, bb84SignalKet basis bit (x i))

/-- PDF p.19: ideal number-resolved extraction is the fixed tensor-factor split.
For n+1 photons, Eve stores the first and Bob receives the remaining n. -/
def extractedPulse (n : ℕ) (basis bit : Bool) :
    EuclideanSpace ℂ (Bool × Qubits n) :=
  WithLp.toLp 2 (fun x => photonPulse (n + 1) basis bit (Fin.cons x.1 x.2))

/-- PDF p.19: matched-basis polarization measurement after the basis announcement. -/
def matchedPolarizationProb (basis bit outcome : Bool) : ℝ :=
  Complex.normSq (inner ℂ (bb84SignalKet basis outcome) (bb84SignalKet basis bit))

/-- PDF pp.14,19: Poisson photon statistics, with no finite cutoff. -/
def poissonMass (mu : ℝ) (n : ℕ) : ℝ :=
  Real.exp (-mu) * mu ^ n / (Nat.factorial n : ℝ)

example : poissonMass 0 0 = 1 := by
  simp [poissonMass]

/-- PDF p.19: available genuine-click rate, forwarding only multiphoton pulses.
Number n+2 leaves n+1 photons at Bob, so d is evaluated at n+1. -/
def pnsForwardRate (p d : ℕ → ℝ) : ℝ :=
  ∑' n : ℕ, p (n + 2) * d (n + 1)

/-- PDF p.19: subnormalized sifted two-bit law of the explicit number-measure,
extract/store, superior-channel forwarding and basis-delayed measurement attack.
Blocked pulses produce no transmitted key signal. Bob's click response d is
basis-independent. The classical thinning probability t is independent of polarization. -/
def pnsKeyLaw (p d : ℕ → ℝ) (t : ℝ) (basis bit bob eve : Bool) : ℝ :=
  ∑' n : ℕ, t * p (n + 2) * d (n + 1) *
    matchedPolarizationProb basis bit bob * matchedPolarizationProb basis bit eve

end QAlgorithms.Papers.Independent.Intakenext100.P87
Source
Unconditional Security Of Quantum Key Distribution Over Arbitrarily Long Distances, arXiv:quant-ph/9803006v5, https://arxiv.org/abs/quant-ph/9803006v5
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P87.OutcomePartition

For any type OOO equipped with a measurable space and any natural number nnn, this structure consists of a function

ℓ:O⟶{0,…,n−1}\ell:O\longrightarrow\{0,\ldots,n-1\}ℓ:O⟶{0,…,n−1}

together with a proof that ℓ\ellℓ is measurable, where the finite target has its discrete measurable structure. The fibers of ℓ\ellℓ are therefore measurable labeled cells covering OOO; labels need not be used, so cells may be empty. When n=0n=0n=0, such a function can exist only if OOO is empty.

QAlgorithms.Papers.Independent.Intakenext100.P87.PairRegister

For each natural number NNN, this abbreviates the type

PairRegister⁡(N)={0,1}N×{0,1}N,\operatorname{PairRegister}(N) =\{0,1\}^{N}\times\{0,1\}^{N},PairRegister(N)={0,1}N×{0,1}N,

where an NNN-bit string is a function from {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1} to the Boolean values. Thus an element consists of two ordered NNN-bit strings. When N=0N=0N=0, both strings are empty and the type has exactly one element.

QAlgorithms.Papers.Independent.Intakenext100.P87.atPair

For every natural number NNN, every index i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, and every complex matrix PPP indexed by pairs of Boolean values, this defines a matrix Ei(P)E_i(P)Ei​(P) indexed by ΩN={0,1}N×{0,1}N\Omega_N=\{0,1\}^N\times\{0,1\}^NΩN​={0,1}N×{0,1}N. For x=(x(1),x(2))x=(x^{(1)},x^{(2)})x=(x(1),x(2)) and y=(y(1),y(2))y=(y^{(1)},y^{(2)})y=(y(1),y(2)), its entries are

Ei(P)x,y=P(xi(1),xi(2)),(yi(1),yi(2))∏0≤j<Nj≠i1{xj(1)=yj(1) ∧ xj(2)=yj(2)}.E_i(P)_{x,y} = P_{(x^{(1)}_i,x^{(2)}_i),(y^{(1)}_i,y^{(2)}_i)} \prod_{\substack{0\leq j<N\\j\ne i}} \mathbf1_{\{x^{(1)}_j=y^{(1)}_j\ \land\ x^{(2)}_j=y^{(2)}_j\}}.Ei​(P)x,y​=P(xi(1)​,xi(2)​),(yi(1)​,yi(2)​)​0≤j<Nj=i​∏​1{xj(1)​=yj(1)​ ∧ xj(2)​=yj(2)​}​.

No assumption is made on PPP. The product is 111 when its index set is empty, as happens for N=1N=1N=1; for N=0N=0N=0, there is no index iii to supply.

QAlgorithms.Papers.Independent.Intakenext100.P87.axisEffect

For every natural number RRR, every unitary matrix UUU indexed by the two Boolean values, and every Boolean string a:{0,…,R−1}→{false,true}a:\{0,\ldots,R-1\}\to\{\mathrm{false},\mathrm{true}\}a:{0,…,R−1}→{false,true}, this defines a complex matrix ER,U,aE_{R,U,a}ER,U,a​ whose rows and columns are indexed by Boolean strings of length RRR, with entries

(ER,U,a)x,y=∏i=0R−1Uxi,ai Uyi,ai‾.(E_{R,U,a})_{x,y} =\prod_{i=0}^{R-1}U_{x_i,a_i}\,\overline{U_{y_i,a_i}}.(ER,U,a​)x,y​=i=0∏R−1​Uxi​,ai​​Uyi​,ai​​​.

The definition includes R=0R=0R=0: there is one empty string, and the resulting matrix has its sole entry equal to the empty product 111.

QAlgorithms.Papers.Independent.Intakenext100.P87.axisPauli

For each k∈{0,1,2}k\in\{0,1,2\}k∈{0,1,2}, this defines a complex matrix indexed by the two Boolean values, ordered as false and true, by

axisPauli⁡(k)={X,k=0,Y,k=1,Z,k=2,X=(0110),Y=(0−ii0),Z=(100−1).\operatorname{axisPauli}(k)= \begin{cases} X,&k=0,\\ Y,&k=1,\\ Z,&k=2, \end{cases} \qquad X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Y=\begin{pmatrix}0&-\mathrm i\\ \mathrm i&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.axisPauli(k)=⎩⎨⎧​X,Y,Z,​k=0,k=1,k=2,​X=(01​10​),Y=(0i​−i0​),Z=(10​0−1​).

QAlgorithms.Papers.Independent.Intakenext100.P87.basisPinch

For any finite type III with decidable equality, any unitary complex matrix UUU indexed by III, and any complex matrix ρ\rhoρ indexed by III, this defines

basisPinch⁡U(ρ)=U diag⁡((U†ρU)ii)i∈I U†.\operatorname{basisPinch}_U(\rho) =U\,\operatorname{diag}\bigl((U^\dagger\rho U)_{ii}\bigr)_{i\in I}\,U^\dagger.basisPinchU​(ρ)=Udiag((U†ρU)ii​)i∈I​U†.

Thus one conjugates ρ\rhoρ by U†U^\daggerU†, retains its diagonal entries and sets its off-diagonal entries to zero, and conjugates back by UUU. Here U†U^\daggerU† denotes conjugate transpose. No positivity or trace condition on ρ\rhoρ is required, and III may be empty.

QAlgorithms.Papers.Independent.Intakenext100.P87.bb84SignalKet

For every pair of Boolean values basis\mathrm{basis}basis and bit\mathrm{bit}bit, this defines a complex vector indexed by false and true. Writing ∣0⟩=(1,0)|0\rangle=(1,0)∣0⟩=(1,0) and ∣1⟩=(0,1)|1\rangle=(0,1)∣1⟩=(0,1), with false corresponding to 000 and true to 111, its value is

bb84SignalKet⁡(basis,bit)={∣bit⟩,basis=false,∣0⟩+(−1)1{bit=true}∣1⟩2,basis=true.\operatorname{bb84SignalKet}(\mathrm{basis},\mathrm{bit}) = \begin{cases} |\mathrm{bit}\rangle,&\mathrm{basis}=\mathrm{false},\\[2pt] \dfrac{|0\rangle+(-1)^{\mathbf1_{\{\mathrm{bit}=\mathrm{true}\}}}|1\rangle}{\sqrt2}, &\mathrm{basis}=\mathrm{true}. \end{cases}bb84SignalKet(basis,bit)=⎩⎨⎧​∣bit⟩,2​∣0⟩+(−1)1{bit=true}​∣1⟩​,​basis=false,basis=true.​

QAlgorithms.Papers.Independent.Intakenext100.P87.bellPinch

For every natural number NNN and every complex matrix ρ\rhoρ indexed by pairs of NNN-bit strings, this defines

bellPinch⁡(ρ)=∑w=(u,v)BwρBw,Bw=bwbw†,bw=12N∑x∣x⟩⊗Mw∣x⟩,\operatorname{bellPinch}(\rho)=\sum_{w=(u,v)}B_w\rho B_w, \qquad B_w=b_wb_w^\dagger,\qquad b_w=\frac{1}{\sqrt{2^N}}\sum_x |x\rangle\otimes M_w|x\rangle,bellPinch(ρ)=w=(u,v)∑​Bw​ρBw​,Bw​=bw​bw†​,bw​=2N​1​x∑​∣x⟩⊗Mw​∣x⟩,

where x,u,vx,u,vx,u,v range over NNN-bit strings and Mw=⨂i=0N−1PiM_w=\bigotimes_{i=0}^{N-1}P_iMw​=⨂i=0N−1​Pi​, with Pi=I,X,Z,YP_i=I,X,Z,YPi​=I,X,Z,Y respectively when (ui,vi)=(0,0),(0,1),(1,0),(1,1)(u_i,v_i)=(0,0),(0,1),(1,0),(1,1)(ui​,vi​)=(0,0),(0,1),(1,0),(1,1). In the false-then-true coordinate order,

I=(1001),X=(0110),Y=(0−ii0),Z=(100−1).I=\begin{pmatrix}1&0\\0&1\end{pmatrix},\quad X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Y=\begin{pmatrix}0&-\mathrm i\\ \mathrm i&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.I=(10​01​),X=(01​10​),Y=(0i​−i0​),Z=(10​0−1​).

Here each ∣x⟩|x\rangle∣x⟩ is a coordinate basis vector. No positivity or trace condition on ρ\rhoρ is imposed. For N=0N=0N=0, the sum has one term and the operation leaves the one-by-one matrix ρ\rhoρ unchanged.

QAlgorithms.Papers.Independent.Intakenext100.P87.coarseProjector

For any finite type III with decidable equality, any type OOO with decidable equality, any unitary complex matrix UUU indexed by III, any function f:I→Of:I\to Of:I→O, and any o∈Oo\in Oo∈O, this defines

coarseProjector⁡(U,f,o)=U diag⁡(1{f(i)=o})i∈I U†,\operatorname{coarseProjector}(U,f,o) =U\,\operatorname{diag}\bigl(\mathbf 1_{\{f(i)=o\}}\bigr)_{i\in I}\,U^\dagger,coarseProjector(U,f,o)=Udiag(1{f(i)=o}​)i∈I​U†,

where the diagonal entry is 111 when f(i)=of(i)=of(i)=o and 000 otherwise. The type OOO need not be finite; if f−1({o})f^{-1}(\{o\})f−1({o}) is empty, the resulting matrix is zero. The index type III may also be empty.

QAlgorithms.Papers.Independent.Intakenext100.P87.directMissProbability

For natural numbers N,mN,mN,m and an index b∈{0,…,N−1}b\in\{0,\ldots,N-1\}b∈{0,…,N−1}, this defines

∣{S⊆{0,…,N−1}:∣S∣=m, b∉S}∣∣{S⊆{0,…,N−1}:∣S∣=m}∣\frac{\bigl|\{S\subseteq\{0,\ldots,N-1\}:|S|=m,\ b\notin S\}\bigr|} {\bigl|\{S\subseteq\{0,\ldots,N-1\}:|S|=m\}\bigr|}​{S⊆{0,…,N−1}:∣S∣=m}​​{S⊆{0,…,N−1}:∣S∣=m, b∈/S}​​

as a real number. The subsets are counted without ordering or repetition. The existence of bbb requires N>0N>0N>0, but there is no restriction on mmm: for m=0m=0m=0 the value is 111, while for m>Nm>Nm>N both counts are zero and the real-division convention makes the value 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.extractedPulse

For every natural number nnn and Booleans b,cb,cb,c, this defines a complex vector indexed by pairs (u,x)(u,x)(u,x), where uuu is Boolean and xxx is a Boolean string of length nnn. Its amplitude is the amplitude of the length-n+1n+1n+1 pulse on the string obtained by putting uuu before xxx, namely

En,b,c(u,x)=sb,c(u)∏i=0n−1sb,c(xi),E_{n,b,c}(u,x)=s_{b,c}(u)\prod_{i=0}^{n-1}s_{b,c}(x_i),En,b,c​(u,x)=sb,c​(u)i=0∏n−1​sb,c​(xi​),

where sb,c(v)s_{b,c}(v)sb,c​(v) is 111 when b=falseb=\mathrm{false}b=false and v=cv=cv=c, 000 when b=falseb=\mathrm{false}b=false and v≠cv\ne cv=c, and, when b=trueb=\mathrm{true}b=true, is −1/2-1/\sqrt2−1/2​ if v=c=truev=c=\mathrm{true}v=c=true and 1/21/\sqrt21/2​ otherwise. For n=0n=0n=0, the product is 111, so the amplitude is sb,c(u)s_{b,c}(u)sb,c​(u).

QAlgorithms.Papers.Independent.Intakenext100.P87.hashingCollisionProbability

For any natural numbers N,mN,mN,m and Boolean strings x,yx,yx,y of length NNN, let SN\mathcal S_NSN​ be the set of Boolean strings of length NNN other than the all-false string. For Boolean strings u,su,su,s, let u⋅su\cdot su⋅s denote the Boolean parity of the coordinates where both are true, namely ∑j=0N−1ujsj\sum_{j=0}^{N-1}u_js_j∑j=0N−1​uj​sj​ modulo 222. This defines the real number

∣{(s0,…,sm−1)∈SNm:x⋅si=y⋅si for every i}∣∣SNm∣.\frac{\bigl|\{(s_0,\ldots,s_{m-1})\in\mathcal S_N^m: x\cdot s_i=y\cdot s_i\text{ for every }i\}\bigr|} {|\mathcal S_N^m|}.∣SNm​∣​{(s0​,…,sm−1​)∈SNm​:x⋅si​=y⋅si​ for every i}​​.

The masks form an ordered tuple and may repeat; no assumptions N>0N>0N>0 or x≠yx\ne yx=y are imposed. For m=0m=0m=0, the unique empty tuple satisfies the condition, so the value is 111. For N=0<mN=0<mN=0<m, there are no masks or tuples, and the ratio 0/00/00/0 is defined as 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.idealKeyLaw

Let EEE be a finite type with decidable equality, let YYY be a measurable space, and let RRR be any natural number. For an arbitrary complex matrix ρ\rhoρ indexed by (({false,true}R×{false,true}R)×E)((\{\mathrm{false},\mathrm{true}\}^R\times\{\mathrm{false},\mathrm{true}\}^R)\times E)(({false,true}R×{false,true}R)×E), a Boolean-indexed unitary matrix UUU, an operator-valued measure QQQ on YYY acting on CE\mathbb C^ECE, Boolean strings a,ba,ba,b of length RRR, and any set S⊆YS\subseteq YS⊆Y, this defines the real number

Re⁡tr⁡ ⁣[(ER,U,a⊗ER,U,b⊗Q(S))ρ],(ER,U,c)x,y=∏i=0R−1Uxi,ciUyi,ci‾.\operatorname{Re}\operatorname{tr}\!\left[ \bigl(E_{R,U,a}\otimes E_{R,U,b}\otimes Q(S)\bigr)\rho \right], \qquad (E_{R,U,c})_{x,y} =\prod_{i=0}^{R-1}U_{x_i,c_i}\overline{U_{y_i,c_i}}.Retr[(ER,U,a​⊗ER,U,b​⊗Q(S))ρ],(ER,U,c​)x,y​=i=0∏R−1​Uxi​,ci​​Uyi​,ci​​​.

Here Q(∅)=0Q(\varnothing)=0Q(∅)=0, Q(Y)=IQ(Y)=IQ(Y)=I, its values on measurable sets are positive semidefinite, and it is countably additive on pairwise disjoint measurable sets. No density-matrix hypothesis on ρ\rhoρ or measurability hypothesis on SSS is imposed. For R=0R=0R=0, each displayed product is 111.

QAlgorithms.Papers.Independent.Intakenext100.P87.keyLeakage

For a finite type EEE with decidable equality, a measurable space YYY, a natural number RRR, an arbitrary complex matrix ρ\rhoρ indexed by ((BR×BR)×E)((\mathcal B_R\times\mathcal B_R)\times E)((BR​×BR​)×E), a Boolean-indexed unitary UUU, and an operator-valued measure QQQ on YYY acting on CE\mathbb C^ECE, this defines an element of [0,∞][0,\infty][0,∞] as

sup⁡m∈Ng:Y→{0,…,m−1} measurablemax⁡ ⁣{0, ∑a∈BR∑j=0m−1pa,jlog⁡2 ⁣(pa,j(∑j′pa,j′)(∑a′pa′,j))},\sup_{\substack{m\in\mathbb N\\ g:Y\to\{0,\ldots,m-1\}\ \mathrm{measurable}}} \max\!\left\{0,\, \sum_{a\in\mathcal B_R}\sum_{j=0}^{m-1} p_{a,j}\log_2\!\left( \frac{p_{a,j}} {(\sum_{j'}p_{a,j'})(\sum_{a'}p_{a',j})} \right)\right\},m∈Ng:Y→{0,…,m−1} measurable​sup​max{0,a∈BR​∑​j=0∑m−1​pa,j​log2​((∑j′​pa,j′​)(∑a′​pa′,j​)pa,j​​)},

where BR\mathcal B_RBR​ consists of Boolean strings of length RRR,

pa,j=Re⁡tr⁡ ⁣[(ER,U,a⊗IBR⊗Q({y:g(y)=j}))ρ],(ER,U,a)x,y=∏iUxi,aiUyi,ai‾.p_{a,j}=\operatorname{Re}\operatorname{tr}\!\left[ (E_{R,U,a}\otimes I_{\mathcal B_R}\otimes Q(\{y:g(y)=j\}))\rho \right], \qquad (E_{R,U,a})_{x,y}=\prod_iU_{x_i,a_i}\overline{U_{y_i,a_i}}.pa,j​=Retr[(ER,U,a​⊗IBR​​⊗Q({y:g(y)=j}))ρ],(ER,U,a​)x,y​=i∏​Uxi​,ai​​Uyi​,ai​​​.

Here Q(∅)=0Q(\varnothing)=0Q(∅)=0, Q(Y)=IQ(Y)=IQ(Y)=I, positivity holds on measurable sets, and countable additivity holds on pairwise disjoint measurable sets. No density-matrix assumption is made on ρ\rhoρ. Division by zero is defined as zero, and the total real logarithm used here is log⁡2t=log⁡∣t∣/log⁡2\log_2t=\log|t|/\log2log2​t=log∣t∣/log2 for t≠0t\ne0t=0, with log⁡20=0\log_2 0=0log2​0=0. The supremum includes R=0R=0R=0 and partition size m=0m=0m=0 whenever such a map ggg exists.

QAlgorithms.Papers.Independent.Intakenext100.P87.keyPartitionLaw

Let EEE be a finite type with decidable equality, YYY a measurable space, and R,mR,mR,m natural numbers. Let ρ\rhoρ be any complex matrix indexed by ((BR×BR)×E)((\mathcal B_R\times\mathcal B_R)\times E)((BR​×BR​)×E), where BR\mathcal B_RBR​ is the set of Boolean strings of length RRR, let UUU be a Boolean-indexed unitary, and let QQQ be an operator-valued measure on YYY acting on CE\mathbb C^ECE. Given a measurable map g:Y→{0,…,m−1}g:Y\to\{0,\ldots,m-1\}g:Y→{0,…,m−1} and z=(a,j)∈BR×{0,…,m−1}z=(a,j)\in\mathcal B_R\times\{0,\ldots,m-1\}z=(a,j)∈BR​×{0,…,m−1}, this defines

pa,j=Re⁡tr⁡ ⁣[(ER,U,a⊗IBR⊗Q({y:g(y)=j}))ρ],(ER,U,a)x,y=∏iUxi,aiUyi,ai‾.p_{a,j} =\operatorname{Re}\operatorname{tr}\!\left[ \bigl(E_{R,U,a}\otimes I_{\mathcal B_R}\otimes Q(\{y:g(y)=j\})\bigr)\rho \right], \qquad (E_{R,U,a})_{x,y}=\prod_iU_{x_i,a_i}\overline{U_{y_i,a_i}}.pa,j​=Retr[(ER,U,a​⊗IBR​​⊗Q({y:g(y)=j}))ρ],(ER,U,a​)x,y​=i∏​Uxi​,ai​​Uyi​,ai​​​.

The measure QQQ takes the empty set to zero and the whole space to the identity, is positive semidefinite on measurable sets, and is countably additive on pairwise disjoint measurable sets. No positivity or normalization of ρ\rhoρ is assumed. The definition permits R=0R=0R=0; for m=0m=0m=0, there is no argument zzz.

QAlgorithms.Papers.Independent.Intakenext100.P87.matchedPolarizationProb

For every three Booleans b,c,ob,c,ob,c,o (basis, bit, and outcome), this defines the real number

∣∑u∈{false,true}sb,o(u)‾ sb,c(u)∣2,\left|\sum_{u\in\{\mathrm{false},\mathrm{true}\}} \overline{s_{b,o}(u)}\,s_{b,c}(u)\right|^2,​u∈{false,true}∑​sb,o​(u)​sb,c​(u)​2,

where sb,a(u)s_{b,a}(u)sb,a​(u) is 111 if b=falseb=\mathrm{false}b=false and u=au=au=a, 000 if b=falseb=\mathrm{false}b=false and u≠au\ne au=a, and, if b=trueb=\mathrm{true}b=true, is −1/2-1/\sqrt2−1/2​ when u=a=trueu=a=\mathrm{true}u=a=true and 1/21/\sqrt21/2​ otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P87.meanLocalSingletWeight

For every natural number NNN and every complex matrix ρ\rhoρ indexed by ΩN={0,1}N×{0,1}N\Omega_N=\{0,1\}^N\times\{0,1\}^NΩN​={0,1}N×{0,1}N, this defines

meanLocalSingletWeight⁡(ρ)=1N∑i=0N−1Re⁡tr⁡ ⁣(Ei(vv†)ρ),v=∣ false,true ⟩−∣ true,false ⟩2.\operatorname{meanLocalSingletWeight}(\rho) =\frac1N\sum_{i=0}^{N-1} \operatorname{Re}\operatorname{tr}\!\left(E_i(vv^\dagger)\rho\right), \qquad v=\frac{|\,\mathrm{false},\mathrm{true}\,\rangle- |\,\mathrm{true},\mathrm{false}\,\rangle}{\sqrt2}.meanLocalSingletWeight(ρ)=N1​i=0∑N−1​Retr(Ei​(vv†)ρ),v=2​∣false,true⟩−∣true,false⟩​.

Each displayed ket is the coordinate vector with value 111 at its indicated Boolean pair and 000 elsewhere. For x,y∈ΩNx,y\in\Omega_Nx,y∈ΩN​, the entry Ei(P)x,yE_i(P)_{x,y}Ei​(P)x,y​ equals P(xi(1),xi(2)),(yi(1),yi(2))P_{(x^{(1)}_i,x^{(2)}_i),(y^{(1)}_i,y^{(2)}_i)}P(xi(1)​,xi(2)​),(yi(1)​,yi(2)​)​ when xxx and yyy agree in both strings at every other position, and equals 000 otherwise. No positivity or normalization assumption is imposed on ρ\rhoρ. When N=0N=0N=0, the sum is empty and total real division makes the value 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.meanSingletEstimate

For every natural number NNN, every complex matrix ρ\rhoρ indexed by ΩN={0,1}N×{0,1}N\Omega_N=\{0,1\}^N\times\{0,1\}^NΩN​={0,1}N×{0,1}N, and every natural number mmm, this defines

meanSingletEstimate⁡(ρ,m)=∑s:{0,…,m−1}↪{0,…,N−1} ∑a∈{0,1,2}m ∑b∈{0,1}mRe⁡tr⁡(Ks,a,bρKs,a,b†) 3∣{j:bj=true}∣−m2m∣{s:{0,…,m−1}↪{0,…,N−1}}∣ 3m.\operatorname{meanSingletEstimate}(\rho,m) = \frac{\displaystyle \sum_{s:\{0,\ldots,m-1\}\hookrightarrow\{0,\ldots,N-1\}} \ \sum_{a\in\{0,1,2\}^m}\ \sum_{b\in\{0,1\}^m} \operatorname{Re}\operatorname{tr}(K_{s,a,b}\rho K_{s,a,b}^{\dagger}) \,\frac{3|\{j:b_j=\mathrm{true}\}|-m}{2m}} {\displaystyle |\{s:\{0,\ldots,m-1\}\hookrightarrow\{0,\ldots,N-1\}\}|\,3^m}.meanSingletEstimate(ρ,m)=∣{s:{0,…,m−1}↪{0,…,N−1}}∣3ms:{0,…,m−1}↪{0,…,N−1}∑​ a∈{0,1,2}m∑​ b∈{0,1}m∑​Retr(Ks,a,b​ρKs,a,b†​)2m3∣{j:bj​=true}∣−m​​.

Here Ks,a,b=Es(m−1)(Pa(m−1),b(m−1))⋯Es(0)(Pa(0),b(0))K_{s,a,b}=E_{s(m-1)}(P_{a(m-1),b(m-1)})\cdots E_{s(0)}(P_{a(0),b(0)})Ks,a,b​=Es(m−1)​(Pa(m−1),b(m−1)​)⋯Es(0)​(Pa(0),b(0)​), with empty product equal to the identity; Pk,c=12(I4+(−1)1{c=true}Ak⊗Ak)P_{k,c}=\tfrac12(I_4+(-1)^{\mathbf1_{\{c=\mathrm{true}\}}}A_k\otimes A_k)Pk,c​=21​(I4​+(−1)1{c=true}​Ak​⊗Ak​), where A0=(0110)A_0=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)A0​=(01​10​), A1=(0−ii0)A_1=\left(\begin{smallmatrix}0&-\mathrm i\\\mathrm i&0\end{smallmatrix}\right)A1​=(0i​−i0​), and A2=(100−1)A_2=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)A2​=(10​0−1​). The entry Ei(P)x,yE_i(P)_{x,y}Ei​(P)x,y​ is the corresponding entry of PPP on the iii-th pair of bits if both strings in xxx and yyy agree everywhere else, and is 000 otherwise. No density-matrix assumption is imposed on ρ\rhoρ. All divisions are total real divisions: the definition gives 000 when m=0m=0m=0, and also when m>Nm>Nm>N, in which case the sum over injections is empty and its cardinality is 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.measuredInfo

Let A,BA,BA,B be arbitrary finite types with decidable equality, X,YX,YX,Y arbitrary measurable spaces, and ρ\rhoρ any complex matrix indexed by A×BA\times BA×B. Let PPP and QQQ be assignments of matrices to all subsets of XXX and YYY, indexed by AAA and BBB, respectively, which send the empty set to zero and the whole space to the identity, are positive semidefinite on measurable sets, and are countably additive on pairwise disjoint measurable sets by convergence of the matrix series. For each pair of natural numbers n,mn,mn,m and measurable labeling functions f:X→{0,…,n−1}f:X\to\{0,\ldots,n-1\}f:X→{0,…,n−1}, g:Y→{0,…,m−1}g:Y\to\{0,\ldots,m-1\}g:Y→{0,…,m−1}, put

pab=Re⁡tr⁡[(P(f−1{a})⊗Q(g−1{b}))ρ].p_{ab}=\operatorname{Re}\operatorname{tr} \left[\left(P(f^{-1}\{a\})\otimes Q(g^{-1}\{b\})\right)\rho\right].pab​=Retr[(P(f−1{a})⊗Q(g−1{b}))ρ].

The declaration defines the extended nonnegative real number

measuredInfo⁡(ρ,P,Q)=sup⁡n,m,f,gmax⁡{0,  ∑a=0n−1∑b=0m−1pablog⁡2 ⁣(pab(∑b′pab′)(∑a′pa′b))}.\operatorname{measuredInfo}(\rho,P,Q) =\sup_{n,m,f,g} \max\left\{0,\; \sum_{a=0}^{n-1}\sum_{b=0}^{m-1} p_{ab}\log_2\!\left( \frac{p_{ab}} {\left(\sum_{b'}p_{ab'}\right)\left(\sum_{a'}p_{a'b}\right)} \right)\right\}.measuredInfo(ρ,P,Q)=n,m,f,gsup​max{0,a=0∑n−1​b=0∑m−1​pab​log2​((∑b′​pab′​)(∑a′​pa′b​)pab​​)}.

The supremum may be +∞+\infty+∞. No positivity or normalization of ρ\rhoρ is assumed. In this formula real division by zero is defined to be zero, and the total real logarithm satisfies log⁡20=0\log_2 0=0log2​0=0 and log⁡2r=log⁡∣r∣/log⁡2\log_2 r=\log|r|/\log 2log2​r=log∣r∣/log2 for r≠0r\ne0r=0. Empty cells are permitted; n=0n=0n=0 or m=0m=0m=0 contributes only when the corresponding outcome space admits a function into the empty label type.

QAlgorithms.Papers.Independent.Intakenext100.P87.pairAxisProjector

For every k∈{0,1,2}k\in\{0,1,2\}k∈{0,1,2} and Boolean value aaa, this defines the complex matrix on pairs of Boolean values

Pk,a=12(I4+σa Ak⊗Ak),σa={−1,a=true,1,a=false,P_{k,a}=\frac12\left(I_4+\sigma_a\,A_k\otimes A_k\right), \qquad \sigma_a= \begin{cases}-1,&a=\mathrm{true},\\1,&a=\mathrm{false},\end{cases}Pk,a​=21​(I4​+σa​Ak​⊗Ak​),σa​={−1,1,​a=true,a=false,​

where

A0=(0110),A1=(0−ii0),A2=(100−1),A_0=\begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad A_1=\begin{pmatrix}0&-\mathrm i\\ \mathrm i&0\end{pmatrix},\qquad A_2=\begin{pmatrix}1&0\\0&-1\end{pmatrix},A0​=(01​10​),A1​=(0i​−i0​),A2​=(10​0−1​),

with Boolean indices ordered as false and true, and ⊗\otimes⊗ denotes the Kronecker product.

QAlgorithms.Papers.Independent.Intakenext100.P87.pairAxisSampleLaw

For any natural numbers N,mN,mN,m, any complex matrix ρ\rhoρ indexed by ΩN={0,1}N×{0,1}N\Omega_N=\{0,1\}^N\times\{0,1\}^NΩN​={0,1}N×{0,1}N, any injection s:{0,…,m−1}↪{0,…,N−1}s:\{0,\ldots,m-1\}\hookrightarrow\{0,\ldots,N-1\}s:{0,…,m−1}↪{0,…,N−1}, any function a:{0,…,m−1}→{0,1,2}a:\{0,\ldots,m-1\}\to\{0,1,2\}a:{0,…,m−1}→{0,1,2}, and any Boolean string b∈{0,1}mb\in\{0,1\}^mb∈{0,1}m, this defines

pairAxisSampleLaw⁡(ρ,s,a,b)=Re⁡tr⁡(KρK†),K=Es(m−1)(Pa(m−1),b(m−1))⋯Es(0)(Pa(0),b(0)).\operatorname{pairAxisSampleLaw}(\rho,s,a,b) =\operatorname{Re}\operatorname{tr}(K\rho K^\dagger), \qquad K=E_{s(m-1)}(P_{a(m-1),b(m-1)})\cdots E_{s(0)}(P_{a(0),b(0)}).pairAxisSampleLaw(ρ,s,a,b)=Retr(KρK†),K=Es(m−1)​(Pa(m−1),b(m−1)​)⋯Es(0)​(Pa(0),b(0)​).

Here Pk,c=12(I4+(−1)1{c=true}Ak⊗Ak)P_{k,c}=\tfrac12(I_4+(-1)^{\mathbf1_{\{c=\mathrm{true}\}}}A_k\otimes A_k)Pk,c​=21​(I4​+(−1)1{c=true}​Ak​⊗Ak​), with A0=X=(0110)A_0=X=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)A0​=X=(01​10​), A1=Y=(0−ii0)A_1=Y=\left(\begin{smallmatrix}0&-\mathrm i\\\mathrm i&0\end{smallmatrix}\right)A1​=Y=(0i​−i0​), and A2=Z=(100−1)A_2=Z=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)A2​=Z=(10​0−1​); Ei(P)x,yE_i(P)_{x,y}Ei​(P)x,y​ equals P(xi(1),xi(2)),(yi(1),yi(2))P_{(x^{(1)}_i,x^{(2)}_i),(y^{(1)}_i,y^{(2)}_i)}P(xi(1)​,xi(2)​),(yi(1)​,yi(2)​)​ when xxx and yyy agree in both strings at every position other than iii, and equals 000 otherwise. The symbol †\dagger† denotes conjugate transpose. No positivity or normalization assumption is imposed on ρ\rhoρ. When m=0m=0m=0, KKK is the identity and the value is Re⁡tr⁡ρ\operatorname{Re}\operatorname{tr}\rhoRetrρ; when m>Nm>Nm>N, no injection sss exists.

QAlgorithms.Papers.Independent.Intakenext100.P87.partitionLaw

Let A,BA,BA,B be arbitrary finite types with decidable equality, let X,YX,YX,Y be arbitrary measurable spaces, and let ρ\rhoρ be any complex matrix indexed by A×BA\times BA×B. Let PPP and QQQ assign matrices indexed by AAA and BBB, respectively, to all subsets of XXX and YYY: each assignment sends the empty set to zero and the whole space to the identity, is positive semidefinite on measurable sets, and is countably additive on pairwise disjoint measurable sets, with additivity expressed by convergence of the matrix series. For natural numbers n,mn,mn,m, measurable functions f:X→{0,…,n−1}f:X\to\{0,\ldots,n-1\}f:X→{0,…,n−1} and g:Y→{0,…,m−1}g:Y\to\{0,\ldots,m-1\}g:Y→{0,…,m−1}, and a pair z=(a,b)z=(a,b)z=(a,b) of such labels, this defines

partitionLaw⁡(ρ,P,Q,f,g)(a,b)=Re⁡tr⁡[(P(f−1{a})⊗Q(g−1{b}))ρ].\operatorname{partitionLaw}(\rho,P,Q,f,g)(a,b) =\operatorname{Re}\operatorname{tr} \left[\left(P(f^{-1}\{a\})\otimes Q(g^{-1}\{b\})\right)\rho\right].partitionLaw(ρ,P,Q,f,g)(a,b)=Retr[(P(f−1{a})⊗Q(g−1{b}))ρ].

Here ⊗\otimes⊗ is the Kronecker product. No positivity or trace-one condition is imposed on ρ\rhoρ; unused labels give zero values. A supplied label pair requires n,m>0n,m>0n,m>0.

QAlgorithms.Papers.Independent.Intakenext100.P87.photonPulse

For every natural number nnn and Booleans b,cb,cb,c (the basis and bit), this defines a complex vector indexed by Boolean strings x:{0,…,n−1}→{false,true}x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}x:{0,…,n−1}→{false,true}, whose amplitude is

Ψn,b,c(x)=∏i=0n−1sb,c(xi),sb,c(u)={1,b=false, u=c,0,b=false, u≠c,−1/2,b=true, u=c=true,1/2,b=true, otherwise.\Psi_{n,b,c}(x)=\prod_{i=0}^{n-1}s_{b,c}(x_i), \qquad s_{b,c}(u)= \begin{cases} 1,&b=\mathrm{false},\ u=c,\\ 0,&b=\mathrm{false},\ u\ne c,\\ -1/\sqrt2,&b=\mathrm{true},\ u=c=\mathrm{true},\\ 1/\sqrt2,&b=\mathrm{true},\ \text{otherwise}. \end{cases}Ψn,b,c​(x)=i=0∏n−1​sb,c​(xi​),sb,c​(u)=⎩⎨⎧​1,0,−1/2​,1/2​,​b=false, u=c,b=false, u=c,b=true, u=c=true,b=true, otherwise.​

For n=0n=0n=0, there is one empty string, and its amplitude is the empty product 111.

QAlgorithms.Papers.Independent.Intakenext100.P87.pnsForwardRate

For arbitrary real-valued sequences p,d:N→Rp,d:\mathbb N\to\mathbb Rp,d:N→R, this defines

F(p,d)=∑n=0∞p(n+2)d(n+1).F(p,d)=\sum_{n=0}^{\infty}p(n+2)d(n+1).F(p,d)=n=0∑∞​p(n+2)d(n+1).

No positivity, boundedness, normalization, or summability assumptions are required by this definition; if the real series is not summable, the totalized sum is 000. Its first term is p(2)d(1)p(2)d(1)p(2)d(1), and it does not use p(0),p(1)p(0),p(1)p(0),p(1), or d(0)d(0)d(0).

QAlgorithms.Papers.Independent.Intakenext100.P87.pnsKeyLaw

For arbitrary real-valued sequences p,d:N→Rp,d:\mathbb N\to\mathbb Rp,d:N→R, a real number ttt, and Booleans b,c,u,vb,c,u,vb,c,u,v (basis, bit, Bob’s outcome, and Eve’s outcome), this defines

∑n=0∞t p(n+2)d(n+1)∣∑a∈{false,true}sb,u(a)‾sb,c(a)∣2∣∑a∈{false,true}sb,v(a)‾sb,c(a)∣2,\sum_{n=0}^{\infty}t\,p(n+2)d(n+1) \left|\sum_{a\in\{\mathrm{false},\mathrm{true}\}}\overline{s_{b,u}(a)}s_{b,c}(a)\right|^2 \left|\sum_{a\in\{\mathrm{false},\mathrm{true}\}}\overline{s_{b,v}(a)}s_{b,c}(a)\right|^2,n=0∑∞​tp(n+2)d(n+1)​a∈{false,true}∑​sb,u​(a)​sb,c​(a)​2​a∈{false,true}∑​sb,v​(a)​sb,c​(a)​2,

where sb,j(a)s_{b,j}(a)sb,j​(a) is 111 if b=falseb=\mathrm{false}b=false and a=ja=ja=j, 000 if b=falseb=\mathrm{false}b=false and a≠ja\ne ja=j, and, if b=trueb=\mathrm{true}b=true, is −1/2-1/\sqrt2−1/2​ when a=j=truea=j=\mathrm{true}a=j=true and 1/21/\sqrt21/2​ otherwise. No restrictions on these sequences or on ttt are imposed; if this real series is not summable, its totalized sum is 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.poissonMass

For every real number μ\muμ and natural number nnn, this defines

poissonMass⁡(μ,n)=e−μμnn!.\operatorname{poissonMass}(\mu,n)=e^{-\mu}\frac{\mu^n}{n!}.poissonMass(μ,n)=e−μn!μn​.

There is no restriction on the sign of μ\muμ. The case n=0n=0n=0 gives e−μe^{-\mu}e−μ, including when μ=0\mu=0μ=0, since the zeroth power is 111.

QAlgorithms.Papers.Independent.Intakenext100.P87.sequentialLaw

For any finite type III with decidable equality, any type OOO with decidable equality, any natural number ttt, any unitary complex matrix UUU indexed by III, any complex matrix ρ\rhoρ indexed by III, and functions fj:I→Of_j:I\to Ofj​:I→O and outcomes oj∈Oo_j\in Ooj​∈O for 0≤j<t0\le j<t0≤j<t, define

Pj=U diag⁡(1{fj(i)=oj})i∈I U†,K=Pt−1⋯P1P0.P_j=U\,\operatorname{diag}\bigl(\mathbf 1_{\{f_j(i)=o_j\}}\bigr)_{i\in I}\,U^\dagger, \qquad K=P_{t-1}\cdots P_1P_0.Pj​=Udiag(1{fj​(i)=oj​}​)i∈I​U†,K=Pt−1​⋯P1​P0​.

The declaration defines the real number

sequentialLaw⁡(U,ρ,f,o)=Re⁡tr⁡(KρK†).\operatorname{sequentialLaw}(U,\rho,f,o) =\operatorname{Re}\operatorname{tr}(K\rho K^\dagger).sequentialLaw(U,ρ,f,o)=Retr(KρK†).

No positivity or normalization of ρ\rhoρ, and no finiteness of OOO, is assumed. When t=0t=0t=0, the product is the identity and the value is Re⁡tr⁡ρ\operatorname{Re}\operatorname{tr}\rhoRetrρ; an empty III gives value zero.

QAlgorithms.Papers.Independent.Intakenext100.P87.singletEstimate

For every natural number mmm and every Boolean string b∈{0,1}mb\in\{0,1\}^mb∈{0,1}m, this defines

singletEstimate⁡(m,b)=3 ∣{j:0≤j<m, bj=true}∣−m2m,\operatorname{singletEstimate}(m,b) =\frac{3\,|\{j:0\leq j<m,\ b_j=\mathrm{true}\}|-m}{2m},singletEstimate(m,b)=2m3∣{j:0≤j<m, bj​=true}∣−m​,

where the arithmetic in the displayed fraction is real arithmetic, so the subtraction is not truncated. For m=0m=0m=0, the unique empty string gives 0/00/00/0, whose value in the total real division operation is 000.

QAlgorithms.Papers.Independent.Intakenext100.P87.singletKet

For every natural number NNN, this defines a complex vector indexed by pairs of NNN-bit strings, explicitly

sN=12N∑x∈{0,1}N(−1)∣x∣ ∣x,x‾⟩,s_N=\frac{1}{\sqrt{2^N}} \sum_{x\in\{0,1\}^{N}}(-1)^{|x|}\,|x,\overline{x}\rangle,sN​=2N​1​x∈{0,1}N∑​(−1)∣x∣∣x,x⟩,

where ∣x∣|x|∣x∣ is the number of true bits of xxx, x‾\overline{x}x is its bitwise complement, and ∣x,y⟩|x,y\rangle∣x,y⟩ is the coordinate vector equal to 111 at (x,y)(x,y)(x,y) and 000 elsewhere. Equivalently, the definition applies YYY to every qubit of the second register of 2−N/2∑x∣x,x⟩2^{-N/2}\sum_x|x,x\rangle2−N/2∑x​∣x,x⟩, and multiplies the resulting vector by (−i)N(-\mathrm i)^N(−i)N, with Y=(0−ii0)Y=\begin{pmatrix}0&-\mathrm i\\ \mathrm i&0\end{pmatrix}Y=(0i​−i0​). When N=0N=0N=0, the vector has its single coordinate equal to 111.

QAlgorithms.Papers.Independent.Intakenext100.P87.singletOverlap

For every natural number NNN and every complex matrix ρ\rhoρ indexed by pairs of NNN-bit strings, this defines

singletOverlap⁡(ρ)=Re⁡tr⁡(sNsN†ρ),sN=12N∑x∈{0,1}N(−1)∣x∣∣x,x‾⟩.\operatorname{singletOverlap}(\rho) =\operatorname{Re}\operatorname{tr}(s_Ns_N^\dagger\rho), \qquad s_N=\frac{1}{\sqrt{2^N}}\sum_{x\in\{0,1\}^{N}} (-1)^{|x|}|x,\overline{x}\rangle.singletOverlap(ρ)=Retr(sN​sN†​ρ),sN​=2N​1​x∈{0,1}N∑​(−1)∣x∣∣x,x⟩.

Here ∣x∣|x|∣x∣ counts the true bits, x‾\overline{x}x is the bitwise complement, and ∣x,y⟩|x,y\rangle∣x,y⟩ is the coordinate basis vector at the pair (x,y)(x,y)(x,y). No positivity or normalization of ρ\rhoρ is required. When N=0N=0N=0, this is the real part of the single entry of ρ\rhoρ.

QAlgorithms.Papers.Independent.Intakenext100.P87.sourceBellPaulis

For every natural number NNN and every pair w=(u,v)w=(u,v)w=(u,v) of Boolean strings of length NNN, this defines a length-NNN string of Pauli labels by assigning, at each position iii,

(ui,vi)=(0,0)↦I,(0,1)↦X,(1,0)↦Z,(1,1)↦Y,(u_i,v_i)=(0,0)\mapsto I,\qquad (0,1)\mapsto X,\qquad (1,0)\mapsto Z,\qquad (1,1)\mapsto Y,(ui​,vi​)=(0,0)↦I,(0,1)↦X,(1,0)↦Z,(1,1)↦Y,

where 000 means false and 111 means true. The result is a function from {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1} to the four Pauli labels. For N=0N=0N=0, it is the unique empty label string.

QAlgorithms.Papers.Independent.Intakenext100.P87.spectralContribution

For any finite type III, any real-valued function p:I→Rp:I\to\mathbb Rp:I→R, and any finite subset S⊆IS\subseteq IS⊆I, this defines

spectralContribution⁡(p,S)=∑i∈S−p(i)log⁡2p(i).\operatorname{spectralContribution}(p,S) =\sum_{i\in S}-p(i)\log_2 p(i).spectralContribution(p,S)=i∈S∑​−p(i)log2​p(i).

There is no assumption that ppp is nonnegative or sums to 111. The real logarithm is total: log⁡20=0\log_2 0=0log2​0=0, and for negative arguments it uses the logarithm of the absolute value. In particular, a zero-valued summand contributes 000, and the sum is 000 when SSS is empty.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me