Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Concentrating Partial Entanglement by Local Operations

Definition
QAlgorithms_Papers_Independent_Support50_P42

by Goku · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Concentrating Partial Entanglement by Local Operations (arXiv:quant-ph/9511030) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Shared: PDF pp.3--4: reuse normalized shared states with two positive local dimensions.
  • LocalTree: PDF pp.4--6: reuse finite adaptive selective LOCC, including local disposal.
  • IsPureShared: PDF pp.3--4: normalized pure state; Shared also represents mixed states.
  • ent: PDF p.4, Eq.(4): entropy of Bob's reduced density.
  • RepresentsShared: PDF pp.3--4: exact state identification via zero-extension outside its basis.
  • ExactYield: PDF pp.4--8: integer exact-singlet counts at actual selective LOCC leaves. No normalization is imposed at zero-probability leaves. Disposal is local.
  • downCount: PDF pp.5--6: down-spin count in the common fixed Schmidt basis.
  • schmidtBlock: PDF p.5, Eq.(5): n identical pairs, with p=sin squared theta.
  • schmidtTypeProjector: PDF pp.5--6: local type projector, independent of the bias.
  • schmidtOutcomeWeight: PDF p.6, Eq.(6): binomial Born probability, including the two endpoints.
  • typeState: PDF pp.6--8: uniform correlated type ket, used as a state only for k<=n.
  • projectedYield: PDF p.8, Eq.(8): entropy yield before standardization, not an integer count.
  • outcomeEntropy: PDF pp.6,8: finite Shannon entropy; zero-weight terms are zero.
  • aliceKetBranch: PDF p.6: refined local Kraus branch, with any local environment retained.
  • uniformKet: PDF p.7: maximally entangled ket of positive local rank d. At d=0 this is zero and is never called a normalized state.
  • trim: PDF p.7: success map onto the first 2^ell local coordinates.
  • trimFailure: PDF p.7: complementary failure projector, without branch normalization.
  • circlePosition: PDF p.8, Eq.(9): circular position after m steps, starting at zero.
  • diagonalKet: PDF p.9: Schmidt-diagonal pure ket.
  • leastAmplitude: PDF p.9: least amplitude. Theorems require a nonempty finite list.
  • procrusteanSuccess: PDF p.9: retained amplitude ratio; zero amplitudes give zero success.
  • filterFailure: PDF p.9: complementary failure Kraus operator.
  • procrusteanYield: PDF pp.9,20: expected one-pair Procrustean singlet yield.
  • sourceKet: PDF pp.11,14: Q-prime source ket with uniform binary labels.
  • flaggedEncoder: PDF pp.13--14: flagged encoder, retaining no coherence between classical k values.
  • bareEncoder: PDF p.13: bare transmission, forgetting k without further decoding.
  • codingFidelity: PDF pp.12--14: source-average fidelity for a fixed label-independent decoder.
  • OneWayBits: PDF pp.15--17: one-way local protocol with at most bits cbits. Alice's complete instrument has private Kraus index z; only i is communicated. Bob's CPTP continuation depends on i. No free numerical cost field is used.
  • ConversionRate: PDF pp.15--16: eventual state-conversion rates with global vanishing error. Both tolerances precede n. Half trace distance has the same zero-error limit as squared pure-target fidelity; no single-copy convex roof is involved.
  • FormationRate: PDF p.17: eventual operational formation rates; not existential-block rates.
  • SingletDistillationRate: PDF p.17: eventual operational singlet yield with whole-target error.
  • formationCost: PDF p.17: least operational cost. Nonempty bounded-below feasibility is concluded below.
  • singletDistillable: PDF p.17: greatest operational yield. Zero feasibility and boundedness are concluded below.
  • classicalPair: PDF pp.16--17: one classically correlated shared pair.
  • twoPairs: PDF p.16: two shared pairs, regrouped as Alice's two spins versus Bob's.
  • discardSecond: PDF p.16: discard the second spin locally at both sites.
  • purificationScores: PDF p.17: purification entropies with variable positive finite C,D and AC:BD partition.
  • purificationMinimum: PDF p.17: the rejected minimum prescription; feasibility is concluded below.
  • wernerState: PDF p.17, Eq.(11): the fixed Werner density.
  • wernerBranch: PDF p.17: product state conditional on n independent fair preparation choices.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P42
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P48
import Definitions.Def_QAlgorithms_Papers_Independent_Gap48_P32
import Definitions.Def_QAlgorithms_Papers_Independent_Next46_P39

/-! Bennett--Bernstein--Popescu--Schumacher, arXiv:quant-ph/9511030v1.
PDF pages are cited below. Entropies are in bits. Compilation and independent
moderation are pending. Deferred full nodes are recorded in HARD.md. -/

noncomputable section

namespace QAlgorithms.Papers.Independent.Support50.P42

open scoped BigOperators Matrix ComplexConjugate
open MeasureTheory ProbabilityTheory

attribute [local instance] Classical.propDecidable Classical.decEq

-- Reuse the exact accepted objects, without introducing same-name aliases.
open Information100.P21 (Op Vec FiniteLOCC)
open Dependency50.P42 (dimensionedPower singlets)
open Dependency50.P48 (pureFidelity)
open Gap48.P32 (pairOfState)
open Next46.P39 (rectAct)

/-- PDF pp.3--4: reuse normalized shared states with two positive local dimensions. -/
abbrev Shared := Claimed50.P33.FiniteState 2

/-- PDF pp.4--6: reuse finite adaptive selective LOCC, including local disposal. -/
abbrev LocalTree := @Claimed50.P33.LOCC 2

/-- PDF pp.3--4: normalized pure state; Shared also represents mixed states. -/
def IsPureShared (s : Shared) : Prop :=
  Information100.P08.IsPure (pairOfState s)

/-- PDF p.4, Eq.(4): entropy of Bob's reduced density. -/
def ent (s : Shared) : ℝ := vnEntropy (traceLeft (pairOfState s))

/-- PDF pp.3--4: exact state identification via zero-extension outside its basis. -/
def RepresentsShared {a b : ℕ} (rho : Op (Fin a × Fin b)) (s : Shared) : Prop :=
  s.dims 0=a ∧ s.dims 1=b ∧ ∀ x y : Fin 2 → ℕ,
    Claimed50.P33.stateEntry s x y =
      if h : x 0<a ∧ x 1<b ∧ y 0<a ∧ y 1<b then
        rho (⟨x 0,h.1⟩,⟨x 1,h.2.1⟩) (⟨y 0,h.2.2.1⟩,⟨y 1,h.2.2.2⟩) else 0

/-- PDF pp.4--8: integer exact-singlet counts at actual selective LOCC leaves.
No normalization is imposed at zero-probability leaves. Disposal is local. -/
def ExactYield (s : Shared) (n : ℕ) (y : ℝ) : Prop :=
  ∃ input : Shared, RepresentsShared (dimensionedPower (pairOfState s) n) input ∧
    ∃ out : List (ℝ × Shared), LocalTree input out ∧ ∃ count : Shared → ℕ,
      (∀ w ∈ out, 0<w.1 → RepresentsShared (singlets (count w.2)) w.2) ∧
      y=(out.map fun w => w.1*(count w.2 : ℝ)).sum

/-- PDF pp.5--6: down-spin count in the common fixed Schmidt basis. -/
def downCount {n : ℕ} (x : Fin n → Bool) : ℕ := (Finset.univ.filter fun i => x i).card

/-- PDF p.5, Eq.(5): n identical pairs, with p=sin squared theta. -/
def schmidtBlock (n : ℕ) (p : ℝ) : Vec ((Fin n → Bool) × (Fin n → Bool)) :=
  WithLp.toLp 2 fun z => if z.1=z.2 then
    ∏ i, ((if z.1 i then Real.sqrt p else Real.sqrt (1-p)) : ℂ) else 0

/-- PDF pp.5--6: local type projector, independent of the bias. -/
def schmidtTypeProjector (n k : ℕ) : Op (Fin n → Bool) :=
  Matrix.diagonal fun x => if downCount x=k then 1 else 0

/-- PDF p.6, Eq.(6): binomial Born probability, including the two endpoints. -/
def schmidtOutcomeWeight (n : ℕ) (p : ℝ) (k : ℕ) : ℝ :=
  (n.choose k : ℝ)*(1-p)^(n-k)*p^k

/-- PDF pp.6--8: uniform correlated type ket, used as a state only for k<=n. -/
def typeState (n k : ℕ) : Vec ((Fin n → Bool) × (Fin n → Bool)) :=
  WithLp.toLp 2 fun z => if z.1=z.2 ∧ downCount z.1=k then
    ((Real.sqrt (n.choose k : ℝ))⁻¹ : ℂ) else 0

/-- PDF p.8, Eq.(8): entropy yield before standardization, not an integer count. -/
def projectedYield (n : ℕ) (p : ℝ) : ℝ :=
  ∑ k ∈ Finset.range (n+1), schmidtOutcomeWeight n p k*Real.logb 2 (n.choose k : ℝ)

/-- PDF pp.6,8: finite Shannon entropy; zero-weight terms are zero. -/
def outcomeEntropy {J : Type*} [Fintype J] (p : J → ℝ) : ℝ :=
  -∑ j, p j*Real.logb 2 (p j)

example {I J : Type*} [Fintype I] (A : Matrix J I ℂ) (v : Vec I) (j : J) :
    rectAct A v j=∑ i, A j i*v i := rfl

/-- PDF p.6: refined local Kraus branch, with any local environment retained. -/
def aliceKetBranch {a b c : ℕ} (A : Matrix (Fin c) (Fin a) ℂ)
    (psi : Vec (Fin a × Fin b)) : Vec (Fin c × Fin b) :=
  rectAct (Matrix.kronecker A (1 : Op (Fin b))) psi

