Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Rate-distance tradeoff and resource costs for all-optical quantum repeaters

Definition
QAlgorithms_Papers_Independent_Intakenext100_P89

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

prove2quantum

The objects the formalized statements of Rate-distance tradeoff and resource costs for all-optical quantum repeaters (arXiv:1603.01353) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Devices: Source p.5: admissible device parameters; zero delay and zero chip attenuation are allowed.
  • etaSD: Source p.5: source--detector product.
  • etaGHZ: Source p.5: conditional single-photon survival after GHZ heralding.
  • chipSurvival: Source p.5: survival through one chip feedforward step.
  • fiberSurvival: Source p.5: survival through the final fiber feedforward step.
  • ghzSuccess: Source p.7: one six-source GHZ factory heralds with this probability.
  • copiesWeight: Independent copies of an explicitly specified finite experiment.
  • heraldLaw: Push a finite experiment to a Boolean herald.
  • anyLaw: Select a successful copy from independent parallel attempts.
  • allLaw: Require success of every independent copy.
  • andLaw: Two independent subexperiments both have to succeed.
  • successes: The number of successes in a vector of Bernoulli outcomes.
  • countLaw: Independent-trial count law, summed over the actual bit outcomes.
  • balancedSize: Source p.7: equal-size successful fusion consumes exactly two photons.
  • leafSourceCount: Source p.7: six sources per GHZ attempt, two nB-fold daughter stacks per fusion level.
  • NaiveSources: Source p.7: simultaneous source labels including nmeas top-level copies.
  • naiveFusionSuccess: Source p.7: conditional success Q_l of unboosted fusion at level l.
  • naiveClusterLaw: Source pp.7--8: actual recursive cluster-herald experiment. Each andLaw occurrence uses independent daughter copies and an independent physical fusion trial.
  • finalMeasurementSuccess: Source p.7: survival of all 4m X measurements and the single Y measurement.
  • naiveFinalLaw: Source pp.7--8: final cluster selected from nmeas complete independent attempts.
  • boostedFactor: Source p.8: ancillary-source/detector polynomial in boosted Bell success.
  • bankFusionSuccess: Source p.8: boosted fusion of the surviving inputs before level l.
  • TreeBits: Source p.11: survival flags for each child and its b1 grandchildren in a depth-two tree.
  • treeWeight: Independent physical losses on the photons used by a logical measurement.
  • treeXEvent: Indirect root-Z/logical-X: some child and all its grandchildren survive.
  • treeZEvent: Logical Z: each child survives or can be recovered from a surviving leaf.
  • depthTwoLogicalXSuccess: Source p.11: depth-two logical-X success probability from the physical loss experiment. This scalar is distinct from the frozen QAlgorithms.logicalX stabilizer operator.
  • logicalZ: Depth-two logical-Z probability, computed from the physical loss experiment.
  • travelingFactor: Source pp.10--11: C, traveling-photon survival before the half-link.
  • stationaryFactor: Source pp.10--11: B, stationary survival before the complete herald round trip.
  • travelingSurvival: Source p.10: survival of an outer photon to its detector or Bell measurement.
  • stationarySurvival: Source p.10: retained photon survival including the round-trip herald delay.
  • linkBellSuccess: Source p.11, Eq.(7): boosted Bell-trial probability on a half-link pair.
  • PauliBasis: Appendix A p.15: the three Pauli measurement bases.
  • basisObservable: The frozen Pauli matrices, with false labelling the positive eigenvalue.
  • pauliProjector: Appendix A p.15: spectral projector onto the outcome r (eigenvalue (-1)^r).
  • conditionalZ: Conditional Z gate determined by a previous measurement outcome.
  • zOutcomeFlip: Fig.8(a),(b): X/Y outcome flips; a Z measurement is unaffected.
  • hadamardBasis: Fig.8(c): basis after moving a measurement across a Hadamard.
  • hadamardOutcomeFlip: Fig.8(c): H Y H = -Y, so the Y result is flipped.
  • effectDiscard: Subnormalized residual operator after consuming the measured register. For an effect E, this equals tracing that register after its measurement branch. Its trace is branch probability; it retains the correlations with an arbitrary unmeasured reference register.
  • unitaryBranch: Apply a unitary on the surviving register to a subnormalized branch.
  • latePauliBranch: Fig.8(a),(b), left: MA on a; its outcome feeds conditional Z on b; Pauli outcome r on b feeds the later unitary U on the surviving register. Both a and b are consumed.
  • earlyPauliBranch: Fig.8(a),(b), right: measure b before MA; remove conditional Z, relabel its outcome and update the downstream control of U. The stored early outcome is t.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P54
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56

/-!
Statements from Pant--Krovi--Englund--Guha, arXiv:1603.01353v4.
The local classical experiments implement the source's loss-only model. They exclude
multiphoton emission, dark counts, mode mismatch and depolarization. They do not define an
operational secret-key capacity. Device lengths and times use consistent units.
-/

namespace QAlgorithms.Papers.Independent.Intakenext100.P89

open scoped BigOperators ComplexConjugate

-- Accepted probability primitives: symbol true is success; choose n x is zero for x > n.
open QAlgorithms.Papers.Independent.Information100.P54 (binomialMass)
open QAlgorithms.Papers.Independent.Information100.P56 (bernoulli)

noncomputable section

/-- Source p.5: admissible device parameters; zero delay and zero chip attenuation are allowed. -/
structure Devices where
  etaS : ℝ
  etaD : ℝ
  etaC : ℝ
  alpha : ℝ
  beta : ℝ
  tauS : ℝ
  tauF : ℝ
  cChip : ℝ
  cFiber : ℝ
  etaS_pos : 0 < etaS
  etaS_le : etaS ≤ 1
  etaD_pos : 0 < etaD
  etaD_le : etaD ≤ 1
  etaC_pos : 0 < etaC
  etaC_le : etaC ≤ 1
  alpha_pos : 0 < alpha
  beta_nonneg : 0 ≤ beta
  tauS_nonneg : 0 ≤ tauS
  tauF_nonneg : 0 ≤ tauF
  cChip_pos : 0 < cChip
  cFiber_pos : 0 < cFiber

/-- Source p.5: source--detector product. -/
def etaSD (d : Devices) : ℝ := d.etaS * d.etaD

/-- Source p.5: conditional single-photon survival after GHZ heralding. -/
def etaGHZ (d : Devices) : ℝ := etaSD d / (2 - etaSD d)

/-- Source p.5: survival through one chip feedforward step. -/
def chipSurvival (d : Devices) : ℝ := Real.exp (-d.beta * d.tauS * d.cChip)

/-- Source p.5: survival through the final fiber feedforward step. -/
def fiberSurvival (d : Devices) : ℝ := Real.exp (-d.alpha * d.tauF * d.cFiber)

/-- Source p.7: one six-source GHZ factory heralds with this probability. -/
def ghzSuccess (d : Devices) : ℝ := (etaSD d * (2 - etaSD d)) ^ 3 / 32

/-- Independent copies of an explicitly specified finite experiment. -/
def copiesWeight {A : Type*} (w : A → ℝ) (n : ℕ) : (Fin n → A) → ℝ :=
  fun x => ∏ i, w (x i)

/-- Push a finite experiment to a Boolean herald. -/
def heraldLaw {A : Type*} [Fintype A] (w : A → ℝ) (E : A → Prop) : Bool → ℝ := by
  classical
  exact fun b => ∑ a, if (E a ↔ b = true) then w a else 0

/-- Select a successful copy from independent parallel attempts. -/
def anyLaw (n : ℕ) (w : Bool → ℝ) : Bool → ℝ :=
  heraldLaw (copiesWeight w n) (fun x => ∃ i, x i = true)

/-- Require success of every independent copy. -/
def allLaw (n : ℕ) (w : Bool → ℝ) : Bool → ℝ :=
  heraldLaw (copiesWeight w n) (fun x => ∀ i, x i = true)

