Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Asymptotic performance of port-based teleportation

Definition
QAlgorithms_Papers_Independent_Extend50_P25

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

prove2quantum

The objects the formalized statements of Asymptotic performance of port-based teleportation (arXiv:1809.10751) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Ports: Bob's N labelled d-dimensional ports (1809.10751v2, PDF p.11).
  • portBranch: Effect-conditioned port output, tracing out Alice, the input and all other Bob ports. PDF pp.11,16,51, Eq. (7.3). The effect rather than its square root is legitimate because all of Alice's systems are traced out. The resource is fixed independently of X.
  • PBTProtocol: Physical deterministic PBT data (PDF pp.9,11). Alice's finite space A includes purifications and classical flags; Bob can only retain the announced port.
  • PBTProtocol.channel: The channel actually implemented by a PBT protocol (PDF p.11).
  • pbtFidelity: Squared entanglement fidelity against identity (PDF p.9), reusing the frozen qudit normalized-Choi overlap. The d=0 totalization is excluded by all statements.
  • diamondError: Full stabilized trace norm error against identity, without a factor 1/2 (PDF p.9). Reuse the frozen diamond norm on the linearized map; all physical channels are already linear. d=0 is a harmless totalization excluded from every theorem using this definition.
  • pbtOptimalFidelity: Constructed optimum over BOTH resources and POVMs, including every finite Alice ancilla (PDF p.11). For d,N>0 the attainable set is nonempty and contained in [0,1].
  • optimalDiamondError: Constructed minimum diamond error over the same physical model (PDF p.11). For d,N>0 the attainable set is nonempty and contained in [0,2].
  • portProjector: The physical EPR projector on the input and port i, identity on all other ports. PDF p.17, Lemma 3.6.
  • eprResource: N maximally entangled d-by-d pairs (PDF pp.11–13).
  • standardMeasurement: PGM for the physical EPR ensemble, completed uniformly on its kernel (PDF p.12). The completion is irrelevant on ensemble support.
  • standardFidelity: Fidelity of the constructed standard PGM/EPR protocol (PDF pp.4,12).
  • HeraldedProtocol: Physical probabilistic PBT data: failure plus N success effects, and a success subchannel p_i id for each successful port (PDF p.13).
  • HeraldedProtocol.success: Total heralded success probability (PDF p.13).
  • pbtOptimalSuccess: Optimize the actual heralded physical model, including resource and POVM (PDF p.13).
  • eprSuccess: Optimize the measurement only, with exactly N EPR pairs as resource (PDF p.13).
  • BobSymmetric: Symmetric Werner marginal: diagonal-unitary AND permutation invariance, without a restriction to the totally symmetric subspace (PDF pp.14–15).
  • SymmetricPurification: Unit pure resource with simultaneous port-permutation invariance and conjugate-U on Alice, U on Bob, plus its symmetric Werner marginal (PDF p.15, Proposition 3.3). Replacing U by its conjugate gives the equivalent source convention.
  • conjugateChannel: Simultaneous conjugation of channel input and output (PDF pp.14–16).
  • ConvexInvariantCost: The convex invariant channel costs explicitly allowed after Lemma 3.2 and Proposition 3.4 (PDF pp.14,16); no claim of exact preservation is imposed.
  • NoWorse: Full conclusion of no-worse performance (PDF pp.14–16).
  • SchurDiagram: Bounded row-tuples representing partitions of n into at most d rows (PDF p.9). The bound alpha_i<=n is automatic mathematically and ensures a concrete finite type.
  • diagramWeylDimension: Source Eq.(2.3), PDF p.10: evaluate the frozen Weyl dimension formula on the actual padded rows. The row adapter is zero beyond the d allowed rows.
  • spechtDimension: Specht dimension, hook-length formula rewritten as on PDF p.20, proof of (4.8).
  • schurMass: The actual Schur–Weyl probability mass, Eq. (4.1), PDF p.18.
  • fluctuation: Centered Schur–Weyl fluctuations, Eq. (4.3), PDF p.18.
  • normalCoordinates: Independent standard real Gaussian coordinates (PDF p.9).
  • gueMatrix: Concrete GUE matrix: diagonal variance 1, off-diagonal real/imaginary variance 1/2. PDF p.9.
  • gueZero: Traceless GUE as the trace-centered pushforward, PDF p.9.
  • gueSpectrum: Ordered eigenvalues of the concrete Hermitian traceless GUE matrix (PDF pp.9,18). The frozen spectral API sorts increasingly; Fin.rev restores the source's order.
  • expectedLargest: Expected largest eigenvalue for the precise GUE normalization in the paper.
  • dirichletFirst: First Dirichlet eigenvalue on the ordered simplex, intrinsically Euclidean. PDF pp.6,39,45. Coordinates z in R^(d-1) map to (z,1-sum z); their Gram matrix is I+11^T and inverse is I-11^T/d. Its constant volume factor sqrt(d) cancels in the Rayleigh quotient. Taking C_c^infinity functions gives the H_0^1 infimum. At d=1 the domain is the zero-dimensional point, its boundary is empty, and its lowest eigenvalue is 0.
  • profileSimplex: Closed ordered probability simplex in the coordinates x=(z,1-sum z). PDF pp.39,42: the affine hyperplane carries its induced Euclidean metric.
  • sampledProfileWeight: Unnormalized sampled profile, PDF p.43, Eq.(6.25). Only the restriction of a to the simplex is used; N>0 is required in the theorem.
  • sampledProfileMass: The normalized q(mu)=eta_N a(mu/N)^2/N^(d-1) in Eq.(6.25), PDF p.43. The normalizing sum is constructed, and is eventually positive for source profiles.
  • sampledProfileFidelity: Fidelity F_a of the sampled resource profile with its source measurement, PDF pp.43,56: substitute q=c*p into Eq.(3.6). The inner sum is exactly over partitions obtained by adding one box to alpha; there is no optimization over a.
  • profileEnergy: Intrinsic Dirichlet energy integral of the source's normalized profile, PDF pp.42,45: sqrt(d) is the coordinate volume Jacobian, and I-11^T/d is the inverse metric. Derivatives within the closed simplex express C2 up to its boundary.
  • dimensionCoefficient: Explicit coefficient appearing in the proof of Theorem 1.5, PDF p.47.
  • smoothMaxInformation: Relative smoothing of max-mutual information in bits, specialized to phi+. PDF p.48. A single extended-real infimum flattens the three nested minimizations: subnormalized rho within purified distance eps, normalized sigma_B, and lambda with rho <= 2^lambda rho_A tensor sigma_B. EReal avoids junk real infima for empty or unbounded sets. The overlap condition is exactly P(phi+,rho)<=eps for 0<=eps<1.
  • communicatedChannel: Entanglement-assisted encoding and decoding, with identity on Bob's retained ancilla during encoding (PDF p.50). d0 counts transmitted dimension only.
  • IsQC: A qc-channel has output diagonal in the fixed classical basis (PDF p.50).
  • binaryRoot: Binary root fidelity b(x,y), without a further outer square root (PDF p.52).
  • portOperatorNorm: Euclidean complex operator norm, using Mathlib's bundled map rather than the real Bloch-matrix norm in Information100.P23 (PDF p.18).
  • gammaInterval: Maximum of adjacent exponents from i through j-1 (PDF p.20). Only i<j is used; this range is then nonempty. NNReal encodes nonnegativity.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_ChannelDiamondNorm
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_Hamiltonian
import Definitions.Def_QAlgorithms_Defs_QuditChannelFidelities
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P21
import Definitions.Def_QAlgorithms_Defs_TensorPermutationRepresentations
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P63
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P65
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P22

noncomputable section

namespace QAlgorithms.Papers.Independent.Extend50.P25

open QAlgorithms MeasureTheory
open QAlgorithms.Papers.Independent.Information100.P21 (Op)
open scoped BigOperators ComplexConjugate Matrix ComplexOrder

/-- Bob's N labelled d-dimensional ports (1809.10751v2, PDF p.11). -/
abbrev Ports (d N : ℕ) := Fin N → Fin d

/-- Effect-conditioned port output, tracing out Alice, the input and all other Bob ports.
PDF pp.11,16,51, Eq. (7.3). The effect rather than its square root is legitimate because
all of Alice's systems are traced out. The resource is fixed independently of X. -/
def portBranch {d N : ℕ} {A : Type*} [Fintype A]
    (rho : Op (A × Ports d N)) (E : Op (Fin d × A)) (i : Fin N) :
    Superop (Fin d) (Fin d) :=
  fun X y z => ∑ a, ∑ b, ∑ u : A, ∑ v : A,
    ∑ s : Ports d N, ∑ t : Ports d N,
      if s i = y ∧ t i = z ∧ (∀ j, j ≠ i → s j = t j) then
        E (b,v) (a,u) * X a b * rho (u,s) (v,t) else 0

/-- Physical deterministic PBT data (PDF pp.9,11). Alice's finite space A includes
purifications and classical flags; Bob can only retain the announced port. -/
structure PBTProtocol (d N : ℕ) (A : Type*) [Fintype A] [DecidableEq A] where
  resource : Op (A × Ports d N)
  resource_state : IsDensityMatrix resource
  measurement : Fin N → Op (Fin d × A)
  measurement_povm : IsPOVM measurement

/-- The channel actually implemented by a PBT protocol (PDF p.11). -/
def PBTProtocol.channel {d N : ℕ} {A : Type*} [Fintype A] [DecidableEq A]
    (P : PBTProtocol d N A) : Superop (Fin d) (Fin d) :=
  fun X => ∑ i, portBranch P.resource (P.measurement i) i X

/-- Squared entanglement fidelity against identity (PDF p.9), reusing the frozen
qudit normalized-Choi overlap. The d=0 totalization is excluded by all statements. -/
def pbtFidelity (d : ℕ) (Phi : Superop (Fin d) (Fin d)) : ℝ :=
  if hd : 0 < d then QAlgorithms.QuditFidelity.entanglementFidelity d hd Phi else 0

/-- Full stabilized trace norm error against identity, without a factor 1/2 (PDF p.9).
Reuse the frozen diamond norm on the linearized map; all physical channels are already
linear. d=0 is a harmless totalization excluded from every theorem using this definition. -/
def diamondError (d : ℕ) (Phi : Superop (Fin d) (Fin d)) : ℝ :=
  if hd : 0 < d then
    QAlgorithms.IntrinsicLearning.diamondNorm d hd
      (QAlgorithms.Papers.Independent.Support50.P22.linearExtension Phi - LinearMap.id)
  else 0

/-- Constructed optimum over BOTH resources and POVMs, including every finite Alice
ancilla (PDF p.11). For d,N>0 the attainable set is nonempty and contained in [0,1]. -/
def pbtOptimalFidelity (d N : ℕ) : ℝ :=
  sSup {v | ∃ m : ℕ, ∃ P : PBTProtocol d N (Fin m), v = pbtFidelity d P.channel}

/-- Constructed minimum diamond error over the same physical model (PDF p.11).
For d,N>0 the attainable set is nonempty and contained in [0,2]. -/
def optimalDiamondError (d N : ℕ) : ℝ :=
  sInf {v | ∃ m : ℕ, ∃ P : PBTProtocol d N (Fin m), v = diamondError d P.channel}

/-- The physical EPR projector on the input and port i, identity on all other ports.
PDF p.17, Lemma 3.6. -/
def portProjector (d N : ℕ) (i : Fin N) : Op (Fin d × Ports d N) :=
  fun x y => if x.1 = x.2 i ∧ y.1 = y.2 i ∧ (∀ j, j ≠ i → x.2 j = y.2 j)
    then (d : ℂ)⁻¹ else 0

/-- N maximally entangled d-by-d pairs (PDF pp.11–13). -/
def eprResource (d N : ℕ) : Op (Ports d N × Ports d N) :=
  fun x y => if x.1 = x.2 ∧ y.1 = y.2 then ((d : ℂ)^N)⁻¹ else 0

/-- PGM for the physical EPR ensemble, completed uniformly on its kernel (PDF p.12).
The completion is irrelevant on ensemble support. -/
def standardMeasurement (d N : ℕ) : Fin N → Op (Fin d × Ports d N) :=
  let S := ∑ i : Fin N, portProjector d N i
  let R := cfc (fun x : ℝ => (Real.sqrt x)⁻¹) S
  fun i => R * portProjector d N i * R + (N : ℂ)⁻¹ • (1 - R * S * R)

/-- Fidelity of the constructed standard PGM/EPR protocol (PDF pp.4,12). -/
def standardFidelity (d N : ℕ) : ℝ :=
  pbtFidelity d (fun X => ∑ i : Fin N,
    portBranch (eprResource d N) (standardMeasurement d N i) i X)