/-- PDF p.7: maximally entangled ket of positive local rank d.
At d=0 this is zero and is never called a normalized state. -/
def uniformKet (d : ℕ) : Vec (Fin d × Fin d) :=
  WithLp.toLp 2 fun x => if x.1=x.2 then ((Real.sqrt (d : ℝ))⁻¹ : ℂ) else 0

/-- PDF p.7: success map onto the first 2^ell local coordinates. -/
def trim (D ell : ℕ) : Matrix (Fin (2^ell)) (Fin D) ℂ :=
  fun i j => if i.val=j.val then 1 else 0

/-- PDF p.7: complementary failure projector, without branch normalization. -/
def trimFailure (D ell : ℕ) : Op (Fin D) :=
  Matrix.diagonal fun j => if j.val<2^ell then 0 else 1

/-- PDF p.8, Eq.(9): circular position after m steps, starting at zero. -/
def circlePosition {Omega : Type*} (X : ℕ → Omega → ℝ) (m : ℕ) (w : Omega) : ℝ :=
  Int.fract (∑ i ∈ Finset.range m, X i w)

/-- PDF p.9: Schmidt-diagonal pure ket. -/
def diagonalKet {d : ℕ} (c : Fin d → ℝ) : Vec (Fin d × Fin d) :=
  WithLp.toLp 2 fun z => if z.1=z.2 then (c z.1 : ℂ) else 0

/-- PDF p.9: least amplitude. Theorems require a nonempty finite list. -/
def leastAmplitude {d : ℕ} (c : Fin d → ℝ) : ℝ := sInf (Set.range c)

/-- PDF p.9: retained amplitude ratio; zero amplitudes give zero success. -/
def procrusteanSuccess {d : ℕ} (c : Fin d → ℝ) : Op (Fin d) :=
  Matrix.diagonal fun i => ((leastAmplitude c/c i : ℝ) : ℂ)

/-- PDF p.9: complementary failure Kraus operator. -/
def filterFailure {d : ℕ} (c : Fin d → ℝ) : Op (Fin d) :=
  Matrix.diagonal fun i => ((Real.sqrt (1-(leastAmplitude c/c i)^2) : ℝ) : ℂ)

/-- PDF pp.9,20: expected one-pair Procrustean singlet yield. -/
def procrusteanYield (p : ℝ) : ℝ := 2*min p (1-p)

/-- PDF pp.11,14: Q-prime source ket with uniform binary labels. -/
def sourceKet {n : ℕ} (p : ℝ) (x : Fin n → Bool) : Vec (Fin n → Bool) :=
  WithLp.toLp 2 fun z => ∏ i,
    if z i then (if x i then -(Real.sqrt p : ℂ) else (Real.sqrt p : ℂ))
    else (Real.sqrt (1-p) : ℂ)

/-- PDF pp.13--14: flagged encoder, retaining no coherence between classical k values. -/
def flaggedEncoder (n : ℕ) : Superop (Fin n → Bool) (Fin (n+1) × (Fin n → Bool)) :=
  fun rho u v => if u.1=v.1 then
    (schmidtTypeProjector n u.1.val*rho*schmidtTypeProjector n u.1.val) u.2 v.2 else 0

/-- PDF p.13: bare transmission, forgetting k without further decoding. -/
def bareEncoder (n : ℕ) : Superop (Fin n → Bool) (Fin n → Bool) :=
  fun rho => ∑ k : Fin (n+1), schmidtTypeProjector n k.val*rho*schmidtTypeProjector n k.val

/-- PDF pp.12--14: source-average fidelity for a fixed label-independent decoder. -/
def codingFidelity (n : ℕ) (p : ℝ)
    (D : Superop (Fin (n+1) × (Fin n → Bool)) (Fin n → Bool)) : ℝ :=
  ((2 : ℝ)^n)⁻¹*∑ x : Fin n → Bool,
    pureFidelity (sourceKet p x) (D (flaggedEncoder n (pureDensity (sourceKet p x))))

/-- PDF pp.15--17: one-way local protocol with at most bits cbits. Alice's
complete instrument has private Kraus index z; only i is communicated.
Bob's CPTP continuation depends on i. No free numerical cost field is used. -/
def OneWayBits {a b c d : ℕ} (bits : ℕ)
    (L : Superop (Fin a × Fin b) (Fin c × Fin d)) : Prop :=
  ∃ k r : ℕ, k≤2^bits ∧ ∃ A : Fin k → Fin r → Matrix (Fin c) (Fin a) ℂ,
    (∑ i, ∑ z, (A i z)ᴴ*A i z)=1 ∧
    ∃ B : Fin k → Superop (Fin b) (Fin d), (∀ i, IsChannel (B i)) ∧ ∀ rho,
      L rho=∑ i, idTensorSuperop (B i)
        (∑ z, conjSuperop (Matrix.kronecker (A i z) (1 : Op (Fin b))) rho)

/-- PDF pp.15--16: eventual state-conversion rates with global vanishing error.
Both tolerances precede n. Half trace distance has the same zero-error limit
as squared pure-target fidelity; no single-copy convex roof is involved. -/
def ConversionRate (s t : Shared) (R : ℝ) : Prop :=
  0≤R ∧ ∀ epsilon>(0 : ℝ), ∀ delta>(0 : ℝ), ∃ N : ℕ,
    ∀ n : ℕ, N<n → ∃ m : ℕ, (R-delta)*(n : ℝ) ≤ (m : ℝ) ∧
      ∃ L : Superop (Fin ((s.dims 0)^n) × Fin ((s.dims 1)^n))
        (Fin ((t.dims 0)^m) × Fin ((t.dims 1)^m)),
        FiniteLOCC L ∧ traceDistance (L (dimensionedPower (pairOfState s) n))
          (dimensionedPower (pairOfState t) m)≤epsilon

/-- PDF p.17: eventual operational formation rates; not existential-block rates. -/
def FormationRate (s : Shared) (R : ℝ) : Prop :=
  0≤R ∧ Dependency50.P42.EventuallyAchievableRate
    Dependency50.P42.halfTraceDistance (pairOfState s) R

/-- PDF p.17: eventual operational singlet yield with whole-target error. -/
def SingletDistillationRate (s : Shared) (R : ℝ) : Prop :=
  0≤R ∧ ∀ epsilon>(0 : ℝ), ∀ delta>(0 : ℝ), ∃ N : ℕ,
    ∀ n : ℕ, N<n → ∃ m : ℕ, (R-delta)*(n : ℝ) ≤ (m : ℝ) ∧
      ∃ L : Superop (Fin ((s.dims 0)^n) × Fin ((s.dims 1)^n))
        (Fin (2^m) × Fin (2^m)),
        FiniteLOCC L ∧ traceDistance (L (dimensionedPower (pairOfState s) n)) (singlets m)≤epsilon

/-- PDF p.17: least operational cost. Nonempty bounded-below feasibility is concluded below. -/
def formationCost (s : Shared) : ℝ := sInf {R | FormationRate s R}

/-- PDF p.17: greatest operational yield. Zero feasibility and boundedness are concluded below. -/
def singletDistillable (s : Shared) : ℝ := sSup {R | SingletDistillationRate s R}

/-- PDF pp.16--17: one classically correlated shared pair. -/
def classicalPair : Op (Fin 2 × Fin 2) :=
  (1/2 : ℂ) • (pureDensity (ket (0,0))+pureDensity (ket (1,1)))

/-- PDF p.16: two shared pairs, regrouped as Alice's two spins versus Bob's. -/
def twoPairs (rho sigma : Op (Fin 2 × Fin 2)) :
    Op ((Fin 2 × Fin 2) × (Fin 2 × Fin 2)) :=
  fun x y => rho (x.1.1,x.2.1) (y.1.1,y.2.1)*sigma (x.1.2,x.2.2) (y.1.2,y.2.2)

/-- PDF p.16: discard the second spin locally at both sites. -/
def discardSecond : Superop ((Fin 2 × Fin 2) × (Fin 2 × Fin 2)) (Fin 2 × Fin 2) :=
  fun rho x y => ∑ a : Fin 2, ∑ b : Fin 2, rho ((x.1,a),(x.2,b)) ((y.1,a),(y.2,b))

/-- PDF p.17: purification entropies with variable positive finite C,D and AC:BD partition. -/
def purificationScores (rho : Op (Fin 2 × Fin 2)) : Set ℝ :=
  {e | ∃ c d : ℕ, 0<c ∧ 0<d ∧
    ∃ v : Vec ((Fin 2 × Fin c) × (Fin 2 × Fin d)), ‖v‖=1 ∧
      (∀ x y : Fin 2 × Fin 2, rho x y=∑ u : Fin c, ∑ w : Fin d,
        pureDensity v ((x.1,u),(x.2,w)) ((y.1,u),(y.2,w))) ∧
      e=vnEntropy (traceLeft (pureDensity v))}

/-- PDF p.17: the rejected minimum prescription; feasibility is concluded below. -/
def purificationMinimum (rho : Op (Fin 2 × Fin 2)) : ℝ := sInf (purificationScores rho)

/-- PDF p.17, Eq.(11): the fixed Werner density. -/
def wernerState : Op (Fin 2 × Fin 2) :=
  (1/8 : ℂ) • 1+(1/2 : ℂ) • Dependency50.P42.singletState

/-- PDF p.17: product state conditional on n independent fair preparation choices. -/
def wernerBranch (n : ℕ) (z : Fin n → Bool) : Op (Fin (2^n) × Fin (2^n)) :=
  fun x y => ∏ i,
    (if z i then Dependency50.P42.singletState else (1/4 : ℂ) • (1 : Op (Fin 2 × Fin 2)))
      ((Dependency50.P42.copyIndex 2 n).symm x.1 i,(Dependency50.P42.copyIndex 2 n).symm x.2 i)
      ((Dependency50.P42.copyIndex 2 n).symm y.1 i,(Dependency50.P42.copyIndex 2 n).symm y.2 i)

/-! Sanity examples pin definitions. No result proofs are supplied. -/