/-- Two independent subexperiments both have to succeed. -/
def andLaw (w v : Bool → ℝ) : Bool → ℝ :=
  heraldLaw (fun x : Bool × Bool => w x.1 * v x.2)
    (fun x => x.1 = true ∧ x.2 = true)

/-- The number of successes in a vector of Bernoulli outcomes. -/
def successes {n : ℕ} (x : Fin n → Bool) : ℕ := ∑ i, if x i then 1 else 0

/-- Independent-trial count law, summed over the actual bit outcomes. -/
def countLaw (n : ℕ) (p : ℝ) (x : ℕ) : ℝ :=
  ∑ z, if successes z = x then copiesWeight (bernoulli p) n z else 0

example (d : Devices) (h : etaSD d = 1) : ghzSuccess d = (1 : ℝ) / 32 := by
  norm_num [ghzSuccess, h]

example (p : ℝ) : bernoulli p true = p := rfl

example (p : ℝ) : binomialMass 0 p 1 = 0 := by simp [binomialMass]

/-- Source p.7: equal-size successful fusion consumes exactly two photons. -/
def balancedSize : ℕ → ℕ
  | 0 => 3
  | k + 1 => 2 * balancedSize k - 2

/-- Source p.7: six sources per GHZ attempt, two nB-fold daughter stacks per fusion level. -/
def leafSourceCount (nGHZ nB : ℕ) : ℕ → ℕ
  | 0 => 6 * nGHZ
  | k + 1 => (2 * nB) * leafSourceCount nGHZ nB k

/-- Source p.7: simultaneous source labels including nmeas top-level copies. -/
abbrev NaiveSources (k nGHZ nB nMeas : ℕ) :=
  Fin nMeas × Fin (leafSourceCount nGHZ nB k)

example : balancedSize 0 = 3 := rfl

example (g b : ℕ) : leafSourceCount g b 0 = 6 * g := rfl

/-- Source p.7: conditional success Q_l of unboosted fusion at level l. -/
def naiveFusionSuccess (d : Devices) (l : ℕ) : ℝ :=
  (etaGHZ d * chipSurvival d ^ l) ^ 2 / 2

/-- Source pp.7--8: actual recursive cluster-herald experiment. Each andLaw occurrence uses
independent daughter copies and an independent physical fusion trial. -/
def naiveClusterLaw (d : Devices) (nGHZ nB : ℕ) : ℕ → Bool → ℝ
  | 0 => anyLaw nGHZ (bernoulli (ghzSuccess d))
  | l + 1 => anyLaw nB
      (andLaw (andLaw (naiveClusterLaw d nGHZ nB l) (naiveClusterLaw d nGHZ nB l))
        (bernoulli (naiveFusionSuccess d (l + 1))))

/-- Source p.7: survival of all 4m X measurements and the single Y measurement. -/
def finalMeasurementSuccess (d : Devices) (k m : ℕ) : ℝ :=
  (etaGHZ d * chipSurvival d ^ (k + 1)) ^ (4 * m + 1)

/-- Source pp.7--8: final cluster selected from nmeas complete independent attempts. -/
def naiveFinalLaw (d : Devices) (k m nGHZ nB nMeas : ℕ) : Bool → ℝ :=
  anyLaw nMeas (andLaw (naiveClusterLaw d nGHZ nB k)
    (bernoulli (finalMeasurementSuccess d k m)))

example (d : Devices) (g b : ℕ) :
    naiveClusterLaw d g b 0 = anyLaw g (bernoulli (ghzSuccess d)) := rfl

/-- Source p.8: ancillary-source/detector polynomial in boosted Bell success. -/
def boostedFactor (d : Devices) : ℝ := (etaSD d) ^ 2 / 2 + (etaSD d) ^ 4 / 4

example (d : Devices) (h : etaSD d = 1) : boostedFactor d = (3 : ℝ) / 4 := by
  norm_num [boostedFactor, h]

/-- Source p.8: boosted fusion of the surviving inputs before level l. -/
def bankFusionSuccess (d : Devices) (l : ℕ) : ℝ :=
  (etaGHZ d * chipSurvival d ^ (l + 1)) ^ 2 * boostedFactor d

/-- Source p.11: survival flags for each child and its b1 grandchildren in a depth-two tree. -/
abbrev TreeBits (b0 b1 : ℕ) := Fin b0 → Fin (b1 + 1) → Bool

/-- Independent physical losses on the photons used by a logical measurement. -/
def treeWeight (b0 b1 : ℕ) (p : ℝ) : TreeBits b0 b1 → ℝ :=
  fun z => ∏ i, ∏ j, bernoulli p (z i j)

/-- Indirect root-Z/logical-X: some child and all its grandchildren survive. -/
def treeXEvent {b0 b1 : ℕ} (z : TreeBits b0 b1) : Prop :=
  ∃ i, ∀ j, z i j = true

/-- Logical Z: each child survives or can be recovered from a surviving leaf. -/
def treeZEvent {b0 b1 : ℕ} (z : TreeBits b0 b1) : Prop :=
  ∀ i, ∃ j, z i j = true

/-- Source p.11: depth-two logical-X success probability from the physical loss experiment.
This scalar is distinct from the frozen QAlgorithms.logicalX stabilizer operator. -/
def depthTwoLogicalXSuccess (b0 b1 : ℕ) (p : ℝ) : ℝ := by
  classical
  exact ∑ z, if treeXEvent z then treeWeight b0 b1 p z else 0

/-- Depth-two logical-Z probability, computed from the physical loss experiment. -/
def logicalZ (b0 b1 : ℕ) (p : ℝ) : ℝ := by
  classical
  exact ∑ z, if treeZEvent z then treeWeight b0 b1 p z else 0

example : treeXEvent (fun (_ : Fin 1) (_ : Fin 1) => true) := by
  exact ⟨0, fun _ => rfl⟩

/-- Source pp.10--11: C, traveling-photon survival before the half-link. -/
def travelingFactor (d : Devices) (k : ℕ) : ℝ :=
  chipSurvival d ^ (k + 2) * etaGHZ d * d.etaC

/-- Source pp.10--11: B, stationary survival before the complete herald round trip. -/
def stationaryFactor (d : Devices) (k : ℕ) : ℝ :=
  travelingFactor d k * fiberSurvival d

/-- Source p.10: survival of an outer photon to its detector or Bell measurement. -/
def travelingSurvival (d : Devices) (k n : ℕ) (L : ℝ) : ℝ :=
  Real.exp (-d.alpha * L / (2 * (n : ℝ))) * travelingFactor d k

/-- Source p.10: retained photon survival including the round-trip herald delay. -/
def stationarySurvival (d : Devices) (k n : ℕ) (L : ℝ) : ℝ :=
  Real.exp (-d.alpha * L / (n : ℝ)) * stationaryFactor d k

/-- Source p.11, Eq.(7): boosted Bell-trial probability on a half-link pair. -/
def linkBellSuccess (d : Devices) (k n : ℕ) (L : ℝ) : ℝ :=
  travelingSurvival d k n L ^ 2 * boostedFactor d

/-- Appendix A p.15: the three Pauli measurement bases. -/
inductive PauliBasis where
  | X
  | Y
  | Z
  deriving DecidableEq

/-- The frozen Pauli matrices, with false labelling the positive eigenvalue. -/
def basisObservable : PauliBasis → Matrix Bool Bool ℂ
  | .X => QAlgorithms.pauliX
  | .Y => QAlgorithms.pauliY
  | .Z => QAlgorithms.pauliZ

/-- Appendix A p.15: spectral projector onto the outcome r (eigenvalue (-1)^r). -/
def pauliProjector (a : PauliBasis) (r : Bool) : Matrix Bool Bool ℂ :=
  (2⁻¹ : ℂ) • (1 + if r then -basisObservable a else basisObservable a)

/-- Conditional Z gate determined by a previous measurement outcome. -/
def conditionalZ (i : Bool) : Matrix Bool Bool ℂ :=
  if i then QAlgorithms.pauliZ else 1

/-- Fig.8(a),(b): X/Y outcome flips; a Z measurement is unaffected. -/
def zOutcomeFlip (a : PauliBasis) (i : Bool) : Bool :=
  match a with
  | .X => i
  | .Y => i
  | .Z => false

