Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Generalized teleportation and entanglement recycling

Definition
QAlgorithms_Papers_Independent_Intake100_P69

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

prove2quantum

The objects the formalized statements of Generalized teleportation and entanglement recycling (arXiv:1209.2683) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • singletAmplitude: PDF pp.1,3: amplitudes of the normalized singlet, in Alice/Bob order.
  • OneAlice: PDF p.3: Alice's input qubit followed by her N port halves.
  • recyclingInput: PDF pp.3,6: the input/reference singlet and the N resource singlets. The second factor consists of R0 followed by Bob's N halves.
  • portSignal: PDF p.3: sigma_i = 2^{-(N-1)} Pminus_{A0,Ai} tensor I on other Alice halves. Theorems use N >= 1, so N-1 is the number of unused Alice halves.
  • signalSum: PDF p.3: rho is constructed as the sum of the port signals.
  • supportInvSqrt: PDF pp.3,6: support inverse square root. The scalar inverse sends zero to zero; functional calculus is on the finite spectrum, including at the singular endpoint.
  • recyclingEffect: PDF pp.3,6: conclusive square-root-measurement effect E_i. No input state is an argument of the measurement. A complementary failure effect is permitted by (21).
  • recyclingBranch: PDF p.6, (18): the unnormalized branch after the positive square root of E_i. The identity acts on R0 and every Bob half, so R0 is untouched.
  • recyclingIdeal: PDF p.3: the normalized ideal full branch, with singlets A0-Ai and R0-Bi, and every unused Aj-Bj. This explicit product corrects the factor in p.6, (20): that printed vector has norm 1/2, whereas the p.3 vector is a unit vector. The change is normalization only; overall singlet-swapping phase is immaterial.
  • recyclingFidelity: PDF p.3, (3), and p.6, (18)-(25): conclusive outcome average of full-branch ROOT fidelities. For an unnormalized branch v, p = ||v||^2, so its contribution p |<ideal|v/||v||>| is ||v|| |<ideal|v>|. This formula assigns zero to a zero-probability branch without division. A nonnegative failure term from (21) can only increase this quantity. Simultaneous swaps of actual and ideal ports leave these overlaps invariant.
  • deterministicPortEffect: PDF pp.3-4: original deterministic one-input PBT measurement, completed symmetrically on the kernel. The completion is an Alice-only effect and requires no correction by Bob. Unlike recycling, the unused resource is discarded.
  • singlePortFidelity: PDF p.4, (8)-(9), with p.10, (80) at k=1: entanglement fidelity of the original deterministic single-input channel, (1/4) sum_i Tr(E_i sigma_i). The signals are normalized. This is a physical channel expression, not the unjustified exact scalar 1-3/(4N) appearing in (8).
  • Assignment: PDF pp.4,10: an ordered assignment of the k labeled inputs to distinct ports.
  • JointRegister: PDF pp.4,10: k input halves (or reference halves), followed by N port halves.
  • simultaneousInput: PDF pp.3-4,10: N resource singlets and k independent input/reference singlets. This is the normalized Choi test input for JOINT entanglement fidelity.
  • selectedTarget: PDF pp.4,10: the target singlet projector between the reference halves and the selected Bob halves in input order, tensor identity on every unselected Bob half. Expectation of this operator traces out unused Bob ports; it does not test their resource fidelity. Only register selection is allowed on Bob's side.
  • SimMeasurement: PDF pp.4,10: a single joint measurement on Alice's inputs and N halves. It has one outcome for every ordered injection, and has no input-state argument.
  • simultaneousBranch: PDF pp.4,10: unnormalized branch of an Alice-only joint measurement. Choosing the positive square root gives the same Bob reduced channel as any instrument with these effects, since Alice's registers are discarded.
  • simultaneousFidelity: PDF p.4, (6)-(7), and p.10, (80): JOINT entanglement fidelity of the operational protocol: measure Alice once, announce the injection once, retain Bob's selected ports in input order, and discard all other registers. The sum is unconditional; each branch is subnormalized. Both resource and test input are normalized singlets, so Bob performs no corrective unitary.
Definition code
import Definitions.Def_QAlgorithms_Defs_Ensemble

/-!
# Generalized teleportation and entanglement recycling

Strelchuk, Horodecki and Oppenheim, arXiv:1209.2683v2.
All new objects are local to this paper. Recycling uses root fidelity of the full
resource; simultaneous and parallel teleportation use joint entanglement fidelity.
The source ambiguities and normalisation correction are recorded in the unit artifacts.
-/

namespace QAlgorithms.Papers.Independent.Intake100.P69

open scoped ComplexConjugate
open Filter

/-- PDF pp.1,3: amplitudes of the normalized singlet, in Alice/Bob order. -/
noncomputable def singletAmplitude (a b : Bool) : ℂ :=
  if a = b then 0 else if a then -((Real.sqrt 2 : ℂ)⁻¹) else (Real.sqrt 2 : ℂ)⁻¹

/-- PDF p.3: Alice's input qubit followed by her N port halves. -/
abbrev OneAlice (N : ℕ) := Bool × Qubits N

/-- PDF pp.3,6: the input/reference singlet and the N resource singlets.
The second factor consists of R0 followed by Bob's N halves. -/
noncomputable def recyclingInput (N : ℕ) :
    EuclideanSpace ℂ (OneAlice N × OneAlice N) :=
  WithLp.toLp 2 fun z =>
    singletAmplitude z.1.1 z.2.1 *
      ∏ j : Fin N, singletAmplitude (z.1.2 j) (z.2.2 j)

