Definitions for Quantum states representing perfectly secure bits are always distillable
DefinitionQAlgorithms_Papers_Independent_Gap48_P42The objects the formalized statements of Quantum states representing perfectly secure bits are always distillable (arXiv:quant-ph/0602176) are stated in. Each was checked against the paper by a blind read-back and a moderator.
PartyBasis: PDF pp.2--3: party k owns a register of dimension D k.localIndex: Fixed local basis relabeling; used identically on bras and kets.partyPower: PDF pp.2--4: independent copies, grouped by the original owners. The local copy enumeration is the accepted fixed enumeration.indexedPrivateDit: PDF p.2, multipartite private dit, after a fixed local basis relabeling. The accepted constructor includes the full joint-shield twists.CanConvert: PDF pp.2--3: deterministic conversion by a complete finite adaptive LOCC tree, including arbitrary local ancillary dimensions and disposal. Density proofs are existentially certified, never assumptions deleting a result.CanSelect: PDF pp.2--3,4: a positive-probability selected outcome of a complete LOCC tree; its other outcomes are retained in the underlying tree.twoLabelGHZVector: PDF p.3: normalized GHZ plus/minus kets on distinct local labels i,j. All uses have N>=2 and i<j.twoPhaseGHZMixture: PDF p.3, Eq.(2.6): the two-phase GHZ mixture, with p in [0,1] in uses.ghzCopies: PDF pp.2--3: m N-party qubit GHZ states, keeping all m qubits per party.GHZAchievable: PDF pp.2--3 and note [19], p.5: operational asymptotic GHZ yield. For every error/rate tolerance, every sufficiently large positive input length has a deterministic LOCC output of full trace-norm error at most epsilon. This is the vanishing-error, liminf-yield formulation; preprocessing success probabilities cannot be discarded.distillableGHZ: PDF pp.2--3: Bell-pair rate for N=2, GHZ rate for N>=2. Extended suprema avoid default values of unbounded real suprema.ProductVectors: PDF pp.2--3: one vector in each local shield, with norms checked separately.UnitFactors: PDF p.2, Eq.(2.2), carried to Eq.(2.5): all local factors are unit vectors.productElement: PDF pp.2--3: conjugate-linear bra, linear ket, on the whole shield.productOverlap: PDF pp.2--3, Eqs.(2.2),(2.5): supremum over exactly normalized product vectors. For positive finite shields this set is nonempty, compact and bounded; the rate theorems assert attainment instead of presupposing a maximizing pair.Maximizes: A maximizing normalized pair; existence is a conclusion below.shieldBlock: PDF pp.2--3: the computed joint-shield block U_i rho U_j^dagger.privateDiagonalWeight: PDF pp.2--3: a_s is computed from the same maximizing vector as eta.filterSuccess: Corrected branch probability and normalized phase parameter, PDF pp.2--3. Theorems establish a,b>0 and 0<eta<=sqrt(a*b) before using these quantities.phaseParameter: PDF pp.2--3: probability of the plus-phase GHZ component.filterYield: Corrected probability-weighted hashing yield, not a conditional branch rate.localFilter: Explicit balanced success operator, PDF pp.2--3. Party 0 balances the weights and removes the coherence phase; other parties project their shields. This rectangular operator alone is trace decreasing, not a TP protocol.jointFilter: Tensor product of precisely the local success operators.filteredBranch: The actual unnormalized all-success output, not an arbitrary output state.PairConclusion: Data and exact success identity used by both quantitative conclusions. Every positivity, probability domain and Cauchy--Schwarz bound is a conclusion.KeyPair: Distinct ordered key pairs; the domain is nonempty at d>=2.bestPairYield: PDF p.3: the finite maximum over all key pairs for the chosen maximizing vectors. The finite nonempty domain at d>=2 guards the real supremum.bipartitePrivateRaw: Bipartite private constructor, with the accepted exact block formula. Only the parentheses and the two fixed local bases are changed; each shield stays with its owner. Raw twists allow the explicitly computed tensor twists below to be checked for unitarity in the tensor-closure conclusion.bipartitePrivate: PDF pp.1,4: the physical bipartite private state; rho is normalized in uses.asTwoParties: Fixed bipartite-to-partywise adapter, with party 0 Alice and party 1 Bob.bipartiteDistillable: PDF pp.2,4: ordinary Bell-pair distillability, the two-party specialization.KeyAchievable: PDF p.4: private-key rate, using deterministic accepted finite LOCC maps, full trace norm and arbitrary positive finite output shields at every n. The denominator counts input copies and the numerator counts only key bits. All sufficiently large positive n are covered; no optimal sequence is assumed.distillableKey: PDF pp.3--4: operational distillable key, including rate zero.regroupIndex: PDF p.4: regroup key and shield copy tuples without changing either owner.tensorTwists: PDF p.4: the computed twist for a key tuple, not an existential new twist.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P42
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67
/-!
Horodecki--Augusiak, arXiv:quant-ph/0602176v2, PDF pp.1--5.
All new objects are paper-local adapters or explicit operational definitions.
Rates are nonnegative extended suprema, in bits per input copy. LOCC uses
complete adaptive instruments and unconditional outputs. No optimal protocol
or attainment of an asymptotic rate is assumed. Compilation is pending.
-/
namespace QAlgorithms.Papers.Independent.Gap48.P42
open scoped BigOperators Matrix ComplexConjugate ComplexOrder ENNReal
noncomputable section
attribute [local instance] Classical.propDecidable Classical.decEq
/-- PDF pp.2--3: party k owns a register of dimension D k. -/
abbrev PartyBasis {N : ℕ} (D : Fin N → ℕ) :=
Claimed50.P33.RegisterBasis (fun k => Fin (D k))
/-- Fixed local basis relabeling; used identically on bras and kets. -/
def localIndex (a b : ℕ) : (Fin a × Fin b) ≃ Fin (a * b) :=
Fintype.equivFinOfCardEq (by simp)
/-- PDF pp.2--4: independent copies, grouped by the original owners.
The local copy enumeration is the accepted fixed enumeration. -/
def partyPower {N : ℕ} {D : Fin N → ℕ}
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ) (n : ℕ) :
Matrix (PartyBasis (fun k => D k ^ n)) (PartyBasis (fun k => D k ^ n)) ℂ :=
fun x y => ∏ t : Fin n, rho
(fun k => (Dependency50.P42.copyIndex (D k) n).symm (x k) t)
(fun k => (Dependency50.P42.copyIndex (D k) n).symm (y k) t)
/-- PDF p.2, multipartite private dit, after a fixed local basis relabeling.
The accepted constructor includes the full joint-shield twists. -/
def indexedPrivateDit {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ) :
Matrix (PartyBasis (fun k => d * S k)) (PartyBasis (fun k => d * S k)) ℂ :=
fun x y => Claimed50.P33.privateDit (m := N) (H := fun k => Fin (S k)) d rho
(fun i => ⟨(U i : Matrix (PartyBasis S) (PartyBasis S) ℂ), by
constructor
· ext a b
have hab := congrFun (congrFun (U i).property.1 a) b
by_cases heq : a = b <;>
simpa only [Matrix.one_apply, heq, if_true, if_false] using hab
· ext a b
have hab := congrFun (congrFun (U i).property.2 a) b
by_cases heq : a = b <;>
simpa only [Matrix.one_apply, heq, if_true, if_false] using hab⟩)
(fun k => (localIndex d (S k)).symm (x k))
(fun k => (localIndex d (S k)).symm (y k))
/-- PDF pp.2--3: deterministic conversion by a complete finite adaptive
LOCC tree, including arbitrary local ancillary dimensions and disposal.
Density proofs are existentially certified, never assumptions deleting a result. -/
def CanConvert {N : ℕ} (D E : Fin N → ℕ)
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ)
(sigma : Matrix (PartyBasis E) (PartyBasis E) ℂ) : Prop :=
∃ hD : ∀ k, 0 < D k, ∃ hE : ∀ k, 0 < E k,
∃ hrho : IsDensityMatrix rho, ∃ hsigma : IsDensityMatrix sigma,
Claimed50.P33.LOCC ⟨D, hD, rho, hrho⟩ [(1, ⟨E, hE, sigma, hsigma⟩)]
/-- PDF pp.2--3,4: a positive-probability selected outcome of a complete
LOCC tree; its other outcomes are retained in the underlying tree. -/
def CanSelect {N : ℕ} (D E : Fin N → ℕ)
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ)
(sigma : Matrix (PartyBasis E) (PartyBasis E) ℂ) : Prop :=
∃ hD : ∀ k, 0 < D k, ∃ hE : ∀ k, 0 < E k,
∃ hrho : IsDensityMatrix rho, ∃ hsigma : IsDensityMatrix sigma,
∃ out : List (ℝ × Claimed50.P33.FiniteState N),
Claimed50.P33.LOCC ⟨D, hD, rho, hrho⟩ out ∧
∃ p : ℝ, 0 < p ∧ (p, ⟨E, hE, sigma, hsigma⟩) ∈ out
/-- PDF p.3: normalized GHZ plus/minus kets on distinct local labels i,j.
All uses have N>=2 and i<j. -/
def twoLabelGHZVector (N d : ℕ) (i j : Fin d) (minus : Bool) :
EuclideanSpace ℂ (Fin N → Fin d) :=
WithLp.toLp 2 fun x => (Real.sqrt 2 : ℂ)⁻¹ *
((if ∀ k, x k = i then 1 else 0) +
(if ∀ k, x k = j then (if minus then -1 else 1) else 0))
/-- PDF p.3, Eq.(2.6): the two-phase GHZ mixture, with p in [0,1] in uses. -/
def twoPhaseGHZMixture (N d : ℕ) (i j : Fin d) (p : ℝ) :
Matrix (Fin N → Fin d) (Fin N → Fin d) ℂ :=
(p : ℂ) • pureDensity (twoLabelGHZVector N d i j false) +
((1 - p : ℝ) : ℂ) • pureDensity (twoLabelGHZVector N d i j true)
/-- PDF pp.2--3: m N-party qubit GHZ states, keeping all m qubits per party. -/
def ghzCopies (N m : ℕ) :
Matrix (Fin N → Fin (2 ^ m)) (Fin N → Fin (2 ^ m)) ℂ :=
partyPower (pureDensity (twoLabelGHZVector N 2 0 1 false)) m
/-- PDF pp.2--3 and note [19], p.5: operational asymptotic GHZ yield.
For every error/rate tolerance, every sufficiently large positive input length
has a deterministic LOCC output of full trace-norm error at most epsilon.
This is the vanishing-error, liminf-yield formulation; preprocessing success
probabilities cannot be discarded. -/
def GHZAchievable {N : ℕ} (D : Fin N → ℕ)
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ) (r : ℝ) : Prop :=
0 ≤ r ∧ ∀ epsilon > (0 : ℝ), ∀ delta > (0 : ℝ), ∃ n0 : ℕ,
∀ n : ℕ, n0 ≤ n → 0 < n → ∃ m : ℕ,
∃ sigma : Matrix (Fin N → Fin (2 ^ m)) (Fin N → Fin (2 ^ m)) ℂ,
CanConvert (fun k => D k ^ n) (fun _ => 2 ^ m) (partyPower rho n) sigma ∧
traceNorm (sigma - ghzCopies N m) ≤ epsilon ∧ r - delta ≤ (m : ℝ) / n
/-- PDF pp.2--3: Bell-pair rate for N=2, GHZ rate for N>=2. Extended
suprema avoid default values of unbounded real suprema. -/
def distillableGHZ {N : ℕ} (D : Fin N → ℕ)
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ) : ℝ≥0∞ :=
⨆ r : {r : ℝ // GHZAchievable D rho r}, ENNReal.ofReal r.val
/-- PDF pp.2--3: one vector in each local shield, with norms checked separately. -/
abbrev ProductVectors {N : ℕ} (S : Fin N → ℕ) :=
(k : Fin N) → EuclideanSpace ℂ (Fin (S k))
/-- PDF p.2, Eq.(2.2), carried to Eq.(2.5): all local factors are unit vectors. -/
def UnitFactors {N : ℕ} {S : Fin N → ℕ} (f : ProductVectors S) : Prop :=
∀ k, ‖f k‖ = 1
/-- PDF pp.2--3: conjugate-linear bra, linear ket, on the whole shield. -/
def productElement {N : ℕ} {S : Fin N → ℕ}
(X : Matrix (PartyBasis S) (PartyBasis S) ℂ) (f g : ProductVectors S) : ℂ :=
∑ x : PartyBasis S, ∑ y : PartyBasis S,
conj (∏ k, f k (x k)) * X x y * (∏ k, g k (y k))
/-- PDF pp.2--3, Eqs.(2.2),(2.5): supremum over exactly normalized product
vectors. For positive finite shields this set is nonempty, compact and bounded;
the rate theorems assert attainment instead of presupposing a maximizing pair. -/
def productOverlap {N : ℕ} {S : Fin N → ℕ}
(X : Matrix (PartyBasis S) (PartyBasis S) ℂ) : ℝ :=
sSup {r : ℝ | ∃ f g : ProductVectors S,
UnitFactors f ∧ UnitFactors g ∧ r = ‖productElement X f g‖}
/-- A maximizing normalized pair; existence is a conclusion below. -/
def Maximizes {N : ℕ} {S : Fin N → ℕ}
(X : Matrix (PartyBasis S) (PartyBasis S) ℂ) (f g : ProductVectors S) : Prop :=
UnitFactors f ∧ UnitFactors g ∧ ‖productElement X f g‖ = productOverlap X
/-- PDF pp.2--3: the computed joint-shield block U_i rho U_j^dagger. -/
def shieldBlock {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ) (i j : Fin d) :
Matrix (PartyBasis S) (PartyBasis S) ℂ :=
(U i : Matrix (PartyBasis S) (PartyBasis S) ℂ) * rho *
(U j : Matrix (PartyBasis S) (PartyBasis S) ℂ)ᴴ
/-- PDF pp.2--3: a_s is computed from the same maximizing vector as eta. -/
def privateDiagonalWeight {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ) (i : Fin d)
(f : ProductVectors S) : ℝ := (productElement (shieldBlock rho U i i) f f).re
/-- Corrected branch probability and normalized phase parameter, PDF pp.2--3.
Theorems establish a,b>0 and 0<eta<=sqrt(a*b) before using these quantities. -/
def filterSuccess (d : ℕ) (a b : ℝ) : ℝ := 2 * min a b / d
/-- PDF pp.2--3: probability of the plus-phase GHZ component. -/
def phaseParameter (eta a b : ℝ) : ℝ := 1 / 2 + eta / (2 * Real.sqrt (a * b))
/-- Corrected probability-weighted hashing yield, not a conditional branch rate. -/
def filterYield (d : ℕ) (eta a b : ℝ) : ℝ :=
filterSuccess d a b * (1 - QAlgorithms.binEntropy2 (phaseParameter eta a b))
/-- Explicit balanced success operator, PDF pp.2--3. Party 0 balances the
weights and removes the coherence phase; other parties project their shields.
This rectangular operator alone is trace decreasing, not a TP protocol. -/
def localFilter {N d : ℕ} {S : Fin N → ℕ} (i j : Fin d)
(f g : ProductVectors S) (a b : ℝ) (c : ℂ) (k : Fin N) :
Matrix (Fin d) (Fin (d * S k)) ℂ :=
fun x y =>
let z := (localIndex d (S k)).symm y
(if x = i ∧ z.1 = i then
(if k.val = 0 then (Real.sqrt (min a b / a) : ℂ) else 1) * conj (f k z.2)
else 0) +
(if x = j ∧ z.1 = j then
(if k.val = 0 then (Real.sqrt (min a b / b) : ℂ) * (c / (‖c‖ : ℂ)) else 1) *
conj (g k z.2) else 0)
/-- Tensor product of precisely the local success operators. -/
def jointFilter {N d : ℕ} {S : Fin N → ℕ} (i j : Fin d)
(f g : ProductVectors S) (a b : ℝ) (c : ℂ) :
Matrix (Fin N → Fin d) (PartyBasis (fun k => d * S k)) ℂ :=
fun x y => ∏ k, localFilter i j f g a b c k (x k) (y k)
/-- The actual unnormalized all-success output, not an arbitrary output state. -/
def filteredBranch {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ) (i j : Fin d)
(f g : ProductVectors S) : Matrix (Fin N → Fin d) (Fin N → Fin d) ℂ :=
let K := jointFilter i j f g (privateDiagonalWeight rho U i f) (privateDiagonalWeight rho U j g)
(productElement (shieldBlock rho U i j) f g)
K * indexedPrivateDit rho U * Kᴴ
/-- Data and exact success identity used by both quantitative conclusions.
Every positivity, probability domain and Cauchy--Schwarz bound is a conclusion. -/
def PairConclusion {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ) (i j : Fin d)
(f g : ProductVectors S) : Prop :=
let eta := productOverlap (shieldBlock rho U i j)
let a := privateDiagonalWeight rho U i f
let b := privateDiagonalWeight rho U j g
let p := phaseParameter eta a b
let q := filterSuccess d a b
0 < eta ∧ 0 < a ∧ 0 < b ∧ eta ≤ Real.sqrt (a * b) ∧
0 < q ∧ q ≤ 1 ∧ 1 / 2 < p ∧ p ≤ 1 ∧
(∀ k, (1 - (localFilter i j f g a b
(productElement (shieldBlock rho U i j) f g) k)ᴴ *
localFilter i j f g a b (productElement (shieldBlock rho U i j) f g) k).PosSemidef) ∧
filteredBranch rho U i j f g = (q : ℂ) • twoPhaseGHZMixture N d i j p ∧
(filteredBranch rho U i j f g).trace.re = q ∧
0 < filterYield d eta a b ∧
ENNReal.ofReal (filterYield d eta a b) ≤
distillableGHZ (fun k => d * S k) (indexedPrivateDit rho U)
/-- Distinct ordered key pairs; the domain is nonempty at d>=2. -/
abbrev KeyPair (d : ℕ) := {p : Fin d × Fin d // p.1 < p.2}
/-- PDF p.3: the finite maximum over all key pairs for the chosen maximizing
vectors. The finite nonempty domain at d>=2 guards the real supremum. -/
def bestPairYield {N d : ℕ} {S : Fin N → ℕ}
(rho : Matrix (PartyBasis S) (PartyBasis S) ℂ)
(U : Fin d → Matrix.unitaryGroup (PartyBasis S) ℂ)
(v : KeyPair d → ProductVectors S × ProductVectors S) : ℝ :=
sSup (Set.range fun p : KeyPair d => filterYield d
(productOverlap (shieldBlock rho U p.val.1 p.val.2))
(privateDiagonalWeight rho U p.val.1 (v p).1)
(privateDiagonalWeight rho U p.val.2 (v p).2))
/-- Bipartite private constructor, with the accepted exact block formula.
Only the parentheses and the two fixed local bases are changed; each shield
stays with its owner. Raw twists allow the explicitly computed tensor twists
below to be checked for unitarity in the tensor-closure conclusion. -/
def bipartitePrivateRaw {d a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
(U : Fin d → Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) :
Matrix (Fin (d * a) × Fin (d * b)) (Fin (d * a) × Fin (d * b)) ℂ :=
fun x y =>
let xa := (localIndex d a).symm x.1
let xb := (localIndex d b).symm x.2
let ya := (localIndex d a).symm y.1
let yb := (localIndex d b).symm y.2
Information100.P67.privateState U rho
(xa.1, (xa.2, (xb.1, xb.2))) (ya.1, (ya.2, (yb.1, yb.2)))
/-- PDF pp.1,4: the physical bipartite private state; rho is normalized in uses. -/
def bipartitePrivate {d a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
(U : Fin d → Matrix.unitaryGroup (Fin a × Fin b) ℂ) :=
bipartitePrivateRaw rho (fun i => (U i : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ))
/-- Fixed bipartite-to-partywise adapter, with party 0 Alice and party 1 Bob. -/
def asTwoParties {a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) :
Matrix (PartyBasis ![a, b]) (PartyBasis ![a, b]) ℂ :=
fun x y => rho (x 0, x 1) (y 0, y 1)
/-- PDF pp.2,4: ordinary Bell-pair distillability, the two-party specialization. -/
def bipartiteDistillable {a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) : ℝ≥0∞ :=
distillableGHZ ![a, b] (asTwoParties rho)
/-- PDF p.4: private-key rate, using deterministic accepted finite LOCC maps,
full trace norm and arbitrary positive finite output shields at every n.
The denominator counts input copies and the numerator counts only key bits.
All sufficiently large positive n are covered; no optimal sequence is assumed. -/
def KeyAchievable {a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) (r : ℝ) : Prop :=
0 ≤ r ∧ ∀ epsilon > (0 : ℝ), ∀ delta > (0 : ℝ), ∃ n0 : ℕ,
∀ n : ℕ, n0 ≤ n → 0 < n →
∃ d s t : ℕ, 0 < d ∧ 0 < s ∧ 0 < t ∧
∃ tau : Matrix (Fin s × Fin t) (Fin s × Fin t) ℂ, IsDensityMatrix tau ∧
∃ U : Fin d → Matrix.unitaryGroup (Fin s × Fin t) ℂ,
∃ L : Superop (Fin (a ^ n) × Fin (b ^ n)) (Fin (d * s) × Fin (d * t)),
Information100.P21.FiniteLOCC L ∧
traceNorm (L (Dependency50.P42.dimensionedPower rho n) - bipartitePrivate tau U) ≤ epsilon ∧
r - delta ≤ Real.logb 2 d / n
/-- PDF pp.3--4: operational distillable key, including rate zero. -/
def distillableKey {a b : ℕ}
(rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ) : ℝ≥0∞ :=
⨆ r : {r : ℝ // KeyAchievable rho r}, ENNReal.ofReal r.val
/-- PDF p.4: regroup key and shield copy tuples without changing either owner. -/
def regroupIndex (d a m : ℕ) : Fin (d ^ m * a ^ m) → Fin ((d * a) ^ m) :=
fun x =>
let z := (localIndex (d ^ m) (a ^ m)).symm x
Dependency50.P42.copyIndex (d * a) m (fun t => localIndex d a
((Dependency50.P42.copyIndex d m).symm z.1 t,
(Dependency50.P42.copyIndex a m).symm z.2 t))
/-- PDF p.4: the computed twist for a key tuple, not an existential new twist. -/
def tensorTwists {d a b : ℕ}
(U : Fin d → Matrix.unitaryGroup (Fin a × Fin b) ℂ) (m : ℕ) :
Fin (d ^ m) → Matrix (Fin (a ^ m) × Fin (b ^ m)) (Fin (a ^ m) × Fin (b ^ m)) ℂ :=
fun key x y => ∏ t : Fin m,
(U ((Dependency50.P42.copyIndex d m).symm key t) :
Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
((Dependency50.P42.copyIndex a m).symm x.1 t,
(Dependency50.P42.copyIndex b m).symm x.2 t)
((Dependency50.P42.copyIndex a m).symm y.1 t,
(Dependency50.P42.copyIndex b m).symm y.2 t)
/-- Sanity: no-copy party power is the scalar-one entry. -/
example {N : ℕ} {D : Fin N → ℕ} (rho : Matrix (PartyBasis D) (PartyBasis D) ℂ)
(x y : PartyBasis (fun k => D k ^ 0)) : partyPower rho 0 x y = 1 := by
simp [partyPower]
/-- Sanity: the bipartite adapter keeps the off-diagonal entries on the same cut. -/
example {a b : ℕ} (rho : Matrix (Fin a × Fin b) (Fin a × Fin b) ℂ)
(x y : PartyBasis ![a, b]) : asTwoParties rho x y = rho (x 0, x 1) (y 0, y 1) := rfl
/-- Sanity: vanishing coherence gives the unbiased phase mixture. -/
example (a b : ℝ) : phaseParameter 0 a b = 1 / 2 := by
simp [phaseParameter]
/-- Sanity: unit diagonal weights yield success 2/d, including d=2. -/
example (d : ℕ) : filterSuccess d 1 1 = 2 / (d : ℝ) := by
simp [filterSuccess]
/-- Sanity: the plus endpoint is the pure GHZ target. -/
example (N d : ℕ) (i j : Fin d) :
twoPhaseGHZMixture N d i j 1 = pureDensity (twoLabelGHZVector N d i j false) := by
simp [twoPhaseGHZMixture]
/-- Sanity: the computed tensor twist is the empty product at zero copies. -/
example {d a b : ℕ} (U : Fin d → Matrix.unitaryGroup (Fin a × Fin b) ℂ)
(key : Fin (d ^ 0)) (x y : Fin (a ^ 0) × Fin (b ^ 0)) :
tensorTwists U 0 key x y = 1 := by
simp [tensorTwists]
/-- Sanity: a deterministic LOCC conversion is already a positive selected branch. -/
example {N : ℕ} (D E : Fin N → ℕ)
(rho : Matrix (PartyBasis D) (PartyBasis D) ℂ)
(sigma : Matrix (PartyBasis E) (PartyBasis E) ℂ) (h : CanConvert D E rho sigma) :
CanSelect D E rho sigma := by
rcases h with ⟨hD, hE, hrho, hsigma, hL⟩
exact ⟨hD, hE, hrho, hsigma, [(1, ⟨E, hE, sigma, hsigma⟩)], hL,
1, by norm_num, by simp⟩
end
end QAlgorithms.Papers.Independent.Gap48.P42
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Gap48.P42.CanConvert
For any natural number , dimension assignments , and complex matrices indexed respectively by tuples with local dimensions , means that every and is strictly positive, both matrices are positive semidefinite with trace , and the following finitely generated protocol relation takes the bundled state to exactly the singleton output list . The relation permits stopping at any state , yielding ; it permits a local instrument followed by a separate such protocol on every outcome, multiplying the instrument weight by each subsequent output weight and concatenating the resulting lists; and it permits replacing an output list by its weighted mixture when all output states have the same local dimensions. More explicitly, a local instrument consists of finitely many nonnegative weights summing to , density matrices with positive local dimensions, a selected party, and finitely many Kraus matrices acting on that party, with every other party’s dimension unchanged. Their full-system lifts have entry when every other numerical coordinate of agrees, and entry otherwise; they must satisfy and . The mixture rule requires the target matrix entries to equal the weighted sum of the output entries, with entries outside a state’s coordinate bounds interpreted as zero. No lower bound on is required; if any specified local dimension is zero, the predicate is false.
QAlgorithms.Papers.Independent.Gap48.P42.CanSelect
For any natural number , natural dimension assignments , and complex matrices on the corresponding tuple-indexed spaces, means that all local dimensions are strictly positive, both matrices are positive semidefinite with trace , and there exists a finite protocol output list containing the exact pair for some real . The protocol relation is the smallest relation generated by stopping with the single output , applying a local instrument and then outcome-dependent protocols with their weights multiplied and lists concatenated, and forgetting an output list by replacing it with its weighted mixture when all output dimensions agree. A local instrument has finitely many nonnegative outcome weights summing to , normalized positive semidefinite branch matrices , positive branch dimensions, one selected party, and finitely many Kraus matrices on that party; other parties’ dimensions remain unchanged. The full-system lift equals on the selected coordinates and enforces equality of every other numerical coordinate. It satisfies and . Forgetting requires equality of the target entries with the weighted sum of the output entries, extending each state’s entries by zero outside its dimension bounds. The selected pair need only occur in the list; it need not be its sole entry, and other occurrences of the same state are allowed. The definition includes ; any zero dimension in or makes it false.
QAlgorithms.Papers.Independent.Gap48.P42.GHZAchievable
For any natural number , natural dimensions , arbitrary complex matrix on , and real , this predicate requires and the following: for every and , there exists a natural such that every natural with admits a natural and a density matrix on satisfying
together with an exact finite protocol conversion from to . Here is the grouped tensor power: decode each local index in into a length- tuple by the fixed cardinality-chosen bijection, and multiply the corresponding entries of . The target is the similarly grouped -fold tensor power of , where . The trace norm is . Exact conversion requires positive input and output local dimensions, positive semidefinite trace-one input and output matrices, and a protocol ending in the singleton list . Such protocols are generated by stopping, finite local instruments with outcome-dependent continuation, and forgetting outcomes by taking their weighted mixture when dimensions agree. Each instrument has nonnegative weights summing to , density-matrix branch states, and Kraus operators acting on one party with identities on the others, satisfying and ; continuation weights multiply, and forgetting sums weighted matrix entries. There is no separate density assumption on , but every required must be a density matrix. Zero parties and are permitted; any zero makes the predicate false, since is required.
QAlgorithms.Papers.Independent.Gap48.P42.KeyAchievable
For arbitrary natural numbers , a complex matrix on , and a real number , this predicate means and the following: for every , there exists such that, for every with , there exist positive integers , a positive semidefinite matrix of trace one on , unitaries on that space for , and a map from matrices on to matrices on , such that
Here belongs to the recursively generated class consisting of identity maps and finite complete local Kraus measurements by either party, followed by an outcome-dependent map in that same class, with the outcome branches summed. The source tensor power has entries , regrouped through chosen finite-cardinality equivalences into dimensions . Using chosen equivalences and similarly for , the target has entries when the two parties’ row key labels both equal and their column key labels both equal , and zero otherwise. The norm is , without a factor of one half. The input is not assumed to be a density matrix, and may be zero; is allowed, whereas is excluded from the requirements.
QAlgorithms.Papers.Independent.Gap48.P42.KeyPair
For every natural number , this is the type of ordered pairs of integers with . It is empty when or .
QAlgorithms.Papers.Independent.Gap48.P42.Maximizes
For any , dimensions , complex matrix indexed by , and families , this predicate requires for every , and requires
Thus it asserts attainment by the supplied families, without asserting their uniqueness. If any , the predicate is impossible; for , it holds for the unique empty families.
QAlgorithms.Papers.Independent.Gap48.P42.PairConclusion
For arbitrary natural numbers , local dimensions for , a complex matrix indexed by , unitaries on this space for , labels , and families of local vectors , this defines the following conjunction; there is no hypothesis here that is a density matrix, that the local vectors are normalized, that , or that . Write , , , , , and . Let be the real supremum of over all families with every local factor of norm one; put , , and , where is binary entropy in bits. For each party, use the chosen finite-cardinality equivalence , and define
Let , and let be the matrix whose entry between configurations and , expressed through the , is
Finally, set and . The conjunction is
Here is the supremum of over real such that, for every , all sufficiently large positive integers admit an integer and a density matrix on local dimensions , obtained deterministically from by the following finite local-operation relation, with and . That relation starts with the unchanged state, permits finite local Kraus instruments whose operators satisfy global completeness and whose branches satisfy , permits recursive branch-dependent operations with multiplied probabilities, and permits forgetting a finite output list by replacing it with its weighted mixture when all output dimensions agree. The target uses , ; tensor powers are regrouped separately at each party through chosen finite-cardinality equivalences, and . Zero parties, zero local dimensions, and equal labels are included wherever the supplied arguments exist; empty products equal one, and the conjunction itself imposes the displayed positivity conditions.
QAlgorithms.Papers.Independent.Gap48.P42.PartyBasis
For any natural number and any assignment of natural numbers to indices , is the set of tuples with . Zero dimensions are permitted: this set is empty if some . When , it consists of the unique empty tuple.
QAlgorithms.Papers.Independent.Gap48.P42.ProductVectors
For any natural number and natural local dimensions , is the type of families , where each is a complex Euclidean vector indexed by . This abbreviation imposes no normalization or nonzero condition and does not itself form a tensor product. If , that component is the unique zero vector in the zero-dimensional space; if , there is exactly one such family, the empty family.
QAlgorithms.Papers.Independent.Gap48.P42.UnitFactors
For any natural number , any dimensions indexed by , and any family with , this predicate means that every factor has Euclidean norm one:
For the condition is vacuous. If some , it cannot hold, since the corresponding vector space contains only the zero vector.
QAlgorithms.Papers.Independent.Gap48.P42.asTwoParties
For all natural numbers and every complex matrix indexed by , this defines the same entries using configurations of two indexed parties: a configuration has and , and the resulting matrix satisfies . No positivity or normalization is required, and or is allowed.
QAlgorithms.Papers.Independent.Gap48.P42.bestPairYield
For arbitrary natural numbers , dimensions , a complex matrix on , unitaries on that space for , and an assignment choosing two local-vector families for every , this defines the real supremum, over those pairs, of
Here , , , , and is the real supremum of over product vectors , with every local factor of norm one. The chosen families need not be normalized or attain that supremum, and need not be positive or have trace one. The entropy function is , with the total real-logarithm convention and for negative ; real square roots of negative numbers and division by zero are zero. Thus no admissibility or positivity conditions are imposed on these yield expressions. The supremum is zero for , when there are no pairs; an empty set of unit local-factor families likewise gives zero for the corresponding real supremum.
QAlgorithms.Papers.Independent.Gap48.P42.bipartiteDistillable
For natural numbers and any complex matrix on , this defines an extended nonnegative real number as the supremum of over real rates satisfying the following condition: for every , there is such that every with admits and a density matrix on two local spaces of dimension , deterministically obtainable from the regrouped tensor power , such that and , where and . The source is represented as two indexed parties by replacing with the entry indexed by configurations . Tensor copies are regrouped at each party through chosen equivalences and similarly for , and . Deterministic obtainability means the finite local-operation relation generated by leaving a state unchanged, finite local Kraus instruments with complete Kraus families and branch identities , recursive branch-dependent operations with multiplied probabilities, and forgetting an output list by taking its weighted mixture when all output dimensions agree; the final list must consist solely of . Every state appearing in this relation has positive local dimensions and is positive semidefinite with trace one. No such assumptions are imposed on the argument itself; if no rate satisfies the condition, the supremum is zero. The choices and or are included, although zero source dimensions cannot satisfy the conversion requirement for positive .
QAlgorithms.Papers.Independent.Gap48.P42.bipartitePrivate
For arbitrary natural numbers , any complex matrix on , and unitaries on that space for , this defines the matrix on with entries
The displayed key-and-shield coordinates are converted to the actual indices using the chosen finite-cardinality equivalences and . The input matrix is not assumed to be a density matrix. Zero dimensions are permitted and produce an empty output index set.
QAlgorithms.Papers.Independent.Gap48.P42.bipartitePrivateRaw
For arbitrary natural numbers , any complex matrix on , and any family of complex matrices on that same space indexed by , this defines a matrix on . Let and be the chosen equivalences obtained from equality of finite cardinalities. Decode its row as and its column as . Then
There is no positivity, trace, or unitarity assumption. The equivalences are chosen by finite cardinality rather than specified arithmetic encodings. Zero values of are allowed and give an empty output index set.
QAlgorithms.Papers.Independent.Gap48.P42.distillableGHZ
For any natural number , natural dimension assignment , and arbitrary complex matrix on , this definition is an extended nonnegative real number: the supremum of over real rates satisfying the following property. The rate is nonnegative, and for every there is a natural such that, for every natural with , some natural and density matrix on local spaces of dimension obey and , and admit an exact finite protocol conversion from to . Here has entries given by products of entries of , with each local index decoded through the fixed cardinality-chosen bijection between and length- local tuples; is the grouped -fold tensor power of , where . The exact conversion requires positive local dimensions and density matrices at its endpoints and ends in the singleton weighted output . Its finite protocol relation is generated by stopping, finite local instruments followed by outcome-dependent protocols, and forgetting an output list through its weighted mixture when all dimensions agree. Instruments have nonnegative weights summing to , density-matrix branches, and one-party Kraus operators lifted by identities on the other parties, satisfying and ; successive weights multiply. No positivity or normalization is separately assumed for . The supremum is if there are no eligible rates and may be . Zero parties and zero output-copy counts are included; if some , no rate is eligible and the value is .
QAlgorithms.Papers.Independent.Gap48.P42.distillableKey
For all natural numbers and every complex matrix on , this defines the supremum in of over all real with this property: for every , all sufficiently large positive integers admit positive integers , a density matrix on local dimensions , unitaries for , and a finite local-operation map satisfying and . A density matrix means a positive semidefinite matrix of trace one. The permitted maps are generated recursively from identity maps by finite complete local Kraus measurements on either party and outcome-dependent permitted maps, summing the output branches. The target , on dimensions , has entries when both row key labels equal and both column key labels equal , and zero otherwise; key-and-shield coordinates are identified with the output indices by chosen finite-cardinality equivalences. The source tensor power is likewise regrouped separately at the two parties using chosen equivalences, and . There is no density-matrix assumption on , zero values of are allowed, and the supremum is zero if there are no qualifying rates; it may otherwise be infinite.
QAlgorithms.Papers.Independent.Gap48.P42.filterSuccess
For every natural number and arbitrary real numbers , this defines
Division is total, with division by zero equal to zero, so the value is when . There are no sign or magnitude restrictions on , and the definition does not require its value to lie in .
QAlgorithms.Papers.Independent.Gap48.P42.filterYield
For every and arbitrary real numbers , this defines
These are total real operations: square roots of negative numbers and divisions by zero are zero; the real logarithm is defined at zero as zero and at negative arguments using their absolute values. There are no positivity or probability-range assumptions. In particular, gives value , and gives entropy argument and hence value .
QAlgorithms.Papers.Independent.Gap48.P42.filteredBranch
For any , dimensions , arbitrary complex matrix indexed by , unitary matrices on this index set for , indices , and families , put and
For a configuration , write , where is the chosen bijection from to . Define a matrix on these configurations by
and define the matrix , with rows , by
The declaration defines the output matrix to be , indexed by . No density-matrix condition on , unit-norm condition on the factors, or distinctness of is assumed. The indices require ; and zero local dimensions remain permitted, with empty products equal to , empty sums equal to , and universal conditions over no parties vacuous. Division by zero and square roots of negative real arguments are zero.
QAlgorithms.Papers.Independent.Gap48.P42.ghzCopies
For any natural numbers , this definition gives a complex matrix indexed by -tuples of elements of . Let be the cardinality-chosen bijection from length- tuples over to , and put for binary -tuples . The entries are
Thus the construction takes the entrywise grouped -fold tensor power of the matrix , using those chosen index bijections. Both and are included: for the singleton-indexed matrix has entry , while for its sole entry is .
QAlgorithms.Papers.Independent.Gap48.P42.indexedPrivateDit
For any natural numbers , natural dimensions , arbitrary complex matrix indexed by , and family of unitary matrices on that same space indexed by , this definition gives a matrix indexed by . Decode each row coordinate and column coordinate through the inverses of the cardinality-chosen bijections , writing the decoded pairs as and . The matrix entry is
Here is interpreted in , with , and denotes conjugate transpose. No density-matrix assumption is imposed on , and no positivity assumption is imposed on or the dimensions . If , the defining sum is empty and the result is the zero matrix. If , the conditions on the key coordinates are vacuous, so the sole entry is .
QAlgorithms.Papers.Independent.Gap48.P42.jointFilter
For any , dimensions , indices , families , real numbers , and complex number , this defines a matrix with rows and columns . For each , write , using the chosen finite-cardinality bijection . The entry is
No normalization, positivity, or distinctness of is required. All divisions and square roots are total, with division by zero and square roots of negative arguments equal to zero. The indices require , but is allowed: both matrix index sets then have one element and the empty product gives entry . For , any zero local dimension makes the column index set empty.
QAlgorithms.Papers.Independent.Gap48.P42.localFilter
For any , dimensions , indices , vector families , real numbers , complex number , and party , this defines a complex matrix with rows and columns . Let , where is the chosen bijection supplied by equality of the finite cardinalities. Its entry is
Here indicators are when their conditions hold and otherwise. No normalization, positivity, or condition is imposed; if , both terms can contribute to the same entry. Square roots of negative arguments and divisions by zero are zero, including when . The supplied indices require ; gives no columns.
QAlgorithms.Papers.Independent.Gap48.P42.localIndex
For every pair of natural numbers , is a bijection from to , chosen using equality of their finite cardinalities. The definition specifies no explicit arithmetic formula for this bijection. If or , both its domain and codomain are empty.
QAlgorithms.Papers.Independent.Gap48.P42.partyPower
For any natural number , natural local dimensions , complex matrix indexed by tuples in , and natural number , this definition produces a complex matrix indexed by . For each , let be the cardinality-chosen bijection from length- tuples over to . Its entries are
There is no positivity, Hermiticity, or normalization assumption on . When , every local dimension is , including when , and the resulting singleton-indexed matrix has entry . When , has one entry and the result is that entry raised to the power .
QAlgorithms.Papers.Independent.Gap48.P42.phaseParameter
For arbitrary real numbers , this defines
The real square root is zero for nonpositive arguments, and division by zero is defined as zero. Consequently, when , the value is . No assumptions restrict this expression to .
QAlgorithms.Papers.Independent.Gap48.P42.privateDiagonalWeight
For any , dimensions , arbitrary complex matrix indexed by , family of unitary matrices on this index set, index , and vectors , this defines the real number
Neither normalization of the factors nor any density-matrix condition on is required. The index requires . If any local dimension is zero, the sums are empty and the value is ; for , the products are and the value is the real part of the sole entry of .
QAlgorithms.Papers.Independent.Gap48.P42.productElement
For any , dimensions , complex matrix indexed by the configurations , and families , this defines the complex number
No normalization or positivity is required. When , the configuration set has one element and both products are , so the result is the sole entry of . If any , the configuration set is empty and the result is .
QAlgorithms.Papers.Independent.Gap48.P42.productOverlap
For any , dimensions , and complex matrix indexed by , this defines the real supremum
There is no assumption on . If some , no admissible factor families exist, and the real supremum of this empty set is defined here as . For , empty products are , and the value is the absolute value of the sole entry of .
QAlgorithms.Papers.Independent.Gap48.P42.regroupIndex
For every , this defines a function as follows. First decode the input through the chosen equivalence , obtaining . Decode and through the chosen finite-cardinality equivalences and , obtaining sequences and . At each coordinate, encode through the chosen equivalence , then encode the resulting length- sequence through . These equivalences are chosen from cardinality equalities, with no specified arithmetic ordering. When , both the domain and codomain are singletons, including when or ; if and either is zero, the domain is empty.
QAlgorithms.Papers.Independent.Gap48.P42.shieldBlock
For any , dimensions , arbitrary complex matrix indexed by , family of unitary matrices on , and indices , this defines the matrix
The indices and need not differ, and need not be a density matrix. The supplied indices require . Zero local dimensions are permitted, yielding an empty matrix index set; instead yields a one-element matrix index set.
QAlgorithms.Papers.Independent.Gap48.P42.tensorTwists
For arbitrary natural numbers , unitaries on for , and , this defines a family of complex matrices , indexed by , on . Decode as a sequence through the chosen equivalence , and decode a row and column through the analogous chosen equivalences for and . The entry is
The output is defined as a family of matrices, without attaching a unitarity assertion to it. For , there is one family label and a single matrix entry, equal to the empty product , even if some of are zero. For , gives no family labels, and or gives empty matrix indices.
QAlgorithms.Papers.Independent.Gap48.P42.twoLabelGHZVector
For any natural numbers , labels , and Boolean parameter , this definition gives the complex Euclidean vector on configurations with amplitude
There is no requirement that or that . If , the vector is zero for the minus choice and is times the basis vector at the constant configuration for the plus choice. When , both conditions are vacuous, so the unique amplitude is respectively or , regardless of the labels. The supplied labels can exist only when .
QAlgorithms.Papers.Independent.Gap48.P42.twoPhaseGHZMixture
For any natural numbers , labels , and arbitrary real , this definition gives the matrix
indexed by configurations . Neither , distinctness of , nor is assumed. If , this is times the projector onto the constant configuration. If , its sole entry is . The labels require .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.