/-- Physical probabilistic PBT data: failure plus N success effects, and a success
subchannel p_i id for each successful port (PDF p.13). -/
structure HeraldedProtocol (d N : ℕ) (A : Type*) [Fintype A] [DecidableEq A] where
  resource : Op (A × Ports d N)
  resource_state : IsDensityMatrix resource
  successEffect : Fin N → Op (Fin d × A)
  failureEffect : Op (Fin d × A)
  success_positive : ∀ i, (successEffect i).PosSemidef
  failure_positive : failureEffect.PosSemidef
  complete : failureEffect + ∑ i, successEffect i = 1
  weight : Fin N → ℝ
  weight_nonnegative : ∀ i, 0 ≤ weight i
  exact_success : ∀ i X, portBranch resource (successEffect i) i X = (weight i : ℂ) • X

/-- Total heralded success probability (PDF p.13). -/
def HeraldedProtocol.success {d N : ℕ} {A : Type*} [Fintype A] [DecidableEq A]
    (P : HeraldedProtocol d N A) : ℝ := ∑ i, P.weight i

/-- Optimize the actual heralded physical model, including resource and POVM (PDF p.13). -/
def pbtOptimalSuccess (d N : ℕ) : ℝ :=
  sSup {p | ∃ m : ℕ, ∃ P : HeraldedProtocol d N (Fin m), p = P.success}

/-- Optimize the measurement only, with exactly N EPR pairs as resource (PDF p.13). -/
def eprSuccess (d N : ℕ) : ℝ :=
  sSup {p | ∃ P : HeraldedProtocol d N (Ports d N),
    P.resource = eprResource d N ∧ p = P.success}

/-- Symmetric Werner marginal: diagonal-unitary AND permutation invariance,
without a restriction to the totally symmetric subspace (PDF pp.14–15). -/
def BobSymmetric {d N : ℕ} (rho : Op (Ports d N)) : Prop :=
  (∀ U : Matrix.unitaryGroup (Fin d) ℂ,
    conjSuperop (QAlgorithms.Papers.Independent.Information100.P63.tensorPower N (U : Op (Fin d))) rho = rho) ∧
  (∀ pi : Equiv.Perm (Fin N), conjSuperop (QAlgorithms.Schur.tensorPermutation d N pi) rho = rho)

/-- Unit pure resource with simultaneous port-permutation invariance and conjugate-U
on Alice, U on Bob, plus its symmetric Werner marginal (PDF p.15, Proposition 3.3).
Replacing U by its conjugate gives the equivalent source convention. -/
def SymmetricPurification {d N : ℕ} (rho : Op (Ports d N × Ports d N)) : Prop :=
  ∃ psi : EuclideanSpace ℂ (Ports d N × Ports d N), ‖psi‖ = 1 ∧
    rho = pureDensity psi ∧ BobSymmetric (traceLeft rho) ∧
    (∀ pi : Equiv.Perm (Fin N),
      (Matrix.kronecker (QAlgorithms.Schur.tensorPermutation d N pi) (QAlgorithms.Schur.tensorPermutation d N pi)).mulVec psi = psi) ∧
    (∀ U : Matrix.unitaryGroup (Fin d) ℂ,
      (Matrix.kronecker (QAlgorithms.Papers.Independent.Information100.P63.tensorPower N (fun i j => conj ((U : Op (Fin d)) i j)))
        (QAlgorithms.Papers.Independent.Information100.P63.tensorPower N (U : Op (Fin d)))).mulVec psi = psi)

/-- Simultaneous conjugation of channel input and output (PDF pp.14–16). -/
def conjugateChannel {d : ℕ} (U : Matrix.unitaryGroup (Fin d) ℂ)
    (Phi : Superop (Fin d) (Fin d)) : Superop (Fin d) (Fin d) :=
  fun X => conjSuperop (U : Op (Fin d)) (Phi (conjSuperop ((U : Op (Fin d))ᴴ) X))

/-- The convex invariant channel costs explicitly allowed after Lemma 3.2 and
Proposition 3.4 (PDF pp.14,16); no claim of exact preservation is imposed. -/
def ConvexInvariantCost {d : ℕ} (J : Superop (Fin d) (Fin d) → ℝ) : Prop :=
  (∀ Phi Psi, IsChannel Phi → IsChannel Psi → ∀ t : ℝ, 0 ≤ t → t ≤ 1 →
    J (fun X => (t : ℂ) • Phi X + ((1-t : ℝ) : ℂ) • Psi X) ≤
      t * J Phi + (1-t) * J Psi) ∧
  (∀ U Phi, IsChannel Phi → J (conjugateChannel U Phi) = J Phi)

/-- Full conclusion of no-worse performance (PDF pp.14–16). -/
def NoWorse {d : ℕ} (new old : Superop (Fin d) (Fin d)) : Prop :=
  pbtFidelity d old ≤ pbtFidelity d new ∧ diamondError d new ≤ diamondError d old ∧
    ∀ J, ConvexInvariantCost J → J new ≤ J old

/-- Bounded row-tuples representing partitions of n into at most d rows (PDF p.9).
The bound alpha_i<=n is automatic mathematically and ensures a concrete finite type. -/
def SchurDiagram (d n : ℕ) :=
  {a : Fin d → Fin (n+1) // (∑ i, (a i).val) = n ∧
    ∀ i j, i ≤ j → (a j).val ≤ (a i).val}

/-- Finite padded Young diagrams, with a decidable constraint predicate (PDF p.9). -/
instance schurDiagramFintype (d n : ℕ) : Fintype (SchurDiagram d n) := by
  classical
  unfold SchurDiagram
  infer_instance

/-- Source Eq.(2.3), PDF p.10: evaluate the frozen Weyl dimension formula
on the actual padded rows. The row adapter is zero beyond the d allowed rows. -/
def diagramWeylDimension {d n : ℕ} (a : SchurDiagram d n) : ℝ :=
  QAlgorithms.Papers.Independent.Information100.P65.weylDimension
    (fun i => if h : i < d then (a.val ⟨i,h⟩).val else 0) d

/-- Specht dimension, hook-length formula rewritten as on PDF p.20, proof of (4.8). -/
def spechtDimension {d n : ℕ} (a : SchurDiagram d n) : ℝ :=
  (n.factorial : ℝ) * diagramWeylDimension a *
    (∏ i : Fin d, ((d - 1 - i.val).factorial : ℝ)) /
    (∏ i : Fin d, (((a.val i).val + d - 1 - i.val).factorial : ℝ))

/-- The actual Schur–Weyl probability mass, Eq. (4.1), PDF p.18. -/
def schurMass {d n : ℕ} (a : SchurDiagram d n) : ℝ :=
  spechtDimension a * diagramWeylDimension a / (d : ℝ)^n

/-- Centered Schur–Weyl fluctuations, Eq. (4.3), PDF p.18. -/
def fluctuation {d n : ℕ} (a : SchurDiagram d n) (i : Fin d) : ℝ :=
  (((a.val i).val : ℝ) - (n : ℝ)/d) / Real.sqrt ((n : ℝ)/d)

/-- Independent standard real Gaussian coordinates (PDF p.9). -/
def normalCoordinates (I : Type*) [Fintype I] : Measure (I → ℝ) :=
  Measure.pi (fun _ : I => ProbabilityTheory.gaussianReal 0 1)

/-- Concrete GUE matrix: diagonal variance 1, off-diagonal real/imaginary variance 1/2.
PDF p.9. -/
def gueMatrix (d : ℕ) (x : (Fin d × Fin d) → ℝ) : Op (Fin d) :=
  fun i j => if i = j then (x (i,i) : ℂ)
    else if i < j then ((x (i,j) : ℂ) + Complex.I * (x (j,i) : ℂ)) / (Real.sqrt 2 : ℂ)
    else ((x (j,i) : ℂ) - Complex.I * (x (i,j) : ℂ)) / (Real.sqrt 2 : ℂ)

/-- Traceless GUE as the trace-centered pushforward, PDF p.9. -/
def gueZero (d : ℕ) (x : (Fin d × Fin d) → ℝ) : Op (Fin d) :=
  gueMatrix d x - ((gueMatrix d x).trace / (d : ℂ)) • (1 : Op (Fin d))

/-- Ordered eigenvalues of the concrete Hermitian traceless GUE matrix (PDF pp.9,18).
The frozen spectral API sorts increasingly; Fin.rev restores the source's order. -/
def gueSpectrum (d : ℕ) (x : (Fin d × Fin d) → ℝ) (j : Fin d) : ℝ :=
  ascEigenvalues (gueZero d x) (Fin.cast (Fintype.card_fin d).symm (Fin.rev j))

/-- Expected largest eigenvalue for the precise GUE normalization in the paper. -/
def expectedLargest (d : ℕ) (hd : 0 < d) : ℝ :=
  ∫ x, gueSpectrum d x ⟨0,hd⟩ ∂normalCoordinates (Fin d × Fin d)

/-- First Dirichlet eigenvalue on the ordered simplex, intrinsically Euclidean.
PDF pp.6,39,45. Coordinates z in R^(d-1) map to (z,1-sum z); their Gram matrix
is I+11^T and inverse is I-11^T/d. Its constant volume factor sqrt(d) cancels in
the Rayleigh quotient. Taking C_c^infinity functions gives the H_0^1 infimum. At d=1 the
domain is the zero-dimensional point, its boundary is empty, and its lowest eigenvalue is 0. -/
def dirichletFirst (d : ℕ) : ℝ :=
  let point := fun z : EuclideanSpace ℝ (Fin (d-1)) => fun i : Fin d =>
    if h : i.val < d-1 then z ⟨i.val,h⟩ else 1 - ∑ j, z j
  let domain : Set (EuclideanSpace ℝ (Fin (d-1))) :=
    {z | (∀ i, 0 < point z i) ∧ ∀ i j, i < j → point z j < point z i}
  let energy := fun (f : EuclideanSpace ℝ (Fin (d-1)) → ℝ) z =>
    ‖fderiv ℝ f z‖^2 -
      (∑ i : Fin (d-1), (fderiv ℝ f z)
        (WithLp.toLp 2 (fun j => if j = i then (1 : ℝ) else 0)))^2 / (d : ℝ)
  sInf {v : ℝ | ∃ f : EuclideanSpace ℝ (Fin (d-1)) → ℝ,
    ContDiff ℝ (⊤ : ℕ∞) f ∧ HasCompactSupport f ∧ tsupport f ⊆ domain ∧
    Integrable (fun z => f z ^ 2) ∧ Integrable (energy f) ∧
    (∫ z, f z ^ 2) = 1 ∧ v = ∫ z, energy f z}

/-- Closed ordered probability simplex in the coordinates x=(z,1-sum z).
PDF pp.39,42: the affine hyperplane carries its induced Euclidean metric. -/
def profileSimplex (d : ℕ) : Set (EuclideanSpace ℝ (Fin (d-1))) :=
  let point := fun z : EuclideanSpace ℝ (Fin (d-1)) => fun i : Fin d =>
    if h : i.val < d-1 then z ⟨i.val,h⟩ else 1 - ∑ j, z j
  {z | (∀ i, 0 ≤ point z i) ∧ ∀ i j, i < j → point z j ≤ point z i}

/-- Unnormalized sampled profile, PDF p.43, Eq.(6.25). Only the restriction of a
to the simplex is used; N>0 is required in the theorem. -/
def sampledProfileWeight (d N : ℕ) (a : EuclideanSpace ℝ (Fin (d-1)) → ℝ)
    (mu : SchurDiagram d N) : ℝ :=
  a (WithLp.toLp 2 (fun i : Fin (d-1) =>
    (((mu.val ⟨i.val, by omega⟩).val : ℝ) / (N : ℝ)))) ^ 2

/-- The normalized q(mu)=eta_N a(mu/N)^2/N^(d-1) in Eq.(6.25), PDF p.43.
The normalizing sum is constructed, and is eventually positive for source profiles. -/
def sampledProfileMass (d N : ℕ) (a : EuclideanSpace ℝ (Fin (d-1)) → ℝ)
    (mu : SchurDiagram d N) : ℝ :=
  sampledProfileWeight d N a mu / ∑ nu : SchurDiagram d N, sampledProfileWeight d N a nu

/-- Fidelity F_a of the sampled resource profile with its source measurement,
PDF pp.43,56: substitute q=c*p into Eq.(3.6). The inner sum is exactly over
partitions obtained by adding one box to alpha; there is no optimization over a. -/
def sampledProfileFidelity (d N : ℕ) (a : EuclideanSpace ℝ (Fin (d-1)) → ℝ) : ℝ :=
  (∑ alpha : SchurDiagram d (N-1),
    (∑ mu : SchurDiagram d N,
      if ∃ j : Fin d, ∀ i : Fin d,
        (mu.val i).val = (alpha.val i).val + (if i = j then 1 else 0)
      then Real.sqrt (sampledProfileMass d N a mu) else 0)^2) / (d : ℝ)^2