/-- Fig.8(c): basis after moving a measurement across a Hadamard. -/
def hadamardBasis : PauliBasis → PauliBasis
  | .X => .Z
  | .Y => .Y
  | .Z => .X

/-- Fig.8(c): H Y H = -Y, so the Y result is flipped. -/
def hadamardOutcomeFlip : PauliBasis → Bool
  | .X => false
  | .Y => true
  | .Z => false

/-- Subnormalized residual operator after consuming the measured register. For an effect E,
this equals tracing that register after its measurement branch. Its trace is branch probability;
it retains the correlations with an arbitrary unmeasured reference register. -/
def effectDiscard {A R : Type*} [Fintype A]
    (E : Matrix A A ℂ) (rho : Matrix (A × R) (A × R) ℂ) : Matrix R R ℂ :=
  fun r s => ∑ a, ∑ b, E b a * rho (a, r) (b, s)

example {R : Type*} (rho : Matrix (Unit × R) (Unit × R) ℂ) :
    effectDiscard (1 : Matrix Unit Unit ℂ) rho =
      (fun r s => rho ((), r) ((), s)) := by
  ext r s
  simp [effectDiscard]

/-- Apply a unitary on the surviving register to a subnormalized branch. -/
def unitaryBranch {R : Type*} [Fintype R] [DecidableEq R]
    (U : Matrix.unitaryGroup R ℂ) (rho : Matrix R R ℂ) : Matrix R R ℂ :=
  (U : Matrix R R ℂ) * rho * (U : Matrix R R ℂ).conjTranspose

/-- Fig.8(a),(b), left: MA on a; its outcome feeds conditional Z on b; Pauli outcome r
on b feeds the later unitary U on the surviving register. Both a and b are consumed. -/
def latePauliBranch {O R : Type*} [Fintype R] [DecidableEq R]
    (MA : O → Matrix Bool Bool ℂ) (feed : O → Bool)
    (U : O → Bool → Matrix.unitaryGroup R ℂ) (a : PauliBasis) (o : O) (r : Bool)
    (rho : Matrix ((Bool × Bool) × R) ((Bool × Bool) × R) ℂ) : Matrix R R ℂ :=
  unitaryBranch (U o r) (effectDiscard
    (Matrix.kronecker ((MA o).conjTranspose * MA o)
      ((conditionalZ (feed o)).conjTranspose * pauliProjector a r * conditionalZ (feed o))) rho)

/-- Fig.8(a),(b), right: measure b before MA; remove conditional Z, relabel its outcome
and update the downstream control of U. The stored early outcome is t. -/
def earlyPauliBranch {O R : Type*} [Fintype R] [DecidableEq R]
    (MA : O → Matrix Bool Bool ℂ) (feed : O → Bool)
    (U : O → Bool → Matrix.unitaryGroup R ℂ) (a : PauliBasis) (o : O) (t : Bool)
    (rho : Matrix ((Bool × Bool) × R) ((Bool × Bool) × R) ℂ) : Matrix R R ℂ :=
  unitaryBranch (U o (xor t (zOutcomeFlip a (feed o))))
    (effectDiscard (Matrix.kronecker ((MA o).conjTranspose * MA o) (pauliProjector a t)) rho)

example : hadamardBasis .X = .Z := rfl

example : hadamardOutcomeFlip .Y = true := rfl

example (i : Bool) : zOutcomeFlip .Z i = false := rfl

end

end QAlgorithms.Papers.Independent.Intakenext100.P89
Source
Rate-distance tradeoff and resource costs for all-optical quantum repeaters, arXiv:1603.01353v4, https://arxiv.org/abs/1603.01353v4
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P89.Devices

A device record consists of nine real numbers ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​, together with the conditions 0<ηS≤10<\eta_S\le10<ηS​≤1, 0<ηD≤10<\eta_D\le10<ηD​≤1, 0<ηC≤10<\eta_C\le10<ηC​≤1, α>0\alpha>0α>0, β≥0\beta\ge0β≥0, τS≥0\tau_S\ge0τS​≥0, τF≥0\tau_F\ge0τF​≥0, cChip>0c_{\mathrm{Chip}}>0cChip​>0, and cFiber>0c_{\mathrm{Fiber}}>0cFiber​>0. In particular, β,τS,τF\beta,\tau_S,\tau_Fβ,τS​,τF​ are allowed to be zero.

QAlgorithms.Papers.Independent.Intakenext100.P89.NaiveSources

For arbitrary natural numbers k,nGHZ,nB,nMeask,n_{\mathrm{GHZ}},n_B,n_{\mathrm{Meas}}k,nGHZ​,nB​,nMeas​, this denotes the finite set of ordered pairs

{0,…,nMeas−1}×{0,…,L(k)−1},\{0,\ldots,n_{\mathrm{Meas}}-1\}\times\{0,\ldots,L(k)-1\},{0,…,nMeas​−1}×{0,…,L(k)−1},

where L(0)=6nGHZL(0)=6n_{\mathrm{GHZ}}L(0)=6nGHZ​ and L(j+1)=(2nB)L(j)L(j+1)=(2n_B)L(j)L(j+1)=(2nB​)L(j). Either coordinate set is empty when its size is zero, making the product empty. In particular, nB=0n_B=0nB​=0 makes the second coordinate set empty for k>0k>0k>0, but does not affect its size at k=0k=0k=0.

QAlgorithms.Papers.Independent.Intakenext100.P89.PauliBasis

This defines a type with exactly three distinct elements, named XXX, YYY, and ZZZ, equipped with decidable equality.

QAlgorithms.Papers.Independent.Intakenext100.P89.TreeBits

For natural numbers b0,b1b_0,b_1b0​,b1​, this abbreviates the set of Boolean arrays z=(zij)z=(z_{ij})z=(zij​) with 0≤i<b00\le i<b_00≤i<b0​ and 0≤j<b1+10\le j<b_1+10≤j<b1​+1. Thus there are b0b_0b0​ rows and b1+1b_1+1b1​+1 columns. The case b0=0b_0=0b0​=0 has exactly one empty array, while b1=0b_1=0b1​=0 gives one column.

QAlgorithms.Papers.Independent.Intakenext100.P89.allLaw

For any natural number nnn and any function w:{false,true}→Rw:\{\mathrm{false},\mathrm{true}\}\to\mathbb Rw:{false,true}→R, define a Boolean-valued weight function by

allLaw⁡(n,w)(true)=∑x∈{false,true}n∀i, xi=true∏i=0n−1w(xi),allLaw⁡(n,w)(false)=∑x∈{false,true}n∃i, xi=false∏i=0n−1w(xi).\operatorname{allLaw}(n,w)(\mathrm{true}) =\sum_{\substack{x\in\{\mathrm{false},\mathrm{true}\}^n\\\forall i,\ x_i=\mathrm{true}}} \prod_{i=0}^{n-1}w(x_i), \qquad \operatorname{allLaw}(n,w)(\mathrm{false}) =\sum_{\substack{x\in\{\mathrm{false},\mathrm{true}\}^n\\\exists i,\ x_i=\mathrm{false}}} \prod_{i=0}^{n-1}w(x_i).allLaw(n,w)(true)=x∈{false,true}n∀i, xi​=true​∑​i=0∏n−1​w(xi​),allLaw(n,w)(false)=x∈{false,true}n∃i, xi​=false​∑​i=0∏n−1​w(xi​).

No nonnegativity or normalization is required of www. When n=0n=0n=0, the universal condition holds vacuously, so these values are respectively 111 and 000.

QAlgorithms.Papers.Independent.Intakenext100.P89.andLaw

For any two functions w,v:{false,true}→Rw,v:\{\mathrm{false},\mathrm{true}\}\to\mathbb Rw,v:{false,true}→R, define a Boolean-valued weight function by summing the pair weight w(a)v(b)w(a)v(b)w(a)v(b) according to whether both aaa and bbb are true; explicitly,