example (n : ℕ) (x : Fin n → Bool) : schmidtTypeProjector n (downCount x) x x=1 := by
  simp [schmidtTypeProjector]

example (n : ℕ) : downCount (fun _ : Fin n => false)=0 := by simp [downCount]

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

example {J : Type*} [Fintype J] : outcomeEntropy (fun _ : J => (0 : ℝ))=0 := by
  simp [outcomeEntropy]

example (D ell : ℕ) (i : Fin (2^ell)) (j : Fin D) (h : i.val=j.val) : trim D ell i j=1 := by
  simp [trim,h]

example {Omega : Type*} (X : ℕ → Omega → ℝ) (w : Omega) : circlePosition X 0 w=0 := by
  simp [circlePosition]

example : procrusteanYield 0=0 := by norm_num [procrusteanYield]

example {d : ℕ} (c : Fin d → ℝ) (i : Fin d) : diagonalKet c (i,i)=(c i : ℂ) := by
  simp [diagonalKet]

example (n : ℕ) (rho : Op (Fin n → Bool)) (u v : Fin (n+1) × (Fin n → Bool))
    (h : u.1≠v.1) : flaggedEncoder n rho u v=0 := by simp [flaggedEncoder,h]

example {I : Type*} [Fintype I] (v : Vec I) : pureFidelity v 0=0 := by
  simp [Dependency50.P48.pureFidelity, effectProb]

example : classicalPair (0,0) (1,1)=0 := by simp [classicalPair,pureDensity,ket]

example (rho sigma : Op (Fin 2 × Fin 2)) (x y : (Fin 2 × Fin 2) × (Fin 2 × Fin 2)) :
    twoPairs rho sigma x y=rho (x.1.1,x.2.1) (y.1.1,y.2.1)*sigma (x.1.2,x.2.2) (y.1.2,y.2.2) := rfl

example : wernerState=(1/2 : ℂ) • ((1/4 : ℂ) • (1 : Op (Fin 2 × Fin 2)))+
    (1/2 : ℂ) • Dependency50.P42.singletState := by norm_num [wernerState,smul_smul]

/-- Sanity: no-copy source registers have their unique scalar amplitude one. -/
example (p : ℝ) : sourceKet p (fun i : Fin 0 => Fin.elim0 i) (fun i : Fin 0 => Fin.elim0 i)=1 := by
  simp [sourceKet]

example (p : ℝ) (x : (Fin 0 → Bool) × (Fin 0 → Bool)) : schmidtBlock 0 p x=1 := by
  have h : x.1=x.2 := Subsingleton.elim _ _
  simp [schmidtBlock,h]

example (x : (Fin 0 → Bool) × (Fin 0 → Bool)) : typeState 0 0 x=1 := by
  have h : x.1=x.2 := Subsingleton.elim _ _
  simp [typeState,h,downCount]

example : uniformKet 1 (0,0)=1 := by simp [uniformKet]

example : leastAmplitude (fun _ : Fin 1 => (1 : ℝ))=1 := by
  simp [leastAmplitude]

example (s : Shared) : ent s=vnEntropy (traceLeft (pairOfState s)) := rfl

example (s : Shared) (h : IsPureShared s) :
    ∃ v : Vec (Fin (s.dims 0) × Fin (s.dims 1)), ‖v‖=1 := by
  obtain ⟨v,hv,_⟩ := h
  exact ⟨v,hv⟩

example {a b : ℕ} (rho : Op (Fin a × Fin b)) (s : Shared) (h : RepresentsShared rho s) :
    s.dims 0=a ∧ s.dims 1=b := ⟨h.1,h.2.1⟩

example (s t : Shared) (R : ℝ) (h : ConversionRate s t R) : 0≤R := h.1

example (s : Shared) (R : ℝ) (h : FormationRate s R) : 0≤R := h.1

example (s : Shared) (R : ℝ) (h : SingletDistillationRate s R) : 0≤R := h.1

example (s : Shared) : formationCost s=sInf {R | FormationRate s R} := rfl

example (s : Shared) : singletDistillable s=sSup {R | SingletDistillationRate s R} := rfl

example (rho : Op (Fin 2 × Fin 2)) : purificationMinimum rho=sInf (purificationScores rho) := rfl

example (rho : Op ((Fin 2 × Fin 2) × (Fin 2 × Fin 2))) (x y : Fin 2 × Fin 2) :
    discardSecond rho x y=∑ a : Fin 2, ∑ b : Fin 2, rho ((x.1,a),(x.2,b)) ((y.1,a),(y.2,b)) := rfl

example (rho : Op (Fin 0 → Bool)) (x y : Fin 0 → Bool) : bareEncoder 0 rho x y=rho x y := by
  have h : schmidtTypeProjector 0 0=(1 : Op (Fin 0 → Bool)) := by
    ext a b
    have hab : a=b := Subsingleton.elim _ _
    subst b
    simp [schmidtTypeProjector,downCount]
  simp [bareEncoder,Fin.sum_univ_one,h]

example (z : Fin 0 → Bool) : wernerBranch 0 z=1 := by
  letI : Subsingleton (Fin (2 ^ 0) × Fin (2 ^ 0)) := by
    simp only [pow_zero]
    infer_instance
  ext x y
  have h : x=y := Subsingleton.elim _ _
  subst y
  simp [wernerBranch]

/-- Sanity: every exact-yield witness contains an actual local protocol. -/
example (s : Shared) (n : ℕ) (y : ℝ) (h : ExactYield s n y) :
    ∃ input : Shared, ∃ out : List (ℝ × Shared), LocalTree input out := by
  obtain ⟨input,_,out,hout,_⟩ := h
  exact ⟨input,out,hout⟩

example {d : ℕ} (c : Fin d → ℝ) (i : Fin d) :
    procrusteanSuccess c i i=(leastAmplitude c/c i : ℂ) := by simp [procrusteanSuccess]

example {d : ℕ} (c : Fin d → ℝ) (i : Fin d) :
    filterFailure c i i=(Real.sqrt (1-(leastAmplitude c/c i)^2) : ℂ) := by simp [filterFailure]

/-- Sanity: a one-way budget witnesses a bounded public outcome alphabet. -/
example {a b c d : ℕ} (bits : ℕ) (L : Superop (Fin a × Fin b) (Fin c × Fin d))
    (h : OneWayBits bits L) : ∃ k : ℕ, k≤2^bits := by
  obtain ⟨k,r,hk,_⟩ := h
  exact ⟨k,hk⟩

example (rho : Op (Fin 2 × Fin 2)) (e : ℝ) (h : e∈purificationScores rho) :
    ∃ c d : ℕ, 0<c ∧ 0<d := by
  obtain ⟨c,d,hc,hd,_⟩ := h
  exact ⟨c,d,hc,hd⟩

end QAlgorithms.Papers.Independent.Support50.P42
Source
Concentrating Partial Entanglement by Local Operations, arXiv:quant-ph/9511030v1, https://arxiv.org/abs/quant-ph/9511030v1
Read-back

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

QAlgorithms.Papers.Independent.Support50.P42.ConversionRate

Let s,ts,ts,t each specify two positive integer dimensions and a positive semidefinite, trace-one complex matrix on the corresponding two-register space; write their dimensions as as,bsa_s,b_sas​,bs​ and at,bta_t,b_tat​,bt​, and their matrices as ρs,ρt\rho_s,\rho_tρs​,ρt​. For a real number RRR, this predicate requires R≥0R\ge0R≥0 and says that for every ϵ>0\epsilon>0ϵ>0 and δ>0\delta>0δ>0, there is a natural number NNN such that for every natural number n>Nn>Nn>N, there exist a natural number mmm and a map LLL satisfying

(R−δ)n≤m,12∥L(ρs[n])−ρt[m]∥1≤ϵ.(R-\delta)n\le m,\qquad \frac12\left\|L(\rho_s^{[n]})-\rho_t^{[m]}\right\|_1\le\epsilon.(R−δ)n≤m,21​​L(ρs[n]​)−ρt[m]​​1​≤ϵ.

Here ∥⋅∥1=Re⁡Tr⁡X†X\|\cdot\|_1=\operatorname{Re}\operatorname{Tr}\sqrt{X^\dagger X}∥⋅∥1​=ReTrX†X​, and ρ[j]\rho^{[j]}ρ[j] is the grouped jjj-fold tensor product, indexed by Fin⁡(aj)×Fin⁡(bj)\operatorname{Fin}(a^j)\times\operatorname{Fin}(b^j)Fin(aj)×Fin(bj) through the chosen bijections between length-jjj strings and those finite index sets: its entries are products of the jjj corresponding entries of ρ\rhoρ. The map LLL, from dimensions asn×bsna_s^n\times b_s^nasn​×bsn​ to atm×btma_t^m\times b_t^matm​×btm​, must be generated recursively from identity maps by finitely many local Kraus steps: either party applies a finite family EiE_iEi​ with ∑iEi†Ei=I\sum_iE_i^\dagger E_i=I∑i​Ei†​Ei​=I, an allowed continuation is selected for each outcome, and the resulting branch maps are summed. The input length nnn is necessarily positive, but m=0m=0m=0 is allowed, with the zeroth tensor power being the scalar matrix 111; no upper bound on m/nm/nm/n is imposed.

QAlgorithms.Papers.Independent.Support50.P42.ExactYield