/-- Intrinsic Dirichlet energy integral of the source's normalized profile,
PDF pp.42,45: sqrt(d) is the coordinate volume Jacobian, and I-11^T/d is the
inverse metric. Derivatives within the closed simplex express C2 up to its boundary. -/
def profileEnergy (d : ℕ) (a : EuclideanSpace ℝ (Fin (d-1)) → ℝ) : ℝ :=
  Real.sqrt (d : ℝ) * ∫ z in profileSimplex d,
    (‖fderivWithin ℝ a (profileSimplex d) z‖^2 -
      (∑ i : Fin (d-1), (fderivWithin ℝ a (profileSimplex d) z)
        (WithLp.toLp 2 (fun j => if j = i then (1 : ℝ) else 0)))^2 / (d : ℝ))

example (d N : ℕ) (mu : SchurDiagram d N) :
    sampledProfileMass d N (fun _ => 0) mu = 0 := by
  simp [sampledProfileMass, sampledProfileWeight]

/-- Explicit coefficient appearing in the proof of Theorem 1.5, PDF p.47. -/
def dimensionCoefficient (d : ℕ) : ℝ :=
  ((d : ℝ)-1)/2 * (Real.sqrt (((d : ℝ)+1)/2) + 1)^2 * (d : ℝ) *
    ((d : ℝ)*((d : ℝ)-1)/Real.sqrt 2 + Real.sqrt ((d : ℝ)*((d : ℝ)-1)) + Real.sqrt 2)

/-- Relative smoothing of max-mutual information in bits, specialized to phi+.
PDF p.48. A single extended-real infimum flattens the three nested minimizations:
subnormalized rho within purified distance eps, normalized sigma_B, and lambda with
rho <= 2^lambda rho_A tensor sigma_B. EReal avoids junk real infima for empty or
unbounded sets. The overlap condition is exactly P(phi+,rho)<=eps for 0<=eps<1. -/
def smoothMaxInformation (d : ℕ) (eps : ℝ) : EReal :=
  sInf {v : EReal | ∃ rho : Op (Fin d × Fin d), rho.PosSemidef ∧ rho.trace.re ≤ 1 ∧
    1 - eps^2 ≤ (∑ i : Fin d, ∑ j : Fin d, rho (i,i) (j,j)).re / (d : ℝ) ∧
    ∃ sigma : Op (Fin d), IsDensityMatrix sigma ∧ ∃ t : ℝ,
    (((Real.rpow 2 t : ℝ) : ℂ) •
      Matrix.kronecker (fun i j => ∑ k : Fin d, rho (i,k) (j,k)) sigma - rho).PosSemidef ∧
    v = (t : EReal)}

/-- Entanglement-assisted encoding and decoding, with identity on Bob's retained
ancilla during encoding (PDF p.50). d0 counts transmitted dimension only. -/
def communicatedChannel {d d0 a b : ℕ} (rho : Op (Fin a × Fin b))
    (E : Superop (Fin d × Fin a) (Fin d0))
    (D : Superop (Fin d0 × Fin b) (Fin d)) : Superop (Fin d) (Fin d) :=
  fun X => D (fun y z =>
    E (fun u v => X u.1 v.1 * rho (u.2,y.2) (v.2,z.2)) y.1 z.1)

/-- A qc-channel has output diagonal in the fixed classical basis (PDF p.50). -/
def IsQC {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A]
    (E : Superop A B) : Prop :=
  IsChannel E ∧ ∀ X i j, i ≠ j → E X i j = 0

/-- Binary root fidelity b(x,y), without a further outer square root (PDF p.52). -/
def binaryRoot (x y : ℝ) : ℝ :=
  Real.sqrt (x*y) + Real.sqrt ((1-x)*(1-y))

/-- Euclidean complex operator norm, using Mathlib's bundled map rather than
the real Bloch-matrix norm in Information100.P23 (PDF p.18). -/
def portOperatorNorm {A : Type*} [Fintype A] (T : Op A) : ℝ := by
  classical
  exact ‖Matrix.toEuclideanCLM (𝕜 := ℂ) T‖

/- Sanity checks for the constructed objects. No theorem proof is part of this draft. -/

example {A B : Type*} (X : Op A) (Y : Op B) (a c : A) (b e : B) :
    Matrix.kronecker X Y (a,b) (c,e) = X a c * Y b e := rfl

example {d N : ℕ} {A : Type*} [Fintype A] [DecidableEq A]
    (P : PBTProtocol d N A) (X : Op (Fin d)) :
    P.channel X = ∑ i, portBranch P.resource (P.measurement i) i X := rfl

example {d N : ℕ} {A : Type*} [Fintype A] [DecidableEq A]
    (P : HeraldedProtocol d N A) : P.success = ∑ i, P.weight i := rfl

example {d : ℕ} (U : Op (Fin d)) : QAlgorithms.Papers.Independent.Information100.P63.tensorPower 0 U = 1 := by
  ext x y
  simp [QAlgorithms.Papers.Independent.Information100.P63.tensorPower,
    Matrix.one_apply, Subsingleton.elim x y]

example (x : (Fin 1 × Fin 1) → ℝ) : gueZero 1 x = 0 := by
  ext i j
  fin_cases i
  fin_cases j
  simp [gueZero, gueMatrix, Matrix.trace, Matrix.one_apply]

example : binaryRoot 0 0 = 1 := by norm_num [binaryRoot]

example (Phi : Superop (Fin 0) (Fin 0)) : pbtFidelity 0 Phi = 0 := by
  simp [pbtFidelity]

example : dimensionCoefficient 1 = 0 := by
  norm_num [dimensionCoefficient]

/-- Maximum of adjacent exponents from i through j-1 (PDF p.20).
Only i<j is used; this range is then nonempty. NNReal encodes nonnegativity. -/
def gammaInterval (d : ℕ) (gamma : Fin (d-1) → NNReal) (i j : Fin d) : ℝ :=
  ((Finset.univ.filter (fun k : Fin (d-1) => i.val ≤ k.val ∧ k.val < j.val)).sup gamma : NNReal)

end QAlgorithms.Papers.Independent.Extend50.P25
Source
Asymptotic performance of port-based teleportation, arXiv:1809.10751v2, https://arxiv.org/abs/1809.10751v2
Read-back

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

QAlgorithms.Papers.Independent.Extend50.P25.BobSymmetric

For arbitrary natural numbers d,Nd,Nd,N, let P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, and let ρ\rhoρ be any complex matrix on P\mathcal PP, without a density-matrix assumption. It is Bob-symmetric precisely when both of the following invariances hold:

TUρTU†=ρfor every unitary U∈Cd×d,VπρVπ†=ρfor every permutation π of {0,…,N−1},T_U\rho T_U^\dagger=\rho \quad\text{for every unitary }U\in\mathbb C^{d\times d}, \qquad V_\pi\rho V_\pi^\dagger=\rho \quad\text{for every permutation }\pi\text{ of }\{0,\ldots,N-1\},TU​ρTU†​=ρfor every unitary U∈Cd×d,Vπ​ρVπ†​=ρfor every permutation π of {0,…,N−1},

where

(TU)y,x=∏i=0N−1Uyi,xi,(Vπ)y,x={1,y=x∘π−1,0,otherwise.(T_U)_{y,x}=\prod_{i=0}^{N-1}U_{y_i,x_i}, \qquad (V_\pi)_{y,x}= \begin{cases} 1,&y=x\circ\pi^{-1},\\ 0,&\text{otherwise}. \end{cases}(TU​)y,x​=i=0∏N−1​Uyi​,xi​​,(Vπ​)y,x​={1,0,​y=x∘π−1,otherwise.​

The dagger denotes conjugate transpose. The definition includes N=0N=0N=0, when P\mathcal PP has one element and the empty product equals 111, so both invariances hold for every scalar matrix; it also includes d=0d=0d=0.

QAlgorithms.Papers.Independent.Extend50.P25.ConvexInvariantCost

For any natural number ddd, a real-valued function JJJ on all functions Φ:Cd×d→Cd×d\Phi:\mathbb C^{d\times d}\to\mathbb C^{d\times d}Φ:Cd×d→Cd×d is a convex invariant cost precisely when it satisfies

J(X↦tΦ(X)+(1−t)Ψ(X))≤tJ(Φ)+(1−t)J(Ψ)J\bigl(X\mapsto t\Phi(X)+(1-t)\Psi(X)\bigr) \le tJ(\Phi)+(1-t)J(\Psi)J(X↦tΦ(X)+(1−t)Ψ(X))≤tJ(Φ)+(1−t)J(Ψ)

for every pair of channels Φ,Ψ\Phi,\PsiΦ,Ψ and every real ttt with 0≤t≤10\le t\le10≤t≤1, and

J(X↦UΦ(U†XU)U†)=J(Φ)J\bigl(X\mapsto U\Phi(U^\dagger XU)U^\dagger\bigr)=J(\Phi)J(X↦UΦ(U†XU)U†)=J(Φ)

for every d×dd\times dd×d unitary UUU and every channel Φ\PhiΦ. Here a channel means a function having a finite Kraus representation: there exist a natural number mmm and matrices K0,…,Km−1∈Cd×dK_0,\ldots,K_{m-1}\in\mathbb C^{d\times d}K0​,…,Km−1​∈Cd×d such that ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I and Φ(X)=∑jKjXKj†\Phi(X)=\sum_jK_jXK_j^\daggerΦ(X)=∑j​Kj​XKj†​ for every XXX. The two requirements constrain JJJ only at the indicated channels and their combinations or conjugations; no further property of its values on other functions is required. The definition includes d=0d=0d=0, and t=0,1t=0,1t=0,1 are included.

QAlgorithms.Papers.Independent.Extend50.P25.HeraldedProtocol

For natural numbers d,Nd,Nd,N and a finite type AAA with decidable equality, put D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1}, P=D{0,…,N−1}P=D^{\{0,\ldots,N-1\}}P=D{0,…,N−1}, and let Op⁡(V)\operatorname{Op}(V)Op(V) denote complex matrices indexed by V×VV\times VV×V. A heralded protocol consists of a positive semidefinite matrix ρ∈Op⁡(A×P)\rho\in\operatorname{Op}(A\times P)ρ∈Op(A×P) with complex trace 111, matrices Ei∈Op⁡(D×A)E_i\in\operatorname{Op}(D\times A)Ei​∈Op(D×A) for every 0≤i<N0\le i<N0≤i<N, a matrix EfailE_{\mathrm{fail}}Efail​ on the same space, and real numbers wi≥0w_i\ge0wi​≥0. Every EiE_iEi​ and EfailE_{\mathrm{fail}}Efail​ must be positive semidefinite, and Efail+∑i=0N−1Ei=IE_{\mathrm{fail}}+\sum_{i=0}^{N-1}E_i=IEfail​+∑i=0N−1​Ei​=I. For every i<Ni<Ni<N, every complex matrix X∈Op⁡(D)X\in\operatorname{Op}(D)X∈Op(D), and every y,z∈Dy,z\in Dy,z∈D, they must satisfy

∑a,b∈D∑u,v∈A∑s,t∈P1{si=y, ti=z, ∀j≠i, sj=tj} (Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t)=wiXy,z.\sum_{a,b\in D}\sum_{u,v\in A}\sum_{s,t\in P} \mathbf 1_{\{s_i=y,\ t_i=z,\ \forall j\ne i,\ s_j=t_j\}}\, (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)} =w_iX_{y,z}.a,b∈D∑​u,v∈A∑​s,t∈P∑​1{si​=y, ti​=z, ∀j=i, sj​=tj​}​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​=wi​Xy,z​.

Here the indicator means that the summand is zero unless its stated conditions hold. The equality applies to arbitrary XXX, without positivity or normalization assumptions. No positivity assumption is imposed on ddd or NNN; when N=0N=0N=0, the branch conditions are vacuous and Efail=IE_{\mathrm{fail}}=IEfail​=I, while an empty resource index space cannot support a matrix of trace 111.

QAlgorithms.Papers.Independent.Extend50.P25.HeraldedProtocol.success

For arbitrary natural numbers d,Nd,Nd,N, a finite type AAA with decidable equality, and a heralded protocol PPP, its success is the real number

success⁡(P)=∑i=0N−1wi.\operatorname{success}(P)=\sum_{i=0}^{N-1}w_i.success(P)=i=0∑N−1​wi​.

Here, writing D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1} and P=D{0,…,N−1}\mathcal P=D^{\{0,\ldots,N-1\}}P=D{0,…,N−1}, the protocol contains a positive semidefinite resource matrix ρ\rhoρ on A×PA\times\mathcal PA×P of trace 111, positive semidefinite matrices Efail,E0,…,EN−1E_{\mathrm{fail}},E_0,\ldots,E_{N-1}Efail​,E0​,…,EN−1​ on D×AD\times AD×A summing to the identity, and nonnegative real weights wiw_iwi​ such that, for every complex matrix XXX on DDD,