andLaw⁡(w,v)(true)=w(true)v(true),andLaw⁡(w,v)(false)=w(false)v(false)+w(false)v(true)+w(true)v(false).\begin{aligned} \operatorname{andLaw}(w,v)(\mathrm{true}) &=w(\mathrm{true})v(\mathrm{true}),\\ \operatorname{andLaw}(w,v)(\mathrm{false}) &=w(\mathrm{false})v(\mathrm{false}) +w(\mathrm{false})v(\mathrm{true}) +w(\mathrm{true})v(\mathrm{false}). \end{aligned}andLaw(w,v)(true)andLaw(w,v)(false)​=w(true)v(true),=w(false)v(false)+w(false)v(true)+w(true)v(false).​

Neither function is required to be nonnegative or normalized.

QAlgorithms.Papers.Independent.Intakenext100.P89.anyLaw

For any natural number nnn and any function w:{false,true}→Rw:\{\mathrm{false},\mathrm{true}\}\to\mathbb Rw:{false,true}→R, define a Boolean-valued weight function by

anyLaw⁡(n,w)(true)=∑x∈{false,true}n∃i, xi=true∏i=0n−1w(xi),anyLaw⁡(n,w)(false)=∑x∈{false,true}n∀i, xi=false∏i=0n−1w(xi).\operatorname{anyLaw}(n,w)(\mathrm{true}) =\sum_{\substack{x\in\{\mathrm{false},\mathrm{true}\}^n\\\exists i,\ x_i=\mathrm{true}}} \prod_{i=0}^{n-1}w(x_i), \qquad \operatorname{anyLaw}(n,w)(\mathrm{false}) =\sum_{\substack{x\in\{\mathrm{false},\mathrm{true}\}^n\\\forall i,\ x_i=\mathrm{false}}} \prod_{i=0}^{n-1}w(x_i).anyLaw(n,w)(true)=x∈{false,true}n∃i, xi​=true​∑​i=0∏n−1​w(xi​),anyLaw(n,w)(false)=x∈{false,true}n∀i, xi​=false​∑​i=0∏n−1​w(xi​).

No nonnegativity or normalization is required of www. When n=0n=0n=0, these values are respectively 000 and 111.

QAlgorithms.Papers.Independent.Intakenext100.P89.balancedSize

This defines a function B:N→NB:\mathbb N\to\mathbb NB:N→N recursively by B(0)=3B(0)=3B(0)=3 and

B(k+1)=2B(k)−2(k∈N).B(k+1)=2B(k)-2 \qquad(k\in\mathbb N).B(k+1)=2B(k)−2(k∈N).

The subtraction is natural-number subtraction, which returns zero if the subtrahend exceeds the minuend.

QAlgorithms.Papers.Independent.Intakenext100.P89.bankFusionSuccess

For device parameters ddd consisting of real numbers ηS,ηD,ηC∈(0,1]\eta_S,\eta_D,\eta_C\in(0,1]ηS​,ηD​,ηC​∈(0,1], α,cchip,cfiber>0\alpha,c_{\mathrm{chip}},c_{\mathrm{fiber}}>0α,cchip​,cfiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and every natural number lll, this defines the real number

(ηSηD2−ηSηD(e−βτScchip)l+1)2((ηSηD)22+(ηSηD)44).\left(\frac{\eta_S\eta_D}{2-\eta_S\eta_D} \left(e^{-\beta\tau_Sc_{\mathrm{chip}}}\right)^{l+1}\right)^2 \left(\frac{(\eta_S\eta_D)^2}{2}+\frac{(\eta_S\eta_D)^4}{4}\right).(2−ηS​ηD​ηS​ηD​​(e−βτS​cchip​)l+1)2(2(ηS​ηD​)2​+4(ηS​ηD​)4​).

The definition includes l=0l=0l=0.

QAlgorithms.Papers.Independent.Intakenext100.P89.basisObservable

For each label aaa in the three-element type {X,Y,Z}\{X,Y,Z\}{X,Y,Z}, this defines a complex matrix whose rows and columns are indexed by Boolean values. In the order false,true\mathrm{false},\mathrm{true}false,true, its values are

BX=(0110),BY=(0−ii0),BZ=(100−1),B_X=\begin{pmatrix}0&1\\1&0\end{pmatrix}, \qquad B_Y=\begin{pmatrix}0&-\mathrm{i}\\ \mathrm{i}&0\end{pmatrix}, \qquad B_Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},BX​=(01​10​),BY​=(0i​−i0​),BZ​=(10​0−1​),

where i2=−1\mathrm{i}^2=-1i2=−1.

QAlgorithms.Papers.Independent.Intakenext100.P89.boostedFactor

For a device record ddd with real fields ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0, this defines

boostedFactor⁡(d)=(ηSηD)22+(ηSηD)44.\operatorname{boostedFactor}(d) =\frac{(\eta_S\eta_D)^2}{2} +\frac{(\eta_S\eta_D)^4}{4}.boostedFactor(d)=2(ηS​ηD​)2​+4(ηS​ηD​)4​.

QAlgorithms.Papers.Independent.Intakenext100.P89.chipSurvival

For any device record ddd consisting of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α,cChip,cFiber>0\alpha,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0α,cChip​,cFiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, define chipSurvival⁡(d)=exp⁡(−βτScChip)\operatorname{chipSurvival}(d)=\exp(-\beta\tau_Sc_{\mathrm{Chip}})chipSurvival(d)=exp(−βτS​cChip​). This value is 111 when β=0\beta=0β=0 or τS=0\tau_S=0τS​=0.

QAlgorithms.Papers.Independent.Intakenext100.P89.conditionalZ

For every Boolean iii, this defines a complex matrix indexed by Boolean rows and columns: it is the identity matrix when i=falsei=\mathrm{false}i=false, and it is diag⁡(1,−1)\operatorname{diag}(1,-1)diag(1,−1) when i=truei=\mathrm{true}i=true, with coordinates ordered as false,true\mathrm{false},\mathrm{true}false,true.

QAlgorithms.Papers.Independent.Intakenext100.P89.copiesWeight

For any type AAA, any function w:A→Rw:A\to\mathbb Rw:A→R, and any natural number nnn, define the weight of an indexed tuple x:{0,…,n−1}→Ax:\{0,\ldots,n-1\}\to Ax:{0,…,n−1}→A by

copiesWeight⁡(w,n)(x)=∏i=0n−1w(xi).\operatorname{copiesWeight}(w,n)(x)=\prod_{i=0}^{n-1}w(x_i).copiesWeight(w,n)(x)=i=0∏n−1​w(xi​).

No finiteness assumption on AAA, nonnegativity assumption on www, or normalization assumption is imposed. For n=0n=0n=0, the unique empty tuple has weight 111; if AAA is empty and n>0n>0n>0, there are no such tuples.

QAlgorithms.Papers.Independent.Intakenext100.P89.countLaw

For natural numbers n,xn,xn,x and any real number ppp, this defines