For any shared state sss, any n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, and any y∈Ry\in\mathbb Ry∈R, ExactYield⁡(s,n,y)\operatorname{ExactYield}(s,n,y)ExactYield(s,n,y) means that there exist an input shared state, a finite output list OOO of real weights paired with shared states, and a function ccc assigning a natural number to every shared state, such that the input represents nnn copies of sss, the output list is obtained by the finite local-tree relation described below, every (w,t)∈O(w,t)\in O(w,t)∈O with w>0w>0w>0 represents exactly c(t)c(t)c(t) singlets, and y=∑(w,t)∈Ow c(t)y=\sum_{(w,t)\in O}w\,c(t)y=∑(w,t)∈O​wc(t), counting list entries with their repetitions. Explicitly, if RRR is sss's matrix on its product basis of dimensions a,ba,ba,b, its nnn-copy matrix has dimensions an,bna^n,b^nan,bn and entries ∏i=0n−1R(xi,zi),(xi′,zi′)\prod_{i=0}^{n-1}R_{(x_i,z_i),(x'_i,z'_i)}∏i=0n−1​R(xi​,zi​),(xi′​,zi′​)​, with tuples identified with single indices using the selected finite-set bijections. A singlet is the rank-one matrix ∣ψ−⟩⟨ψ−∣|\psi^-\rangle\langle\psi^-|∣ψ−⟩⟨ψ−∣, where ψ−=(∣0,1⟩−∣1,0⟩)/2\psi^-=(|0,1\rangle-|1,0\rangle)/\sqrt2ψ−=(∣0,1⟩−∣1,0⟩)/2​, and c(t)c(t)c(t) singlets means its corresponding tensor power, with local dimensions 2c(t)2^{c(t)}2c(t). Representation requires equality of these dimensions and matrix entries, with all out-of-range entries extended by zero. The local-tree relation starts with [(1,input)][(1,\text{input})][(1,input)], allows finite local instruments followed by outcome-dependent continuation, and allows replacing an output list of equal dimensions by its weighted mixture. An instrument has probabilities pj≥0p_j\ge0pj​≥0 summing to 111, local Kraus matrices AjzA_{jz}Ajz​ for one selected party, unchanged dimensions for the other party, and their global extensions KjzK_{jz}Kjz​, whose entries are those of AjzA_{jz}Ajz​ when the other coordinate agrees and 000 otherwise; it requires ∑j,zKjz†Kjz=I\sum_{j,z}K_{jz}^{\dagger}K_{jz}=I∑j,z​Kjz†​Kjz​=I and pjρj=∑zKjzρKjz†p_j\rho_j=\sum_zK_{jz}\rho K_{jz}^{\dagger}pj​ρj​=∑z​Kjz​ρKjz†​, and continuation weights are multiplied by pjp_jpj​. Every shared state has positive local dimensions and a positive semidefinite matrix of trace 111. The singlet requirement applies only to positive-weight entries; ccc is nevertheless defined on all shared states and assigns the same count to repeated occurrences of the same state. A zeroth tensor power, including zero singlets, is the one-dimensional matrix [1][1][1].

QAlgorithms.Papers.Independent.Support50.P42.FormationRate

Let sss specify positive dimensions a,ba,ba,b and a positive semidefinite, trace-one complex matrix ρ\rhoρ on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb. For a real number RRR, this predicate requires R≥0R\ge0R≥0 and says that for every ϵ>0\epsilon>0ϵ>0 and δ>0\delta>0δ>0, there is a natural number NNN such that for every natural number n>Nn>Nn>N, there exist a natural number mmm and a finite local-operation map LLL for which

∣R−mn∣≤δ,12∥L(Sm)−ρ[n]∥1≤ϵ.\left|R-\frac mn\right|\le\delta,\qquad \frac12\left\|L(S_m)-\rho^{[n]}\right\|_1\le\epsilon.​R−nm​​≤δ,21​​L(Sm​)−ρ[n]​1​≤ϵ.

Here SmS_mSm​ is the grouped mmm-fold tensor product of ∣ψ−⟩⟨ψ−∣|\psi^-\rangle\langle\psi^-|∣ψ−⟩⟨ψ−∣, where ψ−=(∣0,1⟩−∣1,0⟩)/2\psi^-=(|0,1\rangle-|1,0\rangle)/\sqrt2ψ−=(∣0,1⟩−∣1,0⟩)/2​, and ρ[n]\rho^{[n]}ρ[n] is the grouped nnn-fold tensor product of ρ\rhoρ. Grouped powers use the chosen bijections from length-jjj strings over ddd labels to Fin⁡(dj)\operatorname{Fin}(d^j)Fin(dj), with entries given by products of the corresponding matrix entries. The trace norm is ∥X∥1=Re⁡Tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{Tr}\sqrt{X^\dagger X}∥X∥1​=ReTrX†X​. The map LLL, from local dimensions 2m,2m2^m,2^m2m,2m to an,bna^n,b^nan,bn, is built recursively from identity maps by finitely many local Kraus families satisfying ∑iEi†Ei=I\sum_iE_i^\dagger E_i=I∑i​Ei†​Ei​=I, followed by outcome-dependent allowed continuations and summation over outcomes. The integer nnn is positive; m=0m=0m=0 is permitted and S0=1S_0=1S0​=1.

QAlgorithms.Papers.Independent.Support50.P42.IsPureShared

For any shared state sss with positive local dimensions d0,d1d_0,d_1d0​,d1​, let RRR be its matrix written on the ordinary product basis, so R(i,j),(i′,j′)=ρs((i,j),(i′,j′))R_{(i,j),(i',j')}=\rho_s((i,j),(i',j'))R(i,j),(i′,j′)​=ρs​((i,j),(i′,j′)), where each pair denotes the corresponding two-coordinate configuration. The predicate IsPureShared⁡(s)\operatorname{IsPureShared}(s)IsPureShared(s) means that there exists a vector v∈Cd0⊗Cd1v\in\mathbb C^{d_0}\otimes\mathbb C^{d_1}v∈Cd0​⊗Cd1​ with Euclidean norm 111 such that R(i,j),(i′,j′)=vijvi′j′‾R_{(i,j),(i',j')}=v_{ij}\overline{v_{i'j'}}R(i,j),(i′,j′)​=vij​vi′j′​​ for every pair of indices. Either local dimension may equal 111.

QAlgorithms.Papers.Independent.Support50.P42.LocalTree

For a shared state sss, consisting of positive local dimensions and a positive semidefinite matrix of trace 111, and a finite list OOO of real weights paired with shared states, LocalTree⁡(s,O)\operatorname{LocalTree}(s,O)LocalTree(s,O) is the relation generated by the following three rules: one may stop with O=[(1,s)]O=[(1,s)]O=[(1,s)]; one may perform a finite local instrument and then continue separately on every outcome; and one may replace the entire output list of an already constructed tree by its mixture, provided all output states have the same local dimensions. More precisely, a local instrument chooses a party q∈{0,1}q\in\{0,1\}q∈{0,1}, an outcome count k∈Nk\in\mathbb Nk∈N, numbers pj≥0p_j\ge0pj​≥0 with ∑jpj=1\sum_jp_j=1∑j​pj​=1, shared states rjr_jrj​, and finitely many matrices AjzA_{jz}Ajz​ from party qqq's input space to its space in rjr_jrj​; every other party's dimension must remain equal to its input dimension. Define the global matrix KjzK_{jz}Kjz​ by (Kjz)xy=(Ajz)xqyq(K_{jz})_{xy}=(A_{jz})_{x_qy_q}(Kjz​)xy​=(Ajz​)xq​yq​​ when all coordinates other than qqq agree, and by 000 otherwise. The instrument must satisfy ∑j,zKjz†Kjz=I\sum_{j,z}K_{jz}^{\dagger}K_{jz}=I∑j,z​Kjz†​Kjz​=I and pjρrj=∑zKjzρsKjz†p_j\rho_{r_j}=\sum_zK_{jz}\rho_sK_{jz}^{\dagger}pj​ρrj​​=∑z​Kjz​ρs​Kjz†​. If the continuation from rjr_jrj​ produces a list OjO_jOj​, the resulting list concatenates the OjO_jOj​, multiplying their weights by pjp_jpj​. The mixture rule produces [(1,t)][(1,t)][(1,t)] when all listed states have ttt's dimensions and, entrywise, ρt=∑(w,r)∈Owρr\rho_t=\sum_{(w,r)\in O}w\rho_rρt​=∑(w,r)∈O​wρr​; entries outside a state's dimensions are interpreted as 000. Zero-weight outcomes are permitted, whereas k=0k=0k=0 cannot satisfy ∑jpj=1\sum_jp_j=1∑j​pj​=1.

QAlgorithms.Papers.Independent.Support50.P42.OneWayBits

For arbitrary natural numbers a,b,c,da,b,c,da,b,c,d, a natural number bits\mathrm{bits}bits, and any function LLL from complex matrices on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb to complex matrices on Cc⊗Cd\mathbb C^c\otimes\mathbb C^dCc⊗Cd, this predicate means that there exist natural numbers k,rk,rk,r with k≤2bitsk\le 2^{\mathrm{bits}}k≤2bits, matrices Aiz∈Cc×aA_{iz}\in\mathbb C^{c\times a}Aiz​∈Cc×a for 0≤i<k0\le i<k0≤i<k, 0≤z<r0\le z<r0≤z<r, and maps BiB_iBi​ from b×bb\times bb×b to d×dd\times dd×d complex matrices such that

∑i=0k−1∑z=0r−1Aiz†Aiz=Ia,L(ρ)=∑i=0k−1(id⁡c⊗Bi)(∑z=0r−1(Aiz⊗Ib)ρ(Aiz⊗Ib)†)\sum_{i=0}^{k-1}\sum_{z=0}^{r-1}A_{iz}^\dagger A_{iz}=I_a, \qquad L(\rho)=\sum_{i=0}^{k-1} (\operatorname{id}_c\otimes B_i) \left(\sum_{z=0}^{r-1}(A_{iz}\otimes I_b)\rho(A_{iz}\otimes I_b)^\dagger\right)i=0∑k−1​z=0∑r−1​Aiz†​Aiz​=Ia​,L(ρ)=i=0∑k−1​(idc​⊗Bi​)(z=0∑r−1​(Aiz​⊗Ib​)ρ(Aiz​⊗Ib​)†)