∑a,b∈D∑u,v∈A∑s,t∈P1{si=y, ti=z, ∀j≠i, sj=tj} (Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t)=wiXy,z\sum_{a,b\in D}\sum_{u,v\in A}\sum_{s,t\in\mathcal P} \mathbf 1_{\{s_i=y,\ t_i=z,\ \forall j\ne i,\ s_j=t_j\}}\, (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)} =w_iX_{y,z}a,b∈D∑​u,v∈A∑​s,t∈P∑​1{si​=y, ti​=z, ∀j=i, sj​=tj​}​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​=wi​Xy,z​

for every i<Ni<Ni<N and y,z∈Dy,z\in Dy,z∈D. The definition of success uses only these weights. In particular, for N=0N=0N=0 it is the empty sum, hence 000.

QAlgorithms.Papers.Independent.Extend50.P25.IsQC

For finite types AAA and BBB, with decidable equality on AAA, and any function EEE from complex A×AA\times AA×A matrices to complex B×BB\times BB×B matrices, this predicate means that EEE admits a finite trace-preserving Kraus representation and every output of EEE is diagonal. Explicitly, there exist m∈Nm\in\mathbb Nm∈N and matrices Kr∈CB×AK_r\in\mathbb C^{B\times A}Kr​∈CB×A, indexed by 0≤r<m0\le r<m0≤r<m, such that ∑rKr†Kr=IA\sum_r K_r^\dagger K_r=I_A∑r​Kr†​Kr​=IA​ and E(X)=∑rKrXKr†E(X)=\sum_r K_rXK_r^\daggerE(X)=∑r​Kr​XKr†​ for every complex matrix XXX; additionally, E(X)ij=0E(X)_{ij}=0E(X)ij​=0 for every XXX and all distinct i,j∈Bi,j\in Bi,j∈B. The condition on outputs applies to all matrices, without requiring XXX to be positive or have trace one. Empty finite types and m=0m=0m=0 are included, with empty sums interpreted as zero.

QAlgorithms.Papers.Independent.Extend50.P25.NoWorse

For any natural number ddd and any two functions Φnew,Φold:Cd×d→Cd×d\Phi_{\mathrm{new}},\Phi_{\mathrm{old}}:\mathbb C^{d\times d}\to\mathbb C^{d\times d}Φnew​,Φold​:Cd×d→Cd×d, the relation NoWorse⁡(Φnew,Φold)\operatorname{NoWorse}(\Phi_{\mathrm{new}},\Phi_{\mathrm{old}})NoWorse(Φnew​,Φold​) means

Fd(Φold)≤Fd(Φnew),Dd(Φnew)≤Dd(Φold),J(Φnew)≤J(Φold)F_d(\Phi_{\mathrm{old}})\le F_d(\Phi_{\mathrm{new}}),\qquad D_d(\Phi_{\mathrm{new}})\le D_d(\Phi_{\mathrm{old}}),\qquad J(\Phi_{\mathrm{new}})\le J(\Phi_{\mathrm{old}})Fd​(Φold​)≤Fd​(Φnew​),Dd​(Φnew​)≤Dd​(Φold​),J(Φnew​)≤J(Φold​)

for every real-valued function JJJ on such functions that is convex on channels and invariant under Φ↦[X↦UΦ(U†XU)U†]\Phi\mapsto[X\mapsto U\Phi(U^\dagger XU)U^\dagger]Φ↦[X↦UΦ(U†XU)U†] for every unitary UUU. Explicitly, convexity means J(tΦ+(1−t)Ψ)≤tJ(Φ)+(1−t)J(Ψ)J(t\Phi+(1-t)\Psi)\le tJ(\Phi)+(1-t)J(\Psi)J(tΦ+(1−t)Ψ)≤tJ(Φ)+(1−t)J(Ψ) for channels Φ,Ψ\Phi,\PsiΦ,Ψ and 0≤t≤10\le t\le10≤t≤1; a channel is a function Φ(X)=∑j=0m−1KjXKj†\Phi(X)=\sum_{j=0}^{m-1}K_jXK_j^\daggerΦ(X)=∑j=0m−1​Kj​XKj†​ with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. For d>0d>0d>0, let Ωa,b=d−1/2\Omega_{a,b}=d^{-1/2}Ωa,b​=d−1/2 when a=ba=ba=b and 000 otherwise, put PΩ=ΩΩ†P_\Omega=\Omega\Omega^\daggerPΩ​=ΩΩ†, and define

Fd(Φ)=Re⁡tr⁡ ⁣[PΩ(idd⊗Φ)(PΩ)],Dd(Φ)=sup⁡∥X∥1≤1∥(idd⊗(Φ^−id))(X)∥1,F_d(\Phi)=\operatorname{Re}\operatorname{tr}\!\left[ P_\Omega(\mathrm{id}_d\otimes\Phi)(P_\Omega)\right], \qquad D_d(\Phi)= \sup_{\|X\|_1\le1} \left\|(\mathrm{id}_d\otimes(\widehat\Phi-\mathrm{id}))(X)\right\|_1,Fd​(Φ)=Retr[PΩ​(idd​⊗Φ)(PΩ​)],Dd​(Φ)=∥X∥1​≤1sup​​(idd​⊗(Φ−id))(X)​1​,

where Φ^(Y)=∑a,bYa,bΦ(Ea,b)\widehat\Phi(Y)=\sum_{a,b}Y_{a,b}\Phi(E_{a,b})Φ(Y)=∑a,b​Ya,b​Φ(Ea,b​), Ea,bE_{a,b}Ea,b​ is the corresponding matrix unit, ∥M∥1=Re⁡tr⁡M†M\|M\|_1=\operatorname{Re}\operatorname{tr}\sqrt{M^\dagger M}∥M∥1​=RetrM†M​, and the supremum is over all complex matrices on {0,…,d−1}2\{0,\ldots,d-1\}^2{0,…,d−1}2. The square root is defined by continuous functional calculus; amplification of any map Λ\LambdaΛ means [(idd⊗Λ)(X)](r,a),(s,b)=Λ((X(r,i),(s,j))i,j)a,b[(\mathrm{id}_d\otimes\Lambda)(X)]_{(r,a),(s,b)}=\Lambda((X_{(r,i),(s,j)})_{i,j})_{a,b}[(idd​⊗Λ)(X)](r,a),(s,b)​=Λ((X(r,i),(s,j)​)i,j​)a,b​. For d=0d=0d=0, both FdF_dFd​ and DdD_dDd​ are defined to be 000. No channel or linearity assumption is imposed on either Φnew\Phi_{\mathrm{new}}Φnew​ or Φold\Phi_{\mathrm{old}}Φold​.

QAlgorithms.Papers.Independent.Extend50.P25.PBTProtocol.channel

For any natural numbers d,Nd,Nd,N, finite type AAA with a finite enumeration and decidable equality, and protocol PPP, let P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, let ρ\rhoρ be its positive semidefinite, trace-one resource matrix on A×PA\times\mathcal PA×P, and let EiE_iEi​ be its positive semidefinite measurement matrices on {0,…,d−1}×A\{0,\ldots,d-1\}\times A{0,…,d−1}×A, satisfying ∑iEi=I\sum_iE_i=I∑i​Ei​=I. The definition assigns the matrix-valued function

ΦP(X)y,z=∑i=0N−1∑a,b=0d−1∑u,v∈A∑s,t∈Psi=y, ti=zsj=tj for every j≠i(Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t).\Phi_P(X)_{y,z} = \sum_{i=0}^{N-1}\sum_{a,b=0}^{d-1}\sum_{u,v\in A} \sum_{\substack{s,t\in\mathcal P\\ s_i=y,\ t_i=z\\ s_j=t_j\text{ for every }j\ne i}} (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)}.ΦP​(X)y,z​=i=0∑N−1​a,b=0∑d−1​u,v∈A∑​s,t∈Psi​=y, ti​=zsj​=tj​ for every j=i​∑​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​.

Thus it adds the contribution from every port. A sum over no ports is zero; this declaration defines the function and does not itself assert a channel property.

QAlgorithms.Papers.Independent.Extend50.P25.PBTProtocol

For natural numbers d,Nd,Nd,N and a finite type AAA equipped with a finite enumeration and decidable equality, a protocol consists of a complex matrix ρ\rhoρ indexed by A×PA\times\mathcal PA×P, where P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, together with proofs that ρ\rhoρ is positive semidefinite and tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, and a family of complex matrices EiE_iEi​, indexed by i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, acting on {0,…,d−1}×A\{0,\ldots,d-1\}\times A{0,…,d−1}×A, together with proofs that every EiE_iEi​ is positive semidefinite and

∑i=0N−1Ei=I.\sum_{i=0}^{N-1}E_i=I.i=0∑N−1​Ei​=I.

Zero values of d,Nd,Nd,N and empty AAA are not excluded by the parameters, although the required proofs can make such data impossible: empty AAA is incompatible with the resource having trace one; d=0<Nd=0<Nd=0<N likewise makes the resource index set empty; and N=0<dN=0<dN=0<d is incompatible with the two normalization requirements. When d=N=0d=N=0d=N=0, the measurement requirement is an equality of empty matrices and imposes no additional restriction on the resource.

QAlgorithms.Papers.Independent.Extend50.P25.Ports

For any natural numbers d,Nd,Nd,N, Ports(d,N)\mathrm{Ports}(d,N)Ports(d,N) is the set of functions from {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1} to {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, equivalently the set of NNN-tuples of ddd-valued labels. When N=0N=0N=0, it contains exactly the empty tuple, including when d=0d=0d=0; when d=0<Nd=0<Nd=0<N, it is empty.

QAlgorithms.Papers.Independent.Extend50.P25.SchurDiagram

For natural numbers d,nd,nd,n, a Schur diagram is a tuple of natural numbers (a0,…,ad−1)(a_0,\ldots,a_{d-1})(a0​,…,ad−1​), each belonging to {0,…,n}\{0,\ldots,n\}{0,…,n}, such that

∑i=0d−1ai=n,aj≤aiwhenever 0≤i≤j<d.\sum_{i=0}^{d-1}a_i=n, \qquad a_j\le a_i\quad\text{whenever }0\le i\le j<d.i=0∑d−1​ai​=n,aj​≤ai​whenever 0≤i≤j<d.

Thus the tuple is weakly decreasing, and zero entries are allowed. The definition includes n=0n=0n=0, when the unique tuple is identically zero, and d=0d=0d=0, when the empty tuple qualifies exactly when n=0n=0n=0.

QAlgorithms.Papers.Independent.Extend50.P25.SymmetricPurification

For arbitrary natural numbers d,Nd,Nd,N, put P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}. A complex matrix ρ\rhoρ on P×P\mathcal P\times\mathcal PP×P has a symmetric purification in the stated sense precisely when there exists a complex Euclidean vector ψ\psiψ on P×P\mathcal P\times\mathcal PP×P with ∥ψ∥=1\|\psi\|=1∥ψ∥=1 and ρ(a,s),(b,t)=ψ(a,s)ψ(b,t)‾\rho_{(a,s),(b,t)}=\psi(a,s)\overline{\psi(b,t)}ρ(a,s),(b,t)​=ψ(a,s)ψ(b,t)​, such that, defining

σs,t=∑a∈Pρ(a,s),(a,t),(TU)y,x=∏i=0N−1Uyi,xi,(Vπ)y,x=1{y=x∘π−1},\sigma_{s,t}=\sum_{a\in\mathcal P}\rho_{(a,s),(a,t)},\qquad (T_U)_{y,x}=\prod_{i=0}^{N-1}U_{y_i,x_i},\qquad (V_\pi)_{y,x}=\mathbf 1_{\{y=x\circ\pi^{-1}\}},σs,t​=a∈P∑​ρ(a,s),(a,t)​,(TU​)y,x​=i=0∏N−1​Uyi​,xi​​,(Vπ​)y,x​=1{y=x∘π−1}​,

one has TUσTU†=σT_U\sigma T_U^\dagger=\sigmaTU​σTU†​=σ for every d×dd\times dd×d unitary UUU, VπσVπ†=σV_\pi\sigma V_\pi^\dagger=\sigmaVπ​σVπ†​=σ for every permutation π\piπ of the NNN coordinates, and additionally

(Vπ⊗Vπ)ψ=ψfor every π,(TU‾⊗TU)ψ=ψfor every unitary U,(V_\pi\otimes V_\pi)\psi=\psi \quad\text{for every }\pi, \qquad (T_{\overline U}\otimes T_U)\psi=\psi \quad\text{for every unitary }U,(Vπ​⊗Vπ​)ψ=ψfor every π,(TU​⊗TU​)ψ=ψfor every unitary U,

where U‾\overline UU is entrywise complex conjugation and ⊗\otimes⊗ is the matrix Kronecker product. These are exact vector equalities. Zero parameters are included: for N=0N=0N=0, the vector space is one-dimensional and these conditions reduce to ∣ψ∣=1|\psi|=1∣ψ∣=1 and ρ=1\rho=1ρ=1; for d=0<Nd=0<Nd=0<N, no unit vector exists.