countLaw⁡(n,p,x)=∑z∈{false,true}n∣{i:zi=true}∣=x∏i=0n−1{p,zi=true,1−p,zi=false.\operatorname{countLaw}(n,p,x) =\sum_{\substack{z\in\{\mathrm{false},\mathrm{true}\}^{n}\\ |\{i:z_i=\mathrm{true}\}|=x}} \prod_{i=0}^{n-1} \begin{cases} p,&z_i=\mathrm{true},\\ 1-p,&z_i=\mathrm{false}. \end{cases}countLaw(n,p,x)=z∈{false,true}n∣{i:zi​=true}∣=x​∑​i=0∏n−1​{p,1−p,​zi​=true,zi​=false.​

There is no assumption that p∈[0,1]p\in[0,1]p∈[0,1]. If x>nx>nx>n, the sum is empty and equals zero. For n=0n=0n=0, there is one empty assignment, whose product is 111, so the value is 111 when x=0x=0x=0 and 000 otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P89.depthTwoLogicalXSuccess

For natural numbers b0,b1b_0,b_1b0​,b1​ and any real number ppp, this defines the sum, over all Boolean arrays zzz with b0b_0b0​ rows and b1+1b_1+1b1​+1 columns that have at least one entirely true row, of their weights:

∑z:{0,…,b0−1}×{0,…,b1}→{false,true}∃i∀j, zij=true∏i=0b0−1∏j=0b1{p,zij=true,1−p,zij=false.\sum_{\substack{z:\{0,\ldots,b_0-1\}\times\{0,\ldots,b_1\} \to\{\mathrm{false},\mathrm{true}\}\\ \exists i\;\forall j,\ z_{ij}=\mathrm{true}}} \prod_{i=0}^{b_0-1}\prod_{j=0}^{b_1} \begin{cases}p,&z_{ij}=\mathrm{true},\\1-p,&z_{ij}=\mathrm{false}.\end{cases}z:{0,…,b0​−1}×{0,…,b1​}→{false,true}∃i∀j, zij​=true​∑​i=0∏b0​−1​j=0∏b1​​{p,1−p,​zij​=true,zij​=false.​

There is no restriction on ppp. For b0=0b_0=0b0​=0 the sum is 000; b1=0b_1=0b1​=0 is permitted and gives one column.

QAlgorithms.Papers.Independent.Intakenext100.P89.earlyPauliBranch

Let OOO be any type and RRR a finite type with decidable equality, possibly empty. Let MoM_oMo​ be an arbitrary complex 2×22\times22×2 matrix for every o∈Oo\in Oo∈O, let f:O→{false,true}f:O\to\{\mathrm{false},\mathrm{true}\}f:O→{false,true}, and let Uo,bU_{o,b}Uo,b​ be a unitary matrix on CR\mathbb C^RCR for every ooo and Boolean bbb. Fix a∈{X,Y,Z}a\in\{X,Y,Z\}a∈{X,Y,Z}, o∈Oo\in Oo∈O, a Boolean ttt, and an arbitrary complex matrix ρ\rhoρ indexed by ({false,true}2×R)2(\{\mathrm{false},\mathrm{true}\}^2\times R)^2({false,true}2×R)2. In Boolean order false,true\mathrm{false},\mathrm{true}false,true, define σX=(0110)\sigma_X=\begin{pmatrix}0&1\\1&0\end{pmatrix}σX​=(01​10​), σY=(0−ii0)\sigma_Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}σY​=(0i​−i0​), σZ=(100−1)\sigma_Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}σZ​=(10​0−1​), and Πa(b)=12(I2+(−1)bσa)\Pi_a(b)=\tfrac12(I_2+(-1)^b\sigma_a)Πa​(b)=21​(I2​+(−1)bσa​), with Boolean exponents interpreted as 000 or 111. Set Fa(o)=f(o)F_a(o)=f(o)Fa​(o)=f(o) when a=Xa=Xa=X or a=Ya=Ya=Y, and FZ(o)=falseF_Z(o)=\mathrm{false}FZ​(o)=false. Writing ⊕\oplus⊕ for Boolean exclusive-or and defining [DE(ρ)]u,v=∑α,β∈{false,true}2Eβ,αρ(α,u),(β,v)[D_E(\rho)]_{u,v}=\sum_{\alpha,\beta\in\{\mathrm{false},\mathrm{true}\}^2}E_{\beta,\alpha}\rho_{(\alpha,u),(\beta,v)}[DE​(ρ)]u,v​=∑α,β∈{false,true}2​Eβ,α​ρ(α,u),(β,v)​, the declaration defines

earlyPauliBranch⁡(M,f,U,a,o,t,ρ)=Uo,t⊕Fa(o) D Mo†Mo⊗Πa(t)(ρ) Uo,t⊕Fa(o)†.\operatorname{earlyPauliBranch}(M,f,U,a,o,t,\rho) = U_{o,t\oplus F_a(o)}\,D_{\,M_o^\dagger M_o\otimes\Pi_a(t)}(\rho)\, U_{o,t\oplus F_a(o)}^\dagger.earlyPauliBranch(M,f,U,a,o,t,ρ)=Uo,t⊕Fa​(o)​DMo†​Mo​⊗Πa​(t)​(ρ)Uo,t⊕Fa​(o)†​.

No normalization or positivity condition is imposed on MoM_oMo​ or ρ\rhoρ; if RRR is empty, the result is the empty matrix.

QAlgorithms.Papers.Independent.Intakenext100.P89.effectDiscard

For any finite type AAA with a specified enumeration, any type RRR, any complex matrix EEE indexed by A×AA\times AA×A, and any complex matrix ρ\rhoρ indexed by (A×R)×(A×R)(A\times R)\times(A\times R)(A×R)×(A×R), this defines the matrix DDD indexed by R×RR\times RR×R through

Dr,s=∑a∈A∑b∈AEb,a ρ(a,r),(b,s)(r,s∈R).D_{r,s}=\sum_{a\in A}\sum_{b\in A}E_{b,a}\,\rho_{(a,r),(b,s)} \qquad(r,s\in R).Dr,s​=a∈A∑​b∈A∑​Eb,a​ρ(a,r),(b,s)​(r,s∈R).

There are no positivity, normalization, or Hermitian assumptions on either input matrix, and RRR need not be finite. If AAA is empty, the result is the zero matrix.

QAlgorithms.Papers.Independent.Intakenext100.P89.etaGHZ

For any device record ddd consisting of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α,cChip,cFiber>0\alpha,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0α,cChip​,cFiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, define

etaGHZ⁡(d)=ηSηD2−ηSηD.\operatorname{etaGHZ}(d)=\frac{\eta_S\eta_D}{2-\eta_S\eta_D}.etaGHZ(d)=2−ηS​ηD​ηS​ηD​​.

The denominator is at least 111 under these conditions.

QAlgorithms.Papers.Independent.Intakenext100.P89.etaSD

For any device record ddd consisting of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α,cChip,cFiber>0\alpha,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0α,cChip​,cFiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, define etaSD⁡(d)=ηSηD\operatorname{etaSD}(d)=\eta_S\eta_DetaSD(d)=ηS​ηD​.

QAlgorithms.Papers.Independent.Intakenext100.P89.fiberSurvival

For any device record ddd consisting of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α,cChip,cFiber>0\alpha,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0α,cChip​,cFiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, define fiberSurvival⁡(d)=exp⁡(−ατFcFiber)\operatorname{fiberSurvival}(d)=\exp(-\alpha\tau_Fc_{\mathrm{Fiber}})fiberSurvival(d)=exp(−ατF​cFiber​). This value is 111 when τF=0\tau_F=0τF​=0.

QAlgorithms.Papers.Independent.Intakenext100.P89.finalMeasurementSuccess

For a device record ddd with real fields ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0, and arbitrary natural numbers k,mk,mk,m, this defines

finalMeasurementSuccess⁡(d,k,m)=(ηSηD2−ηSηD(e−βτScChip)k+1)4m+1.\operatorname{finalMeasurementSuccess}(d,k,m) = \left( \frac{\eta_S\eta_D}{2-\eta_S\eta_D} \left(e^{-\beta\tau_Sc_{\mathrm{Chip}}}\right)^{k+1} \right)^{4m+1}.finalMeasurementSuccess(d,k,m)=(2−ηS​ηD​ηS​ηD​​(e−βτS​cChip​)k+1)4m+1.

Both k=0k=0k=0 and m=0m=0m=0 are allowed; when m=0m=0m=0, the outer exponent is 111.

QAlgorithms.Papers.Independent.Intakenext100.P89.ghzSuccess

For any device record ddd consisting of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α,cChip,cFiber>0\alpha,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0α,cChip​,cFiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, define

ghzSuccess⁡(d)=(ηSηD(2−ηSηD))332.\operatorname{ghzSuccess}(d)= \frac{\bigl(\eta_S\eta_D(2-\eta_S\eta_D)\bigr)^3}{32}.ghzSuccess(d)=32(ηS​ηD​(2−ηS​ηD​))3​.

QAlgorithms.Papers.Independent.Intakenext100.P89.hadamardBasis

This defines a function on the three-element type {X,Y,Z}\{X,Y,Z\}{X,Y,Z} that sends XXX to ZZZ, sends YYY to YYY, and sends ZZZ to XXX.

QAlgorithms.Papers.Independent.Intakenext100.P89.hadamardOutcomeFlip

This defines a Boolean-valued function on {X,Y,Z}\{X,Y,Z\}{X,Y,Z} whose value is false\mathrm{false}false at XXX, true\mathrm{true}true at YYY, and false\mathrm{false}false at ZZZ.

QAlgorithms.Papers.Independent.Intakenext100.P89.heraldLaw

For any finite type AAA, any real-valued function w:A→Rw:A\to\mathbb Rw:A→R, and any predicate EEE on AAA, define a function on Boolean values by

heraldLaw⁡(w,E)(true)=∑a∈AE(a)w(a),heraldLaw⁡(w,E)(false)=∑a∈A¬E(a)w(a).\operatorname{heraldLaw}(w,E)(\mathrm{true})=\sum_{\substack{a\in A\\E(a)}}w(a), \qquad \operatorname{heraldLaw}(w,E)(\mathrm{false})=\sum_{\substack{a\in A\\\neg E(a)}}w(a).heraldLaw(w,E)(true)=a∈AE(a)​∑​w(a),heraldLaw(w,E)(false)=a∈A¬E(a)​∑​w(a).

The weights need not be nonnegative or sum to 111. The type AAA may be empty, in which case both values are zero.

QAlgorithms.Papers.Independent.Intakenext100.P89.latePauliBranch

Let OOO be any type and RRR a finite type with decidable equality, possibly empty. Let MoM_oMo​ be an arbitrary complex 2×22\times22×2 matrix for each o∈Oo\in Oo∈O, let f:O→{false,true}f:O\to\{\mathrm{false},\mathrm{true}\}f:O→{false,true}, and let Uo,bU_{o,b}Uo,b​ be a unitary matrix on CR\mathbb C^RCR for every o∈Oo\in Oo∈O and Boolean bbb. Fix a∈{X,Y,Z}a\in\{X,Y,Z\}a∈{X,Y,Z}, o∈Oo\in Oo∈O, a Boolean rrr, and an arbitrary complex matrix ρ\rhoρ indexed by ({false,true}2×R)2(\{\mathrm{false},\mathrm{true}\}^2\times R)^2({false,true}2×R)2. In the ordering false,true\mathrm{false},\mathrm{true}false,true, put σX=(0110)\sigma_X=\begin{pmatrix}0&1\\1&0\end{pmatrix}σX​=(01​10​), σY=(0−ii0)\sigma_Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}σY​=(0i​−i0​), σZ=(100−1)\sigma_Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}σZ​=(10​0−1​), Πa(b)=12(I2+(−1)bσa)\Pi_a(b)=\tfrac12(I_2+(-1)^b\sigma_a)Πa​(b)=21​(I2​+(−1)bσa​), interpreting a Boolean exponent as 000 or 111, and Co=σZC_o=\sigma_ZCo​=σZ​ if f(o)=truef(o)=\mathrm{true}f(o)=true, otherwise Co=I2C_o=I_2Co​=I2​. For a matrix EEE on the two Boolean indices, define the matrix DE(ρ)D_E(\rho)DE​(ρ) on RRR by [DE(ρ)]u,v=∑α,β∈{false,true}2Eβ,αρ(α,u),(β,v)[D_E(\rho)]_{u,v}=\sum_{\alpha,\beta\in\{\mathrm{false},\mathrm{true}\}^2}E_{\beta,\alpha}\rho_{(\alpha,u),(\beta,v)}[DE​(ρ)]u,v​=∑α,β∈{false,true}2​Eβ,α​ρ(α,u),(β,v)​. The declaration defines