for every complex input matrix ρ\rhoρ. Each BiB_iBi​ must admit a finite Kraus representation Bi(X)=∑jEijXEij†B_i(X)=\sum_jE_{ij}XE_{ij}^\daggerBi​(X)=∑j​Eij​XEij†​ with ∑jEij†Eij=Ib\sum_jE_{ij}^\dagger E_{ij}=I_b∑j​Eij†​Eij​=Ib​; the displayed tensor action applies BiB_iBi​ separately to every b×bb\times bb×b block. All dimensions, k,rk,rk,r, and bits\mathrm{bits}bits may be zero. Empty sums are zero, so if a>0a>0a>0, the completeness equation cannot hold with k=0k=0k=0 or r=0r=0r=0.

QAlgorithms.Papers.Independent.Support50.P42.RepresentsShared

For any natural numbers a,ba,ba,b, any complex matrix RRR indexed by {0,…,a−1}×{0,…,b−1}\{0,\ldots,a-1\}\times\{0,\ldots,b-1\}{0,…,a−1}×{0,…,b−1}, and any shared state sss, the predicate RepresentsShared⁡(R,s)\operatorname{RepresentsShared}(R,s)RepresentsShared(R,s) requires that sss's two local dimensions are exactly a,ba,ba,b, and that, for every x,y:{0,1}→Nx,y:\{0,1\}\to\mathbb Nx,y:{0,1}→N, its matrix entry extended by zero outside its local dimensions equals R(x0,x1),(y0,y1)R_{(x_0,x_1),(y_0,y_1)}R(x0​,x1​),(y0​,y1​)​ if x0,y0<ax_0,y_0<ax0​,y0​<a and x1,y1<bx_1,y_1<bx1​,y1​<b, and equals 000 otherwise. Here a shared state has positive local dimensions and a positive semidefinite matrix of trace 111. Consequently the predicate cannot hold if a=0a=0a=0 or b=0b=0b=0, and when it holds the supplied matrix RRR is itself positive semidefinite with trace 111.

QAlgorithms.Papers.Independent.Support50.P42.Shared

A shared state consists of two positive natural numbers d0,d1d_0,d_1d0​,d1​ and a complex matrix ρ\rhoρ indexed by configurations xxx with xi∈{0,…,di−1}x_i\in\{0,\ldots,d_i-1\}xi​∈{0,…,di​−1} for i=0,1i=0,1i=0,1, together with the requirements that ρ\rhoρ is positive semidefinite and tr⁡ρ=1\operatorname{tr}\rho=1trρ=1. Both local dimensions may equal 111, but neither may equal 000.

QAlgorithms.Papers.Independent.Support50.P42.SingletDistillationRate

Let sss specify positive dimensions a,ba,ba,b and a positive semidefinite, trace-one complex matrix ρ\rhoρ on Ca⊗Cb\mathbb C^a\otimes\mathbb C^bCa⊗Cb. For a real number RRR, this predicate requires R≥0R\ge0R≥0 and says that for every ϵ>0\epsilon>0ϵ>0 and δ>0\delta>0δ>0, there is a natural number NNN such that every natural number n>Nn>Nn>N admits a natural number mmm and a map LLL with

(R−δ)n≤m,12∥L(ρ[n])−Sm∥1≤ϵ.(R-\delta)n\le m,\qquad \frac12\left\|L(\rho^{[n]})-S_m\right\|_1\le\epsilon.(R−δ)n≤m,21​​L(ρ[n])−Sm​​1​≤ϵ.

Here SmS_mSm​ is the grouped mmm-fold tensor product of the projector onto (∣0,1⟩−∣1,0⟩)/2(|0,1\rangle-|1,0\rangle)/\sqrt2(∣0,1⟩−∣1,0⟩)/2​; ρ[n]\rho^{[n]}ρ[n] is the grouped nnn-fold tensor product of ρ\rhoρ, with string indices converted to finite integer indices using the chosen bijections, and tensor-product entries are products of the component entries. The trace norm is ∥X∥1=Re⁡Tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{Tr}\sqrt{X^\dagger X}∥X∥1​=ReTrX†X​. The map LLL, from local dimensions an,bna^n,b^nan,bn to 2m,2m2^m,2^m2m,2m, is generated from identity maps by finitely many local Kraus steps, each having ∑iEi†Ei=I\sum_iE_i^\dagger E_i=I∑i​Ei†​Ei​=I, outcome-dependent allowed continuations, and summation over outcomes. The input length nnn is positive; m=0m=0m=0 is allowed with S0=1S_0=1S0​=1, and there is no upper bound on m/nm/nm/n.

QAlgorithms.Papers.Independent.Support50.P42.aliceKetBranch

For any natural numbers a,b,ca,b,ca,b,c, any complex c×ac\times ac×a matrix AAA, and any vector ψ∈Ca×b\psi\in\mathbb C^{a\times b}ψ∈Ca×b with its Euclidean norm, this defines the vector in Cc×b\mathbb C^{c\times b}Cc×b whose coordinates are

(aliceKetBranch⁡(A,ψ))u,v=∑i=0a−1Au,iψi,v(0≤u<c, 0≤v<b).\bigl(\operatorname{aliceKetBranch}(A,\psi)\bigr)_{u,v} =\sum_{i=0}^{a-1}A_{u,i}\psi_{i,v} \qquad(0\le u<c,\ 0\le v<b).(aliceKetBranch(A,ψ))u,v​=i=0∑a−1​Au,i​ψi,v​(0≤u<c, 0≤v<b).

Thus it applies AAA to the first coordinate and the identity to the second. Neither an isometry condition on AAA nor normalization of ψ\psiψ is assumed. Zero dimensions are allowed; in particular, if a=0a=0a=0, every output coordinate is an empty sum and hence zero.

QAlgorithms.Papers.Independent.Support50.P42.bareEncoder

For every natural number nnn, this defines the map

ρ⟼∑k=0nPkρPk\rho\longmapsto\sum_{k=0}^{n}P_k\rho P_kρ⟼k=0∑n​Pk​ρPk​

on arbitrary complex matrices indexed by nnn-bit strings, where PkP_kPk​ is diagonal with entry 111 on strings having exactly kkk true bits and 000 elsewhere. Thus the output entry at strings z,wz,wz,w is ρz,w\rho_{z,w}ρz,w​ if their numbers of true bits agree, and 000 otherwise. No positivity or normalization is required. For n=0n=0n=0, the map is the identity on the one-dimensional matrix space.

QAlgorithms.Papers.Independent.Support50.P42.circlePosition

For any type Ω\OmegaΩ, any function X:N×Ω→RX:\mathbb N\times\Omega\to\mathbb RX:N×Ω→R, any natural number mmm, and any w∈Ωw\in\Omegaw∈Ω, this defines

circlePosition⁡(X,m,w)=∑i=0m−1X(i,w)−⌊∑i=0m−1X(i,w)⌋.\operatorname{circlePosition}(X,m,w) =\sum_{i=0}^{m-1}X(i,w) -\left\lfloor\sum_{i=0}^{m-1}X(i,w)\right\rfloor.circlePosition(X,m,w)=i=0∑m−1​X(i,w)−⌊i=0∑m−1​X(i,w)⌋.

It is the fractional part in [0,1)[0,1)[0,1), including for negative sums. No probability space, measurability, independence, or distribution assumptions are imposed. When m=0m=0m=0, its value is 000.

QAlgorithms.Papers.Independent.Support50.P42.classicalPair

This defines the complex matrix on the basis {0,1}×{0,1}\{0,1\}\times\{0,1\}{0,1}×{0,1} by

12(∣0,0⟩⟨0,0∣+∣1,1⟩⟨1,1∣),\frac12\bigl(|0,0\rangle\langle0,0|+|1,1\rangle\langle1,1|\bigr),21​(∣0,0⟩⟨0,0∣+∣1,1⟩⟨1,1∣),

where each ket is the coordinate vector equal to 111 at its indicated basis element and 000 elsewhere. Thus its diagonal entries at (0,0)(0,0)(0,0) and (1,1)(1,1)(1,1) are 1/21/21/2, and all other entries are 000.

QAlgorithms.Papers.Independent.Support50.P42.codingFidelity

For every natural number nnn, every real number ppp, and every function DDD from complex matrices indexed by {0,…,n}×{0,1}n\{0,\ldots,n\}\times\{0,1\}^n{0,…,n}×{0,1}n to complex matrices indexed by {0,1}n\{0,1\}^n{0,1}n, define vectors vxv_xvx​, one for each nnn-bit string xxx, by