QAlgorithms.Papers.Independent.Extend50.P25.binaryRoot

For arbitrary real numbers xxx and yyy, this defines the real-valued function

b(x,y)=xy+(1−x)(1−y).b(x,y)=\sqrt{xy}+\sqrt{(1-x)(1-y)}.b(x,y)=xy​+(1−x)(1−y)​.

There is no assumption that x,y∈[0,1]x,y\in[0,1]x,y∈[0,1]. Each real square root is defined to be zero when its argument is negative.

QAlgorithms.Papers.Independent.Extend50.P25.communicatedChannel

For arbitrary natural numbers d,d0,a,bd,d_0,a,bd,d0​,a,b, an arbitrary complex matrix ρ\rhoρ indexed by {0,…,a−1}×{0,…,b−1}\{0,\ldots,a-1\}\times\{0,\ldots,b-1\}{0,…,a−1}×{0,…,b−1}, and arbitrary functions EEE from complex matrices on {0,…,d−1}×{0,…,a−1}\{0,\ldots,d-1\}\times\{0,\ldots,a-1\}{0,…,d−1}×{0,…,a−1} to complex d0×d0d_0\times d_0d0​×d0​ matrices and DDD from complex matrices on {0,…,d0−1}×{0,…,b−1}\{0,\ldots,d_0-1\}\times\{0,\ldots,b-1\}{0,…,d0​−1}×{0,…,b−1} to complex d×dd\times dd×d matrices, the declaration defines the function X↦D(Y)X\mapsto D(Y)X↦D(Y), where

Y(r,β),(s,γ)=E ⁣(X⊗ρβ,γ)rs,ρα,α′β,γ=ρ(α,β),(α′,γ).Y_{(r,\beta),(s,\gamma)} =E\!\left(X\otimes\rho^{\beta,\gamma}\right)_{rs}, \qquad \rho^{\beta,\gamma}_{\alpha,\alpha'} =\rho_{(\alpha,\beta),(\alpha',\gamma)}.Y(r,β),(s,γ)​=E(X⊗ρβ,γ)rs​,ρα,α′β,γ​=ρ(α,β),(α′,γ)​.

Thus the matrix supplied to EEE has entry Xijρ(α,β),(α′,γ)X_{ij}\rho_{(\alpha,\beta),(\alpha',\gamma)}Xij​ρ(α,β),(α′,γ)​ at row (i,α)(i,\alpha)(i,α) and column (j,α′)(j,\alpha')(j,α′). No density, positivity, linearity, or channel hypotheses are imposed on ρ,E,D\rho,E,Dρ,E,D, and zero values of any of the four dimensions are allowed.

QAlgorithms.Papers.Independent.Extend50.P25.conjugateChannel

For any natural number ddd, any unitary matrix U∈Cd×dU\in\mathbb C^{d\times d}U∈Cd×d, and any function Φ:Cd×d→Cd×d\Phi:\mathbb C^{d\times d}\to\mathbb C^{d\times d}Φ:Cd×d→Cd×d, the function called conjugateChannel⁡(U,Φ)\operatorname{conjugateChannel}(U,\Phi)conjugateChannel(U,Φ) is defined on every complex matrix XXX by

conjugateChannel⁡(U,Φ)(X)=U Φ(U†XU) U†.\operatorname{conjugateChannel}(U,\Phi)(X) = U\,\Phi(U^\dagger XU)\,U^\dagger.conjugateChannel(U,Φ)(X)=UΦ(U†XU)U†.

No linearity, positivity, trace preservation, or channel assumption is imposed on Φ\PhiΦ. The definition also applies to d=0d=0d=0.

QAlgorithms.Papers.Independent.Extend50.P25.diagramWeylDimension

For arbitrary natural numbers d,nd,nd,n and a weakly decreasing tuple a=(a0,…,ad−1)a=(a_0,\ldots,a_{d-1})a=(a0​,…,ad−1​) of integers in {0,…,n}\{0,\ldots,n\}{0,…,n} with ∑iai=n\sum_i a_i=n∑i​ai​=n, the real number called its diagram Weyl dimension is

diagramWeylDimension⁡(a)=∏i=0d−1 ∏j=i+1d−1(ai−i)−(aj−j)j−i,\operatorname{diagramWeylDimension}(a) = \prod_{i=0}^{d-1}\ \prod_{j=i+1}^{d-1} \frac{(a_i-i)-(a_j-j)}{j-i},diagramWeylDimension(a)=i=0∏d−1​ j=i+1∏d−1​j−i(ai​−i)−(aj​−j)​,

where all entries and indices in the fractions are interpreted as real numbers. The underlying row function is extended by zero at indices i≥di\ge di≥d, although those entries do not occur in this product. Each displayed denominator is positive because j>ij>ij>i; for d=0d=0d=0 or d=1d=1d=1, the product is empty and equals 111, whenever a tuple satisfying the hypotheses exists.

QAlgorithms.Papers.Independent.Extend50.P25.diamondError

For any natural number ddd and arbitrary function Φ\PhiΦ from complex d×dd\times dd×d matrices to complex d×dd\times dd×d matrices, the value is zero if d=0d=0d=0. For d>0d>0d>0, let EijE_{ij}Eij​ be the matrix with its sole nonzero entry equal to one at (i,j)(i,j)(i,j), form the complex-linear map

LΦ(Y)=∑i,j=0d−1YijΦ(Eij),Δ=LΦ−id⁡,L_\Phi(Y)=\sum_{i,j=0}^{d-1}Y_{ij}\Phi(E_{ij}), \qquad \Delta=L_\Phi-\operatorname{id},LΦ​(Y)=i,j=0∑d−1​Yij​Φ(Eij​),Δ=LΦ​−id,

and define

diamondError⁡(d,Φ)=sup⁡X∈Cd2×d2∥X∥1≤1∥(id⁡⊗Δ)(X)∥1.\operatorname{diamondError}(d,\Phi) = \sup_{\substack{X\in\mathbb C^{d^2\times d^2}\\ \|X\|_1\le1}} \|(\operatorname{id}\otimes\Delta)(X)\|_1.diamondError(d,Φ)=X∈Cd2×d2∥X∥1​≤1​sup​∥(id⊗Δ)(X)∥1​.

Here ∥X∥1=Re⁡tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{tr}\sqrt{X^\dagger X}∥X∥1​=RetrX†X​, with the square root defined by continuous functional calculus, and the tensor extension applies Δ\DeltaΔ to each block X(r,i),(s,j)X_{(r,i),(s,j)}X(r,i),(s,j)​ with r,sr,sr,s fixed. The optimization includes arbitrary complex matrices XXX, without positivity or Hermiticity restrictions, and has no factor of 1/21/21/2. No linearity or channel assumption is imposed on Φ\PhiΦ; the definition uses LΦL_\PhiLΦ​, which is constructed from its values on matrix units.

QAlgorithms.Papers.Independent.Extend50.P25.dimensionCoefficient

For every natural number ddd, the declaration defines the real number

dimensionCoefficient⁡(d)=d−12(d+12+1)2d(d(d−1)2+d(d−1)+2).\operatorname{dimensionCoefficient}(d) =\frac{d-1}{2} \left(\sqrt{\frac{d+1}{2}}+1\right)^2d \left( \frac{d(d-1)}{\sqrt2} +\sqrt{d(d-1)} +\sqrt2 \right).dimensionCoefficient(d)=2d−1​(2d+1​​+1)2d(2​d(d−1)​+d(d−1)​+2​).

Here every occurrence of ddd has already been converted to a real number, so d−1d-1d−1 is ordinary real subtraction. The values d=0d=0d=0 and d=1d=1d=1 are included, and both give zero.

QAlgorithms.Papers.Independent.Extend50.P25.dirichletFirst

For every natural number ddd, set m=d−1m=d-1m=d−1, using subtraction truncated at zero, and work on Euclidean Rm\mathbb R^mRm. For z∈Rmz\in\mathbb R^mz∈Rm and 0≤i<d0\le i<d0≤i<d, define pi(z)=zip_i(z)=z_ipi​(z)=zi​ if i<mi<mi<m, and pi(z)=1−∑j=0m−1zjp_i(z)=1-\sum_{j=0}^{m-1}z_jpi​(z)=1−∑j=0m−1​zj​ otherwise; let Ωd\Omega_dΩd​ consist of those zzz for which every pi(z)>0p_i(z)>0pi​(z)>0 and pj(z)<pi(z)p_j(z)<p_i(z)pj​(z)<pi​(z) whenever i<ji<ji<j. For a real-valued function fff, define

Ed(f,z)=∥Df(z)∥op2−(∑i=0m−1Df(z)[ei])2d,\mathcal E_d(f,z)=\|Df(z)\|_{\mathrm{op}}^2 -\frac{\left(\sum_{i=0}^{m-1}Df(z)[e_i]\right)^2}{d},Ed​(f,z)=∥Df(z)∥op2​−d(∑i=0m−1​Df(z)[ei​])2​,

where Df(z)Df(z)Df(z) is its real Fréchet derivative and eie_iei​ is the iii-th Euclidean coordinate vector. The declaration defines dirichletFirst⁡(d)\operatorname{dirichletFirst}(d)dirichletFirst(d) as the real infimum of ∫RmEd(f,z) dz\int_{\mathbb R^m}\mathcal E_d(f,z)\,dz∫Rm​Ed​(f,z)dz over all infinitely continuously differentiable f:Rm→Rf:\mathbb R^m\to\mathbb Rf:Rm→R having compact support, whose closed support is contained in Ωd\Omega_dΩd​, such that both f2f^2f2 and Ed(f,⋅)\mathcal E_d(f,\cdot)Ed​(f,⋅) are integrable with respect to Euclidean volume and ∫Rmf(z)2 dz=1\int_{\mathbb R^m}f(z)^2\,dz=1∫Rm​f(z)2dz=1. No positivity assumption on ddd is imposed: for d=0d=0d=0 the conditions defining Ωd\Omega_dΩd​ are vacuous and the energy uses the totalized quotient 0/0=00/0=00/0=0; for d=1d=1d=1, Ωd\Omega_dΩd​ is also the singleton zero-dimensional space and the energy is zero. A real infimum of an empty or unbounded-below set is defined to be zero.

QAlgorithms.Papers.Independent.Extend50.P25.eprResource

For any natural numbers d,Nd,Nd,N, let P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}. The definition gives a complex matrix ρEPR\rho_{\mathrm{EPR}}ρEPR​ on P×P\mathcal P\times\mathcal PP×P by