/-- PDF p.3: sigma_i = 2^{-(N-1)} Pminus_{A0,Ai} tensor I on other Alice halves.
Theorems use N >= 1, so N-1 is the number of unused Alice halves. -/
noncomputable def portSignal (N : ℕ) (i : Fin N) :
    Matrix (OneAlice N) (OneAlice N) ℂ := by
  classical
  exact fun a b =>
    ((2 : ℂ) ^ (N - 1))⁻¹ *
      singletAmplitude a.1 (a.2 i) * conj (singletAmplitude b.1 (b.2 i)) *
      (if ∀ j : Fin N, j ≠ i → a.2 j = b.2 j then 1 else 0)

/-- PDF p.3: rho is constructed as the sum of the port signals. -/
noncomputable def signalSum (N : ℕ) : Matrix (OneAlice N) (OneAlice N) ℂ :=
  ∑ i : Fin N, portSignal N i

/-- PDF pp.3,6: support inverse square root. The scalar inverse sends zero to zero;
functional calculus is on the finite spectrum, including at the singular endpoint. -/
noncomputable def supportInvSqrt {ι : Type*} [Fintype ι] [DecidableEq ι]
    (A : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
  cfc (fun x : ℝ => (Real.sqrt x)⁻¹) A

/-- PDF pp.3,6: conclusive square-root-measurement effect E_i. No input state is
an argument of the measurement. A complementary failure effect is permitted by (21). -/
noncomputable def recyclingEffect (N : ℕ) (i : Fin N) :
    Matrix (OneAlice N) (OneAlice N) ℂ :=
  supportInvSqrt (signalSum N) * portSignal N i * supportInvSqrt (signalSum N)

/-- PDF p.6, (18): the unnormalized branch after the positive square root of E_i.
The identity acts on R0 and every Bob half, so R0 is untouched. -/
noncomputable def recyclingBranch (N : ℕ) (i : Fin N) :
    EuclideanSpace ℂ (OneAlice N × OneAlice N) :=
  act (Matrix.kronecker (cfc Real.sqrt (recyclingEffect N i)) 1) (recyclingInput N)

/-- PDF p.3: the normalized ideal full branch, with singlets A0-Ai and R0-Bi,
and every unused Aj-Bj. This explicit product corrects the factor in p.6, (20):
that printed vector has norm 1/2, whereas the p.3 vector is a unit vector.
The change is normalization only; overall singlet-swapping phase is immaterial. -/
noncomputable def recyclingIdeal (N : ℕ) (i : Fin N) :
    EuclideanSpace ℂ (OneAlice N × OneAlice N) := by
  classical
  exact WithLp.toLp 2 fun z =>
    singletAmplitude z.1.1 (z.1.2 i) * singletAmplitude z.2.1 (z.2.2 i) *
      ∏ j ∈ Finset.univ.erase i, singletAmplitude (z.1.2 j) (z.2.2 j)

/-- PDF p.3, (3), and p.6, (18)-(25): conclusive outcome average of full-branch
ROOT fidelities. For an unnormalized branch v, p = ||v||^2, so its contribution
p |<ideal|v/||v||>| is ||v|| |<ideal|v>|. This formula assigns zero to a
zero-probability branch without division. A nonnegative failure term from (21)
can only increase this quantity. Simultaneous swaps of actual and ideal ports
leave these overlaps invariant. -/
noncomputable def recyclingFidelity (N : ℕ) : ℝ :=
  ∑ i : Fin N, ‖recyclingBranch N i‖ *
    ‖inner ℂ (recyclingIdeal N i) (recyclingBranch N i)‖

/-- PDF pp.3-4: original deterministic one-input PBT measurement, completed
symmetrically on the kernel. The completion is an Alice-only effect and requires
no correction by Bob. Unlike recycling, the unused resource is discarded. -/
noncomputable def deterministicPortEffect (N : ℕ) (i : Fin N) :
    Matrix (OneAlice N) (OneAlice N) ℂ :=
  recyclingEffect N i + (N : ℂ)⁻¹ • (1 - ∑ j : Fin N, recyclingEffect N j)

/-- PDF p.4, (8)-(9), with p.10, (80) at k=1: entanglement fidelity of the
original deterministic single-input channel, (1/4) sum_i Tr(E_i sigma_i).
The signals are normalized. This is a physical channel expression, not the
unjustified exact scalar 1-3/(4N) appearing in (8). -/
noncomputable def singlePortFidelity (N : ℕ) : ℝ :=
  (1 / 4 : ℝ) * ∑ i : Fin N,
    (deterministicPortEffect N i * portSignal N i).trace.re

/-- PDF pp.4,10: an ordered assignment of the k labeled inputs to distinct ports. -/
abbrev Assignment (N k : ℕ) := Fin k ↪ Fin N

/-- PDF pp.4,10: k input halves (or reference halves), followed by N port halves. -/
abbrev JointRegister (N k : ℕ) := Qubits k × Qubits N

/-- PDF pp.3-4,10: N resource singlets and k independent input/reference singlets.
This is the normalized Choi test input for JOINT entanglement fidelity. -/
noncomputable def simultaneousInput (N k : ℕ) :
    EuclideanSpace ℂ (JointRegister N k × JointRegister N k) :=
  WithLp.toLp 2 fun z =>
    (∏ l : Fin k, singletAmplitude (z.1.1 l) (z.2.1 l)) *
      ∏ j : Fin N, singletAmplitude (z.1.2 j) (z.2.2 j)

/-- PDF pp.4,10: the target singlet projector between the reference halves and
the selected Bob halves in input order, tensor identity on every unselected Bob
half. Expectation of this operator traces out unused Bob ports; it does not test
their resource fidelity. Only register selection is allowed on Bob's side. -/
noncomputable def selectedTarget (N k : ℕ) (f : Assignment N k) :
    Matrix (JointRegister N k) (JointRegister N k) ℂ := by
  classical
  exact fun a b =>
    (∏ l : Fin k, singletAmplitude (a.1 l) (a.2 (f l)) *
      conj (singletAmplitude (b.1 l) (b.2 (f l)))) *
      (if ∀ j : Fin N, (∀ l : Fin k, f l ≠ j) → a.2 j = b.2 j then 1 else 0)

/-- PDF pp.4,10: a single joint measurement on Alice's inputs and N halves.
It has one outcome for every ordered injection, and has no input-state argument. -/
abbrev SimMeasurement (N k : ℕ) :=
  Assignment N k → Matrix (JointRegister N k) (JointRegister N k) ℂ

/-- PDF pp.4,10: unnormalized branch of an Alice-only joint measurement.
Choosing the positive square root gives the same Bob reduced channel as any
instrument with these effects, since Alice's registers are discarded. -/
noncomputable def simultaneousBranch {N k : ℕ} (M : SimMeasurement N k)
    (f : Assignment N k) :
    EuclideanSpace ℂ (JointRegister N k × JointRegister N k) :=
  act (Matrix.kronecker (cfc Real.sqrt (M f)) 1) (simultaneousInput N k)

/-- PDF p.4, (6)-(7), and p.10, (80): JOINT entanglement fidelity of the
operational protocol: measure Alice once, announce the injection once, retain
Bob's selected ports in input order, and discard all other registers. The sum
is unconditional; each branch is subnormalized. Both resource and test input
are normalized singlets, so Bob performs no corrective unitary. -/
noncomputable def simultaneousFidelity {N k : ℕ} (M : SimMeasurement N k) : ℝ :=
  ∑ f : Assignment N k,
    (inner ℂ (simultaneousBranch M f)
      (act (Matrix.kronecker 1 (selectedTarget N k f)) (simultaneousBranch M f))).re

/-! Small sanity checks of signs, unused-register factors and zero branches. -/

example (a : Bool) : singletAmplitude a a = 0 := by
  simp [singletAmplitude]

example : singletAmplitude false true = -singletAmplitude true false := by
  simp [singletAmplitude]

example (z : OneAlice 0 × OneAlice 0) :
    recyclingInput 0 z = singletAmplitude z.1.1 z.2.1 := by
  simp [recyclingInput]

example : recyclingFidelity 0 = 0 := by
  simp [recyclingFidelity]

example (N : ℕ) : singlePortFidelity (N / 0) ^ (0 : ℕ) = 1 := by
  simp

example (N k : ℕ) (f : Assignment N k) (b : Qubits N) (r : Qubits k) :
    selectedTarget N k f (r, b) (r, b) =
      ∏ l : Fin k, singletAmplitude (r l) (b (f l)) *
        conj (singletAmplitude (r l) (b (f l))) := by
  simp [selectedTarget]

end QAlgorithms.Papers.Independent.Intake100.P69
Source
Generalized teleportation and entanglement recycling, arXiv:1209.2683v2, https://arxiv.org/abs/1209.2683v2
Read-back

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

QAlgorithms.Papers.Independent.Intake100.P69.Assignment

For any natural numbers NNN and kkk, including zero, Assignment⁡(N,k)\operatorname{Assignment}(N,k)Assignment(N,k) is the type of injective functions from {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1} to {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}. Thus an assignment chooses an ordered list of kkk distinct indices among NNN indices. There is exactly one assignment when k=0k=0k=0, and there are no assignments when k>Nk>Nk>N.

QAlgorithms.Papers.Independent.Intake100.P69.JointRegister

For any natural numbers NNN and kkk, JointRegister⁡(N,k)\operatorname{JointRegister}(N,k)JointRegister(N,k) is the set Bk×BN\mathcal B_k\times\mathcal B_NBk​×BN​, where Br={0,1}{0,…,r−1}\mathcal B_r=\{0,1\}^{\{0,\ldots,r-1\}}Br​={0,1}{0,…,r−1} is the set of Boolean strings of length rrr. An element is therefore a pair consisting of a kkk-bit string and an NNN-bit string. A zero-length component has exactly one possible value, the empty string.

QAlgorithms.Papers.Independent.Intake100.P69.OneAlice

For every natural number NNN, this abbreviates the type of pairs consisting of one Boolean and a Boolean string indexed by {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}:

AN={false,true}×{false,true}{0,…,N−1}.A_N=\{\mathrm{false},\mathrm{true}\}\times \{\mathrm{false},\mathrm{true}\}^{\{0,\ldots,N-1\}}.AN​={false,true}×{false,true}{0,…,N−1}.

When N=0N=0N=0, the string component is the unique empty string, so A0A_0A0​ still has two elements.

QAlgorithms.Papers.Independent.Intake100.P69.SimMeasurement

For any natural numbers N,kN,kN,k, let J=Bk×BNJ=\mathcal B_k\times\mathcal B_NJ=Bk​×BN​, where Br\mathcal B_rBr​ is the set of Boolean strings of length rrr. The type SimMeasurement⁡(N,k)\operatorname{SimMeasurement}(N,k)SimMeasurement(N,k) consists of arbitrary families M=(Mf)fM=(M_f)_fM=(Mf​)f​ of complex J×JJ\times JJ×J matrices indexed by injections f:{0,…,k−1}↪{0,…,N−1}f:\{0,\ldots,k-1\}\hookrightarrow\{0,\ldots,N-1\}f:{0,…,k−1}↪{0,…,N−1}. This definition imposes no positivity, Hermitian, or sum-to-identity condition on the matrices. When k=0k=0k=0, the family contains one matrix; when k>Nk>Nk>N, its indexing set is empty, so there is exactly one such empty family.

QAlgorithms.Papers.Independent.Intake100.P69.deterministicPortEffect

For every natural number NNN and index i<Ni<Ni<N, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. Define

Pj(a,b)=2−(N−1)s(a∗,aj)s(b∗,bj)‾ 1{∀ℓ<N, ℓ≠j⇒aℓ=bℓ},SN=∑j<NPj,DN=f(SN),Ej=DNPjDN,\begin{aligned} P_j(a,b)&=2^{-(N-1)}s(a_*,a_j)\overline{s(b_*,b_j)} \,\mathbf1_{\{\forall \ell<N,\ \ell\ne j\Rightarrow a_\ell=b_\ell\}},\\ S_N&=\sum_{j<N}P_j,\qquad D_N=f(S_N),\qquad E_j=D_NP_jD_N, \end{aligned}Pj​(a,b)SN​​=2−(N−1)s(a∗​,aj​)s(b∗​,bj​)​1{∀ℓ<N, ℓ=j⇒aℓ​=bℓ​}​,=j<N∑​Pj​,DN​=f(SN​),Ej​=DN​Pj​DN​,​

where the indicator is 000 or 111, and real functional calculus applies f(t)=1/tf(t)=1/\sqrt tf(t)=1/t​ for t>0t>0t>0 and f(t)=0f(t)=0f(t)=0 otherwise. This defines the complex matrix

E~i=Ei+1N(IAN−∑j<NEj).\widetilde E_i = E_i+\frac1N\left(I_{A_N}-\sum_{j<N}E_j\right).Ei​=Ei​+N1​​IAN​​−j<N∑​Ej​​.

The index iii forces N≥1N\ge1N≥1, so the reciprocal of NNN is nonzero and there is no indexed value at N=0N=0N=0.

QAlgorithms.Papers.Independent.Intake100.P69.portSignal

For every natural number NNN and every index i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, with false identified with 000, true with 111, and the result regarded as complex. This defines the complex matrix PiP_iPi​, with rows and columns indexed by ANA_NAN​, by

Pi(a,b)=2−(N−1)s(a∗,ai) s(b∗,bi)‾{1,aj=bj for every j<N with j≠i,0,otherwise.P_i(a,b)= 2^{-(N-1)}s(a_*,a_i)\,\overline{s(b_*,b_i)} \begin{cases} 1,&a_j=b_j\text{ for every }j<N\text{ with }j\ne i,\\ 0,&\text{otherwise}. \end{cases}Pi​(a,b)=2−(N−1)s(a∗​,ai​)s(b∗​,bi​)​{1,0,​aj​=bj​ for every j<N with j=i,otherwise.​

The existence of iii forces N≥1N\ge1N≥1; there are no such indexed matrices when N=0N=0N=0. When N=1N=1N=1, the condition on the other coordinates is vacuous and the prefactor is 111.

QAlgorithms.Papers.Independent.Intake100.P69.recyclingBranch

For every natural number NNN and index i<Ni<Ni<N, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and set s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. Define

ΨN(a,b)=s(a∗,b∗)∏j<Ns(aj,bj),Pj(a,c)=2−(N−1)s(a∗,aj)s(c∗,cj)‾ 1{∀ℓ<N, ℓ≠j⇒aℓ=cℓ},SN=∑j<NPj,DN=f(SN),Ei=DNPiDN,\begin{aligned} \Psi_N(a,b)&=s(a_*,b_*)\prod_{j<N}s(a_j,b_j),\\ P_j(a,c)&=2^{-(N-1)}s(a_*,a_j)\overline{s(c_*,c_j)} \,\mathbf1_{\{\forall \ell<N,\ \ell\ne j\Rightarrow a_\ell=c_\ell\}},\\ S_N&=\sum_{j<N}P_j,\qquad D_N=f(S_N),\qquad E_i=D_NP_iD_N, \end{aligned}ΨN​(a,b)Pj​(a,c)SN​​=s(a∗​,b∗​)j<N∏​s(aj​,bj​),=2−(N−1)s(a∗​,aj​)s(c∗​,cj​)​1{∀ℓ<N, ℓ=j⇒aℓ​=cℓ​}​,=j<N∑​Pj​,DN​=f(SN​),Ei​=DN​Pi​DN​,​

where the indicator is 000 or 111, and f(t)=1/tf(t)=1/\sqrt tf(t)=1/t​ for t>0t>0t>0, with f(t)=0f(t)=0f(t)=0 for t≤0t\le0t≤0, is applied by real functional calculus. This defines the vector BiB_iBi​ in the complex Euclidean space indexed by AN×ANA_N\times A_NAN​×AN​ by

Bi=(g(Ei)⊗IAN)ΨN,g(t)=t,B_i=(g(E_i)\otimes I_{A_N})\Psi_N, \qquad g(t)=\sqrt t,Bi​=(g(Ei​)⊗IAN​​)ΨN​,g(t)=t​,

using real functional calculus for ggg, with t=0\sqrt t=0t​=0 for t<0t<0t<0, the Kronecker product, and ordinary matrix action. Equivalently, Bi(a,b)=∑c∈ANg(Ei)(a,c)ΨN(c,b)B_i(a,b)=\sum_{c\in A_N}g(E_i)(a,c)\Psi_N(c,b)Bi​(a,b)=∑c∈AN​​g(Ei​)(a,c)ΨN​(c,b). The index requires N≥1N\ge1N≥1, and this definition does not divide by the norm of BiB_iBi​.

QAlgorithms.Papers.Independent.Intake100.P69.recyclingEffect

For every natural number NNN and index i<Ni<Ni<N, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. Define matrices on ANA_NAN​ by

Pj(a,b)=2−(N−1)s(a∗,aj)s(b∗,bj)‾ 1{∀ℓ<N, ℓ≠j⇒aℓ=bℓ},SN=∑j=0N−1Pj,DN=f(SN),P_j(a,b)=2^{-(N-1)}s(a_*,a_j)\overline{s(b_*,b_j)} \,\mathbf1_{\{\forall \ell<N,\ \ell\ne j\Rightarrow a_\ell=b_\ell\}}, \qquad S_N=\sum_{j=0}^{N-1}P_j, \qquad D_N=f(S_N),Pj​(a,b)=2−(N−1)s(a∗​,aj​)s(b∗​,bj​)​1{∀ℓ<N, ℓ=j⇒aℓ​=bℓ​}​,SN​=j=0∑N−1​Pj​,DN​=f(SN​),

where the indicator takes values 0,10,10,1, and f(SN)f(S_N)f(SN​) is the real functional calculus for f(t)=1/tf(t)=1/\sqrt tf(t)=1/t​ when t>0t>0t>0 and f(t)=0f(t)=0f(t)=0 when t≤0t\le0t≤0. This defines

Ei=DNPiDN.E_i=D_NP_iD_N.Ei​=DN​Pi​DN​.

The index iii requires N≥1N\ge1N≥1; there is no such indexed value for N=0N=0N=0.

QAlgorithms.Papers.Independent.Intake100.P69.recyclingFidelity

For every natural number NNN, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. Define

Pi(a,c)=2−(N−1)s(a∗,ai)s(c∗,ci)‾ 1{∀j<N, j≠i⇒aj=cj},SN=∑i<NPi,DN=f(SN),Ei=DNPiDN,ΨN(a,b)=s(a∗,b∗)∏j<Ns(aj,bj),Bi=(g(Ei)⊗IAN)ΨN,Ωi(a,b)=s(a∗,ai)s(b∗,bi)∏j<Nj≠is(aj,bj).\begin{aligned} P_i(a,c)&=2^{-(N-1)}s(a_*,a_i)\overline{s(c_*,c_i)} \,\mathbf1_{\{\forall j<N,\ j\ne i\Rightarrow a_j=c_j\}},\\ S_N&=\sum_{i<N}P_i,\qquad D_N=f(S_N),\qquad E_i=D_NP_iD_N,\\ \Psi_N(a,b)&=s(a_*,b_*)\prod_{j<N}s(a_j,b_j),\\ B_i&=(g(E_i)\otimes I_{A_N})\Psi_N,\\ \Omega_i(a,b)&=s(a_*,a_i)s(b_*,b_i) \prod_{\substack{j<N\\j\ne i}}s(a_j,b_j). \end{aligned}Pi​(a,c)SN​ΨN​(a,b)Bi​Ωi​(a,b)​=2−(N−1)s(a∗​,ai​)s(c∗​,ci​)​1{∀j<N, j=i⇒aj​=cj​}​,=i<N∑​Pi​,DN​=f(SN​),Ei​=DN​Pi​DN​,=s(a∗​,b∗​)j<N∏​s(aj​,bj​),=(g(Ei​)⊗IAN​​)ΨN​,=s(a∗​,ai​)s(b∗​,bi​)j<Nj=i​∏​s(aj​,bj​).​

Here the indicator is 000 or 111, f(t)=1/tf(t)=1/\sqrt tf(t)=1/t​ for t>0t>0t>0 and 000 otherwise, and g(t)=tg(t)=\sqrt tg(t)=t​, equal to 000 for negative ttt; the matrix functions use real functional calculus. This defines the real number

FN=∑i<N∥Bi∥2∣∑a,b∈ANΩi(a,b)‾Bi(a,b)∣.F_N=\sum_{i<N}\|B_i\|_2 \left|\sum_{a,b\in A_N}\overline{\Omega_i(a,b)}B_i(a,b)\right|.FN​=i<N∑​∥Bi​∥2​​a,b∈AN​∑​Ωi​(a,b)​Bi​(a,b)​.

Thus each summand uses the Euclidean norm of BiB_iBi​ multiplied by the modulus of its inner product with Ωi\Omega_iΩi​. For N=0N=0N=0, the sum is empty and F0=0F_0=0F0​=0.

QAlgorithms.Papers.Independent.Intake100.P69.recyclingIdeal

For every natural number NNN and index i<Ni<Ni<N, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. This defines the vector Ωi\Omega_iΩi​ in the complex Euclidean space indexed by AN×ANA_N\times A_NAN​×AN​ by

Ωi(a,b)=s(a∗,ai)s(b∗,bi)∏j<Nj≠is(aj,bj).\Omega_i(a,b)=s(a_*,a_i)s(b_*,b_i) \prod_{\substack{j<N\\j\ne i}}s(a_j,b_j).Ωi​(a,b)=s(a∗​,ai​)s(b∗​,bi​)j<Nj=i​∏​s(aj​,bj​).

The index requires N≥1N\ge1N≥1. For N=1N=1N=1, the product over j≠ij\ne ij=i is empty and equals 111.

QAlgorithms.Papers.Independent.Intake100.P69.recyclingInput

For every natural number NNN, let ANA_NAN​ consist of pairs a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​) of one Boolean and an NNN-bit string. Identifying false with 000 and true with 111, put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, regarded as a complex number. This defines the vector ΨN\Psi_NΨN​ in the complex Euclidean space indexed by AN×ANA_N\times A_NAN​×AN​ by

ΨN(a,b)=s(a∗,b∗)∏j=0N−1s(aj,bj).\Psi_N(a,b)=s(a_*,b_*)\prod_{j=0}^{N-1}s(a_j,b_j).ΨN​(a,b)=s(a∗​,b∗​)j=0∏N−1​s(aj​,bj​).

For N=0N=0N=0, the product is 111, leaving Ψ0(a,b)=s(a∗,b∗)\Psi_0(a,b)=s(a_*,b_*)Ψ0​(a,b)=s(a∗​,b∗​).

QAlgorithms.Papers.Independent.Intake100.P69.selectedTarget

For any natural numbers N,kN,kN,k and any injection f:{0,…,k−1}↪{0,…,N−1}f:\{0,\ldots,k-1\}\hookrightarrow\{0,\ldots,N-1\}f:{0,…,k−1}↪{0,…,N−1}, let J=Bk×BNJ=\mathcal B_k\times\mathcal B_NJ=Bk​×BN​, where Br\mathcal B_rBr​ denotes the Boolean strings of length rrr. Write s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0, s(0,1)=1/2s(0,1)=1/\sqrt2s(0,1)=1/2​, and s(1,0)=−1/2s(1,0)=-1/\sqrt2s(1,0)=−1/2​, with false identified with 000. The definition gives the complex matrix TfT_fTf​, with rows and columns indexed by JJJ, whose entries for a=(u,v)a=(u,v)a=(u,v) and b=(u~,v~)b=(\tilde u,\tilde v)b=(u~,v~) are

Tf(a,b)=(∏ℓ=0k−1s(uℓ,vf(ℓ)) s(u~ℓ,v~f(ℓ))‾){1,vj=v~j for every j∉range⁡(f),0,otherwise.T_f(a,b)= \left(\prod_{\ell=0}^{k-1} s(u_\ell,v_{f(\ell)}) \,\overline{s(\tilde u_\ell,\tilde v_{f(\ell)})}\right) \begin{cases} 1,&v_j=\tilde v_j\text{ for every }j\notin\operatorname{range}(f),\\ 0,&\text{otherwise}. \end{cases}Tf​(a,b)=(ℓ=0∏k−1​s(uℓ​,vf(ℓ)​)s(u~ℓ​,v~f(ℓ)​)​){1,0,​vj​=v~j​ for every j∈/range(f),otherwise.​

When k=0k=0k=0, the product is 111 and this matrix is the identity on BN\mathcal B_NBN​. When k>Nk>Nk>N, there is no injection fff to supply as an argument.

QAlgorithms.Papers.Independent.Intake100.P69.signalSum

For every natural number NNN, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. This defines the complex matrix SNS_NSN​, indexed by ANA_NAN​, whose entries are

SN(a,b)=∑i=0N−12−(N−1)s(a∗,ai) s(b∗,bi)‾ 1{∀j<N, j≠i⇒aj=bj},S_N(a,b)=\sum_{i=0}^{N-1} 2^{-(N-1)}s(a_*,a_i)\,\overline{s(b_*,b_i)} \,\mathbf1_{\{\forall j<N,\ j\ne i\Rightarrow a_j=b_j\}},SN​(a,b)=i=0∑N−1​2−(N−1)s(a∗​,ai​)s(b∗​,bi​)​1{∀j<N, j=i⇒aj​=bj​}​,

where the indicator is 111 when its condition holds and 000 otherwise. Here N−1N-1N−1 uses natural-number subtraction, so it is 000 when N=0N=0N=0; in that case the sum is empty and S0S_0S0​ is the zero matrix.

QAlgorithms.Papers.Independent.Intake100.P69.simultaneousBranch

For any natural numbers N,kN,kN,k, any family M=(Mf)fM=(M_f)_fM=(Mf​)f​ of complex matrices on J=Bk×BNJ=\mathcal B_k\times\mathcal B_NJ=Bk​×BN​ indexed by injections f:{0,…,k−1}↪{0,…,N−1}f:\{0,\ldots,k-1\}\hookrightarrow\{0,\ldots,N-1\}f:{0,…,k−1}↪{0,…,N−1}, and any such injection fff, the definition gives the vector

Bf=(cfc⁡(⋅,Mf)⊗IJ)ΩN,kin CJ×J.B_f=\bigl(\operatorname{cfc}(\sqrt{\cdot},M_f)\otimes I_J\bigr)\Omega_{N,k} \quad\text{in }\mathbb C^{J\times J}.Bf​=(cfc(⋅​,Mf​)⊗IJ​)ΩN,k​in CJ×J.

Here Br\mathcal B_rBr​ is the set of Boolean strings of length rrr, IJI_JIJ​ is the identity matrix, and cfc⁡(⋅,Mf)\operatorname{cfc}(\sqrt{\cdot},M_f)cfc(⋅​,Mf​) is the real continuous functional calculus applied to the real square-root function and MfM_fMf​. In coordinates, the input is

ΩN,k((u,v),(u′,v′))=∏ℓ=0k−1s(uℓ,uℓ′)∏j=0N−1s(vj,vj′),\Omega_{N,k}\bigl((u,v),(u',v')\bigr) = \prod_{\ell=0}^{k-1}s(u_\ell,u'_\ell) \prod_{j=0}^{N-1}s(v_j,v'_j),ΩN,k​((u,v),(u′,v′))=ℓ=0∏k−1​s(uℓ​,uℓ′​)j=0∏N−1​s(vj​,vj′​),

where s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0, s(0,1)=1/2s(0,1)=1/\sqrt2s(0,1)=1/2​, and s(1,0)=−1/2s(1,0)=-1/\sqrt2s(1,0)=−1/2​, with false represented by 000. Matrix action means ordinary matrix-vector multiplication. No positivity or normalization hypothesis on MMM is required, and the resulting vector is not divided by its norm. Empty products equal 111; when k>Nk>Nk>N, no injection fff exists.

QAlgorithms.Papers.Independent.Intake100.P69.simultaneousFidelity

For any natural numbers N,kN,kN,k and any family M=(Mf)fM=(M_f)_fM=(Mf​)f​ of arbitrary complex matrices on J=Bk×BNJ=\mathcal B_k\times\mathcal B_NJ=Bk​×BN​, indexed by injections f:{0,…,k−1}↪{0,…,N−1}f:\{0,\ldots,k-1\}\hookrightarrow\{0,\ldots,N-1\}f:{0,…,k−1}↪{0,…,N−1}, the definition gives the real number

F(M)=∑fRe⁡⟨Bf,(IJ⊗Tf)Bf⟩,Bf=(cfc⁡(⋅,Mf)⊗IJ)ΩN,k.F(M)=\sum_f\operatorname{Re}\left\langle B_f,(I_J\otimes T_f)B_f \right\rangle, \qquad B_f=\bigl(\operatorname{cfc}(\sqrt{\cdot},M_f)\otimes I_J\bigr)\Omega_{N,k}.F(M)=f∑​Re⟨Bf​,(IJ​⊗Tf​)Bf​⟩,Bf​=(cfc(⋅​,Mf​)⊗IJ​)ΩN,k​.

Here Br\mathcal B_rBr​ denotes Boolean strings of length rrr, the inner product is the complex Euclidean inner product, conjugate-linear in its first argument, and cfc⁡\operatorname{cfc}cfc denotes real continuous functional calculus. Define s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0, s(0,1)=1/2s(0,1)=1/\sqrt2s(0,1)=1/2​, and s(1,0)=−1/2s(1,0)=-1/\sqrt2s(1,0)=−1/2​, identifying false with 000. The input coordinates are ΩN,k((u,v),(u′,v′))=∏ℓs(uℓ,uℓ′)∏js(vj,vj′)\Omega_{N,k}((u,v),(u',v'))=\prod_\ell s(u_\ell,u'_\ell)\prod_j s(v_j,v'_j)ΩN,k​((u,v),(u′,v′))=∏ℓ​s(uℓ​,uℓ′​)∏j​s(vj​,vj′​), and

Tf((u,v),(u~,v~))=(∏ℓs(uℓ,vf(ℓ))s(u~ℓ,v~f(ℓ))‾)1{vj=v~j for every j∉range⁡(f)}.T_f\bigl((u,v),(\tilde u,\tilde v)\bigr)= \left(\prod_\ell s(u_\ell,v_{f(\ell)}) \overline{s(\tilde u_\ell,\tilde v_{f(\ell)})}\right) \mathbf1_{\{v_j=\tilde v_j\text{ for every }j\notin\operatorname{range}(f)\}}.Tf​((u,v),(u~,v~))=(ℓ∏​s(uℓ​,vf(ℓ)​)s(u~ℓ​,v~f(ℓ)​)​)1{vj​=v~j​ for every j∈/range(f)}​.

All products run over their respective kkk or NNN indices, empty products equal 111, and matrix action is matrix-vector multiplication. There is no assumption that MMM is a POVM. If k>Nk>Nk>N, the sum is empty and F(M)=0F(M)=0F(M)=0; if k=0k=0k=0, the sum has one term.

QAlgorithms.Papers.Independent.Intake100.P69.simultaneousInput

For any natural numbers N,kN,kN,k, let Br\mathcal B_rBr​ denote the Boolean strings of length rrr, and put J=Bk×BNJ=\mathcal B_k\times\mathcal B_NJ=Bk​×BN​. Identify false with 000 and true with 111, and define the complex-valued function sss by s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0s(0,0)=s(1,1)=0, s(0,1)=1/2s(0,1)=1/\sqrt2s(0,1)=1/2​, and s(1,0)=−1/2s(1,0)=-1/\sqrt2s(1,0)=−1/2​. The definition gives the vector ΩN,k\Omega_{N,k}ΩN,k​ in the complex Euclidean space indexed by J×JJ\times JJ×J whose coordinates are

ΩN,k((u,v),(u′,v′))=(∏ℓ=0k−1s(uℓ,uℓ′))(∏j=0N−1s(vj,vj′)).\Omega_{N,k}\bigl((u,v),(u',v')\bigr) = \left(\prod_{\ell=0}^{k-1}s(u_\ell,u'_\ell)\right) \left(\prod_{j=0}^{N-1}s(v_j,v'_j)\right).ΩN,k​((u,v),(u′,v′))=(ℓ=0∏k−1​s(uℓ​,uℓ′​))(j=0∏N−1​s(vj​,vj′​)).

Here u,u′∈Bku,u'\in\mathcal B_ku,u′∈Bk​ and v,v′∈BNv,v'\in\mathcal B_Nv,v′∈BN​. Empty products equal 111; in particular, when N=k=0N=k=0N=k=0, the vector has one coordinate, equal to 111.

QAlgorithms.Papers.Independent.Intake100.P69.singlePortFidelity

For every natural number NNN, let ANA_NAN​ consist of Boolean tuples a=(a∗,(aj)j<N)a=(a_*,(a_j)_{j<N})a=(a∗​,(aj​)j<N​), and put s(u,v)=(v−u)/2s(u,v)=(v-u)/\sqrt2s(u,v)=(v−u)/2​, identifying false with 000 and true with 111. Define

Pi(a,b)=2−(N−1)s(a∗,ai)s(b∗,bi)‾ 1{∀j<N, j≠i⇒aj=bj},SN=∑i<NPi,DN=f(SN),Ei=DNPiDN,E~i=Ei+(N:C)−1(IAN−∑j<NEj),\begin{aligned} P_i(a,b)&=2^{-(N-1)}s(a_*,a_i)\overline{s(b_*,b_i)} \,\mathbf1_{\{\forall j<N,\ j\ne i\Rightarrow a_j=b_j\}},\\ S_N&=\sum_{i<N}P_i,\qquad D_N=f(S_N),\qquad E_i=D_NP_iD_N,\\ \widetilde E_i&=E_i+(N:\mathbb C)^{-1} \left(I_{A_N}-\sum_{j<N}E_j\right), \end{aligned}Pi​(a,b)SN​Ei​​=2−(N−1)s(a∗​,ai​)s(b∗​,bi​)​1{∀j<N, j=i⇒aj​=bj​}​,=i<N∑​Pi​,DN​=f(SN​),Ei​=DN​Pi​DN​,=Ei​+(N:C)−1​IAN​​−j<N∑​Ej​​,​

where the indicator is 000 or 111, and f(SN)f(S_N)f(SN​) uses real functional calculus with f(t)=1/tf(t)=1/\sqrt tf(t)=1/t​ for t>0t>0t>0 and f(t)=0f(t)=0f(t)=0 otherwise. This defines the real number

14∑i=0N−1Re⁡tr⁡(E~iPi).\frac14\sum_{i=0}^{N-1}\operatorname{Re}\operatorname{tr}(\widetilde E_iP_i).41​i=0∑N−1​Retr(Ei​Pi​).

For N=0N=0N=0, the sum is empty and the defined value is 000; the total complex reciprocal used in the formula also assigns 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Intake100.P69.singletAmplitude

For any Booleans a,ba,ba,b, this defines the complex number

s(a,b)={0,a=b,−1/2,a=true, b=false,1/2,a=false, b=true.s(a,b)= \begin{cases} 0,&a=b,\\ -1/\sqrt2,&a=\mathrm{true},\ b=\mathrm{false},\\ 1/\sqrt2,&a=\mathrm{false},\ b=\mathrm{true}. \end{cases}s(a,b)=⎩⎨⎧​0,−1/2​,1/2​,​a=b,a=true, b=false,a=false, b=true.​

QAlgorithms.Papers.Independent.Intake100.P69.supportInvSqrt

For any finite index type ι\iotaι equipped with decidable equality and any complex matrix AAA indexed by ι×ι\iota\times\iotaι×ι, this defines f(A)f(A)f(A) using the real continuous functional calculus, where

f(t)=(t)−1={1/t,t>0,0,t≤0.f(t)=(\sqrt t)^{-1}= \begin{cases} 1/\sqrt t,&t>0,\\ 0,&t\le0. \end{cases}f(t)=(t​)−1={1/t​,0,​t>0,t≤0.​

The square root and reciprocal are total real operations, so both the square root of a negative number and the reciprocal of zero are zero. For Hermitian AAA, the definition applies fff to its eigenvalues; for non-Hermitian AAA, this total functional-calculus operation returns the zero matrix. No Hermitian, positivity, or invertibility hypothesis is imposed, and ι\iotaι may be empty.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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