vx(z)=∏i=0n−1{−p,zi=true, xi=true,p,zi=true, xi=false,1−p,zi=false.v_x(z)=\prod_{i=0}^{n-1} \begin{cases} -\sqrt p,&z_i=\mathrm{true},\ x_i=\mathrm{true},\\ \sqrt p,&z_i=\mathrm{true},\ x_i=\mathrm{false},\\ \sqrt{1-p},&z_i=\mathrm{false}. \end{cases}vx​(z)=i=0∏n−1​⎩⎨⎧​−p​,p​,1−p​,​zi​=true, xi​=true,zi​=true, xi​=false,zi​=false.​

Writing vxvx†v_xv_x^\daggervx​vx†​ for the matrix with entries vx(z)vx(w)‾v_x(z)\overline{v_x(w)}vx​(z)vx​(w)​, and defining Fn(ρ)F_n(\rho)Fn​(ρ) by

Fn(ρ)(k,z),(ℓ,w)={ρz,w,k=ℓ, ∣z∣=∣w∣=k,0,otherwise,F_n(\rho)_{(k,z),(\ell,w)} = \begin{cases} \rho_{z,w},&k=\ell,\ |z|=|w|=k,\\ 0,&\text{otherwise}, \end{cases}Fn​(ρ)(k,z),(ℓ,w)​={ρz,w​,0,​k=ℓ, ∣z∣=∣w∣=k,otherwise,​

where ∣z∣|z|∣z∣ counts true bits, the defined real number is

2−n∑x∈{0,1}nRe⁡Tr⁡ ⁣[vxvx† D ⁣(Fn(vxvx†))].2^{-n}\sum_{x\in\{0,1\}^n} \operatorname{Re}\operatorname{Tr} \!\left[v_xv_x^\dagger\,D\!\left(F_n(v_xv_x^\dagger)\right)\right].2−nx∈{0,1}n∑​ReTr[vx​vx†​D(Fn​(vx​vx†​))].

There is no channel, linearity, or positivity requirement on DDD, and ppp is unrestricted: real square roots of negative arguments are 000. When n=0n=0n=0, the products are empty products equal to 111, and the sum has one term.

QAlgorithms.Papers.Independent.Support50.P42.diagonalKet

For any natural number ddd and any real function c:{0,…,d−1}→Rc:\{0,\ldots,d-1\}\to\mathbb Rc:{0,…,d−1}→R, this defines the complex Euclidean vector

vi,j={ci,i=j,0,i≠j.v_{i,j}= \begin{cases} c_i,&i=j,\\ 0,&i\ne j. \end{cases}vi,j​={ci​,0,​i=j,i=j.​

Equivalently, v=∑i=0d−1ci∣i,i⟩v=\sum_{i=0}^{d-1}c_i|i,i\ranglev=∑i=0d−1​ci​∣i,i⟩, where the kets are coordinate unit vectors. The coefficients may be negative and need not satisfy any normalization condition. When d=0d=0d=0, this is the zero vector.

QAlgorithms.Papers.Independent.Support50.P42.discardSecond

This defines a map on arbitrary complex matrices ρ\rhoρ indexed by ({0,1}×{0,1})×({0,1}×{0,1})(\{0,1\}\times\{0,1\})\times(\{0,1\}\times\{0,1\})({0,1}×{0,1})×({0,1}×{0,1}), with output indexed by {0,1}×{0,1}\{0,1\}\times\{0,1\}{0,1}×{0,1}, through

discardSecond⁡(ρ)(x1,x2),(y1,y2)=∑a=01∑b=01ρ((x1,a),(x2,b)), ((y1,a),(y2,b)).\operatorname{discardSecond}(\rho)_{(x_1,x_2),(y_1,y_2)} = \sum_{a=0}^{1}\sum_{b=0}^{1} \rho_{((x_1,a),(x_2,b)),\,((y_1,a),(y_2,b))}.discardSecond(ρ)(x1​,x2​),(y1​,y2​)​=a=0∑1​b=0∑1​ρ((x1​,a),(x2​,b)),((y1​,a),(y2​,b))​.

Thus it sums over the second coordinate of each of the two paired input registers, using the same summed coordinates in the row and column. No positivity or normalization assumption is required.

QAlgorithms.Papers.Independent.Support50.P42.downCount

For every natural number nnn and every Boolean string xxx indexed by {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, downCount⁡(x)\operatorname{downCount}(x)downCount(x) is the number of indices iii for which xi=truex_i=\mathrm{true}xi​=true. For n=0n=0n=0, this number is 000.

QAlgorithms.Papers.Independent.Support50.P42.ent

For any shared state sss with positive local dimensions d0,d1d_0,d_1d0​,d1​, write its density matrix on the product basis as RRR, and define the matrix BBB on the second local space by Bjj′=∑i=0d0−1R(i,j),(i,j′)B_{jj'}=\sum_{i=0}^{d_0-1}R_{(i,j),(i,j')}Bjj′​=∑i=0d0​−1​R(i,j),(i,j′)​. Then ent⁡(s)\operatorname{ent}(s)ent(s) is the real number −Re⁡tr⁡f(B)-\operatorname{Re}\operatorname{tr}f(B)−Retrf(B), where f(x)=xlog⁡2xf(x)=x\log_2xf(x)=xlog2​x is applied by continuous functional calculus, with the total logarithm convention log⁡20=0\log_2 0=0log2​0=0. Thus this definition takes the entropy in bits of the second marginal for every shared state, without a purity hypothesis; dimensions equal to 111 are included.

QAlgorithms.Papers.Independent.Support50.P42.filterFailure

For any natural number ddd and any real function c:{0,…,d−1}→Rc:\{0,\ldots,d-1\}\to\mathbb Rc:{0,…,d−1}→R, let a=inf⁡{cj:0≤j<d}a=\inf\{c_j:0\le j<d\}a=inf{cj​:0≤j<d}, taking a=0a=0a=0 when d=0d=0d=0. This defines the diagonal complex d×dd\times dd×d matrix

Fi,i=1−(aci)2,F_{i,i}=\sqrt{1-\left(\frac{a}{c_i}\right)^2},Fi,i​=1−(ci​a​)2​,

with all off-diagonal entries zero. No assumptions ensure that the radicands are nonnegative: the real square root has value 000 for negative arguments. Division by zero has value 000, so ci=0c_i=0ci​=0 gives Fi,i=1F_{i,i}=1Fi,i​=1. For d=0d=0d=0, the matrix is empty.

QAlgorithms.Papers.Independent.Support50.P42.flaggedEncoder

For every natural number nnn, let Zn={0,1}nZ_n=\{0,1\}^nZn​={0,1}n, and let ∣z∣|z|∣z∣ count the true bits of z∈Znz\in Z_nz∈Zn​. This defines a map from arbitrary complex matrices ρ\rhoρ indexed by ZnZ_nZn​ to matrices indexed by {0,…,n}×Zn\{0,\ldots,n\}\times Z_n{0,…,n}×Zn​, with entries

flaggedEncoder⁡n(ρ)(k,z),(ℓ,w)={ρz,w,k=ℓ, ∣z∣=k, ∣w∣=k,0,otherwise.\operatorname{flaggedEncoder}_n(\rho)_{(k,z),(\ell,w)} = \begin{cases} \rho_{z,w},&k=\ell,\ |z|=k,\ |w|=k,\\ 0,&\text{otherwise}. \end{cases}flaggedEncodern​(ρ)(k,z),(ℓ,w)​={ρz,w​,0,​k=ℓ, ∣z∣=k, ∣w∣=k,otherwise.​

Equivalently, its kkk-th diagonal flag block is PkρPkP_k\rho P_kPk​ρPk​, where PkP_kPk​ is the diagonal projector onto strings with exactly kkk true bits; off-diagonal flag blocks vanish. No positivity or normalization assumption is imposed on ρ\rhoρ. The definition includes n=0n=0n=0, when both the string register and the flag register have one basis element.

QAlgorithms.Papers.Independent.Support50.P42.formationCost

For a state sss consisting of positive local dimensions a,ba,ba,b and a positive semidefinite, trace-one matrix ρ\rhoρ, this defines the real infimum of all R≥0R\ge0R≥0 with the following property: for every ϵ,δ>0\epsilon,\delta>0ϵ,δ>0, some natural number NNN ensures that every natural number n>Nn>Nn>N admits a natural number mmm and a finite local-operation map LLL such that

∣R−mn∣≤δ,12∥L(Sm)−ρ[n]∥1≤ϵ.\left|R-\frac mn\right|\le\delta,\qquad \frac12\|L(S_m)-\rho^{[n]}\|_1\le\epsilon.​R−nm​​≤δ,21​∥L(Sm​)−ρ[n]∥1​≤ϵ.

The matrices SmS_mSm​ and ρ[n]\rho^{[n]}ρ[n] are respectively grouped tensor powers of the projector onto (∣0,1⟩−∣1,0⟩)/2(|0,1\rangle-|1,0\rangle)/\sqrt2(∣0,1⟩−∣1,0⟩)/2​ and of ρ\rhoρ, reindexed using the chosen string-to-integer bijections; their entries are products of the component entries. The trace norm is ∥X∥1=Re⁡Tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{Tr}\sqrt{X^\dagger X}∥X∥1​=ReTrX†X​. The map LLL is recursively built from identity maps by finitely many local Kraus families with ∑iEi†Ei=I\sum_iE_i^\dagger E_i=I∑i​Ei†​Ei​=I, outcome-dependent continuations, and summation over outcomes. The source has local dimensions 2m,2m2^m,2^m2m,2m, the target has dimensions an,bna^n,b^nan,bn, and m=0m=0m=0 is allowed with S0=1S_0=1S0​=1. This definition asserts neither attainment of the infimum nor nonemptiness of its defining set; the real infimum of an empty set is 000.

QAlgorithms.Papers.Independent.Support50.P42.leastAmplitude

For any natural number ddd and any real function c:{0,…,d−1}→Rc:\{0,\ldots,d-1\}\to\mathbb Rc:{0,…,d−1}→R, this defines

leastAmplitude⁡(c)=inf⁡{ci:0≤i<d}.\operatorname{leastAmplitude}(c)=\inf\{c_i:0\le i<d\}.leastAmplitude(c)=inf{ci​:0≤i<d}.

For d>0d>0d>0, this is the minimum of the finitely many real coefficients, with no nonnegativity assumption. For d=0d=0d=0, the range is empty and the real infimum used here has value 000.

QAlgorithms.Papers.Independent.Support50.P42.outcomeEntropy

For any finite type JJJ, equipped with a finite enumeration, and any function p:J→Rp:J\to\mathbb Rp:J→R, this defines

−∑j∈Jpjlog⁡2(pj).-\sum_{j\in J}p_j\log_2(p_j).−j∈J∑​pj​log2​(pj​).

There is no assumption that the pjp_jpj​ are nonnegative or sum to 111. The real logarithm is total: log⁡2(0)=0\log_2(0)=0log2​(0)=0, and for negative arguments it uses the logarithm of the absolute value. If JJJ is empty, the result is 000.

QAlgorithms.Papers.Independent.Support50.P42.procrusteanSuccess

For any natural number ddd and any real function c:{0,…,d−1}→Rc:\{0,\ldots,d-1\}\to\mathbb Rc:{0,…,d−1}→R, let a=inf⁡{cj:0≤j<d}a=\inf\{c_j:0\le j<d\}a=inf{cj​:0≤j<d}, taking a=0a=0a=0 when d=0d=0d=0. This defines the diagonal complex d×dd\times dd×d matrix

Si,i=aci,S_{i,i}=\frac{a}{c_i},Si,i​=ci​a​,

with all off-diagonal entries zero. No positivity, nonzero-coefficient, or normalization assumptions are imposed. Division by zero has value 000, so ci=0c_i=0ci​=0 gives Si,i=0S_{i,i}=0Si,i​=0; when d=0d=0d=0, the matrix is empty.

QAlgorithms.Papers.Independent.Support50.P42.procrusteanYield

For every real number ppp, this defines

procrusteanYield⁡(p)=2min⁡{p,1−p}.\operatorname{procrusteanYield}(p)=2\min\{p,1-p\}.procrusteanYield(p)=2min{p,1−p}.

There is no restriction that p∈[0,1]p\in[0,1]p∈[0,1]; the result is negative when p<0p<0p<0 or p>1p>1p>1, is zero at p=0,1p=0,1p=0,1, and equals 111 at p=12p=\tfrac12p=21​.

QAlgorithms.Papers.Independent.Support50.P42.projectedYield

For every n∈Nn\in\mathbb Nn∈N and every real ppp, projectedYield⁡(n,p)\operatorname{projectedYield}(n,p)projectedYield(n,p) is the real number ∑k=0n(nk)(1−p)n−kpklog⁡2(nk)\sum_{k=0}^{n}\binom nk(1-p)^{n-k}p^k\log_2\binom nk∑k=0n​(kn​)(1−p)n−kpklog2​(kn​). The summation includes both endpoints, and no restriction on ppp is imposed. All binomial coefficients inside this sum are positive; natural powers use 00=10^0=100=1. For n=0n=0n=0, the value is 000.

QAlgorithms.Papers.Independent.Support50.P42.purificationMinimum

For any complex matrix ρ\rhoρ indexed by {0,1}2\{0,1\}^2{0,1}2, this defines a real number as the infimum of all values S(Tr⁡AC∣v⟩⟨v∣)S(\operatorname{Tr}_{A C}|v\rangle\langle v|)S(TrAC​∣v⟩⟨v∣) obtained as follows: choose positive natural numbers c,dc,dc,d and a unit vector vvv on (C2⊗Cc)⊗(C2⊗Cd)(\mathbb C^2\otimes\mathbb C^c)\otimes(\mathbb C^2\otimes\mathbb C^d)(C2⊗Cc)⊗(C2⊗Cd) such that, for every x,y∈{0,1}2x,y\in\{0,1\}^2x,y∈{0,1}2,

ρx,y=∑u=0c−1∑w=0d−1v((x1,u),(x2,w))v((y1,u),(y2,w))‾.\rho_{x,y} =\sum_{u=0}^{c-1}\sum_{w=0}^{d-1} v_{((x_1,u),(x_2,w))} \overline{v_{((y_1,u),(y_2,w))}}.ρx,y​=u=0∑c−1​w=0∑d−1​v((x1​,u),(x2​,w))​v((y1​,u),(y2​,w))​​.

The partial trace in the entropy discards the first enlarged subsystem, and S(M)=−Re⁡tr⁡(f(M))S(M)=-\operatorname{Re}\operatorname{tr}(f(M))S(M)=−Retr(f(M)) with f(t)=tlog⁡2tf(t)=t\log_2tf(t)=tlog2​t applied by continuous functional calculus. The definition does not assert that the infimum is attained, and it assumes no positivity or normalization of ρ\rhoρ. It uses the real-valued infimum convention: an empty set, or a set unbounded below, has assigned infimum 000.

QAlgorithms.Papers.Independent.Support50.P42.purificationScores

For any complex matrix ρ\rhoρ indexed by {0,1}×{0,1}\{0,1\}\times\{0,1\}{0,1}×{0,1}, this defines the set of real numbers

{S ⁣(Tr⁡{0,1}×{0,…,c−1}∣v⟩⟨v∣)  |  c,d∈N,c>0, d>0,v∈C({0,1}×{0,…,c−1})×({0,1}×{0,…,d−1}),∥v∥=1,ρ(x1,x2),(y1,y2)=∑u=0c−1∑w=0d−1v((x1,u),(x2,w))v((y1,u),(y2,w))‾for all x,y∈{0,1}2}.\left\{ S\!\left(\operatorname{Tr}_{\{0,1\}\times\{0,\ldots,c-1\}}|v\rangle\langle v|\right) \;\middle|\; \begin{array}{l} c,d\in\mathbb N,\quad c>0,\ d>0,\\ v\in\mathbb C^{(\{0,1\}\times\{0,\ldots,c-1\})\times (\{0,1\}\times\{0,\ldots,d-1\})},\quad \|v\|=1,\\ \displaystyle \rho_{(x_1,x_2),(y_1,y_2)} =\sum_{u=0}^{c-1}\sum_{w=0}^{d-1} v_{((x_1,u),(x_2,w))} \overline{v_{((y_1,u),(y_2,w))}} \quad\text{for all }x,y\in\{0,1\}^2 \end{array} \right\}.⎩⎨⎧​S(Tr{0,1}×{0,…,c−1}​∣v⟩⟨v∣)​c,d∈N,c>0, d>0,v∈C({0,1}×{0,…,c−1})×({0,1}×{0,…,d−1}),∥v∥=1,ρ(x1​,x2​),(y1​,y2​)​=u=0∑c−1​w=0∑d−1​v((x1​,u),(x2​,w))​v((y1​,u),(y2​,w))​​for all x,y∈{0,1}2​⎭⎬⎫​.

Here ∣v⟩⟨v∣|v\rangle\langle v|∣v⟩⟨v∣ has entries vαvβ‾v_\alpha\overline{v_\beta}vα​vβ​​, the indicated partial trace discards the entire first factor (x1,u)(x_1,u)(x1​,u) and retains (x2,w)(x_2,w)(x2​,w), and S(M)=−Re⁡tr⁡(f(M))S(M)=-\operatorname{Re}\operatorname{tr}(f(M))S(M)=−Retr(f(M)), where f(t)=tlog⁡2tf(t)=t\log_2tf(t)=tlog2​t is applied by continuous functional calculus. Thus each member is the entropy of the second enlarged subsystem of a finite, normalized purification satisfying the displayed entrywise identity. No density-matrix hypothesis is imposed on the argument ρ\rhoρ; the defining conditions may have no witnesses, in which case the set is empty.

QAlgorithms.Papers.Independent.Support50.P42.schmidtBlock

For every n∈Nn\in\mathbb Nn∈N and every real ppp, schmidtBlock⁡(n,p)\operatorname{schmidtBlock}(n,p)schmidtBlock(n,p) is the complex Euclidean vector indexed by pairs of nnn-bit strings (x,z)(x,z)(x,z), whose amplitude is 000 when x≠zx\ne zx=z, and otherwise is ∏i=0n−1ai\prod_{i=0}^{n-1}a_i∏i=0n−1​ai​, where ai=pa_i=\sqrt pai​=p​ if xi=truex_i=\mathrm{true}xi​=true and ai=1−pa_i=\sqrt{1-p}ai​=1−p​ otherwise, viewed as complex numbers. No restriction on ppp or normalization requirement is imposed: the real square root is 000 on negative arguments. For n=0n=0n=0, the sole amplitude is the empty product 111, for every ppp.

QAlgorithms.Papers.Independent.Support50.P42.schmidtOutcomeWeight

For every n,k∈Nn,k\in\mathbb Nn,k∈N and every real ppp, the real number schmidtOutcomeWeight⁡(n,p,k)\operatorname{schmidtOutcomeWeight}(n,p,k)schmidtOutcomeWeight(n,p,k) is (nk)(1−p) n−˙kpk\binom nk(1-p)^{\,n\mathbin{\dot-}k}p^k(kn​)(1−p)n−˙​kpk, where n−˙k=max⁡(n−k,0)n\mathbin{\dot-}k=\max(n-k,0)n−˙​k=max(n−k,0). No assumption 0≤p≤10\le p\le10≤p≤1 is imposed. Natural powers use 00=10^0=100=1; when k>nk>nk>n, the binomial coefficient is 000, so the defined weight is 000, and when n=k=0n=k=0n=k=0, it is 111 for every ppp.

QAlgorithms.Papers.Independent.Support50.P42.schmidtTypeProjector

For every n,k∈Nn,k\in\mathbb Nn,k∈N, schmidtTypeProjector⁡(n,k)\operatorname{schmidtTypeProjector}(n,k)schmidtTypeProjector(n,k) is the complex diagonal matrix indexed by nnn-bit strings, with diagonal entry 111 at xxx if exactly kkk coordinates of xxx are true, and 000 otherwise; all off-diagonal entries are 000. In particular, it is the zero matrix when k>nk>nk>n; when n=0n=0n=0, it is the one-dimensional identity for k=0k=0k=0 and the zero matrix otherwise.

QAlgorithms.Papers.Independent.Support50.P42.singletDistillable

For a state sss consisting of positive local dimensions a,ba,ba,b and a positive semidefinite, trace-one matrix ρ\rhoρ, this defines the real supremum of all R≥0R\ge0R≥0 such that, for every ϵ,δ>0\epsilon,\delta>0ϵ,δ>0, there is a natural number NNN for which every natural number n>Nn>Nn>N admits a natural number mmm and a finite local-operation map LLL satisfying

(R−δ)n≤m,12∥L(ρ[n])−Sm∥1≤ϵ.(R-\delta)n\le m,\qquad \frac12\|L(\rho^{[n]})-S_m\|_1\le\epsilon.(R−δ)n≤m,21​∥L(ρ[n])−Sm​∥1​≤ϵ.

Here ρ[n]\rho^{[n]}ρ[n] is the grouped tensor power of ρ\rhoρ, and SmS_mSm​ is the grouped tensor power of the projector onto (∣0,1⟩−∣1,0⟩)/2(|0,1\rangle-|1,0\rangle)/\sqrt2(∣0,1⟩−∣1,0⟩)/2​, with string indices converted through the chosen bijections to finite integer indices. The trace norm is ∥X∥1=Re⁡Tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{Tr}\sqrt{X^\dagger X}∥X∥1​=ReTrX†X​. The map LLL, from local dimensions an,bna^n,b^nan,bn to 2m,2m2^m,2^m2m,2m, is generated recursively from identity maps by finitely many local Kraus families satisfying ∑iEi†Ei=I\sum_iE_i^\dagger E_i=I∑i​Ei†​Ei​=I, with outcome-dependent continuations and summation over outcomes. The integer nnn is positive, while m=0m=0m=0 is permitted and S0=1S_0=1S0​=1. No attainment or boundedness assertion accompanies this definition; the total real supremum is 000 for an empty set or a set unbounded above.

QAlgorithms.Papers.Independent.Support50.P42.sourceKet

For any natural number nnn, any real number ppp, and any Boolean string xxx of length nnn, this defines the complex Euclidean vector indexed by Boolean strings zzz of length nnn, with coordinates

vz=∏i=0n−1{−p,zi=true and xi=true,p,zi=true and xi=false,1−p,zi=false.v_z=\prod_{i=0}^{n-1} \begin{cases} -\sqrt p,&z_i=\mathrm{true}\ \text{and}\ x_i=\mathrm{true},\\ \sqrt p,&z_i=\mathrm{true}\ \text{and}\ x_i=\mathrm{false},\\ \sqrt{1-p},&z_i=\mathrm{false}. \end{cases}vz​=i=0∏n−1​⎩⎨⎧​−p​,p​,1−p​,​zi​=true and xi​=true,zi​=true and xi​=false,zi​=false.​

No restriction on ppp or normalization hypothesis is imposed; real square roots of negative arguments have value 000. When n=0n=0n=0, the unique coordinate is the empty product 111, for every ppp and the unique empty string xxx.

QAlgorithms.Papers.Independent.Support50.P42.trim

For any natural numbers D,ℓD,\ellD,ℓ, this defines a complex matrix with 2ℓ2^\ell2ℓ rows and DDD columns by

Ti,j={1,i=j,0,i≠j,0≤i<2ℓ,0≤j<D.T_{i,j}= \begin{cases} 1,&i=j,\\ 0,&i\ne j, \end{cases} \qquad 0\le i<2^\ell,\quad 0\le j<D.Ti,j​={1,0,​i=j,i=j,​0≤i<2ℓ,0≤j<D.

No relation between DDD and 2ℓ2^\ell2ℓ is required: multiplication by this matrix retains coordinates with index below both dimensions, discards any remaining input coordinates, and fills any remaining output coordinates with zero. For D=0D=0D=0, the matrix has no columns.

QAlgorithms.Papers.Independent.Support50.P42.trimFailure

For any natural numbers D,ℓD,\ellD,ℓ, this defines the diagonal complex D×DD\times DD×D matrix FFF with

Fj,j={0,j<2ℓ,1,2ℓ≤j,0≤j<D,F_{j,j}= \begin{cases} 0,&j<2^\ell,\\ 1,&2^\ell\le j, \end{cases} \qquad 0\le j<D,Fj,j​={0,1,​j<2ℓ,2ℓ≤j,​0≤j<D,

and all off-diagonal entries zero. If D≤2ℓD\le 2^\ellD≤2ℓ, this is the zero matrix, including when D=0D=0D=0.

QAlgorithms.Papers.Independent.Support50.P42.twoPairs

For any two complex matrices ρ,σ\rho,\sigmaρ,σ indexed by {0,1}×{0,1}\{0,1\}\times\{0,1\}{0,1}×{0,1}, this defines a complex matrix whose basis is grouped as (A1,A2)×(B1,B2)(A_1,A_2)\times(B_1,B_2)(A1​,A2​)×(B1​,B2​), each coordinate taking values in {0,1}\{0,1\}{0,1}, by

twoPairs⁡(ρ,σ)((a1,a2),(b1,b2)), ((a1′,a2′),(b1′,b2′))=ρ(a1,b1),(a1′,b1′) σ(a2,b2),(a2′,b2′).\operatorname{twoPairs}(\rho,\sigma)_{((a_1,a_2),(b_1,b_2)),\,((a'_1,a'_2),(b'_1,b'_2))} = \rho_{(a_1,b_1),(a'_1,b'_1)} \,\sigma_{(a_2,b_2),(a'_2,b'_2)}.twoPairs(ρ,σ)((a1​,a2​),(b1​,b2​)),((a1′​,a2′​),(b1′​,b2′​))​=ρ(a1​,b1​),(a1′​,b1′​)​σ(a2​,b2​),(a2′​,b2′​)​.

No positivity, trace, or normalization assumptions are imposed on either input matrix.

QAlgorithms.Papers.Independent.Support50.P42.typeState

For every n,k∈Nn,k\in\mathbb Nn,k∈N, typeState⁡(n,k)\operatorname{typeState}(n,k)typeState(n,k) is the complex Euclidean vector indexed by pairs of nnn-bit strings (x,z)(x,z)(x,z), with amplitude 1/(nk)1/\sqrt{\binom nk}1/(kn​)​ when x=zx=zx=z and exactly kkk coordinates of xxx are true, and amplitude 000 otherwise. Inversion is total, with 0−1=00^{-1}=00−1=0. Thus for k>nk>nk>n the vector is zero; for n=k=0n=k=0n=k=0, its sole amplitude is 111.

QAlgorithms.Papers.Independent.Support50.P42.uniformKet

For every natural number ddd, this defines a vector v∈Cd×dv\in\mathbb C^{d\times d}v∈Cd×d by

vi,j={1/d,i=j,0,i≠j.v_{i,j}= \begin{cases} 1/\sqrt d,&i=j,\\ 0,&i\ne j. \end{cases}vi,j​={1/d​,0,​i=j,i=j.​

For d>0d>0d>0, this is d−1/2∑i=0d−1∣i,i⟩d^{-1/2}\sum_{i=0}^{d-1}|i,i\rangled−1/2∑i=0d−1​∣i,i⟩, where ∣i,i⟩|i,i\rangle∣i,i⟩ is the corresponding coordinate unit vector. The case d=0d=0d=0 is included and gives the zero vector on an empty coordinate set.

QAlgorithms.Papers.Independent.Support50.P42.wernerBranch

For every natural number nnn and every Boolean function z:{0,…,n−1}→{false,true}z:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}z:{0,…,n−1}→{false,true}, this defines a matrix on C2n⊗C2n\mathbb C^{2^n}\otimes\mathbb C^{2^n}C2n⊗C2n. Let en:{0,…,n−1}→{0,1}  ≃  {0,…,2n−1}e_n:\{0,\ldots,n-1\}\to\{0,1\}\;\simeq\;\{0,\ldots,2^n-1\}en​:{0,…,n−1}→{0,1}≃{0,…,2n−1} denote the fixed cardinality-based equivalence used in the definition, and put ax=en−1(x1)a_x=e_n^{-1}(x_1)ax​=en−1​(x1​) and bx=en−1(x2)b_x=e_n^{-1}(x_2)bx​=en−1​(x2​) for a matrix index x=(x1,x2)x=(x_1,x_2)x=(x1​,x2​). Its entries are

Wn,z(x,y)=∏i=0n−1Ri((ax(i),bx(i)),(ay(i),by(i))),Ri={∣ψ−⟩⟨ψ−∣,z(i)=true,I4/4,z(i)=false,W_{n,z}(x,y)=\prod_{i=0}^{n-1} R_i\bigl((a_x(i),b_x(i)),(a_y(i),b_y(i))\bigr), \qquad R_i= \begin{cases} |\psi^-\rangle\langle\psi^-|,&z(i)=\mathrm{true},\\ I_4/4,&z(i)=\mathrm{false}, \end{cases}Wn,z​(x,y)=i=0∏n−1​Ri​((ax​(i),bx​(i)),(ay​(i),by​(i))),Ri​={∣ψ−⟩⟨ψ−∣,I4​/4,​z(i)=true,z(i)=false,​

where ψ−=(∣0,1⟩−∣1,0⟩)/2\psi^-=(|0,1\rangle-|1,0\rangle)/\sqrt2ψ−=(∣0,1⟩−∣1,0⟩)/2​. The equivalence is a chosen identification by cardinality; no particular binary ordering is specified here. The definition includes n=0n=0n=0: the product is empty and equals 111, giving the one-dimensional identity matrix.

QAlgorithms.Papers.Independent.Support50.P42.wernerState

This defines the complex matrix on C2⊗C2\mathbb C^2\otimes\mathbb C^2C2⊗C2

ρW=18I4+12∣ψ−⟩⟨ψ−∣,ψ(0,1)−=22,ψ(1,0)−=−22,ψ(0,0)−=ψ(1,1)−=0,\rho_{\mathrm W}=\frac18 I_4+\frac12|\psi^-\rangle\langle\psi^-|, \qquad \psi^-_{(0,1)}=\frac{\sqrt2}{2},\quad \psi^-_{(1,0)}=-\frac{\sqrt2}{2},\quad \psi^-_{(0,0)}=\psi^-_{(1,1)}=0,ρW​=81​I4​+21​∣ψ−⟩⟨ψ−∣,ψ(0,1)−​=22​​,ψ(1,0)−​=−22​​,ψ(0,0)−​=ψ(1,1)−​=0,

where I4I_4I4​ is the identity matrix and the rank-one matrix ∣ψ−⟩⟨ψ−∣|\psi^-\rangle\langle\psi^-|∣ψ−⟩⟨ψ−∣ has entries ψx−ψy−‾\psi^-_x\overline{\psi^-_y}ψx−​ψy−​​.

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

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 24, 2026

    Confirmed by the mission captain (proposal self-audit).

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