(ρEPR)(s,t),(u,v)={(dN)−1,s=t and u=v,0,otherwise.(\rho_{\mathrm{EPR}})_{(s,t),(u,v)} = \begin{cases} (d^N)^{-1},&s=t\text{ and }u=v,\\ 0,&\text{otherwise}. \end{cases}(ρEPR​)(s,t),(u,v)​={(dN)−1,0,​s=t and u=v,otherwise.​

The power and inverse are taken in C\mathbb CC, with 00=10^0=100=1 and 0−1=00^{-1}=00−1=0. For N=0N=0N=0, P\mathcal PP is a singleton and this is the 1×11\times11×1 matrix with entry one, including when d=0d=0d=0; for d=0<Nd=0<Nd=0<N, it is an empty matrix.

QAlgorithms.Papers.Independent.Extend50.P25.eprSuccess

For any natural numbers d,Nd,Nd,N, put D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1} and P=D{0,…,N−1}\mathcal P=D^{\{0,\ldots,N-1\}}P=D{0,…,N−1}. The quantity eprSuccess⁡(d,N)\operatorname{eprSuccess}(d,N)eprSuccess(d,N) is the real supremum of ∑i=0N−1wi\sum_{i=0}^{N-1}w_i∑i=0N−1​wi​ over protocols whose auxiliary index set is exactly P\mathcal PP and whose resource matrix is exactly

ρ(u,s),(v,t)={(dN)−1,u=s and v=t,0,otherwise,u,s,v,t∈P,\rho_{(u,s),(v,t)} = \begin{cases} (d^N)^{-1},&u=s\ \text{and}\ v=t,\\ 0,&\text{otherwise}, \end{cases} \qquad u,s,v,t\in\mathcal P,ρ(u,s),(v,t)​={(dN)−1,0,​u=s and v=t,otherwise,​u,s,v,t∈P,

with the inverse and power taken in C\mathbb CC. Such a protocol must have this resource positive semidefinite with trace 111, positive semidefinite matrices Efail,EiE_{\mathrm{fail}},E_iEfail​,Ei​ on D×PD\times\mathcal PD×P satisfying Efail+∑iEi=IE_{\mathrm{fail}}+\sum_iE_i=IEfail​+∑i​Ei​=I, and nonnegative real weights wiw_iwi​ satisfying

∑a,b∈D∑u,v∈P∑s,t∈P1{si=y, ti=z, ∀j≠i, sj=tj} (Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t)=wiXy,z\sum_{a,b\in D}\sum_{u,v\in\mathcal P}\sum_{s,t\in\mathcal P} \mathbf 1_{\{s_i=y,\ t_i=z,\ \forall j\ne i,\ s_j=t_j\}}\, (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)} =w_iX_{y,z}a,b∈D∑​u,v∈P∑​s,t∈P∑​1{si​=y, ti​=z, ∀j=i, sj​=tj​}​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​=wi​Xy,z​

for every i<Ni<Ni<N, every complex matrix XXX on DDD, and every y,z∈Dy,z\in Dy,z∈D. No maximizing protocol is asserted to exist. The parameters may be zero, empty sums are zero, and 0−1=00^{-1}=00−1=0; the real supremum is 000 if its defining set is empty or unbounded above.

QAlgorithms.Papers.Independent.Extend50.P25.expectedLargest

For every natural number ddd with d>0d>0d>0, take a real array x=(xij)0≤i,j<dx=(x_{ij})_{0\le i,j<d}x=(xij​)0≤i,j<d​ under the product measure of independent Gaussian coordinates of mean zero and variance one. Form the Hermitian matrix GGG with Gii=xiiG_{ii}=x_{ii}Gii​=xii​, Gij=(xij+ixji)/2G_{ij}=(x_{ij}+\mathrm i x_{ji})/\sqrt2Gij​=(xij​+ixji​)/2​ for i<ji<ji<j, and Gij=(xji−ixij)/2G_{ij}=(x_{ji}-\mathrm i x_{ij})/\sqrt2Gij​=(xji​−ixij​)/2​ for i>ji>ji>j, and set H=G−(tr⁡G/d)IdH=G-(\operatorname{tr}G/d)I_dH=G−(trG/d)Id​. The declaration defines

expectedLargest⁡(d)=∫λmax⁡(H) dμ(x),\operatorname{expectedLargest}(d)=\int \lambda_{\max}(H)\,d\mu(x),expectedLargest(d)=∫λmax​(H)dμ(x),

where μ\muμ is that product Gaussian measure and λmax⁡\lambda_{\max}λmax​ is the first entry of the descending eigenvalue list, counting multiplicities. The integral is the real measure-theoretic integral, whose total definition gives zero if its integrand is not integrable. The hypothesis excludes d=0d=0d=0; for d=1d=1d=1, H=0H=0H=0, so the value is zero.

QAlgorithms.Papers.Independent.Extend50.P25.fluctuation

For natural numbers d,nd,nd,n, a nonincreasing sequence a0,…,ad−1a_0,\ldots,a_{d-1}a0​,…,ad−1​ of natural numbers at most nnn with sum nnn, and an index 0≤i<d0\le i<d0≤i<d, the declaration defines

fluctuation⁡(a,i)=ai−n/dn/d,\operatorname{fluctuation}(a,i)=\frac{a_i-n/d}{\sqrt{n/d}},fluctuation(a,i)=n/d​ai​−n/d​,

where division and square root are real operations. The index assumption forces d>0d>0d>0, but n=0n=0n=0 is allowed: then every ai=0a_i=0ai​=0, and the value is 000, since division by zero is defined to be zero.

QAlgorithms.Papers.Independent.Extend50.P25.gammaInterval

For every natural number ddd, every function γ:{0,…,d−2}→R≥0\gamma:\{0,\ldots,d-2\}\to\mathbb R_{\ge0}γ:{0,…,d−2}→R≥0​, with this domain interpreted as having d−1d-1d−1 elements using natural-number subtraction, and every i,j∈{0,…,d−1}i,j\in\{0,\ldots,d-1\}i,j∈{0,…,d−1}, the real number \gammaInterval(d,γ,i,j)\gammaInterval(d,\gamma,i,j)\gammaInterval(d,γ,i,j) is the maximum of γk\gamma_kγk​ over indices satisfying i≤k<ji\le k<ji≤k<j, with maximum 000 when there are no such indices. In particular, it is 000 whenever j≤ij\le ij≤i; for d=1d=1d=1, the function γ\gammaγ has empty domain and the sole value, at i=j=0i=j=0i=j=0, is 000. For d=0d=0d=0, there are no possible arguments i,ji,ji,j.

QAlgorithms.Papers.Independent.Extend50.P25.gueMatrix

For every natural number ddd and every real array x=(xij)0≤i,j<dx=(x_{ij})_{0\le i,j<d}x=(xij​)0≤i,j<d​, the declaration defines a complex d×dd\times dd×d matrix Gd(x)G_d(x)Gd​(x) by

Gd(x)ij={xii,i=j,xij+ixji2,i<j,xji−ixij2,i>j.G_d(x)_{ij}= \begin{cases} x_{ii},&i=j,\\[2pt] \dfrac{x_{ij}+\mathrm i x_{ji}}{\sqrt2},&i<j,\\[6pt] \dfrac{x_{ji}-\mathrm i x_{ij}}{\sqrt2},&i>j. \end{cases}Gd​(x)ij​=⎩⎨⎧​xii​,2​xij​+ixji​​,2​xji​−ixij​​,​i=j,i<j,i>j.​

The array xxx is arbitrary; no probability distribution is assumed. The case d=0d=0d=0 defines the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P25.gueSpectrum

For every natural number ddd, real array x=(xij)0≤i,j<dx=(x_{ij})_{0\le i,j<d}x=(xij​)0≤i,j<d​, and index 0≤j<d0\le j<d0≤j<d, let GGG have diagonal entries xiix_{ii}xii​, upper triangular entries (xij+ixji)/2(x_{ij}+\mathrm i x_{ji})/\sqrt2(xij​+ixji​)/2​, and lower triangular entries (xji−ixij)/2(x_{ji}-\mathrm i x_{ij})/\sqrt2(xji​−ixij​)/2​, and set H=G−(tr⁡G/d)IdH=G-(\operatorname{tr}G/d)I_dH=G−(trG/d)Id​. The declaration defines gueSpectrum⁡(d,x,j)\operatorname{gueSpectrum}(d,x,j)gueSpectrum(d,x,j) to be the entry at position d−1−jd-1-jd−1−j in the ascending eigenvalue list of HHH, counting multiplicities; equivalently, it is the eigenvalue at position jjj in descending order, starting at position zero. The underlying ascending-list definition returns zeros for a non-Hermitian matrix; here HHH is Hermitian by its displayed entries. There is no admissible index jjj when d=0d=0d=0.

QAlgorithms.Papers.Independent.Extend50.P25.gueZero

For every natural number ddd and real array x=(xij)0≤i,j<dx=(x_{ij})_{0\le i,j<d}x=(xij​)0≤i,j<d​, form the complex matrix GGG with diagonal entries xiix_{ii}xii​, upper triangular entries (xij+ixji)/2(x_{ij}+\mathrm i x_{ji})/\sqrt2(xij​+ixji​)/2​, and lower triangular entries (xji−ixij)/2(x_{ji}-\mathrm i x_{ij})/\sqrt2(xji​−ixij​)/2​. The declaration defines

gueZero⁡(d,x)=G−tr⁡GdId.\operatorname{gueZero}(d,x)=G-\frac{\operatorname{tr}G}{d}I_d.gueZero(d,x)=G−dtrG​Id​.

For d>0d>0d>0, its diagonal entries are xii−d−1∑kxkkx_{ii}-d^{-1}\sum_k x_{kk}xii​−d−1∑k​xkk​, and its off-diagonal entries are those of GGG. The case d=0d=0d=0 is included: the trace and the quotient 0/00/00/0 are zero, and the result is the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P25.normalCoordinates

For any type III equipped with a finite enumeration, the declaration defines a measure on the space of functions I→RI\to\mathbb RI→R as the product, over all i∈Ii\in Ii∈I, of the real Gaussian measure with mean 000 and variance 111. Thus its coordinates are independent standard real Gaussian variables. The empty index type is included; its function space has one element, and the product measure assigns that element mass 111.

QAlgorithms.Papers.Independent.Extend50.P25.optimalDiamondError

For any natural numbers d,Nd,Nd,N, this is the real infimum over all natural numbers mmm, positive semidefinite trace-one resource matrices ρ\rhoρ on {0,…,m−1}×P\{0,\ldots,m-1\}\times\mathcal P{0,…,m−1}×P, and positive semidefinite measurement matrices EiE_iEi​ on {0,…,d−1}×{0,…,m−1}\{0,\ldots,d-1\}\times\{0,\ldots,m-1\}{0,…,d−1}×{0,…,m−1} with ∑i=0N−1Ei=I\sum_{i=0}^{N-1}E_i=I∑i=0N−1​Ei​=I, where P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, of the error defined as follows:

Φ(X)y,z=∑i=0N−1∑a,b=0d−1∑u,v=0m−1∑s,t∈Psi=y, ti=zsj=tj for all j≠i(Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t).\Phi(X)_{y,z} = \sum_{i=0}^{N-1}\sum_{a,b=0}^{d-1}\sum_{u,v=0}^{m-1} \sum_{\substack{s,t\in\mathcal P\\ s_i=y,\ t_i=z\\ s_j=t_j\text{ for all }j\ne i}} (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)}.Φ(X)y,z​=i=0∑N−1​a,b=0∑d−1​u,v=0∑m−1​s,t∈Psi​=y, ti​=zsj​=tj​ for all j=i​∑​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​.

For d>0d>0d>0, set LΦ(Y)=∑a,bYabΦ(Eabunit)L_\Phi(Y)=\sum_{a,b}Y_{ab}\Phi(E_{ab}^{\mathrm{unit}})LΦ​(Y)=∑a,b​Yab​Φ(Eabunit​), where EabunitE_{ab}^{\mathrm{unit}}Eabunit​ are the matrix units; the error is sup⁡∥X∥1≤1∥(id⁡⊗(LΦ−id⁡))(X)∥1\sup_{\|X\|_1\le1}\|(\operatorname{id}\otimes(L_\Phi-\operatorname{id}))(X)\|_1sup∥X∥1​≤1​∥(id⊗(LΦ​−id))(X)∥1​, over all complex matrices on two ddd-dimensional registers, with ∥X∥1=Re⁡tr⁡X†X\|X\|_1=\operatorname{Re}\operatorname{tr}\sqrt{X^\dagger X}∥X∥1​=RetrX†X​ and the tensor extension acting separately on each reference-index block. For d=0d=0d=0, the error is zero. No attainment of the infimum is asserted. The parameter m=0m=0m=0 admits no trace-one resource; when d=0<Nd=0<Nd=0<N or N=0<dN=0<dN=0<d, the protocol set is empty and the real infimum is defined to be zero. The value is also zero when d=N=0d=N=0d=N=0.

QAlgorithms.Papers.Independent.Extend50.P25.pbtFidelity

For any natural number ddd and arbitrary function Φ\PhiΦ from complex d×dd\times dd×d matrices to complex d×dd\times dd×d matrices, the value is zero if d=0d=0d=0. If d>0d>0d>0, define the vector φ\varphiφ, indexed by pairs r,a∈{0,…,d−1}r,a\in\{0,\ldots,d-1\}r,a∈{0,…,d−1}, by φr,a=δr,a/d\varphi_{r,a}=\delta_{r,a}/\sqrt dφr,a​=δr,a​/d​, and let Ω=φφ†\Omega=\varphi\varphi^\daggerΩ=φφ†. The value is

Re⁡tr⁡ ⁣(Ω (id⁡⊗Φ)(Ω)),[(id⁡⊗Φ)(X)](r,a),(s,b)=[Φ((X(r,i),(s,j))i,j)]a,b.\operatorname{Re}\operatorname{tr} \!\left(\Omega\,(\operatorname{id}\otimes\Phi)(\Omega)\right), \qquad [(\operatorname{id}\otimes\Phi)(X)]_{(r,a),(s,b)} = \bigl[\Phi((X_{(r,i),(s,j)})_{i,j})\bigr]_{a,b}.Retr(Ω(id⊗Φ)(Ω)),[(id⊗Φ)(X)](r,a),(s,b)​=[Φ((X(r,i),(s,j)​)i,j​)]a,b​.

No linearity or channel assumption is imposed on Φ\PhiΦ.

QAlgorithms.Papers.Independent.Extend50.P25.pbtOptimalFidelity

For any natural numbers d,Nd,Nd,N, this is the real supremum over all natural numbers mmm, all positive semidefinite trace-one matrices ρ\rhoρ on {0,…,m−1}×P\{0,\ldots,m-1\}\times\mathcal P{0,…,m−1}×P, and all families of positive semidefinite matrices EiE_iEi​ on {0,…,d−1}×{0,…,m−1}\{0,\ldots,d-1\}\times\{0,\ldots,m-1\}{0,…,d−1}×{0,…,m−1} satisfying ∑i=0N−1Ei=I\sum_{i=0}^{N-1}E_i=I∑i=0N−1​Ei​=I, where P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, of the following fidelity. Define

Φ(X)y,z=∑i=0N−1∑a,b=0d−1∑u,v=0m−1∑s,t∈Psi=y, ti=zsj=tj for all j≠i(Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t).\Phi(X)_{y,z} = \sum_{i=0}^{N-1}\sum_{a,b=0}^{d-1}\sum_{u,v=0}^{m-1} \sum_{\substack{s,t\in\mathcal P\\ s_i=y,\ t_i=z\\ s_j=t_j\text{ for all }j\ne i}} (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)}.Φ(X)y,z​=i=0∑N−1​a,b=0∑d−1​u,v=0∑m−1​s,t∈Psi​=y, ti​=zsj​=tj​ for all j=i​∑​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​.

For d>0d>0d>0, its fidelity is Re⁡tr⁡[Ω(id⁡⊗Φ)(Ω)]\operatorname{Re}\operatorname{tr}[\Omega(\operatorname{id}\otimes\Phi)(\Omega)]Retr[Ω(id⊗Φ)(Ω)], where Ω=φφ†\Omega=\varphi\varphi^\daggerΩ=φφ†, φr,a=δr,a/d\varphi_{r,a}=\delta_{r,a}/\sqrt dφr,a​=δr,a​/d​, and the tensor extension applies Φ\PhiΦ separately to each block with fixed reference indices r,sr,sr,s; for d=0d=0d=0, its fidelity is defined to be zero. The supremum need not be attained. The parameter m=0m=0m=0 is included but admits no trace-one resource; when d=0<Nd=0<Nd=0<N or N=0<dN=0<dN=0<d, there are no protocols and the real supremum of the empty set is zero. The value is also zero when d=N=0d=N=0d=N=0.

QAlgorithms.Papers.Independent.Extend50.P25.pbtOptimalSuccess

For any natural numbers d,Nd,Nd,N, put D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1} and P=D{0,…,N−1}\mathcal P=D^{\{0,\ldots,N-1\}}P=D{0,…,N−1}. The quantity pbtOptimalSuccess⁡(d,N)\operatorname{pbtOptimalSuccess}(d,N)pbtOptimalSuccess(d,N) is the real supremum of all numbers ∑i=0N−1wi\sum_{i=0}^{N-1}w_i∑i=0N−1​wi​ obtained by choosing a natural number mmm, an auxiliary set A={0,…,m−1}A=\{0,\ldots,m-1\}A={0,…,m−1}, a positive semidefinite resource matrix ρ\rhoρ on A×PA\times\mathcal PA×P of trace 111, positive semidefinite matrices Efail,EiE_{\mathrm{fail}},E_iEfail​,Ei​ on D×AD\times AD×A with Efail+∑iEi=IE_{\mathrm{fail}}+\sum_iE_i=IEfail​+∑i​Ei​=I, and real weights wi≥0w_i\ge0wi​≥0, subject to the identities

