Definitions for Minimal Port-based Teleportation
DefinitionQAlgorithms_Papers_Independent_Extend50_P08The objects the formalized statements of Minimal Port-based Teleportation (arXiv:2111.05499) are stated in. Each was checked against the paper by a blind read-back and a moderator.
Ports: Computational coordinates of N ports of dimension d (PDF p.3).AC: Alice's N ports and input C, in that order (PDF pp.3–4).AliceMatrix: Alice's resource-filter matrix (PDF p.3, Eq.(1)).EffectMatrix: Effects on Alice and the input (PDF p.3).Effects: Physical outcomes: none is failure, some i names the retained port (PDF p.4).liftAlice: Extend an Alice filter by the identity on C (PDF p.10, Eq.(32)).resource: The physical filtered, normalized Bell resource of Eq.(1), PDF p.3. Normalization is a property of filters with Tr(O†O)=d^N, not imposed by rescaling O.IsPhysicalPBT: Physical PBT data: trace-normalized resource filter and a complete PSD POVM including failure; Bob's retained-port action is fixed by branch below (PDF pp.3–4).pulledBackEffect: Effective effect O† M O; the physical M and effective effect are distinct (PDF p.4, Eq.(6)).portBellEffect: Eq.(3), PDF p.3: identity on all other ports times the normalized Bell projector. The other-port identity does not require the retained coordinates to coincide.pbtSignal: The normalized signal state sigma_i, PDF p.3, Eq.(3).pbtSignalSum: rho has trace N, not one (PDF pp.3,7, Eq.(18)).inverseSqrtScalar: Scalar support inverse square root: zero eigenvalues stay zero (PDF p.4).supportInverseSqrt: Support inverse square root of the particular PBT rho (PDF p.7, Eq.(18)).srm: Uncompleted SRM effect of Eq.(18), PDF p.7.srmFailureEffect: The SRM failure effect Delta, PDF pp.4,7.minimalEffects: Minimal PBT's physical N+1-outcome family, PDF p.7.redistribute: Uniformly redistribute the physical failure effect (PDF p.11, Eq.(39)). The resulting family has a zero failure effect. N>0 is required in uses.completedEffects: Corresponding completed deterministic SRM, with the same resource (PDF pp.4,10).retainedPortBranch: Retain B_i and discard the other B ports after Alice's outcome i (PDF p.3, Eq.(2)). This is the exact coordinate contraction of M with (O tensor I)|Psi+>: the reversed AC indices implement the partial trace. All input off-diagonal blocks are retained, so this acts on entangled inputs.successfulMap: Sum of successful retained-port branches (PDF pp.3–4).pbtSuccess: Average/Choi success, Tr(T(I/d)), not a worst-input success bound (PDF p.4, Eq.(6)).conditionalFidelity: Conditional entanglement fidelity; uses have strictly positive success (PDF p.10, Eq.(35)).IsExact: Exact pPBT means each successful branch is a nonnegative multiple of the identity channel on every matrix, not just on one input (PDF p.4, Eq.(7)).IsConvergent: A physical family converges when its two figures of merit tend to one, on an eventually positive-success domain (PDF p.7, Definition 1).irrepDim: Actual symmetric-group irrep dimension d_lambda (PDF p.5).pbtSchurMultiplicity: Actual Schur–Weyl multiplicity m_lambda, counted by SSYTs (PDF p.5).OneBox: One added box, including the empty predecessor at N=1 (PDF pp.4–5). The size equation is explicit even on the unused N=0 domain.teleportationMatrix: Young-branching incidence Gram matrix on dimension-truncated shapes. Source [23], arXiv:1707.08456, Definition 3 and Theorem 23, PDF pp.7,14; this is the actual matrix referred to on PDF pp.9,20 of the present paper.teleportationRayleigh: Rayleigh quadratic form of the concrete teleportation matrix (source [23] §4).IsPrincipal: Nonnegative unit principal eigenvector, expressed equivalently by maximizing its Rayleigh form over the real unit sphere (PDF pp.9,15,20).deterministicFilter: Deterministic-optimal central filter, using the same vector v throughout (PDF p.9 Eq.(30), p.20 Eq.(A9)).probabilisticNormalization: g(N) of Eq.(A6), PDF p.20; physical-domain positivity is not assumed.probabilisticFilter: Canonical optimal pPBT filter, Eq.(A5), PDF p.20.skipPort: Delete the selected port from the ordered computational coordinates.probabilisticCoefficient: Eq.(A6)'s u_alpha, PDF p.20. Uses N≥1.probabilisticEffective: Canonical EFFECTIVE success effect from Eq.(A5), PDF p.20. The factor 1/d is the normalized Bell projector, with the complementary Young projector embedded on exactly the other N-1 ports.probabilisticInverse: Inverse of the positive, full-support canonical pPBT filter, Eq.(A5). Its invertibility on the physical domain is a consequence of its coefficients.probabilisticPhysical: Physical successful effect obtained by undoing the resource pullback, consistent with Eqs.(6),(7),(A5), PDF pp.4,20.probabilisticEffects: Complete PHYSICAL optimal pPBT POVM, PDF pp.4,20.minimalSuccessFormula: The sum in Theorem 2, Eq.(19), PDF p.7.bellDeterministicFormula: The deterministic Bell-resource numerator (A10), PDF p.20.optimizedSuccessFormula: Principal-vector success evaluation in Theorem 3, Eq.(31), PDF p.10.resourceOverlap: Root fidelity of the two specified filtered pure resources (PDF pp.14–16, Appendix C). These vectors are normalized on the stated domains.qubitPrincipal: Explicit qubit principal vector in shape coordinates, from the positive square root of gamma(j) in Eqs.(55),(59), PDF pp.15–16.qubitResourceOverlap: The overlap for the actual qubit filters, not an independently chosen sum.qubitOverlapFormula: Eq.(56), PDF p.15, reindexed by k=N/2-j, k=0,...,floor(N/2). Subtraction takes place in R; parity is preserved without real factorials.unnormalizedBell: Unnormalized entangled vector of Lemma 12, PDF p.21.denseUnnormalized: Unnormalized remote postmeasurement state; entanglement transfer gives the TRANSPOSE, before using the particular real SRM symmetry (PDF p.17, Eq.(67)).denseProbability: Remote outcome probability, constructed from the state (PDF p.17).denseState: The state on ALL B ports and D conditional on outcome i (PDF p.17, Eq.(68)).denseFidelity: F_{i|k}, Bell effect on B_k D extended by identity on the other B ports (PDF p.17, Eq.(70)).denseTransition: Constructed classical transition coefficients, PDF p.17, Eq.(69).
import Mathlib
import Definitions.Def_QAlgorithms_Defs_SchurWeylDecomposition
import Definitions.Def_QAlgorithms_Defs_QuditChannelFidelities
import Definitions.Def_QAlgorithms_Defs_Ensemble
/-!
Minimal Port-based Teleportation, arXiv:2111.05499v2.
Paper-local physical constructions. No mixed-tower projector is postulated.
The formulas for branches below are the coordinate contraction of the filtered
Bell resource with Alice's effect, followed by discarding all unretained ports.
-/
noncomputable section
open scoped Matrix ComplexConjugate ComplexOrder Matrix.Norms.L2Operator
namespace QAlgorithms.Papers.Independent.Extend50.P08
attribute [local instance] Classical.propDecidable Classical.decEq
/-- Computational coordinates of N ports of dimension d (PDF p.3). -/
abbrev Ports (d N : ℕ) := Fin N → Fin d
/-- Alice's N ports and input C, in that order (PDF pp.3–4). -/
abbrev AC (d N : ℕ) := Ports d N × Fin d
/-- Alice's resource-filter matrix (PDF p.3, Eq.(1)). -/
abbrev AliceMatrix (d N : ℕ) := Matrix (Ports d N) (Ports d N) ℂ
/-- Effects on Alice and the input (PDF p.3). -/
abbrev EffectMatrix (d N : ℕ) := Matrix (AC d N) (AC d N) ℂ
/-- Physical outcomes: none is failure, some i names the retained port (PDF p.4). -/
abbrev Effects (d N : ℕ) := Option (Fin N) → EffectMatrix d N
/-- Extend an Alice filter by the identity on C (PDF p.10, Eq.(32)). -/
def liftAlice {d N : ℕ} (O : AliceMatrix d N) : EffectMatrix d N :=
Matrix.kronecker O (1 : Matrix (Fin d) (Fin d) ℂ)
/-- The physical filtered, normalized Bell resource of Eq.(1), PDF p.3.
Normalization is a property of filters with Tr(O†O)=d^N, not imposed by rescaling O. -/
def resource {d N : ℕ} (hd : 0 < d) (O : AliceMatrix d N) :
EuclideanSpace ℂ (Ports d N × Ports d N) :=
letI : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩
act (Matrix.kronecker O (1 : AliceMatrix d N)) (finiteMaxEntangled (Ports d N))
/-- Physical PBT data: trace-normalized resource filter and a complete PSD POVM
including failure; Bob's retained-port action is fixed by branch below (PDF pp.3–4). -/
def IsPhysicalPBT {d N : ℕ} (O : AliceMatrix d N) (M : Effects d N) : Prop :=
0 < N ∧ 2 ≤ d ∧ (Oᴴ * O).trace = (d : ℂ) ^ N ∧ IsPOVM M
/-- Effective effect O† M O; the physical M and effective effect are distinct
(PDF p.4, Eq.(6)). -/
def pulledBackEffect {d N : ℕ} (O : AliceMatrix d N) (M : EffectMatrix d N) : EffectMatrix d N :=
(liftAlice O)ᴴ * M * liftAlice O
/-- Eq.(3), PDF p.3: identity on all other ports times the normalized Bell projector.
The other-port identity does not require the retained coordinates to coincide. -/
def portBellEffect (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
Matrix.of fun x y =>
if (∀ j : Fin N, j ≠ i → x.1 j = y.1 j) ∧ x.1 i = x.2 ∧ y.1 i = y.2
then (d : ℂ)⁻¹ else 0
/-- The normalized signal state sigma_i, PDF p.3, Eq.(3). -/
def pbtSignal (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
(((d : ℝ) ^ (N - 1))⁻¹) • portBellEffect d N i
/-- rho has trace N, not one (PDF pp.3,7, Eq.(18)). -/
def pbtSignalSum (d N : ℕ) : EffectMatrix d N := ∑ i : Fin N, pbtSignal d N i
/-- Scalar support inverse square root: zero eigenvalues stay zero (PDF p.4). -/
def inverseSqrtScalar (x : ℝ) : ℝ := (Real.sqrt x)⁻¹
/-- Support inverse square root of the particular PBT rho (PDF p.7, Eq.(18)). -/
def supportInverseSqrt (d N : ℕ) : EffectMatrix d N :=
cfc inverseSqrtScalar (pbtSignalSum d N)
/-- Uncompleted SRM effect of Eq.(18), PDF p.7. -/
def srm (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
supportInverseSqrt d N * pbtSignal d N i * supportInverseSqrt d N
/-- The SRM failure effect Delta, PDF pp.4,7. -/
def srmFailureEffect (d N : ℕ) : EffectMatrix d N := 1 - ∑ i : Fin N, srm d N i
/-- Minimal PBT's physical N+1-outcome family, PDF p.7. -/
def minimalEffects (d N : ℕ) : Effects d N
| none => srmFailureEffect d N
| some i => srm d N i
/-- Uniformly redistribute the physical failure effect (PDF p.11, Eq.(39)).
The resulting family has a zero failure effect. N>0 is required in uses. -/
def redistribute {d N : ℕ} (M : Effects d N) : Effects d N
| none => 0
| some i => M (some i) + ((N : ℝ)⁻¹) • M none
/-- Corresponding completed deterministic SRM, with the same resource
(PDF pp.4,10). -/
def completedEffects (d N : ℕ) : Effects d N := redistribute (minimalEffects d N)
/-- Retain B_i and discard the other B ports after Alice's outcome i
(PDF p.3, Eq.(2)). This is the exact coordinate contraction of M with
(O tensor I)|Psi+>: the reversed AC indices implement the partial trace.
All input off-diagonal blocks are retained, so this acts on entangled inputs. -/
def retainedPortBranch {d N : ℕ} (O : AliceMatrix d N) (M : EffectMatrix d N) (i : Fin N) :
Superop (Fin d) (Fin d) :=
fun X => Matrix.of fun b b' =>
((d : ℂ) ^ N)⁻¹ *
∑ x : Ports d N, ∑ y : Ports d N,
if x i = b ∧ y i = b' ∧ (∀ j : Fin N, j ≠ i → x j = y j) then
∑ c : Fin d, ∑ c' : Fin d, pulledBackEffect O M (y, c') (x, c) * X c c'
else 0
/-- Sum of successful retained-port branches (PDF pp.3–4). -/
def successfulMap {d N : ℕ} (O : AliceMatrix d N) (M : Effects d N) :
Superop (Fin d) (Fin d) := fun X => ∑ i : Fin N, retainedPortBranch O (M (some i)) i X
/-- Average/Choi success, Tr(T(I/d)), not a worst-input success bound
(PDF p.4, Eq.(6)). -/
def pbtSuccess {d N : ℕ} (O : AliceMatrix d N) (M : Effects d N) : ℝ :=
((successfulMap O M) (((d : ℂ)⁻¹) • (1 : Matrix (Fin d) (Fin d) ℂ))).trace.re
/-- Conditional entanglement fidelity; uses have strictly positive success
(PDF p.10, Eq.(35)). -/
def conditionalFidelity {d N : ℕ} (hd : 0 < d) (O : AliceMatrix d N) (M : Effects d N) : ℝ :=
QuditFidelity.entanglementFidelity d hd (successfulMap O M) / pbtSuccess O M
/-- Exact pPBT means each successful branch is a nonnegative multiple of the
identity channel on every matrix, not just on one input (PDF p.4, Eq.(7)). -/
def IsExact {d N : ℕ} (O : AliceMatrix d N) (M : Effects d N) : Prop :=
∀ i : Fin N, ∃ p : ℝ, 0 ≤ p ∧ ∀ X : Matrix (Fin d) (Fin d) ℂ,
retainedPortBranch O (M (some i)) i X = (p : ℂ) • X
/-- A physical family converges when its two figures of merit tend to one,
on an eventually positive-success domain (PDF p.7, Definition 1). -/
def IsConvergent (d : ℕ) (hd : 0 < d) (O : (N : ℕ) → AliceMatrix d N)
(M : (N : ℕ) → Effects d N) : Prop :=
(∀ N, 0 < N → IsPhysicalPBT (O N) (M N)) ∧
(∀ᶠ N in Filter.atTop, 0 < pbtSuccess (O N) (M N)) ∧
Filter.Tendsto (fun N => pbtSuccess (O N) (M N)) Filter.atTop (nhds 1) ∧
Filter.Tendsto (fun N => conditionalFidelity hd (O N) (M N)) Filter.atTop (nhds 1)
/-- Actual symmetric-group irrep dimension d_lambda (PDF p.5). -/
def irrepDim {d n : ℕ} (lambda : Schur.Partition d n) : ℝ :=
Module.finrank ℂ (Schur.spechtSpace lambda)
/-- Actual Schur–Weyl multiplicity m_lambda, counted by SSYTs (PDF p.5). -/
def pbtSchurMultiplicity {d n : ℕ} (lambda : Schur.Partition d n) : ℝ := Schur.schurDimension lambda
/-- One added box, including the empty predecessor at N=1 (PDF pp.4–5).
The size equation is explicit even on the unused N=0 domain. -/
def OneBox {d n m : ℕ} (alpha : Schur.Partition d n) (mu : Schur.Partition d m) : Prop :=
m = n + 1 ∧ alpha.val.cells ⊆ mu.val.cells
/-- Young-branching incidence Gram matrix on dimension-truncated shapes.
Source [23], arXiv:1707.08456, Definition 3 and Theorem 23, PDF pp.7,14;
this is the actual matrix referred to on PDF pp.9,20 of the present paper. -/
def teleportationMatrix (d N : ℕ) : Matrix (Schur.Partition d N) (Schur.Partition d N) ℝ :=
Matrix.of fun mu nu => ∑ alpha : Schur.Partition d (N - 1),
if OneBox alpha mu ∧ OneBox alpha nu then 1 else 0
/-- Rayleigh quadratic form of the concrete teleportation matrix (source [23] §4). -/
def teleportationRayleigh {d N : ℕ} (v : Schur.Partition d N → ℝ) : ℝ :=
∑ mu, ∑ nu, v mu * teleportationMatrix d N mu nu * v nu
/-- Nonnegative unit principal eigenvector, expressed equivalently by maximizing
its Rayleigh form over the real unit sphere (PDF pp.9,15,20). -/
def IsPrincipal {d N : ℕ} (v : Schur.Partition d N → ℝ) : Prop :=
(∀ mu, 0 ≤ v mu) ∧ (∑ mu, (v mu) ^ 2) = 1 ∧
∀ w : Schur.Partition d N → ℝ, (∑ mu, (w mu) ^ 2) = 1 →
teleportationRayleigh w ≤ teleportationRayleigh v
/-- Deterministic-optimal central filter, using the same vector v throughout
(PDF p.9 Eq.(30), p.20 Eq.(A9)). -/
def deterministicFilter {d N : ℕ} (v : Schur.Partition d N → ℝ) : AliceMatrix d N :=
∑ mu, ((Real.sqrt ((d : ℝ) ^ N) * v mu /
Real.sqrt (irrepDim mu * pbtSchurMultiplicity mu) : ℝ) : ℂ) • Schur.isotypicProjector mu
/-- g(N) of Eq.(A6), PDF p.20; physical-domain positivity is not assumed. -/
def probabilisticNormalization (d N : ℕ) : ℝ :=
(∑ mu : Schur.Partition d N, (pbtSchurMultiplicity mu) ^ 2)⁻¹
/-- Canonical optimal pPBT filter, Eq.(A5), PDF p.20. -/
def probabilisticFilter (d N : ℕ) : AliceMatrix d N :=
∑ mu : Schur.Partition d N,
((Real.sqrt ((d : ℝ) ^ N) *
Real.sqrt (probabilisticNormalization d N * pbtSchurMultiplicity mu / irrepDim mu) : ℝ) : ℂ) •
Schur.isotypicProjector mu
/-- Delete the selected port from the ordered computational coordinates. -/
def skipPort {N : ℕ} (i : Fin N) (j : Fin (N - 1)) : Fin N :=
⟨if j.val < i.val then j.val else j.val + 1, by
have hi := i.isLt
have hj := j.isLt
split <;> omega⟩
/-- Eq.(A6)'s u_alpha, PDF p.20. Uses N≥1. -/
def probabilisticCoefficient {d N : ℕ} (alpha : Schur.Partition d (N - 1)) : ℝ :=
(d : ℝ) ^ (N + 1) * probabilisticNormalization d N * pbtSchurMultiplicity alpha /
((N : ℝ) * irrepDim alpha)
/-- Canonical EFFECTIVE success effect from Eq.(A5), PDF p.20.
The factor 1/d is the normalized Bell projector, with the complementary
Young projector embedded on exactly the other N-1 ports. -/
def probabilisticEffective (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
Matrix.of fun x y =>
∑ alpha : Schur.Partition d (N - 1),
((probabilisticCoefficient (d := d) (N := N) alpha / d : ℝ) : ℂ) *
Schur.isotypicProjector alpha (fun j => x.1 (skipPort i j))
(fun j => y.1 (skipPort i j)) *
(if x.1 i = x.2 ∧ y.1 i = y.2 then 1 else 0)
/-- Inverse of the positive, full-support canonical pPBT filter, Eq.(A5).
Its invertibility on the physical domain is a consequence of its coefficients. -/
def probabilisticInverse (d N : ℕ) : AliceMatrix d N :=
cfc (fun x : ℝ => x⁻¹) (probabilisticFilter d N)
/-- Physical successful effect obtained by undoing the resource pullback,
consistent with Eqs.(6),(7),(A5), PDF pp.4,20. -/
def probabilisticPhysical (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
liftAlice (probabilisticInverse d N) * probabilisticEffective d N i *
liftAlice (probabilisticInverse d N)
/-- Complete PHYSICAL optimal pPBT POVM, PDF pp.4,20. -/
def probabilisticEffects (d N : ℕ) : Effects d N
| none => 1 - ∑ i : Fin N, probabilisticPhysical d N i
| some i => probabilisticPhysical d N i
/-- The sum in Theorem 2, Eq.(19), PDF p.7. -/
def minimalSuccessFormula (d N : ℕ) : ℝ :=
(∑ alpha : Schur.Partition d (N - 1), ∑ mu : Schur.Partition d N,
if OneBox alpha mu then irrepDim mu * pbtSchurMultiplicity alpha else 0) / (d : ℝ) ^ (N + 1)
/-- The deterministic Bell-resource numerator (A10), PDF p.20. -/
def bellDeterministicFormula (d N : ℕ) : ℝ :=
(∑ alpha : Schur.Partition d (N - 1),
(∑ mu : Schur.Partition d N,
if OneBox alpha mu then Real.sqrt (irrepDim mu * pbtSchurMultiplicity mu) else 0) ^ 2) /
(d : ℝ) ^ (N + 2)
/-- Principal-vector success evaluation in Theorem 3, Eq.(31), PDF p.10. -/
def optimizedSuccessFormula {d N : ℕ} (v : Schur.Partition d N → ℝ) : ℝ :=
(∑ alpha : Schur.Partition d (N - 1), ∑ mu : Schur.Partition d N,
if OneBox alpha mu then pbtSchurMultiplicity alpha / pbtSchurMultiplicity mu * (v mu) ^ 2 else 0) / d
/-- Root fidelity of the two specified filtered pure resources
(PDF pp.14–16, Appendix C). These vectors are normalized on the stated domains. -/
def resourceOverlap {d N : ℕ} (hd : 0 < d) (O P : AliceMatrix d N) : ℝ :=
‖inner ℂ (resource hd O) (resource hd P)‖
/-- Explicit qubit principal vector in shape coordinates, from the positive
square root of gamma(j) in Eqs.(55),(59), PDF pp.15–16. -/
def qubitPrincipal (N : ℕ) (mu : Schur.Partition 2 N) : ℝ :=
2 / Real.sqrt (N + 2) *
Real.sin (Real.pi * ((mu.val.rowLen 0 : ℝ) - (mu.val.rowLen 1 : ℝ) + 1) / (N + 2))
/-- The overlap for the actual qubit filters, not an independently chosen sum. -/
def qubitResourceOverlap (N : ℕ) : ℝ :=
resourceOverlap (by norm_num : 0 < 2) (probabilisticFilter 2 N)
(deterministicFilter (qubitPrincipal N))
/-- Eq.(56), PDF p.15, reindexed by k=N/2-j, k=0,...,floor(N/2).
Subtraction takes place in R; parity is preserved without real factorials. -/
def qubitOverlapFormula (N : ℕ) : ℝ :=
2 / (N + 2) * Real.sqrt (6 / (((N : ℝ) + 1) * (N + 3))) *
∑ k ∈ Finset.range (N / 2 + 1),
((N : ℝ) - 2 * k + 1) *
Real.sin (Real.pi * ((N : ℝ) - 2 * k + 1) / (N + 2))
/-- Unnormalized entangled vector of Lemma 12, PDF p.21. -/
def unnormalizedBell (d : ℕ) : EuclideanSpace ℂ (Fin d × Fin d) :=
WithLp.toLp 2 fun p => if p.1 = p.2 then 1 else 0
/-- Unnormalized remote postmeasurement state; entanglement transfer gives the
TRANSPOSE, before using the particular real SRM symmetry (PDF p.17, Eq.(67)). -/
def denseUnnormalized (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
(((d : ℝ) ^ (N + 1))⁻¹) • (completedEffects d N (some i))ᵀ
/-- Remote outcome probability, constructed from the state (PDF p.17). -/
def denseProbability (d N : ℕ) (i : Fin N) : ℝ := (denseUnnormalized d N i).trace.re
/-- The state on ALL B ports and D conditional on outcome i (PDF p.17, Eq.(68)). -/
def denseState (d N : ℕ) (i : Fin N) : EffectMatrix d N :=
(denseProbability d N i)⁻¹ • denseUnnormalized d N i
/-- F_{i|k}, Bell effect on B_k D extended by identity on the other B ports
(PDF p.17, Eq.(70)). -/
def denseFidelity (d N : ℕ) (i k : Fin N) : ℝ :=
effectProb (portBellEffect d N k) (denseState d N i)
/-- Constructed classical transition coefficients, PDF p.17, Eq.(69). -/
def denseTransition (d N : ℕ) (i k : Fin N) : ℝ :=
(d : ℝ) ^ 2 * denseProbability d N i * denseFidelity d N i k
/-! Sanity examples pin bad-input defaults and physical register conventions. -/
example : inverseSqrtScalar 0 = 0 ∧ inverseSqrtScalar 1 = 1 := by
simp [inverseSqrtScalar]
example (d : ℕ) : pbtSignalSum d 0 = 0 := by simp [pbtSignalSum]
example {d N : ℕ} (M : Effects d N) : redistribute M none = 0 := rfl
example (d N : ℕ) : ∑ i : Fin N, srm d N i + srmFailureEffect d N = 1 := by
unfold srmFailureEffect
abel
example {d N : ℕ} (O : AliceMatrix d N) (i : Fin N) :
retainedPortBranch O (0 : EffectMatrix d N) i = fun _ => 0 := by
funext X
ext b b'
simp [retainedPortBranch, pulledBackEffect]
example (b : Fin 2) :
portBellEffect 2 1 (0 : Fin 1) ((fun _ => b), b) ((fun _ => b), b) = (2 : ℂ)⁻¹ := by
simp [portBellEffect]
example : unnormalizedBell 2 (0, 1) = 0 ∧ unnormalizedBell 2 (1, 1) = 1 := by
simp [unnormalizedBell]
end QAlgorithms.Papers.Independent.Extend50.P08
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P08.AC
For natural numbers , is the type of pairs , where and . It is empty when . When , the first component is the unique empty tuple, so the pairs are indexed solely by .
QAlgorithms.Papers.Independent.Extend50.P08.AliceMatrix
For natural numbers , is the type of complex matrices whose rows and columns are indexed by length- tuples of elements of . These are matrices, with . In particular, gives a matrix type, while and gives the type containing the unique matrix with empty row and column index sets.
QAlgorithms.Papers.Independent.Extend50.P08.EffectMatrix
For natural numbers , is the type of complex matrices whose rows and columns are indexed by pairs with and . No positivity or normalization condition is part of this type. When , the index set is empty; when , it is identified with .
QAlgorithms.Papers.Independent.Extend50.P08.Effects
For natural numbers , is the type of families indexed by one distinguished label together with labels for every . Each value is a complex matrix indexed in both coordinates by pairs , where is a length- tuple of labels from and is another such label. This type imposes no positivity or sum condition. For , the family has only the value at .
QAlgorithms.Papers.Independent.Extend50.P08.IsConvergent
For a natural number , let be a complex matrix indexed by , and let assign a complex matrix on to each outcome in , for every natural number . Put , and define, for each port , a map on matrices by
Set , , and
where applies separately to each matrix block indexed by the first register. The predicate holds exactly when, for every , one has , , , every is positive semidefinite, and ; furthermore, for all sufficiently large , , and as . No physicality requirement is imposed at . Division by zero has value zero, so whenever ; eventual positivity permits such zeros at finitely many indices. Although the supplied assumption allows , the physicality requirement then cannot hold.
QAlgorithms.Papers.Independent.Extend50.P08.IsExact
For any natural numbers , any complex matrix on , and any family of complex matrices on indexed by a failure label and , where , put and . This predicate says that for every there exists a real number such that, for every complex matrix and every ,
The scalar may depend on but must work for all ; it need not be positive, unique, or bounded above. The failure matrix is unrestricted, and no physical or channel assumptions are included. All reciprocals use . For the predicate holds vacuously; for the matrix identities have no entries and satisfies the requirement.
QAlgorithms.Papers.Independent.Extend50.P08.IsPhysicalPBT
For any natural numbers , any complex matrix indexed by length- tuples from , and any family of complex matrices on pairs of such a tuple and an additional label, indexed by and by for , means exactly that , ,
and every matrix in the family is positive semidefinite, with
Here denotes the conjugate transpose and the identity acts on the pair index set. The predicate is false when or .
QAlgorithms.Papers.Independent.Extend50.P08.IsPrincipal
For natural numbers , let consist of Young diagrams with cells and at most rows, and define
where natural-number subtraction is truncated at zero. For a real function on , the predicate holds exactly when every , , and for every real function on the same set satisfying . The comparison functions need not be nonnegative. No uniqueness is required. If the indexing set is empty, the normalization condition is impossible; for , the sole diagram is empty, is zero, and the predicate requires the sole coordinate of to be .
QAlgorithms.Papers.Independent.Extend50.P08.OneBox
For natural numbers , a Young diagram with cells and at most rows, and a Young diagram with cells and at most rows, this predicate means exactly
The inclusion allows equality as an inclusion relation, but the stipulated cell counts and force precisely one additional cell. Zero sizes are included: is permitted, while cannot satisfy the predicate.
QAlgorithms.Papers.Independent.Extend50.P08.Ports
For natural numbers , is the type of functions from to , that is, length- tuples of labels with possible values. When , this type contains exactly one empty tuple, including when ; when and , it is empty.
QAlgorithms.Papers.Independent.Extend50.P08.bellDeterministicFormula
For every pair of natural numbers , this defines
Here consists of Young diagrams with cells and first-column length at most , and counts their fillings by weakly increasing along rows and strictly increasing down columns. To obtain , use the definition’s chosen numbering of the cells, let preserve rows and columns respectively, and take the complex dimension of the image of in . All dimensions and counts in the formula are viewed as real numbers. Natural-number subtraction makes when , in which case every inner size condition is false and the result is zero. The definition also permits , with division by zero defined as zero.
QAlgorithms.Papers.Independent.Extend50.P08.completedEffects
For any natural numbers , put , where , and define matrices on by
where is applied by real continuous functional calculus and is zero for . This defines a family indexed by a failure label and through
All reciprocals at zero are zero. When , only the zero failure matrix remains; when , the matrix index set is empty.
QAlgorithms.Papers.Independent.Extend50.P08.conditionalFidelity
For natural numbers with the hypothesis , any complex matrix on , and any family of complex matrices on indexed by a failure label and , where , put and . Define the matrix function by
Let , where is the coordinate unit vector, and let . The definition is the real quotient
where means applying to each matrix block indexed by the first register. No positivity, normalization, channel, or positive-denominator assumption is imposed. Real division by zero is defined to be zero, so the value is zero whenever the denominator is zero; in particular this includes .
QAlgorithms.Papers.Independent.Extend50.P08.denseFidelity
For arbitrary natural numbers and ports , work on . For each , define
Let , , with applied by continuous functional calculus and , and set
The declared real number is
The ports and may coincide. Their existence forces , while is allowed. All zero denominators have inverse zero, so gives and .
QAlgorithms.Papers.Independent.Extend50.P08.denseProbability
For arbitrary natural numbers and , let . Define matrices , indexed by , by
Put , , where is applied by continuous functional calculus and , and
The declared real number is
The transpose here does not conjugate entries. This definition imposes no separate positivity or normalization hypothesis. The port index forces , but is permitted; then the index set is empty and . Every inverse of zero is taken to be zero.
QAlgorithms.Papers.Independent.Extend50.P08.denseState
For arbitrary natural numbers and , define matrices on by
where is applied by continuous functional calculus, with . Set
The declared matrix is
Here denotes ordinary transpose. There is no hypothesis that is positive or nonzero: if , the declared matrix is zero because the inverse of zero is zero. The index requires ; remains allowed and gives an empty matrix.
QAlgorithms.Papers.Independent.Extend50.P08.denseTransition
For arbitrary natural numbers and ports , define matrices on by
where is applied by continuous functional calculus with . Set
The declared real number is
No additional assertion about its sign or its row or column sums is part of this definition. The indices require , and may be equal. Inverses of zero are zero; thus gives , and is also allowed.
QAlgorithms.Papers.Independent.Extend50.P08.denseUnnormalized
For arbitrary natural numbers and , define a complex matrix indexed by as follows. For each port , let
Set , , and , where is applied by continuous functional calculus, with . Define
The declared matrix is
where is the ordinary transpose, without complex conjugation. No additional hypotheses on or are imposed; the existence of forces . Inverses of zero are interpreted as zero. In particular, is allowed, in which case the matrix has an empty index set.
QAlgorithms.Papers.Independent.Extend50.P08.deterministicFilter
For natural numbers and any real function on the set of Young diagrams with cells and at most rows, this defines a complex matrix indexed by words by
Here is the number of fillings of by that weakly increase along rows and strictly increase down columns. To define and , use the supplied numbering of the cells, and let be the permutations preserving each cell's row and column coordinate, respectively. Set , let , let , and let be the orthogonal projection onto . With and , the matrix used above is
Real coefficients are embedded into . No positivity, normalization, or maximizing condition is assumed on . Zero denominators give coefficient zero, empty sums give zero matrices, and , including when .
QAlgorithms.Papers.Independent.Extend50.P08.inverseSqrtScalar
For every real number , this defines , using the real square root and totalized reciprocal. Thus when , and when .
QAlgorithms.Papers.Independent.Extend50.P08.irrepDim
For natural numbers and a Young diagram with exactly cells and at most rows, this defines a real number as follows. Choose the cell numbering supplied by the finite-set equivalence in the definition. Let and be, respectively, the permutations of these labels that preserve the row coordinate and the column coordinate of every labelled cell. On the complex vector space with orthonormal basis indexed by the symmetric group , define the matrix
The value is , regarded as a real number. The parameters need not be positive: when , the empty diagram gives a one-dimensional range and value ; when , there is no diagram satisfying the required conditions.
QAlgorithms.Papers.Independent.Extend50.P08.liftAlice
For any natural numbers and any complex matrix indexed by length- tuples from , is the Kronecker product . Its rows and columns are indexed by pairs of such a tuple and an additional label, and its entries are . This includes , when is a scalar matrix, and , when the resulting matrix has empty indices.
QAlgorithms.Papers.Independent.Extend50.P08.minimalEffects
For any natural numbers , this defines a family of matrices indexed by a distinguished failure label and the indices . To specify it, put and define matrices on by
where is applied by real continuous functional calculus and equals zero for . The family is
All reciprocals at zero are zero. For , only the failure label exists and its matrix is ; for , the matrix index set is empty.
QAlgorithms.Papers.Independent.Extend50.P08.minimalSuccessFormula
For all natural numbers , this defines the real number
Here is natural-number subtraction, truncated at zero; consists of Young diagrams with cells and first-column length at most ; and counts fillings of by that are weakly increasing along rows and strictly increasing down columns. To define , number the cells of by using the bijection chosen in the definition, let be the permutations preserving rows and columns respectively, and take to be the complex dimension of the image of the map on given by . There are no positivity assumptions on or . For the size condition in the summation is false, giving zero; for division by zero is defined to give zero.
QAlgorithms.Papers.Independent.Extend50.P08.optimizedSuccessFormula
For natural numbers and any real-valued function on , the Young diagrams with cells and first-column length at most , this defines
where is the number of fillings of by that are weakly increasing along rows and strictly increasing down columns. No nonnegativity, normalization, or maximizing property is required of . The subtraction is truncated at zero, so for the size condition is false and the result is zero. The case is included, and every scalar division by zero is defined to be zero.
QAlgorithms.Papers.Independent.Extend50.P08.pbtSchurMultiplicity
For natural numbers and a Young diagram with exactly cells and at most rows, this defines the real number
equivalently, the number of such fillings, regarded as a real number. More precisely, cells in the same row with increasing column coordinates must have weakly increasing entries, and cells in the same column with increasing row coordinates must have strictly increasing entries. For , there is one empty filling and its empty product is , so the value is , including when . For , there is no admissible .
QAlgorithms.Papers.Independent.Extend50.P08.pbtSignal
For any natural numbers and any , is the real scalar times the complex matrix indexed by , with length- tuples from , whose entry is when for every , , and , and is otherwise. The exponent uses natural-number subtraction, so is truncated at , although the existence of already requires . Reciprocals at zero are defined to be zero. For , the matrix has empty indices; for , no exists.
QAlgorithms.Papers.Independent.Extend50.P08.pbtSignalSum
For any natural numbers , is the complex matrix indexed by pairs of a length- tuple from and one additional label, with entries
The outer reciprocal is real, the inner reciprocal is complex, and both assign value zero to the reciprocal of zero; uses truncated natural-number subtraction. When , the sum is empty and gives the zero matrix on the additional-label index set. When , the matrix has empty indices.
QAlgorithms.Papers.Independent.Extend50.P08.pbtSuccess
For any natural numbers , any complex matrix on , and any family of complex matrices on indexed by a failure label and , where , put . This defines the real number obtained by applying the sum of the retained-port maps to and taking the real part of its trace; explicitly, it is
All scalars inside the brackets are complex, with . No positivity, normalization, or channel assumptions are imposed, so the definition does not itself assert that this number is a probability. It equals zero when or .
QAlgorithms.Papers.Independent.Extend50.P08.portBellEffect
For any natural numbers and any index , is the complex matrix indexed by pairs , where and , whose entries are
The reciprocal is taken in , where . For , the matrix has empty indices. For , there is no possible choice of .
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticCoefficient
For natural numbers and a Young diagram with cells and at most rows, where is truncated at zero, this defines the real number
Here is the set of Young diagrams with cells and at most rows, and , for either or , counts fillings of by that weakly increase along rows and strictly increase down columns. To define , put , number the cells of by using the supplied finite-set equivalence, and let be the permutations preserving each cell's row and column coordinate, respectively; then is the complex dimension of the range of the matrix
acting on . Natural-number quantities in the coefficient are regarded as real numbers. Every reciprocal or division by zero has value zero; in particular, at , is the empty diagram and the coefficient is zero.
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticEffective
For natural numbers and an index , this defines a complex matrix indexed by pairs , where and , by
Here consists of Young diagrams with cells and first-column length at most ; for and otherwise, for ; is the number of fillings of by that are weakly increasing along rows and strictly increasing down columns; and . To specify and explicitly, use the definition’s chosen bijection between the cells of a diagram with cells and , let and be the permutations preserving respectively the row and column of each numbered cell, and let be the image, in , of the linear map
Then , is orthogonal projection onto , , and
All scalar coefficients are interpreted in . The index requires , but no positivity assumption on is imposed; division by zero is defined to be zero, so gives the zero matrix.
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticEffects
For every pair of natural numbers , this defines a family of complex matrices on pairs , where is an -letter word over and is an additional letter, with labels consisting of a distinguished label and one label for each :
To specify these matrices, let comprise the Young diagrams with cells and first-column length at most , let count fillings by weakly increasing along rows and strictly increasing down columns, and put . For each diagram with cells, use the definition’s chosen cell numbering, let preserve the rows and columns of numbered cells, and let be the image of . With , orthogonal projection onto , , and , set
Here is reciprocal real continuous functional calculus applied to , and
Scalar inverses at zero are zero, real square roots of negative numbers are zero, and reciprocal functional calculus sends zero eigenvalues to zero for Hermitian arguments and defaults to zero otherwise. No positivity or normalization hypothesis is imposed. When , there are no indexed labels and the distinguished matrix is the identity.
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticFilter
For arbitrary natural numbers , this defines a complex matrix indexed by words by
where is the set of Young diagrams with cells and at most rows, and counts fillings by that weakly increase along rows and strictly increase down columns. For each , use the supplied cell numbering and let be the permutations preserving each cell's row and column coordinate, respectively. Define , , , and as the orthogonal projection onto . With , the matrix in the sum is
The real coefficients are embedded into . Reciprocals and divisions by zero have value zero, empty sums have value zero, and , including when ; no positivity assumption on or is imposed.
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticInverse
For all natural numbers , this defines a complex matrix on the words by applying the real continuous functional calculus with scalar function to
Here is the set of Young diagrams with cells and first-column length at most , and counts their fillings by that are weakly increasing along rows and strictly increasing down columns. For a diagram with cells, fix the cell numbering chosen in the definition; let preserve rows and columns respectively, and let be the image of in . Write , let be orthogonal projection onto that image, and put
Thus, when is Hermitian, replaces each nonzero eigenvalue by its reciprocal and replaces a zero eigenvalue by zero; the functional calculus has value zero for a non-Hermitian argument. Neither , , nor invertibility is assumed. All divisions use the convention , real square roots of negative numbers are zero, and even when .
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticNormalization
For arbitrary natural numbers , let be the set of Young diagrams with cells and at most rows. For each such diagram , let be the number of fillings of its cells by that weakly increase along rows and strictly increase down columns. This defines the real number
The reciprocal of zero is defined to be zero, so an empty indexing set gives value zero. When , the sole diagram is empty and has one empty filling, giving value , including for .
QAlgorithms.Papers.Independent.Extend50.P08.probabilisticPhysical
For natural numbers and , this defines the complex matrix
on pairs consisting of an -letter word over and one additional letter. Both outer factors are the same matrix, with no adjoint inserted. Explicitly, let be the Young diagrams with cells and first-column length at most , let count fillings weakly increasing along rows and strictly increasing down columns with entries , and set . Using the definition’s chosen numbering of the cells of , let be the row-preserving and column-preserving permutations, let be the image of , put , and let be orthogonal projection onto . Define
Then is the real continuous functional calculus of at , and
where for and otherwise. Reciprocal functional calculus sends zero eigenvalues to zero for Hermitian arguments and defaults to zero for non-Hermitian arguments; scalar division by zero and real square roots of negative numbers are zero. The index requires , while is allowed and gives the zero matrix.
QAlgorithms.Papers.Independent.Extend50.P08.pulledBackEffect
For any natural numbers , any complex matrix indexed by length- tuples from , and any complex matrix indexed by pairs of such a tuple and an additional label from , the definition is
The inputs are arbitrary matrices, with no positivity or normalization hypotheses. The definition also includes and ; for , the resulting matrix has empty indices.
QAlgorithms.Papers.Independent.Extend50.P08.qubitOverlapFormula
For every natural number , this defines the real number
The index bound uses natural-number division , while all arithmetic inside the summand and the displayed scalar factors is real arithmetic; in particular, is a real subtraction. The definition includes , when the sum has the single term and the resulting value is .
QAlgorithms.Papers.Independent.Extend50.P08.qubitPrincipal
For every natural number and every Young diagram with cells and first-column length at most , this defines the real number
where and are the lengths of rows numbered and , interpreted as real numbers, with a missing row having length zero. The definition includes ; for its empty diagram the value is . It imposes no additional condition on .
QAlgorithms.Papers.Independent.Extend50.P08.qubitResourceOverlap
For every natural number , this defines
where , the identity acts on the second word register, and
Here comprises Young diagrams with cells and first-column length at most ; is row ’s length, zero for an absent row; and counts fillings by weakly increasing along rows and strictly increasing down columns. Using the definition’s chosen numbering of the cells of , let preserve rows and columns respectively, let be the image of , put , and let be orthogonal projection onto . The matrix appearing above is
The inner product is conjugate-linear in its first argument, and its complex norm is the absolute value. Scalar inverses at zero are defined to be zero. No lower bound on is assumed; in particular, is included and gives .
QAlgorithms.Papers.Independent.Extend50.P08.redistribute
For any natural numbers , let , where , and let be any family of complex matrices on indexed by a failure label and indices . This defines a new family by
where is a real scalar and . No positivity, normalization, or other condition on is assumed. When , there are no port indices and the resulting family consists solely of the zero matrix at ; is also included.
QAlgorithms.Papers.Independent.Extend50.P08.resource
For any natural numbers , a hypothesis , and any complex matrix indexed by length- tuples from , is the vector in the complex Euclidean space indexed by pairs of these tuples given by
where is the identity on the tuple index set and has value at and elsewhere. Equivalently, its coordinate at is . The matrix is arbitrary. The case is included: there is one pair of empty tuples, and the vector’s sole coordinate is the sole entry of .
QAlgorithms.Papers.Independent.Extend50.P08.resourceOverlap
For natural numbers , a hypothesis , and arbitrary complex matrices indexed by the words , this defines the real number
The identity acts on a second copy of the word register, the matrices act by ordinary matrix-vector multiplication, and the complex inner product is conjugate-linear in its first argument. Equivalently, the value is . No unitarity or normalization assumption is imposed on or . The case is included: each word register then has one element, and the value is the absolute value of the inner product of the two resulting scalar vectors.
QAlgorithms.Papers.Independent.Extend50.P08.retainedPortBranch
For any natural numbers , any complex matrix on , any complex matrix on , and any , where , let and . This defines a function from complex matrices to complex matrices by requiring, for every input matrix and every ,
Here denotes conjugate transpose, the powers and reciprocal in the prefactor are complex, and . There are no positivity, normalization, unitarity, or channel assumptions on , , or . When , no index exists; when , the input and output matrices have empty index sets.
QAlgorithms.Papers.Independent.Extend50.P08.skipPort
For any natural number , any index , and any index , with the latter set interpreted as having elements using subtraction truncated at zero, this defines an index in whose numerical value is
Thus the resulting index skips . For , there is no possible argument ; for , the argument exists but there is no possible argument .
QAlgorithms.Papers.Independent.Extend50.P08.srm
For any natural numbers and any , put and define matrices on by
Let under real continuous functional calculus, where , equal to zero for . This defines the matrix . All reciprocals use . There is no possible index when ; when , these are matrices on an empty index set.
QAlgorithms.Papers.Independent.Extend50.P08.srmFailureEffect
For any natural numbers , put , where , and define matrices on by
Let under real continuous functional calculus, with and for . This defines
where is the identity matrix on . Reciprocals at zero are zero. When , the sum is empty and the result is ; is also allowed and gives an empty matrix index set.
QAlgorithms.Papers.Independent.Extend50.P08.successfulMap
For any natural numbers , any complex matrix on , and any family of complex matrices on indexed by a failure label and , where , put and . This defines a function on complex matrices by
for every matrix and every . The failure matrix does not enter this expression. The reciprocal is complex and totalized at zero, and no physical or channel assumptions are imposed. When , is the zero function; is also allowed.
QAlgorithms.Papers.Independent.Extend50.P08.supportInverseSqrt
For any natural numbers , including zero, let , let be the set of port configurations, and index matrices by . For each , define by
Set . This defines the matrix by real continuous functional calculus, where with for . Equivalently, on each eigenspace of the Hermitian matrix , acts by the reciprocal square root of a positive eigenvalue and by zero at eigenvalue zero. All reciprocals are totalized, so . When , ; when , the matrix index set is empty.
QAlgorithms.Papers.Independent.Extend50.P08.teleportationMatrix
For any natural numbers , this defines a real matrix whose rows and columns are indexed by Young diagrams with cells and at most rows. For row and column , its entry is
Here is natural-number subtraction, truncated at zero. Thus, for , the entry counts diagrams obtained by deleting one cell from both and . For , the equality inside the indicator becomes , so every entry is zero. If there are no indexing diagrams, the result is a matrix with empty row and column index sets.
QAlgorithms.Papers.Independent.Extend50.P08.teleportationRayleigh
For natural numbers and any real-valued function on the set of Young diagrams with cells and at most rows, this defines
The subtraction is truncated at zero. There is no nonnegativity or normalization assumption on . Empty sums are zero; in particular, the value is zero if is empty, and it is also zero for because the indicated equality then fails.
QAlgorithms.Papers.Independent.Extend50.P08.unnormalizedBell
For every natural number , this defines a vector in the complex Euclidean space indexed by whose coordinate at is if and otherwise; equivalently, it is . No normalization factor is included. The case is allowed and gives the zero vector in the zero-dimensional space.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.