latePauliBranch⁡(M,f,U,a,o,r,ρ)=Uo,r D Mo†Mo⊗(Co†Πa(r)Co)(ρ) Uo,r†.\operatorname{latePauliBranch}(M,f,U,a,o,r,\rho) = U_{o,r}\,D_{\,M_o^\dagger M_o\otimes(C_o^\dagger\Pi_a(r)C_o)}(\rho)\,U_{o,r}^\dagger.latePauliBranch(M,f,U,a,o,r,ρ)=Uo,r​DMo†​Mo​⊗(Co†​Πa​(r)Co​)​(ρ)Uo,r†​.

No normalization or positivity condition is imposed on MoM_oMo​ or ρ\rhoρ; if RRR is empty, the result is the uniquely indexed empty matrix.

QAlgorithms.Papers.Independent.Intakenext100.P89.leafSourceCount

For arbitrary natural numbers nGHZn_{\mathrm{GHZ}}nGHZ​ and nBn_BnB​, this defines a function L:N→NL:\mathbb N\to\mathbb NL:N→N by

L(0)=6nGHZ,L(k+1)=(2nB)L(k).L(0)=6n_{\mathrm{GHZ}}, \qquad L(k+1)=(2n_B)L(k).L(0)=6nGHZ​,L(k+1)=(2nB​)L(k).

Zero values of either parameter are allowed: if nGHZ=0n_{\mathrm{GHZ}}=0nGHZ​=0, every value is zero; if nB=0n_B=0nB​=0, every value at a positive index is zero, while L(0)=6nGHZL(0)=6n_{\mathrm{GHZ}}L(0)=6nGHZ​.

QAlgorithms.Papers.Independent.Intakenext100.P89.linkBellSuccess

Let ddd consist of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​, satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0. For any natural numbers k,nk,nk,n, including zero, and any real LLL, the definition is

linkBellSuccess⁡(d,k,n,L)=[e−αL/(2n)(e−βτScChip)k+2ηSηD2−ηSηD ηC]2((ηSηD)22+(ηSηD)44).\operatorname{linkBellSuccess}(d,k,n,L) = \left[ e^{-\alpha L/(2n)} \left(e^{-\beta\tau_Sc_{\mathrm{Chip}}}\right)^{k+2} \frac{\eta_S\eta_D}{2-\eta_S\eta_D}\,\eta_C \right]^2 \left(\frac{(\eta_S\eta_D)^2}{2} +\frac{(\eta_S\eta_D)^4}{4}\right).linkBellSuccess(d,k,n,L)=[e−αL/(2n)(e−βτS​cChip​)k+22−ηS​ηD​ηS​ηD​​ηC​]2(2(ηS​ηD​)2​+4(ηS​ηD​)4​).

When n=0n=0n=0, real division by zero makes the exponential involving LLL equal to 111.

QAlgorithms.Papers.Independent.Intakenext100.P89.logicalZ

For natural numbers b0,b1b_0,b_1b0​,b1​ and any real number ppp, this defines the sum, over all Boolean arrays zzz with b0b_0b0​ rows and b1+1b_1+1b1​+1 columns that contain a true entry in every row, of their weights:

∑z:{0,…,b0−1}×{0,…,b1}→{false,true}∀i∃j, zij=true∏i=0b0−1∏j=0b1{p,zij=true,1−p,zij=false.\sum_{\substack{z:\{0,\ldots,b_0-1\}\times\{0,\ldots,b_1\} \to\{\mathrm{false},\mathrm{true}\}\\ \forall i\;\exists j,\ z_{ij}=\mathrm{true}}} \prod_{i=0}^{b_0-1}\prod_{j=0}^{b_1} \begin{cases}p,&z_{ij}=\mathrm{true},\\1-p,&z_{ij}=\mathrm{false}.\end{cases}z:{0,…,b0​−1}×{0,…,b1​}→{false,true}∀i∃j, zij​=true​∑​i=0∏b0​−1​j=0∏b1​​{p,1−p,​zij​=true,zij​=false.​

There is no restriction on ppp. For b0=0b_0=0b0​=0 the unique empty array satisfies the condition and has weight 111, so the sum is 111; b1=0b_1=0b1​=0 is permitted and gives one column.

QAlgorithms.Papers.Independent.Intakenext100.P89.naiveClusterLaw

For a device record ddd with real fields ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0, and arbitrary natural numbers nGHZ,nBn_{\mathrm{GHZ}},n_BnGHZ​,nB​, this defines real-valued Boolean weights Cl(b)=naiveClusterLaw⁡(d,nGHZ,nB,l,b)C_l(b)=\operatorname{naiveClusterLaw}(d,n_{\mathrm{GHZ}},n_B,l,b)Cl​(b)=naiveClusterLaw(d,nGHZ​,nB​,l,b). To specify the recursion, put u=ηSηDu=\eta_S\eta_Du=ηS​ηD​, h=u/(2−u)h=u/(2-u)h=u/(2−u), c=e−βτScChipc=e^{-\beta\tau_Sc_{\mathrm{Chip}}}c=e−βτS​cChip​, g=(u(2−u))3/32g=(u(2-u))^3/32g=(u(2−u))3/32, and fj=(hcj)2/2f_j=(hc^j)^2/2fj​=(hcj)2/2. Write Bp(true)=pB_p(\mathrm{true})=pBp​(true)=p, Bp(false)=1−pB_p(\mathrm{false})=1-pBp​(false)=1−p; for any Boolean weight www, define

At(w)(b)=∑z∈{false,true}t(∃i, zi=true) ⟺ b=true∏i=0t−1w(zi),A_t(w)(b)= \sum_{\substack{z\in\{\mathrm{false},\mathrm{true}\}^{t}\\ (\exists i,\ z_i=\mathrm{true})\ \Longleftrightarrow\ b=\mathrm{true}}} \prod_{i=0}^{t-1}w(z_i),At​(w)(b)=z∈{false,true}t(∃i, zi​=true) ⟺ b=true​∑​i=0∏t−1​w(zi​),

and define

D(w,v)(b)=∑a,e∈{false,true}(a=true ∧ e=true) ⟺ b=truew(a)v(e).D(w,v)(b)= \sum_{\substack{a,e\in\{\mathrm{false},\mathrm{true}\}\\ (a=\mathrm{true}\ \land\ e=\mathrm{true})\ \Longleftrightarrow\ b=\mathrm{true}}} w(a)v(e).D(w,v)(b)=a,e∈{false,true}(a=true ∧ e=true) ⟺ b=true​∑​w(a)v(e).

The recursion is C0=AnGHZ(Bg)C_0=A_{n_{\mathrm{GHZ}}}(B_g)C0​=AnGHZ​​(Bg​) and Cl+1=AnB(D(D(Cl,Cl),Bfl+1))C_{l+1}=A_{n_B}(D(D(C_l,C_l),B_{f_{l+1}}))Cl+1​=AnB​​(D(D(Cl​,Cl​),Bfl+1​​)). Zero repetition counts are permitted: A0(w)A_0(w)A0​(w) assigns weight 111 to false and 000 to true.

QAlgorithms.Papers.Independent.Intakenext100.P89.naiveFinalLaw

For a device record ddd with real fields ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0, and arbitrary natural numbers k,m,nGHZ,nB,nMeask,m,n_{\mathrm{GHZ}},n_B,n_{\mathrm{Meas}}k,m,nGHZ​,nB​,nMeas​, this defines a real-valued Boolean weight FFF as follows. Put u=ηSηDu=\eta_S\eta_Du=ηS​ηD​, h=u/(2−u)h=u/(2-u)h=u/(2−u), c=e−βτScChipc=e^{-\beta\tau_Sc_{\mathrm{Chip}}}c=e−βτS​cChip​, g=(u(2−u))3/32g=(u(2-u))^3/32g=(u(2−u))3/32, fj=(hcj)2/2f_j=(hc^j)^2/2fj​=(hcj)2/2, and v=(hck+1)4m+1v=(hc^{k+1})^{4m+1}v=(hck+1)4m+1. Let Bp(true)=pB_p(\mathrm{true})=pBp​(true)=p and Bp(false)=1−pB_p(\mathrm{false})=1-pBp​(false)=1−p. For Boolean weights w,w′w,w'w,w′, let D(w,w′)(b)D(w,w')(b)D(w,w′)(b) be the sum of w(a)w′(e)w(a)w'(e)w(a)w′(e) over Boolean pairs (a,e)(a,e)(a,e) whose conjunction is bbb, and let At(w)(b)A_t(w)(b)At​(w)(b) be the sum of ∏i=0t−1w(zi)\prod_{i=0}^{t-1}w(z_i)∏i=0t−1​w(zi​) over Boolean ttt-tuples zzz for which “at least one entry is true” holds exactly when b=trueb=\mathrm{true}b=true. Define C0=AnGHZ(Bg)C_0=A_{n_{\mathrm{GHZ}}}(B_g)C0​=AnGHZ​​(Bg​) and Cj+1=AnB(D(D(Cj,Cj),Bfj+1))C_{j+1}=A_{n_B}(D(D(C_j,C_j),B_{f_{j+1}}))Cj+1​=AnB​​(D(D(Cj​,Cj​),Bfj+1​​)). Then

F=naiveFinalLaw⁡(d,k,m,nGHZ,nB,nMeas)=AnMeas(D(Ck,Bv)).F=\operatorname{naiveFinalLaw}(d,k,m,n_{\mathrm{GHZ}},n_B,n_{\mathrm{Meas}}) =A_{n_{\mathrm{Meas}}}(D(C_k,B_v)).F=naiveFinalLaw(d,k,m,nGHZ​,nB​,nMeas​)=AnMeas​​(D(Ck​,Bv​)).

All five natural-number parameters may be zero; empty products equal 111, and A0(w)A_0(w)A0​(w) assigns weight 111 to false and 000 to true.

QAlgorithms.Papers.Independent.Intakenext100.P89.naiveFusionSuccess

For a device record ddd with real fields ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​ satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0, and for every natural number lll, this defines

naiveFusionSuccess⁡(d,l)=12(ηSηD2−ηSηD(e−βτScChip)l)2.\operatorname{naiveFusionSuccess}(d,l) =\frac12\left( \frac{\eta_S\eta_D}{2-\eta_S\eta_D} \left(e^{-\beta\tau_Sc_{\mathrm{Chip}}}\right)^l \right)^2.naiveFusionSuccess(d,l)=21​(2−ηS​ηD​ηS​ηD​​(e−βτS​cChip​)l)2.

The case l=0l=0l=0 is included, with the exponential factor raised to zero equal to 111.

QAlgorithms.Papers.Independent.Intakenext100.P89.pauliProjector

For every label a∈{X,Y,Z}a\in\{X,Y,Z\}a∈{X,Y,Z} and Boolean rrr, this defines the complex matrix

Pa,r={12(I2+Ba),r=false,12(I2−Ba),r=true,P_{a,r}= \begin{cases} \frac12(I_2+B_a),&r=\mathrm{false},\\ \frac12(I_2-B_a),&r=\mathrm{true}, \end{cases}Pa,r​={21​(I2​+Ba​),21​(I2​−Ba​),​r=false,r=true,​

where rows and columns are ordered as false,true\mathrm{false},\mathrm{true}false,true, I2I_2I2​ is the identity matrix, and

BX=(0110),BY=(0−ii0),BZ=(100−1).B_X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad B_Y=\begin{pmatrix}0&-\mathrm{i}\\ \mathrm{i}&0\end{pmatrix},\qquad B_Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.BX​=(01​10​),BY​=(0i​−i0​),BZ​=(10​0−1​).

QAlgorithms.Papers.Independent.Intakenext100.P89.stationaryFactor

For device parameters ddd consisting of real numbers ηS,ηD,ηC∈(0,1]\eta_S,\eta_D,\eta_C\in(0,1]ηS​,ηD​,ηC​∈(0,1], α,cchip,cfiber>0\alpha,c_{\mathrm{chip}},c_{\mathrm{fiber}}>0α,cchip​,cfiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and every natural number kkk, this defines

(e−βτScchip)k+2ηSηD2−ηSηD ηCe−ατFcfiber.\left(e^{-\beta\tau_Sc_{\mathrm{chip}}}\right)^{k+2} \frac{\eta_S\eta_D}{2-\eta_S\eta_D}\,\eta_C e^{-\alpha\tau_Fc_{\mathrm{fiber}}}.(e−βτS​cchip​)k+22−ηS​ηD​ηS​ηD​​ηC​e−ατF​cfiber​.

The case k=0k=0k=0 is included.

QAlgorithms.Papers.Independent.Intakenext100.P89.stationarySurvival

Let ddd consist of real parameters ηS,ηD,ηC,α,β,τS,τF,cChip,cFiber\eta_S,\eta_D,\eta_C,\alpha,\beta,\tau_S,\tau_F,c_{\mathrm{Chip}},c_{\mathrm{Fiber}}ηS​,ηD​,ηC​,α,β,τS​,τF​,cChip​,cFiber​, satisfying 0<ηS,ηD,ηC≤10<\eta_S,\eta_D,\eta_C\le10<ηS​,ηD​,ηC​≤1, α>0\alpha>0α>0, β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and cChip,cFiber>0c_{\mathrm{Chip}},c_{\mathrm{Fiber}}>0cChip​,cFiber​>0. For any natural numbers k,nk,nk,n, including zero, and any real LLL, the definition is

stationarySurvival⁡(d,k,n,L)=e−αL/n(e−βτScChip)k+2ηSηD2−ηSηD ηCe−ατFcFiber.\operatorname{stationarySurvival}(d,k,n,L) = e^{-\alpha L/n} \left(e^{-\beta\tau_Sc_{\mathrm{Chip}}}\right)^{k+2} \frac{\eta_S\eta_D}{2-\eta_S\eta_D}\,\eta_C e^{-\alpha\tau_Fc_{\mathrm{Fiber}}}.stationarySurvival(d,k,n,L)=e−αL/n(e−βτS​cChip​)k+22−ηS​ηD​ηS​ηD​​ηC​e−ατF​cFiber​.

Real division by zero is defined to be zero, so when n=0n=0n=0, the first exponential equals 111, regardless of LLL.

QAlgorithms.Papers.Independent.Intakenext100.P89.successes

For every natural number nnn and every Boolean tuple x:{0,…,n−1}→{false,true}x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}x:{0,…,n−1}→{false,true}, define successes⁡(x)\operatorname{successes}(x)successes(x) to be the natural number ∑i=0n−11{xi=true}\sum_{i=0}^{n-1}\mathbf1_{\{x_i=\mathrm{true}\}}∑i=0n−1​1{xi​=true}​, namely the number of indices whose value is true. For n=0n=0n=0, this empty sum is zero.

QAlgorithms.Papers.Independent.Intakenext100.P89.travelingFactor

For device parameters ddd consisting of real numbers ηS,ηD,ηC∈(0,1]\eta_S,\eta_D,\eta_C\in(0,1]ηS​,ηD​,ηC​∈(0,1], α,cchip,cfiber>0\alpha,c_{\mathrm{chip}},c_{\mathrm{fiber}}>0α,cchip​,cfiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, and every natural number kkk, this defines

(e−βτScchip)k+2ηSηD2−ηSηD ηC.\left(e^{-\beta\tau_Sc_{\mathrm{chip}}}\right)^{k+2} \frac{\eta_S\eta_D}{2-\eta_S\eta_D}\,\eta_C.(e−βτS​cchip​)k+22−ηS​ηD​ηS​ηD​​ηC​.

The case k=0k=0k=0 is included.

QAlgorithms.Papers.Independent.Intakenext100.P89.travelingSurvival

For device parameters ddd consisting of real numbers ηS,ηD,ηC∈(0,1]\eta_S,\eta_D,\eta_C\in(0,1]ηS​,ηD​,ηC​∈(0,1], α,cchip,cfiber>0\alpha,c_{\mathrm{chip}},c_{\mathrm{fiber}}>0α,cchip​,cfiber​>0, and β,τS,τF≥0\beta,\tau_S,\tau_F\ge0β,τS​,τF​≥0, natural numbers k,nk,nk,n, and any real number LLL, this defines

e−αL/(2n)(e−βτScchip)k+2ηSηD2−ηSηD ηC.e^{-\alpha L/(2n)} \left(e^{-\beta\tau_Sc_{\mathrm{chip}}}\right)^{k+2} \frac{\eta_S\eta_D}{2-\eta_S\eta_D}\,\eta_C.e−αL/(2n)(e−βτS​cchip​)k+22−ηS​ηD​ηS​ηD​​ηC​.

Both k=0k=0k=0 and n=0n=0n=0 are allowed, and LLL need not be nonnegative. Division by zero is defined to be zero, so at n=0n=0n=0 the first exponential factor is 111 for every LLL.

QAlgorithms.Papers.Independent.Intakenext100.P89.treeWeight

For natural numbers b0,b1b_0,b_1b0​,b1​, any real number ppp, and a Boolean array zzz with b0b_0b0​ rows and b1+1b_1+1b1​+1 columns, this defines

∏i=0b0−1∏j=0b1{p,zij=true,1−p,zij=false.\prod_{i=0}^{b_0-1}\prod_{j=0}^{b_1} \begin{cases} p,&z_{ij}=\mathrm{true},\\ 1-p,&z_{ij}=\mathrm{false}. \end{cases}i=0∏b0​−1​j=0∏b1​​{p,1−p,​zij​=true,zij​=false.​

No assumption restricts ppp to [0,1][0,1][0,1]. If b0=0b_0=0b0​=0, the empty product is 111; b1=0b_1=0b1​=0 is also allowed.

QAlgorithms.Papers.Independent.Intakenext100.P89.treeXEvent

For natural numbers b0,b1b_0,b_1b0​,b1​ and a Boolean array zzz with b0b_0b0​ rows and b1+1b_1+1b1​+1 columns, this is the proposition that some row consists entirely of true entries:

∃i∈{0,…,b0−1},∀j∈{0,…,b1},zij=true.\exists i\in\{0,\ldots,b_0-1\},\quad \forall j\in\{0,\ldots,b_1\},\quad z_{ij}=\mathrm{true}.∃i∈{0,…,b0​−1},∀j∈{0,…,b1​},zij​=true.

It is false when b0=0b_0=0b0​=0; when b1=0b_1=0b1​=0, it requires at least one true entry in the single column.

QAlgorithms.Papers.Independent.Intakenext100.P89.treeZEvent

For natural numbers b0,b1b_0,b_1b0​,b1​ and a Boolean array zzz with b0b_0b0​ rows and b1+1b_1+1b1​+1 columns, this is the proposition that every row contains at least one true entry:

∀i∈{0,…,b0−1},∃j∈{0,…,b1},zij=true.\forall i\in\{0,\ldots,b_0-1\},\quad \exists j\in\{0,\ldots,b_1\},\quad z_{ij}=\mathrm{true}.∀i∈{0,…,b0​−1},∃j∈{0,…,b1​},zij​=true.

It holds vacuously when b0=0b_0=0b0​=0; when b1=0b_1=0b1​=0, it requires every entry in the single column to be true.

QAlgorithms.Papers.Independent.Intakenext100.P89.unitaryBranch

For any finite type RRR with a specified enumeration and decidable equality, any unitary complex matrix UUU indexed by R×RR\times RR×R, and any complex matrix ρ\rhoρ on the same index set, this defines

unitaryBranch⁡(U,ρ)=UρU†,\operatorname{unitaryBranch}(U,\rho)=U\rho U^\dagger,unitaryBranch(U,ρ)=UρU†,

where U†U^\daggerU† is the conjugate transpose and unitarity means U†U=UU†=IU^\dagger U=UU^\dagger=IU†U=UU†=I. No positivity or trace condition is imposed on ρ\rhoρ, and the definition also includes an empty index type RRR.

QAlgorithms.Papers.Independent.Intakenext100.P89.zOutcomeFlip

For every label a∈{X,Y,Z}a\in\{X,Y,Z\}a∈{X,Y,Z} and Boolean iii, this defines a Boolean equal to iii when a=Xa=Xa=X or a=Ya=Ya=Y, and equal to false\mathrm{false}false when a=Za=Za=Z.

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