∑a,b∈D∑u,v∈A∑s,t∈P1{si=y, ti=z, ∀j≠i, sj=tj} (Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t)=wiXy,z\sum_{a,b\in D}\sum_{u,v\in A}\sum_{s,t\in\mathcal P} \mathbf 1_{\{s_i=y,\ t_i=z,\ \forall j\ne i,\ s_j=t_j\}}\, (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)} =w_iX_{y,z}a,b∈D∑​u,v∈A∑​s,t∈P∑​1{si​=y, ti​=z, ∀j=i, sj​=tj​}​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​=wi​Xy,z​

for every i<Ni<Ni<N, arbitrary complex matrix XXX on DDD, and y,z∈Dy,z\in Dy,z∈D. The supremum ranges over all such finite auxiliary dimensions; it does not assert attainment. Zero values of d,N,md,N,md,N,m are included, although an empty resource space makes the trace-one requirement impossible. This is a supremum in R\mathbb RR, whose convention gives 000 for an empty or unbounded-above set.

QAlgorithms.Papers.Independent.Extend50.P25.portBranch

Let d,Nd,Nd,N be natural numbers, let AAA be a finite type with a specified finite enumeration, and write P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}. For arbitrary complex square matrices ρ\rhoρ indexed by A×PA\times\mathcal PA×P and EEE indexed by {0,…,d−1}×A\{0,\ldots,d-1\}\times A{0,…,d−1}×A, and any i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, the definition gives a function Bρ,E,i\mathcal B_{\rho,E,i}Bρ,E,i​ from complex d×dd\times dd×d matrices to complex d×dd\times dd×d matrices by

Bρ,E,i(X)y,z=∑a,b=0d−1 ∑u,v∈A ∑s,t∈Psi=y, ti=zsj=tj for every j≠iE(b,v),(a,u) Xa,b ρ(u,s),(v,t).\mathcal B_{\rho,E,i}(X)_{y,z} = \sum_{a,b=0}^{d-1}\ \sum_{u,v\in A}\ \sum_{\substack{s,t\in\mathcal P\\ s_i=y,\ t_i=z\\ s_j=t_j\text{ for every }j\ne i}} E_{(b,v),(a,u)}\,X_{a,b}\,\rho_{(u,s),(v,t)}.Bρ,E,i​(X)y,z​=a,b=0∑d−1​ u,v∈A∑​ s,t∈Psi​=y, ti​=zsj​=tj​ for every j=i​∑​E(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​.

There are no positivity, normalization, or measurement assumptions on ρ\rhoρ or EEE. The parameter iii cannot be supplied when N=0N=0N=0; empty summation sets contribute zero, and when d=0d=0d=0 the output matrix has no entries.

QAlgorithms.Papers.Independent.Extend50.P25.portOperatorNorm

For any finite type AAA and any complex matrix T∈CA×AT\in\mathbb C^{A\times A}T∈CA×A, this defines the operator norm of the complex linear map on CA\mathbb C^ACA given by matrix multiplication, using the Euclidean norm on vectors:

∥T∥op=sup⁡∥v∥2≤1∥Tv∥2.\|T\|_{\mathrm{op}}=\sup_{\|v\|_2\le1}\|Tv\|_2.∥T∥op​=∥v∥2​≤1sup​∥Tv∥2​.

No Hermitian, positivity, or normalization assumption is imposed on TTT. Equality on AAA is chosen classically in the definition. If AAA is empty, the vector space is zero-dimensional and this norm is zero.

QAlgorithms.Papers.Independent.Extend50.P25.portProjector

For natural numbers d,Nd,Nd,N and any i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, write P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}. The definition gives a complex matrix PiP_iPi​ indexed by {0,…,d−1}×P\{0,\ldots,d-1\}\times\mathcal P{0,…,d−1}×P whose entries are

(Pi)(a,s),(b,t)={d−1,a=si, b=ti, and sj=tj for every j≠i,0,otherwise.(P_i)_{(a,s),(b,t)} = \begin{cases} d^{-1},&a=s_i,\ b=t_i,\ \text{and }s_j=t_j\text{ for every }j\ne i,\\ 0,&\text{otherwise}. \end{cases}(Pi​)(a,s),(b,t)​={d−1,0,​a=si​, b=ti​, and sj​=tj​ for every j=i,otherwise.​

The inverse is taken in C\mathbb CC, where 0−1=00^{-1}=00−1=0. When d=0d=0d=0, the matrix has no entries; when N=0N=0N=0, no index iii exists.

QAlgorithms.Papers.Independent.Extend50.P25.profileEnergy

For every natural number ddd and every function a:Vd→Ra:V_d\to\mathbb Ra:Vd​→R, where Vd=Rd−1V_d=\mathbb R^{d-1}Vd​=Rd−1 and natural-number subtraction truncates at 000, form KdK_dKd​ by completing z∈Vdz\in V_dz∈Vd​ with the final coordinate 1−∑izi1-\sum_i z_i1−∑i​zi​ and requiring all ddd completed coordinates to be nonnegative and nonincreasing; when d=0d=0d=0, these requirements are vacuous. Let DKda(z)D_{K_d}a(z)DKd​​a(z) denote the total within-set Fréchet derivative used by the definition, and let eie_iei​ be the usual coordinate vector in VdV_dVd​. The defined energy is

Ed(a)=d∫Kd(∥DKda(z)∥op2−(∑i=0d−2DKda(z)[ei])2d) dz,\mathcal E_d(a)=\sqrt d\int_{K_d} \left( \|D_{K_d}a(z)\|_{\mathrm{op}}^2 -\frac{\left(\sum_{i=0}^{d-2}D_{K_d}a(z)[e_i]\right)^2}{d} \right)\,dz,Ed​(a)=d​∫Kd​​​∥DKd​​a(z)∥op2​−d(∑i=0d−2​DKd​​a(z)[ei​])2​​dz,

where integration uses Euclidean volume restricted to KdK_dKd​. No differentiability or integrability hypothesis is imposed: the derivative and integral are Lean’s total operations, including their default values when unavailable. Empty sums and total division apply in dimensions d=0,1d=0,1d=0,1; the defined energy is 000 in both cases.

QAlgorithms.Papers.Independent.Extend50.P25.profileSimplex

For every natural number ddd, let Vd=Rd−1V_d=\mathbb R^{d-1}Vd​=Rd−1 with its Euclidean norm, where d−1d-1d−1 is natural-number subtraction and hence equals 000 when d=0d=0d=0. For z∈Vdz\in V_dz∈Vd​, define ddd coordinates by pi(z)=zip_i(z)=z_ipi​(z)=zi​ for 0≤i<d−10\le i<d-10≤i<d−1, and pi(z)=1−∑j=0d−2zjp_i(z)=1-\sum_{j=0}^{d-2}z_jpi​(z)=1−∑j=0d−2​zj​ otherwise. The defined set is

Kd={z∈Vd: pi(z)≥0 for every i<d,pj(z)≤pi(z) whenever i<j<d}.K_d=\{z\in V_d:\ p_i(z)\ge0\text{ for every }i<d,\quad p_j(z)\le p_i(z)\text{ whenever }i<j<d\}.Kd​={z∈Vd​: pi​(z)≥0 for every i<d,pj​(z)≤pi​(z) whenever i<j<d}.

For d≥1d\ge1d≥1, these are the first d−1d-1d−1 coordinates of a nonincreasing, nonnegative ddd-tuple summing to 111. For d=0d=0d=0, both conditions are vacuous, so the set is the whole zero-dimensional space; for d=1d=1d=1, it is also the whole zero-dimensional space, with its sole completed coordinate equal to 111.

QAlgorithms.Papers.Independent.Extend50.P25.sampledProfileFidelity

For all natural numbers d,Nd,Nd,N and every function a:Rd−1→Ra:\mathbb R^{d-1}\to\mathbb Ra:Rd−1→R, let Dd,r\mathcal D_{d,r}Dd,r​ be the finite set of nonincreasing natural-number ddd-tuples summing to rrr, with entries at most rrr, and put

W(μ)=a ⁣((μiN)i<d−1)2,P(μ)=W(μ)∑ν∈Dd,NW(ν).W(\mu)=a\!\left(\left(\frac{\mu_i}{N}\right)_{i<d-1}\right)^2, \qquad P(\mu)=\frac{W(\mu)}{\sum_{\nu\in\mathcal D_{d,N}}W(\nu)}.W(μ)=a((Nμi​​)i<d−1​)2,P(μ)=∑ν∈Dd,N​​W(ν)W(μ)​.

The defined value is

Fd,N(a)=1d2∑α∈Dd,N−1(∑μ∈Dd,N∃j<d ∀i<d: μi=αi+1{i=j}P(μ))2.F_{d,N}(a)=\frac1{d^2} \sum_{\alpha\in\mathcal D_{d,N-1}} \left( \sum_{\substack{\mu\in\mathcal D_{d,N}\\ \exists j<d\ \forall i<d:\ \mu_i=\alpha_i+\mathbf1_{\{i=j\}}}} \sqrt{P(\mu)} \right)^2.Fd,N​(a)=d21​α∈Dd,N−1​∑​​μ∈Dd,N​∃j<d ∀i<d: μi​=αi​+1{i=j}​​∑​P(μ)​​2.

The inner condition is existential, so a qualifying μ\muμ contributes once, rather than once for each witness jjj. Both d−1d-1d−1 and N−1N-1N−1 are truncated natural-number subtractions, and all divisions are total, with division by 000 equal to 000. Thus zero total sampled weight gives zero masses, d=0d=0d=0 gives value 000, and N=0N=0N=0 also gives value 000.

QAlgorithms.Papers.Independent.Extend50.P25.sampledProfileMass

For all natural numbers d,Nd,Nd,N, every function a:Rd−1→Ra:\mathbb R^{d-1}\to\mathbb Ra:Rd−1→R, and every nonincreasing natural-number ddd-tuple μ\muμ whose entries sum to NNN, define

W(ν)=a ⁣((νiN)0≤i<d−1)2W(\nu)=a\!\left(\left(\frac{\nu_i}{N}\right)_{0\le i<d-1}\right)^2W(ν)=a((Nνi​​)0≤i<d−1​)2

for every nonincreasing natural-number ddd-tuple ν\nuν summing to NNN. The defined mass is

Pd,N,a(μ)=W(μ)∑νW(ν).P_{d,N,a}(\mu)=\frac{W(\mu)}{\sum_{\nu}W(\nu)}.Pd,N,a​(μ)=∑ν​W(ν)W(μ)​.

Each entry of these tuples lies between 000 and NNN, and d−1d-1d−1 uses truncated natural-number subtraction. No hypothesis requires the denominator to be positive: if it is 000, the defined mass is 000. In particular, this definition does not by itself assert that the masses sum to 111. When N=0N=0N=0, all sampled coordinates are 000, using 0/0=00/0=00/0=0.

QAlgorithms.Papers.Independent.Extend50.P25.sampledProfileWeight

For all natural numbers d,Nd,Nd,N, every function a:Rd−1→Ra:\mathbb R^{d-1}\to\mathbb Ra:Rd−1→R, and every nonincreasing tuple μ=(μ0,…,μd−1)\mu=(\mu_0,\ldots,\mu_{d-1})μ=(μ0​,…,μd−1​) of natural numbers with 0≤μi≤N0\le\mu_i\le N0≤μi​≤N and ∑iμi=N\sum_i\mu_i=N∑i​μi​=N, the defined weight is

Wd,N,a(μ)=a ⁣((μiN)0≤i<d−1)2.W_{d,N,a}(\mu)=a\!\left(\left(\frac{\mu_i}{N}\right)_{0\le i<d-1}\right)^2.Wd,N,a​(μ)=a((Nμi​​)0≤i<d−1​)2.

The argument of aaa is a vector in Euclidean space, and no regularity, sign, or normalization assumption is imposed on aaa. Natural-number subtraction determines the dimension when d=0d=0d=0; division is total real division, so for N=0N=0N=0 every sampled coordinate is 000 and the weight is a(0)2a(0)^2a(0)2. For d=0d=0d=0, such a tuple exists only when N=0N=0N=0.

QAlgorithms.Papers.Independent.Extend50.P25.schurDiagramFintype

For every pair of natural numbers d,nd,nd,n, the type of tuples (a0,…,ad−1)(a_0,\ldots,a_{d-1})(a0​,…,ad−1​) with 0≤ai≤n0\le a_i\le n0≤ai​≤n, ∑iai=n\sum_i a_i=n∑i​ai​=n, and aj≤aia_j\le a_iaj​≤ai​ whenever i≤ji\le ji≤j is equipped with a finite enumeration containing every such tuple. This supplies finiteness without asserting a formula for the number of tuples. It includes the empty type when d=0<nd=0<nd=0<n, the single empty tuple when d=n=0d=n=0d=n=0, and the single all-zero tuple when n=0n=0n=0.

QAlgorithms.Papers.Independent.Extend50.P25.schurMass

For natural numbers d,nd,nd,n and a nonincreasing sequence a0,…,ad−1a_0,\ldots,a_{d-1}a0​,…,ad−1​ of natural numbers at most nnn, summing to nnn, put

Wd(a)=∏0≤r<s<d(ar−r)−(as−s)s−r.W_d(a)=\prod_{0\le r<s<d}\frac{(a_r-r)-(a_s-s)}{s-r}.Wd​(a)=0≤r<s<d∏​s−r(ar​−r)−(as​−s)​.

The declaration defines

schurMass⁡(a)=1dn n! Wd(a)2∏i=0d−1(d−1−i)!∏i=0d−1(ai+d−1−i)!,\operatorname{schurMass}(a) =\frac{1}{d^n}\, \frac{n!\,W_d(a)^2\displaystyle\prod_{i=0}^{d-1}(d-1-i)!} {\displaystyle\prod_{i=0}^{d-1}(a_i+d-1-i)!},schurMass(a)=dn1​i=0∏d−1​(ai​+d−1−i)!n!Wd​(a)2i=0∏d−1​(d−1−i)!​,

with all numerical quantities interpreted in R\mathbb RR after taking the indicated natural-number factorials. Empty products equal 111; when d=0d=0d=0, necessarily n=0n=0n=0, and the value is 111, using 00=10^0=100=1.

QAlgorithms.Papers.Independent.Extend50.P25.smoothMaxInformation

For every natural number ddd and every real ε\varepsilonε, the declaration defines an extended real number as the infimum of all real ttt, embedded in the extended reals, for which there exist a complex matrix ρ\rhoρ indexed by pairs from {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} and a complex d×dd\times dd×d matrix σ\sigmaσ satisfying

ρ⪰0,Re⁡tr⁡ρ≤1,1−ε2≤Re⁡∑i,j=0d−1ρ(i,i),(j,j)d,σ⪰0,tr⁡σ=1,2t(ρA⊗σ)−ρ⪰0,\rho\succeq0,\qquad \operatorname{Re}\operatorname{tr}\rho\le1,\qquad 1-\varepsilon^2\le \frac{\operatorname{Re}\displaystyle\sum_{i,j=0}^{d-1}\rho_{(i,i),(j,j)}}{d}, \qquad \sigma\succeq0,\quad \operatorname{tr}\sigma=1,\qquad 2^t\bigl(\rho_A\otimes\sigma\bigr)-\rho\succeq0,ρ⪰0,Retrρ≤1,1−ε2≤dRei,j=0∑d−1​ρ(i,i),(j,j)​​,σ⪰0,trσ=1,2t(ρA​⊗σ)−ρ⪰0,

where (ρA)ij=∑k=0d−1ρ(i,k),(j,k)(\rho_A)_{ij}=\sum_{k=0}^{d-1}\rho_{(i,k),(j,k)}(ρA​)ij​=∑k=0d−1​ρ(i,k),(j,k)​ and ⊗\otimes⊗ is the Kronecker product. There is no restriction on ε\varepsilonε, and it enters only through its square. The infimum of an empty feasible set is +∞+\infty+∞; in particular, this occurs for d=0d=0d=0, since no empty matrix has trace one, even though the displayed quotient is then totalized to zero. For d>0d>0d>0 and ∣ε∣≥1|\varepsilon|\ge1∣ε∣≥1, choosing ρ=0\rho=0ρ=0 makes every real ttt feasible, so the infimum is −∞-\infty−∞.

QAlgorithms.Papers.Independent.Extend50.P25.spechtDimension

For natural numbers d,nd,nd,n, let a=(a0,…,ad−1)a=(a_0,\ldots,a_{d-1})a=(a0​,…,ad−1​) be a nonincreasing sequence of natural numbers, each at most nnn, with ∑iai=n\sum_i a_i=n∑i​ai​=n. Define

Wd(a)=∏0≤r<s<d(ar−r)−(as−s)s−r.W_d(a)=\prod_{0\le r<s<d}\frac{(a_r-r)-(a_s-s)}{s-r}.Wd​(a)=0≤r<s<d∏​s−r(ar​−r)−(as​−s)​.

The declaration defines the real number

spechtDimension⁡(a)=n! Wd(a)∏i=0d−1(d−1−i)!∏i=0d−1(ai+d−1−i)!.\operatorname{spechtDimension}(a) =\frac{n!\,W_d(a)\displaystyle\prod_{i=0}^{d-1}(d-1-i)!} {\displaystyle\prod_{i=0}^{d-1}(a_i+d-1-i)!}.spechtDimension(a)=i=0∏d−1​(ai​+d−1−i)!n!Wd​(a)i=0∏d−1​(d−1−i)!​.

All factorial arguments are natural numbers; the subtractions in their definitions are natural-number subtraction, truncated at zero. Empty products equal 111. In particular, d=0d=0d=0 requires n=0n=0n=0, and the value is then 111.

QAlgorithms.Papers.Independent.Extend50.P25.standardFidelity

For any natural numbers d,Nd,Nd,N, put P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, define ρ(u,s),(v,t)=(dN)−1\rho_{(u,s),(v,t)}=(d^N)^{-1}ρ(u,s),(v,t)​=(dN)−1 if u=su=su=s and v=tv=tv=t, and zero otherwise, with u,v,s,t∈Pu,v,s,t\in\mathcal Pu,v,s,t∈P; define (Pi)(a,u),(b,v)=d−1(P_i)_{(a,u),(b,v)}=d^{-1}(Pi​)(a,u),(b,v)​=d−1 if a=uia=u_ia=ui​, b=vib=v_ib=vi​, and uj=vju_j=v_juj​=vj​ for all j≠ij\ne ij=i, and zero otherwise; and set S=∑iPiS=\sum_iP_iS=∑i​Pi​, R=f(S)R=f(S)R=f(S) by continuous functional calculus for f(x)=(x)−1f(x)=(\sqrt{x})^{-1}f(x)=(x​)−1, and Ei=RPiR+N−1(I−RSR)E_i=RP_iR+N^{-1}(I-RSR)Ei​=RPi​R+N−1(I−RSR). Form the matrix-valued function

Φ(X)y,z=∑i=0N−1∑a,b=0d−1∑u,v∈P∑s,t∈Psi=y, ti=zsj=tj for every j≠i(Ei)(b,v),(a,u)Xa,bρ(u,s),(v,t).\Phi(X)_{y,z} = \sum_{i=0}^{N-1}\sum_{a,b=0}^{d-1}\sum_{u,v\in\mathcal P} \sum_{\substack{s,t\in\mathcal P\\ s_i=y,\ t_i=z\\ s_j=t_j\text{ for every }j\ne i}} (E_i)_{(b,v),(a,u)}X_{a,b}\rho_{(u,s),(v,t)}.Φ(X)y,z​=i=0∑N−1​a,b=0∑d−1​u,v∈P∑​s,t∈Psi​=y, ti​=zsj​=tj​ for every j=i​∑​(Ei​)(b,v),(a,u)​Xa,b​ρ(u,s),(v,t)​.

For d>0d>0d>0, the defined value is Re⁡tr⁡[Ω(id⁡⊗Φ)(Ω)]\operatorname{Re}\operatorname{tr}[\Omega(\operatorname{id}\otimes\Phi)(\Omega)]Retr[Ω(id⊗Φ)(Ω)], where Ω=φφ†\Omega=\varphi\varphi^\daggerΩ=φφ†, φr,a=δr,a/d\varphi_{r,a}=\delta_{r,a}/\sqrt dφr,a​=δr,a​/d​, and the tensor extension applies Φ\PhiΦ to each block with reference indices fixed; for d=0d=0d=0, the value is zero. All zero reciprocals are zero, 00=10^0=100=1, and f(x)=0f(x)=0f(x)=0 for x≤0x\le0x≤0. In particular, when N=0<dN=0<dN=0<d, Φ\PhiΦ is the zero function and the value is zero.

QAlgorithms.Papers.Independent.Extend50.P25.standardMeasurement

For any natural numbers d,Nd,Nd,N, let P={0,…,d−1}{0,…,N−1}\mathcal P=\{0,\ldots,d-1\}^{\{0,\ldots,N-1\}}P={0,…,d−1}{0,…,N−1}, and, for each i<Ni<Ni<N, define a matrix on {0,…,d−1}×P\{0,\ldots,d-1\}\times\mathcal P{0,…,d−1}×P by (Pi)(a,s),(b,t)=d−1(P_i)_{(a,s),(b,t)}=d^{-1}(Pi​)(a,s),(b,t)​=d−1 when a=sia=s_ia=si​, b=tib=t_ib=ti​, and sj=tjs_j=t_jsj​=tj​ for all j≠ij\ne ij=i, and zero otherwise. Set

S=∑i=0N−1Pi,R=f(S),f(x)=(x)−1,Ei=RPiR+N−1(I−RSR),S=\sum_{i=0}^{N-1}P_i, \qquad R=f(S),\quad f(x)=(\sqrt{x})^{-1}, \qquad E_i=RP_iR+N^{-1}(I-RSR),S=i=0∑N−1​Pi​,R=f(S),f(x)=(x​)−1,Ei​=RPi​R+N−1(I−RSR),

where f(S)f(S)f(S) uses continuous functional calculus with a real scalar function, and scalar inverses multiplying matrices are interpreted in C\mathbb CC. The returned family is i↦Eii\mapsto E_ii↦Ei​. The scalar function has value zero for x≤0x\le0x≤0, since the real square root and reciprocal are total with x=0\sqrt{x}=0x​=0 for x≤0x\le0x≤0 and 0−1=00^{-1}=00−1=0. When N=0N=0N=0, S=0S=0S=0 and the returned family is empty; when d=0d=0d=0, its matrices have empty index sets. This declaration defines the matrices without asserting that the family is a POVM.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

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

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me