Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Near-optimal covariant quantum error-correcting codes from random unitaries with symmetries

Definition
QAlgorithms_Papers_Independent_Extend50_P09

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

prove2quantum

The objects the formalized statements of Near-optimal covariant quantum error-correcting codes from random unitaries with symmetries (arXiv:2112.01498) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • CovariantWord: Computational basis for n d-level systems (§II, p.2).
  • pdist: Root-fidelity purified distance, (1)–(2), p.2.
  • choiError: Eq.(6), p.3: optimize over all CPTP decoders, normalized Choi input.
  • optimalWorstRecoveryError: Eq.(8), p.3: one decoder is chosen before the reference-entangled input. A reference of dimension dim L suffices; pure unit inputs suffice.
  • selectedRecoveryError: Select the source's two recovery criteria.
  • firstCoordinates: First k tensor factors; the bound prevents a truncated physical register.
  • remainingCoordinates: Remaining n-k tensor factors.
  • append: Append the fixed ancillary density operator, Defs.1–2, pp.5,11.
  • appendUnitaryEncoder: Unitary conjugation after appending the ancillary state.
  • RetainedConfigurations: Configuration on retained sites S. Locations are fixed before U.
  • joinSites: Join configurations on S and its complement, p.14.
  • retain: Partial trace retaining precisely S, §§III B, IV C.
  • noisyEncoder: Receiver retains the complement of the known erased set.
  • chargeHammingWeight: Hamming weight of a binary computational word, p.5.
  • u1ChargeOperator: Charge operator Q(n), p.5.
  • u1SectorProjector: Charge eigenspace projector, including the zero projector on impossible sectors.
  • ChargeState: Def.1, p.5: normalized pure ancilla of charge alpha.
  • chargeRotation: U(1) action exp(-i theta Q), §III A, p.5.
  • U1Group: Full charge commutant, with full U(binomial(n,j)) blocks, p.5.
  • collectiveQuditAction: Collective single-qudit action, Eq.(71), p.10.
  • SUGroup: Compact commutant as DEFINED on p.10, including determinant one. This is not the incorrect independent SU(r_lambda)-block reading on p.11.
  • FullGroup: Full unconstrained unitary group (§VI, pp.13–14).
  • IsCommutantHaarLaw: Probability law supported on the named compact matrix group, invariant under every left translation. This characterizes its normalized Haar measure.
  • PhysicalUnitaryLaws: A family of laws, one for each physical register size.
  • sdp: SDP value of (B14), p.17, for arbitrary PSD operators including zero. The feasible set is nonempty and bounded below for PSD input.
  • chooseZ: Signed lower binomial index; negative indices contribute zero.
  • hyper: Conditional probabilities in (C2), with all invalid sectors omitted.
  • choiMarginalCoefficient: Beta of (C4), p.19, a coefficient per computational basis vector.
  • avgChoi: Exact averaged environmental Choi state of (C2), p.19.
  • choiMarginalState: Marginal zeta_0 of (C3)–(C5), p.19.
  • avgFullChoi: Exact averaged full physical Choi state of (C1), p.19.
  • comparatorFidelity: Exact (C6), interpreted as the fidelity of its constructed states.
  • comparatorDistance: The symmetry/comparator distance, not optimized recovery error.
  • avgBasis: Exact averaged basis environment state, (C20), p.21.
  • basisDistance: Largest basis symmetry distance, using all logical basis words.
  • u1Leading: Leading term in Thms.2–3, pp.5,7.
  • u1Ratio: Relative remainder parameter: k²t²/n for Choi, kt²/n for worst case.
  • U1Performance: Full Thm.2 or Thm.3 contract. Constants precede all admissible size subsequences, ancillas and erased sets; thresholds may depend on convergence. No integrality of a*n is demanded off the chosen unbounded subsequence.
  • rdim: Actual Specht and Schur dimensions, pp.9–10.
  • ldim: Actual Schur-module dimension, pp.9–10.
  • embeddedSchurSpechtVector: Physical vector for one Schur basis coordinate and a fixed Specht unit vector, using the accepted constructed Schur transform, Def.2, p.11.
  • suAncilla: Def.2's actual embedded mixed ancilla I_L/l tensor |psi><psi|. No arbitrary certified density matrix or dimension is supplied.
  • SUPerformance: Full Thm.5/6 contract, pp.11–12. Constants are uniform over every partition with a FIXED separation eta, its Specht vector, and erased position. Uses the physical receiver and CPTP recovery even when the ancilla is mixed.
  • jointUnitaryEntryMoment: Degree-(s,s) joint physical matrix-entry jointUnitaryEntryMoment. Cross-block phases are included; matching marginal block designs alone does not suffice (§V).
  • DesignLaw: Exact symmetric 2-design, §V p.13: probability, group support and FULL first/second conjugation moments equal to the named Haar law.
  • concat: Reassemble first t and last n-t coordinates in their physical order.
  • firstTrace: Complementary erasure keeping the FIRST t qudits, (A9), (B8).
  • erasureChoi: Normalized Choi state of the actual complementary partial trace.
  • initialChoi: Initial normalized Choi ket, before U, (B6), p.17.
  • u1Xi: The diagonal U(1) Xi of (B4), canonically embedded in A tensor Abar. Cross-charge sectors are zero. Zero padding the A* register preserves H_min.
  • u1Lambda: Constructed Lambda=Xi(Psi tensor Choi(tau))Xi†, (B3)–(B4), p.16. Order is A*=(A,Abar), followed by (R,E); no entropy certificate is a field.
  • choiLambda: Choi instance of the constructed Lambda.
  • simpleInitial: An arbitrary normalized logical ket with the same fixed charge ancilla, and a one-dimensional reference, as in Appendix B2.
  • simpleLambda: Basis or superposition instance of Lambda, with trivial reference.
  • sectorBell: Normalized equal-weight-u1SectorProjector entangled vector, (B5), p.17. Impossible sectors return zero and are excluded from all normalized uses.
  • choiGammaCoefficient: Actual Gamma_i of (B11)–(B12), with only physical j sectors.
  • choiKappaValue: Kappa, (B25), p.18: NO square root on the two binomial factors in the inner sum. Signed indices omit every impossible u1SectorProjector.
  • FourPhase: Four unit phases used for the normalized two-basis-state superpositions.
  • superposition: (49)–(50), p.7; x!=y is carried at every normalized use.
  • SymmetryBlockCoordinates: A direct-sum-product coordinate index, (26), p.4.
  • StarIndex: The A* output coordinates, with the two multiplicity factors only.
  • blockProjector: Physical projector onto a block of the actual unitary decomposition.
  • generalXi: Xi of (26)/(A5), pp.4,15. In normalized Bell contraction the sqrt(l_j) cancels; the barred decomposition uses conjugate coordinates.
  • generalLambda: Lambda of (25)/(A5), constructed from its input, normalized Choi state and the actual decomposition. No desired norm/entropy bound is assumed.
  • physicalSchurBlockCoordinates: The actual accepted Schur transform reordered with L first and R second.
  • shapeEntropy: Shannon entropy of the zero-padded normalized row vector, (A16), p.16.
  • constantCoeff11: Coefficient in (C17), PDF p.20. The term -2 sqrt(2) alpha is LINEAR in alpha; it is not -2 sqrt(2 alpha).
  • constantCoeff22: Coefficient in (C18), PDF p.20.
  • isotypicState: Actual normalized lambda-isotypic projector in n-1 qudits, (D9).
  • removeSite: Delete the j-th coordinate; t>=1 is supplied at every use.
  • insertAt: rho on retained site j and tau on the other t-1 retained sites.
  • logicalMatrix: Convert the one-qudit logical register to its single site.
  • suMarginalFormula: (D10), including t=n. The last term is omitted at t=n rather than tracing a fictitious -1 qudits.
  • oneErasureMeanChannel: Exact oneErasureMeanChannel averaged erased-qudit channel, (D13), p.22.
  • schmidtKet: Schmidt probabilities (not amplitudes) give this normalized ket.
  • schmidtLeading: Coefficient of 1/n in (D23); 0/0=0 is the continuous value for two zero Schmidt probabilities.
  • FlaggedIndex: Classical location flag with its corresponding surviving register, p.14.
  • LocationLaw: Arbitrary distribution over erased sets of exactly t sites, independent of the unknown logical state.
  • locationFlaggedErasureEncoder: Flagged erasure after the appendUnitaryEncoder: the receiver learns S and gets S^c. Different location flags are orthogonal blocks.
  • locationFailure: Failure means either one erased set violates the bound or one flagged mixture violates it. A single good appendUnitaryEncoder works simultaneously for all locations and all input-independent distributions of the fixed erasure size.
  • U1LocationPerformance: U(1) main-bound extension to flagged random erasures, §VI p.14.
  • SULocationPerformance: SU(d) extension to one flagged random erasure, §VI p.14.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_SchurWeylDecomposition
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P22
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P02

/-!
Statements from Kong–Liu, arXiv:2112.01498v2. All page references are PDF pages.
Paper-local definitions have complete bodies. Error is always optimal CPTP
RECOVERY error; no erased-register relaxation is used for mixed encoders.
Compilation is pending the batch mechanical handoff.
-/
noncomputable section
-- Finite-matrix Bochner averages use the standard entrywise norm and topology.
open scoped Matrix Matrix.Norms.Elementwise ComplexConjugate ENNReal ComplexOrder
open MeasureTheory Filter
namespace QAlgorithms.Papers.Independent.Extend50.P09
attribute [local instance] Classical.propDecidable Classical.decEq

-- Exact generic definitions from the pinned accepted library.
open QAlgorithms.Papers.Independent.Information100.P22 (Op mixed bell)
open QAlgorithms.Papers.Independent.Information100.P67 (conditionalMinEntropy)
open QAlgorithms.Papers.Independent.Advance50.P02 (negLog)

/-- Borel sigma algebra of the finite-dimensional physical matrix space (§II A). -/
local instance covariantMatrixMeasurable (I : Type*) [Fintype I] :
    MeasurableSpace (Op I) := borel _

/-- The physical matrix sigma algebra is Borel (§II A). -/
local instance covariantMatrixBorel (I : Type*) [Fintype I] :
    BorelSpace (Op I) := ⟨rfl⟩

/-- Computational basis for n d-level systems (§II, p.2). -/
abbrev CovariantWord (d n : ℕ) := Fin n → Fin d

/-- Root-fidelity purified distance, (1)–(2), p.2. -/
def pdist {I : Type*} [Fintype I] [DecidableEq I] (rho sigma : Op I) : ℝ :=
  Real.sqrt (1 - rootFidelity rho sigma ^ 2)

/-- Eq.(6), p.3: optimize over all CPTP decoders, normalized Choi input. -/
def choiError {L B : Type*} [Fintype L] [DecidableEq L]
    [Fintype B] [DecidableEq B] (channel : Superop L B) : ℝ :=
  sInf {e : ℝ | ∃ D : Superop B L, IsChannel D ∧
    e = pdist (pureDensity (bell L))
      (idTensorSuperop (R := L) (D ∘ channel) (pureDensity (bell L)))}

/-- Eq.(8), p.3: one decoder is chosen before the reference-entangled input.
A reference of dimension dim L suffices; pure unit inputs suffice. -/
def optimalWorstRecoveryError {L B : Type*} [Fintype L] [DecidableEq L]
    [Fintype B] [DecidableEq B] (channel : Superop L B) : ℝ :=
  sInf {e : ℝ | ∃ D : Superop B L, IsChannel D ∧
    e = sSup {v : ℝ | ∃ psi : EuclideanSpace ℂ (L × L), IsState psi ∧
      v = pdist (pureDensity psi)
        (idTensorSuperop (R := L) (D ∘ channel) (pureDensity psi))}}

/-- Select the source's two recovery criteria. -/
def selectedRecoveryError {L B : Type*} [Fintype L] [DecidableEq L]
    [Fintype B] [DecidableEq B] (worst : Bool) (C : Superop L B) : ℝ :=
  if worst then optimalWorstRecoveryError C else choiError C

/-- First k tensor factors; the bound prevents a truncated physical register. -/
def firstCoordinates {d n k : ℕ} (h : k ≤ n) (x : CovariantWord d n) : CovariantWord d k :=
  fun i => x ⟨i.val, lt_of_lt_of_le i.isLt h⟩

/-- Remaining n-k tensor factors. -/
def remainingCoordinates {d n k : ℕ} (x : CovariantWord d n) : CovariantWord d (n-k) :=
  fun i => x ⟨k+i.val, by omega⟩

/-- Append the fixed ancillary density operator, Defs.1–2, pp.5,11. -/
def append {d n k : ℕ} (h : k ≤ n) (anc : Op (CovariantWord d (n-k))) :
    Superop (CovariantWord d k) (CovariantWord d n) :=
  fun rho a b => rho (firstCoordinates h a) (firstCoordinates h b) * anc (remainingCoordinates a) (remainingCoordinates b)

/-- Unitary conjugation after appending the ancillary state. -/
def appendUnitaryEncoder {d n k : ℕ} (h : k ≤ n) (anc : Op (CovariantWord d (n-k)))
    (U : Op (CovariantWord d n)) : Superop (CovariantWord d k) (CovariantWord d n) :=
  fun rho => U * append h anc rho * Uᴴ

/-- Configuration on retained sites S. Locations are fixed before U. -/
abbrev RetainedConfigurations (d n : ℕ) (S : Finset (Fin n)) := {i : Fin n // i ∈ S} → Fin d

/-- Join configurations on S and its complement, p.14. -/
def joinSites {d n : ℕ} (S : Finset (Fin n))
    (a : RetainedConfigurations d n S) (b : RetainedConfigurations d n Sᶜ) : CovariantWord d n :=
  fun i => if h : i ∈ S then a ⟨i,h⟩ else b ⟨i, by simpa using h⟩

/-- Partial trace retaining precisely S, §§III B, IV C. -/
def retain {d n : ℕ} (S : Finset (Fin n)) : Superop (CovariantWord d n) (RetainedConfigurations d n S) :=
  fun rho a b => ∑ z : RetainedConfigurations d n Sᶜ, rho (joinSites S a z) (joinSites S b z)

/-- Receiver retains the complement of the known erased set. -/
def noisyEncoder {d n k : ℕ} (h : k ≤ n) (anc : Op (CovariantWord d (n-k)))
    (S : Finset (Fin n)) (U : Op (CovariantWord d n)) :=
  retain Sᶜ ∘ appendUnitaryEncoder h anc U

/-- Hamming weight of a binary computational word, p.5. -/
def chargeHammingWeight {n : ℕ} (x : CovariantWord 2 n) : ℕ := ∑ i, (x i).val

/-- Charge operator Q(n), p.5. -/
def u1ChargeOperator (n : ℕ) : Op (CovariantWord 2 n) := Matrix.diagonal fun x => (chargeHammingWeight x : ℂ)

/-- Charge eigenspace projector, including the zero projector on impossible sectors. -/
def u1SectorProjector (n j : ℕ) : Op (CovariantWord 2 n) :=
  Matrix.diagonal fun x => if chargeHammingWeight x = j then 1 else 0

/-- Def.1, p.5: normalized pure ancilla of charge alpha. -/
def ChargeState {m : ℕ} (alpha : ℕ) (psi : EuclideanSpace ℂ (CovariantWord 2 m)) : Prop :=
  IsState psi ∧ ∀ x, chargeHammingWeight x ≠ alpha → psi x = 0

/-- U(1) action exp(-i theta Q), §III A, p.5. -/
def chargeRotation (n : ℕ) (theta : ℝ) : Op (CovariantWord 2 n) :=
  Matrix.diagonal fun x => Complex.exp (-Complex.I * (theta : ℂ) * (chargeHammingWeight x : ℂ))

/-- Full charge commutant, with full U(binomial(n,j)) blocks, p.5. -/
def U1Group (n : ℕ) (U : Op (CovariantWord 2 n)) : Prop :=
  Uᴴ * U = 1 ∧ U * u1ChargeOperator n = u1ChargeOperator n * U

/-- Collective single-qudit action, Eq.(71), p.10. -/
def collectiveQuditAction {d : ℕ} (n : ℕ) (U : Op (Fin d)) : Op (CovariantWord d n) :=
  fun a b => ∏ i, U (a i) (b i)

/-- Compact commutant as DEFINED on p.10, including determinant one.
This is not the incorrect independent SU(r_lambda)-block reading on p.11. -/
def SUGroup (d n : ℕ) (V : Op (CovariantWord d n)) : Prop :=
  Vᴴ * V = 1 ∧ V.det = 1 ∧ ∀ U : Op (Fin d), Uᴴ * U = 1 → U.det = 1 →
    V * collectiveQuditAction n U = collectiveQuditAction n U * V

/-- Full unconstrained unitary group (§VI, pp.13–14). -/
def FullGroup (d n : ℕ) (U : Op (CovariantWord d n)) : Prop := Uᴴ * U = 1

/-- Probability law supported on the named compact matrix group, invariant
under every left translation. This characterizes its normalized Haar measure. -/
def IsCommutantHaarLaw {I : Type*} [Fintype I] [DecidableEq I]
    (G : Op I → Prop) (mu : Measure (Op I)) : Prop :=
  IsProbabilityMeasure mu ∧ mu {U | ¬ G U} = 0 ∧
    ∀ V, G V → Measure.map (fun U => V * U) mu = mu

/-- A family of laws, one for each physical register size. -/
abbrev PhysicalUnitaryLaws (d : ℕ) := (n : ℕ) → Measure (Op (CovariantWord d n))

/-- SDP value of (B14), p.17, for arbitrary PSD operators including zero.
The feasible set is nonempty and bounded below for PSD input. -/
def sdp {A B : Type*} [Fintype A] [DecidableEq A]
    [Fintype B] [DecidableEq B] (rho : Op (A × B)) : ℝ :=
  sInf {s : ℝ | ∃ sigma : Op B, sigma.PosSemidef ∧ s = sigma.trace.re ∧
    (Matrix.kronecker (1 : Op A) sigma - rho).PosSemidef}

/-- Signed lower binomial index; negative indices contribute zero. -/
def chooseZ (n : ℕ) (j : ℤ) : ℝ :=
  if 0 ≤ j then (n.choose j.toNat : ℝ) else 0

/-- Conditional probabilities in (C2), with all invalid sectors omitted. -/
def hyper (n t q i : ℕ) : ℝ :=
  chooseZ (n-t) ((q : ℤ)-i) / (n.choose q : ℝ)

/-- Beta of (C4), p.19, a coefficient per computational basis vector. -/
def choiMarginalCoefficient (n k t alpha i : ℕ) : ℝ :=
  (2 : ℝ)^(- (k : ℤ)) * ∑ j ∈ Finset.range (k+1),
    (k.choose j : ℝ) * hyper n t (j+alpha) i

/-- Exact averaged environmental Choi state of (C2), p.19. -/
def avgChoi (n k t alpha : ℕ) : Op (CovariantWord 2 k × CovariantWord 2 t) :=
  fun x y => if x = y then
    ((2 : ℝ)^(- (k : ℤ)) * hyper n t (chargeHammingWeight x.1 + alpha) (chargeHammingWeight x.2) : ℂ) else 0

/-- Marginal zeta_0 of (C3)–(C5), p.19. -/
def choiMarginalState (n k t alpha : ℕ) : Op (CovariantWord 2 t) :=
  Matrix.diagonal fun x => (choiMarginalCoefficient n k t alpha (chargeHammingWeight x) : ℂ)

/-- Exact averaged full physical Choi state of (C1), p.19. -/
def avgFullChoi (n k alpha : ℕ) : Op (CovariantWord 2 k × CovariantWord 2 n) :=
  (2 : ℂ)^(- (k : ℤ)) • ∑ j ∈ Finset.range (k+1),
    (n.choose (j+alpha) : ℂ)⁻¹ • Matrix.kronecker (u1SectorProjector k j) (u1SectorProjector n (j+alpha))

/-- Exact (C6), interpreted as the fidelity of its constructed states. -/
def comparatorFidelity (n k t alpha : ℕ) : ℝ :=
  rootFidelity (avgChoi n k t alpha) (Matrix.kronecker (mixed (CovariantWord 2 k)) (choiMarginalState n k t alpha))

/-- The symmetry/comparator distance, not optimized recovery error. -/
def comparatorDistance (n k t alpha : ℕ) : ℝ :=
  pdist (avgChoi n k t alpha) (Matrix.kronecker (mixed (CovariantWord 2 k)) (choiMarginalState n k t alpha))

/-- Exact averaged basis environment state, (C20), p.21. -/
def avgBasis (n t q : ℕ) : Op (CovariantWord 2 t) :=
  Matrix.diagonal fun x => (hyper n t q (chargeHammingWeight x) : ℂ)

/-- Largest basis symmetry distance, using all logical basis words. -/
def basisDistance (n k t alpha : ℕ) : ℝ :=
  (Finset.univ : Finset (CovariantWord 2 k)).sup' Finset.univ_nonempty
    (fun x => pdist (avgBasis n t (chargeHammingWeight x+alpha)) (choiMarginalState n k t alpha))

/-- Leading term in Thms.2–3, pp.5,7. -/
def u1Leading (worst : Bool) (a : ℝ) (n k t : ℕ) : ℝ :=
  (if worst then (k : ℝ) * Real.sqrt t else Real.sqrt ((t : ℝ)*k)) /
    (4 * n * Real.sqrt (a*(1-a)))

/-- Relative remainder parameter: k²t²/n for Choi, kt²/n for worst case. -/
def u1Ratio (worst : Bool) (n k t : ℕ) : ℝ :=
  (k : ℝ)^(if worst then 1 else 2) * (t : ℝ)^2 / n

/-- Full Thm.2 or Thm.3 contract. Constants precede all admissible size
subsequences, ancillas and erased sets; thresholds may depend on convergence.
No integrality of a*n is demanded off the chosen unbounded subsequence. -/
def U1Performance (worst : Bool) (laws : PhysicalUnitaryLaws 2) : Prop :=
  ∀ a : ℝ, 0 < a → a < 1 → ∃ C c : ℝ, 0 < C ∧ 0 < c ∧
    ∀ N k t alpha : ℕ → ℕ,
    Tendsto N atTop atTop →
    Tendsto (fun i => u1Ratio worst (N i) (k i) (t i)) atTop (nhds 0) →
    (∀ i, 0 < N i ∧ 0 < k i ∧ k i ≤ N i ∧ 0 < t i ∧ t i ≤ N i ∧
      alpha i ≤ N i-k i ∧ (alpha i : ℝ) = a * N i) →
    ∃ i0 : ℕ, ∀ i ≥ i0, ∀ h : k i ≤ N i,
    ∀ psi : EuclideanSpace ℂ (CovariantWord 2 (N i-k i)), ChargeState (alpha i) psi →
    ∀ S : Finset (Fin (N i)), S.card = t i →
    let err := fun U => selectedRecoveryError worst (noisyEncoder h (pureDensity psi) S U)
    let b := u1Leading worst a (N i) (k i) (t i) *
      (1 + C * u1Ratio worst (N i) (k i) (t i))
    (∫ U, err U ∂laws (N i)) ≤ b ∧
      (laws (N i)).real {U | b < err U} ≤ Real.exp (-c * N i)

/-- Actual Specht and Schur dimensions, pp.9–10. -/
def rdim {d n : ℕ} (lam : Schur.Partition d n) : ℕ :=
  Module.finrank ℂ (Schur.spechtSpace lam)

/-- Actual Schur-module dimension, pp.9–10. -/
def ldim {d n : ℕ} (lam : Schur.Partition d n) : ℕ :=
  Module.finrank ℂ (Schur.schurModule lam)

/-- Physical vector for one Schur basis coordinate and a fixed Specht unit
vector, using the accepted constructed Schur transform, Def.2, p.11. -/
def embeddedSchurSpechtVector {d m : ℕ} (lam : Schur.Partition d m)
    (psi : EuclideanSpace ℂ (Fin (rdim lam))) (l : Fin (ldim lam)) :
    EuclideanSpace ℂ (CovariantWord d m) :=
  WithLp.toLp 2 fun x => ∑ r, conj (Schur.decomposition d m ⟨lam,(r,l)⟩ x) * psi r

/-- Def.2's actual embedded mixed ancilla I_L/l tensor |psi><psi|.
No arbitrary certified density matrix or dimension is supplied. -/
def suAncilla {d m : ℕ} (lam : Schur.Partition d m)
    (psi : EuclideanSpace ℂ (Fin (rdim lam))) : Op (CovariantWord d m) :=
  (ldim lam : ℂ)⁻¹ • ∑ l : Fin (ldim lam), pureDensity (embeddedSchurSpechtVector lam psi l)

/-- Full Thm.5/6 contract, pp.11–12. Constants are uniform over every
partition with a FIXED separation eta, its Specht vector, and erased position.
Uses the physical receiver and CPTP recovery even when the ancilla is mixed. -/
def SUPerformance (worst : Bool) (d : ℕ) (laws : PhysicalUnitaryLaws d) : Prop :=
  ∀ eta : ℝ, 0 < eta → ∃ C c : ℝ, 0 < C ∧ 0 < c ∧
    ∃ n0 : ℕ, ∀ n ≥ n0, ∀ hn : 2 ≤ n,
    ∀ lam : Schur.Partition d (n-1),
    eta * n ≤ (n : ℝ) - lam.val.rowLen 0 →
    ∀ psi : EuclideanSpace ℂ (Fin (rdim lam)), IsState psi →
    ∀ S : Finset (Fin n), S.card = 1 →
    let err := fun V => selectedRecoveryError worst
      (noisyEncoder (show 1 ≤ n by omega) (suAncilla lam psi) S V)
    let b := Real.sqrt ((d : ℝ)^2-1)/(2*n) + C/(n : ℝ)^2
    (∫ V, err V ∂laws n) ≤ b ∧ (laws n).real {V | b < err V} ≤ Real.exp (-c*n)

/-- Degree-(s,s) joint physical matrix-entry jointUnitaryEntryMoment. Cross-block phases
are included; matching marginal block designs alone does not suffice (§V). -/
def jointUnitaryEntryMoment {I : Type*} [Fintype I] (s : ℕ)
    (a b c e : Fin s → I) (U : Op I) : ℂ :=
  (∏ i, U (a i) (b i)) * conj (∏ i, U (c i) (e i))

/-- Exact symmetric 2-design, §V p.13: probability, group support and
FULL first/second conjugation moments equal to the named Haar law. -/
def DesignLaw {I : Type*} [Fintype I] [DecidableEq I]
    (G : Op I → Prop) (mu nu : Measure (Op I)) : Prop :=
  IsProbabilityMeasure mu ∧ mu {U | ¬ G U} = 0 ∧ IsCommutantHaarLaw G nu ∧
    ∀ s ∈ ({1,2} : Finset ℕ), ∀ a b c e : Fin s → I,
      (∫ U, jointUnitaryEntryMoment s a b c e U ∂mu) = ∫ U, jointUnitaryEntryMoment s a b c e U ∂nu

example (n : ℕ) : chargeRotation n 0 = 1 := by simp [chargeRotation]

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

example : chooseZ 3 (-1) = 0 := by norm_num [chooseZ]

example {A B : Type*} [Fintype A] [DecidableEq A] [Fintype B] [DecidableEq B] :
    negLog 0 = (⊤ : EReal) := by simp [negLog]

example (n k t alpha : ℕ) : selectedRecoveryError false
    (fun rho : Op (CovariantWord 2 k) => rho) = choiError (fun rho : Op (CovariantWord 2 k) => rho) := rfl

example {d n : ℕ} (S : Finset (Fin n)) (X : Op (CovariantWord d n)) :
    retain S X = fun a b => ∑ z : RetainedConfigurations d n Sᶜ, X (joinSites S a z) (joinSites S b z) := rfl

example (d n : ℕ) (U : Op (Fin d)) (a b : CovariantWord d n) :
    collectiveQuditAction n U a b = ∏ i, U (a i) (b i) := rfl

/-- Reassemble first t and last n-t coordinates in their physical order. -/
def concat {d n t : ℕ} (ht : t ≤ n) (x : CovariantWord d t) (z : CovariantWord d (n-t)) : CovariantWord d n :=
  fun i => if h : i.val < t then x ⟨i.val,h⟩ else z ⟨i.val-t,by omega⟩

/-- Complementary erasure keeping the FIRST t qudits, (A9), (B8). -/
def firstTrace {d n t : ℕ} (ht : t ≤ n) : Superop (CovariantWord d n) (CovariantWord d t) :=
  fun X x y => ∑ z : CovariantWord d (n-t), X (concat ht x z) (concat ht y z)

/-- Normalized Choi state of the actual complementary partial trace. -/
def erasureChoi {d n t : ℕ} (ht : t ≤ n) : Op (CovariantWord d n × CovariantWord d t) :=
  idTensorSuperop (R := CovariantWord d n) (firstTrace ht) (pureDensity (bell (CovariantWord d n)))

/-- Initial normalized Choi ket, before U, (B6), p.17. -/
def initialChoi {n k : ℕ} (hk : k ≤ n) (psi : EuclideanSpace ℂ (CovariantWord 2 (n-k))) :
    EuclideanSpace ℂ (CovariantWord 2 k × CovariantWord 2 n) :=
  WithLp.toLp 2 fun p => bell (CovariantWord 2 k) (p.1,firstCoordinates hk p.2) * psi (remainingCoordinates p.2)

/-- The diagonal U(1) Xi of (B4), canonically embedded in A tensor Abar.
Cross-charge sectors are zero. Zero padding the A* register preserves H_min. -/
def u1Xi (n : ℕ) (a b : CovariantWord 2 n) : ℂ :=
  if chargeHammingWeight a = chargeHammingWeight b then (Real.sqrt ((2 : ℝ)^n/(n.choose (chargeHammingWeight a) : ℝ)) : ℂ) else 0

/-- Constructed Lambda=Xi(Psi tensor Choi(tau))Xi†, (B3)–(B4), p.16.
Order is A*=(A,Abar), followed by (R,E); no entropy certificate is a field. -/
def u1Lambda {R : Type*} [Fintype R] {n t : ℕ} (ht : t ≤ n)
    (Psi : Op (R × CovariantWord 2 n)) : Op ((CovariantWord 2 n × CovariantWord 2 n) × (R × CovariantWord 2 t)) :=
  fun a b => u1Xi n a.1.1 a.1.2 * conj (u1Xi n b.1.1 b.1.2) *
    Psi (a.2.1,a.1.1) (b.2.1,b.1.1) * erasureChoi ht (a.1.2,a.2.2) (b.1.2,b.2.2)

/-- Choi instance of the constructed Lambda. -/
def choiLambda {n k t : ℕ} (hk : k ≤ n) (ht : t ≤ n)
    (psi : EuclideanSpace ℂ (CovariantWord 2 (n-k))) :=
  u1Lambda ht (pureDensity (initialChoi hk psi))

/-- An arbitrary normalized logical ket with the same fixed charge ancilla,
and a one-dimensional reference, as in Appendix B2. -/
def simpleInitial {n k : ℕ} (hk : k ≤ n)
    (psi : EuclideanSpace ℂ (CovariantWord 2 (n-k))) (v : EuclideanSpace ℂ (CovariantWord 2 k)) :
    EuclideanSpace ℂ (Unit × CovariantWord 2 n) :=
  WithLp.toLp 2 fun p => v (firstCoordinates hk p.2) * psi (remainingCoordinates p.2)

/-- Basis or superposition instance of Lambda, with trivial reference. -/
def simpleLambda {n k t : ℕ} (hk : k ≤ n) (ht : t ≤ n)
    (psi : EuclideanSpace ℂ (CovariantWord 2 (n-k))) (v : EuclideanSpace ℂ (CovariantWord 2 k)) :=
  u1Lambda ht (pureDensity (simpleInitial hk psi v))

/-- Normalized equal-weight-u1SectorProjector entangled vector, (B5), p.17.
Impossible sectors return zero and are excluded from all normalized uses. -/
def sectorBell (m q : ℕ) : EuclideanSpace ℂ (CovariantWord 2 m × CovariantWord 2 m) :=
  WithLp.toLp 2 fun p => if p.1 = p.2 ∧ chargeHammingWeight p.1 = q then
    ((Real.sqrt (m.choose q : ℝ))⁻¹ : ℂ) else 0

/-- Actual Gamma_i of (B11)–(B12), with only physical j sectors. -/
def choiGammaCoefficient {n k t : ℕ} (hk : k ≤ n) (ht : t ≤ n) (alpha : ℕ)
    (psi : EuclideanSpace ℂ (CovariantWord 2 (n-k))) (i : ℕ)
    (a : CovariantWord 2 n) (b : CovariantWord 2 t) (r : CovariantWord 2 k) (e : CovariantWord 2 t) : ℂ :=
  ∑ j ∈ Finset.range (n+1),
    if i ≤ j ∧ j-i ≤ t ∧ alpha ≤ j ∧ j-alpha ≤ k then
      (Real.sqrt (((t.choose (j-i) : ℝ) * (k.choose (j-alpha) : ℝ)) /
        ((2 : ℝ)^k * (n.choose j : ℝ))) : ℂ) *
        sectorBell t (j-i) (b,e) * sectorBell k (j-alpha) (firstCoordinates hk a,r) * psi (remainingCoordinates a)
    else 0

/-- Kappa, (B25), p.18: NO square root on the two binomial factors
in the inner sum. Signed indices omit every impossible u1SectorProjector. -/
def choiKappaValue (n k t alpha : ℕ) : ℝ :=
  ∑ i ∈ Finset.range (n-t+1),
    (∑ j ∈ Finset.range (n+1),
      chooseZ t ((j : ℤ)-i) * chooseZ k ((j : ℤ)-alpha) /
        Real.sqrt ((2 : ℝ)^k * (n.choose j : ℝ)))^2

/-- Four unit phases used for the normalized two-basis-state superpositions. -/
def FourPhase (z : ℂ) : Prop := z = 1 ∨ z = -1 ∨ z = Complex.I ∨ z = -Complex.I

/-- (49)–(50), p.7; x!=y is carried at every normalized use. -/
def superposition {k : ℕ} (x y : CovariantWord 2 k) (z : ℂ) : EuclideanSpace ℂ (CovariantWord 2 k) :=
  ((Real.sqrt 2)⁻¹ : ℂ) • (ket x + z • ket y)

/-- A direct-sum-product coordinate index, (26), p.4. -/
abbrev SymmetryBlockCoordinates {J : Type*} (l r : J → ℕ) := (j : J) × (Fin (l j) × Fin (r j))

/-- The A* output coordinates, with the two multiplicity factors only. -/
abbrev StarIndex {J : Type*} (r : J → ℕ) := (j : J) × (Fin (r j) × Fin (r j))

/-- Physical projector onto a block of the actual unitary decomposition. -/
def blockProjector {J : Type*} [Fintype J] {d n : ℕ} (l r : J → ℕ)
    (S : Matrix (SymmetryBlockCoordinates l r) (CovariantWord d n) ℂ) (j : J) : Op (CovariantWord d n) :=
  fun a b => ∑ u : Fin (l j), ∑ v : Fin (r j), conj (S ⟨j,(u,v)⟩ a) * S ⟨j,(u,v)⟩ b

/-- Xi of (26)/(A5), pp.4,15. In normalized Bell contraction the
sqrt(l_j) cancels; the barred decomposition uses conjugate coordinates. -/
def generalXi {J : Type*} [Fintype J] {d n : ℕ} (l r : J → ℕ)
    (S : Matrix (SymmetryBlockCoordinates l r) (CovariantWord d n) ℂ) (j : StarIndex r)
    (a b : CovariantWord d n) : ℂ :=
  (Real.sqrt ((d : ℝ)^n / r j.1) : ℂ) *
    ∑ u : Fin (l j.1), S ⟨j.1,(u,j.2.1)⟩ a * conj (S ⟨j.1,(u,j.2.2)⟩ b)

/-- Lambda of (25)/(A5), constructed from its input, normalized Choi
state and the actual decomposition. No desired norm/entropy bound is assumed. -/
def generalLambda {J R : Type*} [Fintype J] [Fintype R]
    {d n t : ℕ} (ht : t ≤ n) (l r : J → ℕ)
    (S : Matrix (SymmetryBlockCoordinates l r) (CovariantWord d n) ℂ) (Psi : Op (R × CovariantWord d n)) :
    Op (StarIndex r × (R × CovariantWord d t)) :=
  fun x y => ∑ a : CovariantWord d n, ∑ b : CovariantWord d n, ∑ c : CovariantWord d n, ∑ e : CovariantWord d n,
    generalXi l r S x.1 a b * conj (generalXi l r S y.1 c e) *
      Psi (x.2.1,a) (y.2.1,c) * erasureChoi ht (b,x.2.2) (e,y.2.2)

/-- The actual accepted Schur transform reordered with L first and R second. -/
def physicalSchurBlockCoordinates (d n : ℕ) :
    Matrix (SymmetryBlockCoordinates (fun lam : Schur.Partition d n => ldim lam) rdim) (CovariantWord d n) ℂ :=
  fun j a => Schur.decomposition d n ⟨j.1,(j.2.2,j.2.1)⟩ a

/-- Shannon entropy of the zero-padded normalized row vector, (A16), p.16. -/
def shapeEntropy {d m : ℕ} (lam : Schur.Partition d m) : ℝ :=
  -∑ i : Fin d, ((lam.val.rowLen i.val : ℝ)/m) * Real.logb 2 ((lam.val.rowLen i.val : ℝ)/m)

example {d n t : ℕ} (ht : t ≤ n) (x : CovariantWord d t) (z : CovariantWord d (n-t))
    (i : Fin n) (hi : i.val < t) : concat ht x z i = x ⟨i.val,hi⟩ := by
  simp [concat,hi]

example {R : Type*} [Fintype R] {n t : ℕ} (ht : t ≤ n) :
    u1Lambda (R := R) ht 0 = 0 := by ext a b; simp [u1Lambda]

example (m q : ℕ) (a b : CovariantWord 2 m) (h : a ≠ b) : sectorBell m q (a,b) = 0 := by
  simp [sectorBell,h]

/-- Coefficient in (C17), PDF p.20. The term -2 sqrt(2) alpha is LINEAR
in alpha; it is not -2 sqrt(2 alpha). -/
def constantCoeff11 (alpha : ℕ) : ℝ :=
  (-Real.sqrt 2-2*Real.sqrt 2*alpha+Real.sqrt ((alpha : ℝ)*(2*alpha+1))+
    Real.sqrt (((alpha : ℝ)+1)*(2*alpha+1)))/(2*Real.sqrt 2)

/-- Coefficient in (C18), PDF p.20. -/
def constantCoeff22 (alpha : ℕ) : ℝ :=
  (-2-2*(alpha : ℝ)+Real.sqrt ((alpha : ℝ)*(alpha+1))+
    Real.sqrt (((alpha : ℝ)+1)*(alpha+2)))/2

/-- Actual normalized lambda-isotypic projector in n-1 qudits, (D9). -/
def isotypicState {d m : ℕ} (lam : Schur.Partition d m) : Op (CovariantWord d m) :=
  ((ldim lam * rdim lam : ℕ) : ℂ)⁻¹ • Schur.isotypicProjector lam

/-- Delete the j-th coordinate; t>=1 is supplied at every use. -/
def removeSite {d t : ℕ} (j : Fin t) (x : CovariantWord d t) : CovariantWord d (t-1) :=
  fun i => x ⟨if i.val < j.val then i.val else i.val+1,by split_ifs <;> omega⟩

/-- rho on retained site j and tau on the other t-1 retained sites. -/
def insertAt {d t : ℕ} (j : Fin t) (rho : Op (Fin d)) (tau : Op (CovariantWord d (t-1))) :
    Op (CovariantWord d t) :=
  fun a b => rho (a j) (b j) * tau (removeSite j a) (removeSite j b)

/-- Convert the one-qudit logical register to its single site. -/
def logicalMatrix {d : ℕ} (rho : Op (Fin d)) : Op (CovariantWord d 1) :=
  fun a b => rho (a 0) (b 0)

/-- (D10), including t=n. The last term is omitted at t=n rather
than tracing a fictitious -1 qudits. -/
def suMarginalFormula {d n t : ℕ} (hn : 2 ≤ n) (ht0 : 1 ≤ t) (ht : t ≤ n)
    (lam : Schur.Partition d (n-1)) (rho : Op (Fin d)) : Op (CovariantWord d t) :=
  (n : ℂ)⁻¹ • ∑ j : Fin t,
    insertAt j rho (firstTrace (show t-1 ≤ n-1 by omega) (isotypicState lam)) +
  if h : t < n then (((n-t : ℕ) : ℂ)/(n : ℂ)) •
    firstTrace (show t ≤ n-1 by omega) (isotypicState lam) else 0

/-- Exact oneErasureMeanChannel averaged erased-qudit channel, (D13), p.22. -/
def oneErasureMeanChannel (d n : ℕ) : Superop (Fin d) (Fin d) :=
  fun X => (n : ℂ)⁻¹ • X + (((n : ℂ)-1)/(n : ℂ) * X.trace) • mixed (Fin d)

/-- Schmidt probabilities (not amplitudes) give this normalized ket. -/
def schmidtKet {d : ℕ} (p : Fin d → ℝ) : EuclideanSpace ℂ (Fin d × Fin d) :=
  WithLp.toLp 2 fun a => if a.1 = a.2 then (Real.sqrt (p a.1) : ℂ) else 0

/-- Coefficient of 1/n in (D23); 0/0=0 is the continuous value
for two zero Schmidt probabilities. -/
def schmidtLeading {d : ℕ} (p : Fin d → ℝ) : ℝ :=
  Real.sqrt ((d : ℝ)/2 * (∑ i, ∑ j, p i*p j/(p i+p j))-1/4)

example (d n : ℕ) : oneErasureMeanChannel d n 0 = 0 := by simp [oneErasureMeanChannel]

example (d : ℕ) (X : Op (Fin d)) : oneErasureMeanChannel d 1 X = X := by simp [oneErasureMeanChannel]

example (m : ℕ) (a : CovariantWord 2 m) : sectorBell m (chargeHammingWeight a) (a,a) =
    ((Real.sqrt (m.choose (chargeHammingWeight a) : ℝ))⁻¹ : ℂ) := by simp [sectorBell]

/-- Classical location flag with its corresponding surviving register, p.14. -/
abbrev FlaggedIndex (d n : ℕ) := (S : Finset (Fin n)) × RetainedConfigurations d n Sᶜ

/-- Arbitrary distribution over erased sets of exactly t sites, independent
of the unknown logical state. -/
def LocationLaw {n : ℕ} (t : ℕ) (p : Finset (Fin n) → ℝ) : Prop :=
  (∀ S, 0 ≤ p S) ∧ (∑ S, p S = 1) ∧ ∀ S, S.card ≠ t → p S = 0

/-- Flagged erasure after the appendUnitaryEncoder: the receiver learns S and gets S^c.
Different location flags are orthogonal blocks. -/
def locationFlaggedErasureEncoder {d n k : ℕ} (hk : k ≤ n) (anc : Op (CovariantWord d (n-k)))
    (p : Finset (Fin n) → ℝ) (U : Op (CovariantWord d n)) :
    Superop (CovariantWord d k) (FlaggedIndex d n) :=
  fun rho a b => if h : a.1 = b.1 then
    (p a.1 : ℂ) * noisyEncoder hk anc a.1 U rho a.2 (h.symm ▸ b.2) else 0

/-- Failure means either one erased set violates the bound or one flagged
mixture violates it. A single good appendUnitaryEncoder works simultaneously for all
locations and all input-independent distributions of the fixed erasure size. -/
def locationFailure {d n k : ℕ} (worst : Bool) (hk : k ≤ n)
    (anc : Op (CovariantWord d (n-k))) (t : ℕ) (b : ℝ) (U : Op (CovariantWord d n)) : Prop :=
  (∃ S : Finset (Fin n), S.card = t ∧ b < selectedRecoveryError worst (noisyEncoder hk anc S U)) ∨
  (∃ p : Finset (Fin n) → ℝ, LocationLaw t p ∧
    b < selectedRecoveryError worst (locationFlaggedErasureEncoder hk anc p U))

/-- U(1) main-bound extension to flagged random erasures, §VI p.14. -/
def U1LocationPerformance (worst : Bool) (laws : PhysicalUnitaryLaws 2) : Prop :=
  ∀ a : ℝ, 0 < a → a < 1 → ∃ C c : ℝ, 0 < C ∧ 0 < c ∧
    ∀ N k t alpha : ℕ → ℕ, Tendsto N atTop atTop →
    Tendsto (fun i => u1Ratio worst (N i) (k i) (t i)) atTop (nhds 0) →
    (∀ i, 0 < N i ∧ 0 < k i ∧ k i ≤ N i ∧ 0 < t i ∧ t i ≤ N i ∧
      alpha i ≤ N i-k i ∧ (alpha i : ℝ) = a*N i) →
    ∃ i0 : ℕ, ∀ i ≥ i0, ∀ hk : k i ≤ N i,
    ∀ psi : EuclideanSpace ℂ (CovariantWord 2 (N i-k i)), ChargeState (alpha i) psi →
    let b := u1Leading worst a (N i) (k i) (t i) *
      (1+C*u1Ratio worst (N i) (k i) (t i))
    (laws (N i)).real {U | locationFailure worst hk (pureDensity psi) (t i) b U} ≤
      Real.exp (-c*N i) ∧
    ∀ p : Finset (Fin (N i)) → ℝ, LocationLaw (t i) p →
      (∫ U, selectedRecoveryError worst (locationFlaggedErasureEncoder hk (pureDensity psi) p U) ∂laws (N i)) ≤ b

/-- SU(d) extension to one flagged random erasure, §VI p.14. -/
def SULocationPerformance (worst : Bool) (d : ℕ) (laws : PhysicalUnitaryLaws d) : Prop :=
  ∀ eta : ℝ, 0 < eta → ∃ C c : ℝ, 0 < C ∧ 0 < c ∧
    ∃ n0 : ℕ, ∀ n ≥ n0, ∀ hn : 2 ≤ n, ∀ lam : Schur.Partition d (n-1),
    eta*n ≤ (n : ℝ)-lam.val.rowLen 0 →
    ∀ psi : EuclideanSpace ℂ (Fin (rdim lam)), IsState psi →
    let b := Real.sqrt ((d : ℝ)^2-1)/(2*n)+C/(n : ℝ)^2
    (laws n).real {U | locationFailure worst (show 1 ≤ n by omega) (suAncilla lam psi) 1 b U} ≤
      Real.exp (-c*n) ∧
    ∀ p : Finset (Fin n) → ℝ, LocationLaw 1 p →
      (∫ U, selectedRecoveryError worst
        (locationFlaggedErasureEncoder (show 1 ≤ n by omega) (suAncilla lam psi) p U) ∂laws n) ≤ b

example {n : ℕ} (p : Finset (Fin n) → ℝ) (hp : LocationLaw 0 p)
    (S : Finset (Fin n)) (hS : S.card ≠ 0) : p S = 0 := hp.2.2 S hS

example {d n k : ℕ} (hk : k ≤ n) (anc : Op (CovariantWord d (n-k)))
    (p : Finset (Fin n) → ℝ) (U : Op (CovariantWord d n)) (rho : Op (CovariantWord d k))
    (a b : FlaggedIndex d n) (h : a.1 ≠ b.1) :
    locationFlaggedErasureEncoder hk anc p U rho a b = 0 := by simp [locationFlaggedErasureEncoder,h]

end QAlgorithms.Papers.Independent.Extend50.P09
Source
Near-optimal covariant quantum error-correcting codes from random unitaries with symmetries, arXiv:2112.01498v2, https://arxiv.org/abs/2112.01498v2
Read-back

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

QAlgorithms.Papers.Independent.Extend50.P09.ChargeState

For any natural numbers m,αm,\alpham,α and complex Euclidean vector ψ\psiψ indexed by binary words of length mmm, this predicate means that ∥ψ∥=1\|\psi\|=1∥ψ∥=1 and ψ(x)=0\psi(x)=0ψ(x)=0 for every word xxx with ∑i=0m−1xi≠α\sum_{i=0}^{m-1}x_i\ne\alpha∑i=0m−1​xi​=α. It cannot hold when α>m\alpha>mα>m. For m=0m=0m=0, it requires α=0\alpha=0α=0 and the coefficient at the unique empty word to have modulus 111.

QAlgorithms.Papers.Independent.Extend50.P09.CovariantWord

For natural numbers d,nd,nd,n, a word is a function x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1}. Thus it is an ordered list of nnn symbols from an alphabet of size ddd. There is exactly one word when n=0n=0n=0, including when d=0d=0d=0; there are no words when d=0<nd=0<nd=0<n.

QAlgorithms.Papers.Independent.Extend50.P09.DesignLaw

For a finite index type III with decidable equality, an arbitrary predicate GGG on complex I×II\times II×I matrices, and two Borel measures μ,ν\mu,\nuμ,ν on those matrices, this defines the conjunction of the following requirements: μ\muμ is a probability measure and μ{U:¬G(U)}=0\mu\{U:\neg G(U)\}=0μ{U:¬G(U)}=0; ν\nuν is a probability measure, ν{U:¬G(U)}=0\nu\{U:\neg G(U)\}=0ν{U:¬G(U)}=0, and for every matrix VVV satisfying G(V)G(V)G(V), the pushforward of ν\nuν by U↦VUU\mapsto VUU↦VU equals ν\nuν; and, for each s∈{1,2}s\in\{1,2\}s∈{1,2} and every four index functions a,b,c,e:{0,…,s−1}→Ia,b,c,e:\{0,\ldots,s-1\}\to Ia,b,c,e:{0,…,s−1}→I,

∫(∏i<sUai,bi)(∏i<sUci,ei)‾ dμ(U)=∫(∏i<sUai,bi)(∏i<sUci,ei)‾ dν(U).\int \left(\prod_{i<s}U_{a_i,b_i}\right) \overline{\left(\prod_{i<s}U_{c_i,e_i}\right)} \,d\mu(U) = \int \left(\prod_{i<s}U_{a_i,b_i}\right) \overline{\left(\prod_{i<s}U_{c_i,e_i}\right)} \,d\nu(U).∫(i<s∏​Uai​,bi​​)(i<s∏​Uci​,ei​​)​dμ(U)=∫(i<s∏​Uai​,bi​​)(i<s∏​Uci​,ei​​)​dν(U).

The predicate GGG is not required by this definition to describe a group or unitary matrices, and invariance of μ\muμ is not required. The integral equalities use the total complex Bochner integral and contain no separate integrability assumption. Empty III is allowed; in that case the moment requirements have no index functions to quantify over.

QAlgorithms.Papers.Independent.Extend50.P09.FlaggedIndex

For natural numbers d,nd,nd,n, this abbreviates the dependent indexing set of pairs (S,x)(S,x)(S,x), where SSS is any subset of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} and xxx assigns an element of {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} to every site outside SSS. Thus the domain of xxx depends on SSS. Empty and full subsets are included; the full subset admits the unique empty assignment. For n=0n=0n=0, the indexing set has one element. For d=0d=0d=0, only the full subset admits an assignment, so the indexing set again has one element.

QAlgorithms.Papers.Independent.Extend50.P09.FourPhase

For a complex number zzz, this predicate means exactly

z=1orz=−1orz=iorz=−i,z=1\quad\text{or}\quad z=-1\quad\text{or}\quad z=\mathrm i\quad\text{or}\quad z=-\mathrm i,z=1orz=−1orz=iorz=−i,

where i2=−1\mathrm i^2=-1i2=−1.

QAlgorithms.Papers.Independent.Extend50.P09.FullGroup

For any natural numbers d,nd,nd,n and complex matrix UUU indexed by length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this predicate means exactly that U†U=IU^\dagger U=IU†U=I. For n=0n=0n=0, this requires the scalar entry of UUU to have modulus 111; for d=0d=0d=0 and n>0n>0n>0, it holds for the unique matrix on the empty indexing space.

QAlgorithms.Papers.Independent.Extend50.P09.IsCommutantHaarLaw

For any finite type III with decidable equality, any predicate GGG on complex matrices indexed by III, and any measure μ\muμ on those matrices, this predicate means that μ\muμ is a probability measure, μ({U:¬G(U)})=0\mu(\{U:\neg G(U)\})=0μ({U:¬G(U)})=0, and, for every matrix VVV satisfying G(V)G(V)G(V), the pushforward of μ\muμ under U↦VUU\mapsto VUU↦VU equals μ\muμ. The predicate GGG is arbitrary: no group or unitarity condition on its satisfying matrices is separately required. The finite type III may be empty.

QAlgorithms.Papers.Independent.Extend50.P09.LocationLaw

For natural numbers n,tn,tn,t and an arbitrary real-valued function ppp on the subsets of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, this predicate means exactly

p(S)≥0for every S,∑S⊆{0,…,n−1}p(S)=1,∣S∣≠t⟹p(S)=0.p(S)\ge0\quad\text{for every }S,\qquad \sum_{S\subseteq\{0,\ldots,n-1\}}p(S)=1,\qquad |S|\ne t\Longrightarrow p(S)=0.p(S)≥0for every S,S⊆{0,…,n−1}∑​p(S)=1,∣S∣=t⟹p(S)=0.

It does not require equal weights on the subsets of size ttt. If t>nt>nt>n, the conditions cannot hold. When t=0t=0t=0, they force all mass onto the empty subset; in particular, for n=0n=0n=0 they hold precisely when t=0t=0t=0 and p(∅)=1p(\varnothing)=1p(∅)=1.

QAlgorithms.Papers.Independent.Extend50.P09.PhysicalUnitaryLaws

For every natural number ddd, this abbreviates the type of families assigning to each natural number nnn a measure on complex matrices indexed by length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. The abbreviation itself imposes no probability, support, invariance, or unitarity conditions on these measures. It includes n=0n=0n=0, where matrices have one scalar entry, and d=0d=0d=0, where for n>0n>0n>0 the matrix indexing set is empty.

QAlgorithms.Papers.Independent.Extend50.P09.RetainedConfigurations

For natural numbers d,nd,nd,n and a finite set S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1}, a retained configuration is a function S→{0,…,d−1}S\to\{0,\ldots,d-1\}S→{0,…,d−1}, assigning one alphabet symbol to each site in SSS. If SSS is empty, there is exactly one such configuration, including when d=0d=0d=0; if d=0d=0d=0 and SSS is nonempty, there are none.

QAlgorithms.Papers.Independent.Extend50.P09.SUGroup

For any natural numbers d,nd,nd,n and complex matrix VVV indexed by length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this predicate means that V†V=IV^\dagger V=IV†V=I, det⁡V=1\det V=1detV=1, and, for every complex d×dd\times dd×d matrix UUU satisfying U†U=IU^\dagger U=IU†U=I and det⁡U=1\det U=1detU=1, one has VCn(U)=Cn(U)VVC_n(U)=C_n(U)VVCn​(U)=Cn​(U)V, where Cn(U)a,b=∏i=0n−1Uai,biC_n(U)_{a,b}=\prod_{i=0}^{n-1}U_{a_i,b_i}Cn​(U)a,b​=∏i=0n−1​Uai​,bi​​. For n=0n=0n=0, VVV is a scalar matrix and the determinant condition forces its entry to equal 111. If d=0d=0d=0 and n>0n>0n>0, the indexing space is empty and these conditions hold for its unique matrix.

QAlgorithms.Papers.Independent.Extend50.P09.SULocationPerformance

For an arbitrary natural number ddd, a Boolean worst\mathrm{worst}worst, and an arbitrary family (μn)(\mu_n)(μn​) of measures on complex matrices indexed by ddd-ary words of length nnn, this predicate says that for every real η>0\eta>0η>0 there exist real constants C,c>0C,c>0C,c>0 and a natural number n0n_0n0​ such that, for every natural n≥n0n\ge n_0n≥n0​, every supplied hypothesis n≥2n\ge2n≥2, every Young diagram λ\lambdaλ with n−1n-1n−1 cells and at most ddd rows satisfying

ηn≤n−λ0\eta n\le n-\lambda_0ηn≤n−λ0​

(where λ0\lambda_0λ0​ is its first row length), and every unit vector ψ∈Crλ\psi\in\mathbb C^{r_\lambda}ψ∈Crλ​, the following bounds hold. Here rλr_\lambdarλ​ is the complex dimension of the supplied Specht space and ℓλ\ell_\lambdaℓλ​ is the dimension of the supplied Schur space. More explicitly, number the diagram’s cells by 0,…,n−20,\ldots,n-20,…,n−2; let Rλ,CλR_\lambda,C_\lambdaRλ​,Cλ​ be the permutations preserving respectively each cell’s row and column. The Specht space is the range of the matrix on permutations with entries ∑a∈Rλ,b∈Cλsgn⁡(b)1g=hab\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)\mathbf1_{g=hab}∑a∈Rλ​,b∈Cλ​​sgn(b)1g=hab​, and the Schur space is the range of ∑a∈Rλ,b∈Cλsgn⁡(b)Tab\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)T_{ab}∑a∈Rλ​,b∈Cλ​​sgn(b)Tab​, where (Tgv)(x)=v(x∘g)(T_gv)(x)=v(x\circ g)(Tg​v)(x)=v(x∘g). Using the supplied orthonormal bases eλ,re_{\lambda,r}eλ,r​ and fλ,lf_{\lambda,l}fλ,l​ of these spaces, form the synthesis matrix, over all diagrams with n−1n-1n−1 cells and at most ddd rows,

Yx,(λ,r,l)=∑geλ,r(g)(Tgfλ,l)(x),D=(Y†Y)−1/2Y†.Y_{x,(\lambda,r,l)} =\sum_g e_{\lambda,r}(g)(T_gf_{\lambda,l})(x), \qquad D=(Y^\dagger Y)^{-1/2}Y^\dagger.Yx,(λ,r,l)​=g∑​eλ,r​(g)(Tg​fλ,l​)(x),D=(Y†Y)−1/2Y†.

The inverse square root here is continuous functional calculus with scalar value (x)−1(\sqrt{x})^{-1}(x​)−1, including value zero at x=0x=0x=0. Define vectors vl(x)=∑rD(λ,r,l),x‾ψrv_l(x)=\sum_r\overline{D_{(\lambda,r,l),x}}\psi_rvl​(x)=∑r​D(λ,r,l),x​​ψr​ and the ancillary matrix

Aλ,ψ=1ℓλ∑l=0ℓλ−1∣vl⟩⟨vl∣,bn=d2−12n+Cn2.A_{\lambda,\psi}=\frac1{\ell_\lambda}\sum_{l=0}^{\ell_\lambda-1}|v_l\rangle\langle v_l|, \qquad b_n=\frac{\sqrt{d^2-1}}{2n}+\frac{C}{n^2}.Aλ,ψ​=ℓλ​1​l=0∑ℓλ​−1​∣vl​⟩⟨vl​∣,bn​=2nd2−1​​+n2C​.

For a physical matrix UUU, encode a single logical ddd-level register by X↦U(X⊗Aλ,ψ)U†X\mapsto U(X\otimes A_{\lambda,\psi})U^\daggerX↦U(X⊗Aλ,ψ​)U†. Write CS,U\mathcal C_{S,U}CS,U​ for its output after tracing out SSS, and, for real weights pS≥0p_S\ge0pS​≥0 summing to one and vanishing unless ∣S∣=1|S|=1∣S∣=1, write Cp,U\mathcal C_{p,U}Cp,U​ for the map with SSS-diagonal block pSCS,U(X)p_S\mathcal C_{S,U}(X)pS​CS,U​(X) and zero blocks between distinct flags. Define Eworst(C:L→B)\mathcal E_{\mathrm{worst}}(\mathcal C:L\to B)Eworst​(C:L→B) by infimizing over maps D:B→L\mathcal D:B\to LD:B→L of the form ∑jKj(⋅)Kj†\sum_jK_j(\cdot)K_j^\dagger∑j​Kj​(⋅)Kj†​, with finitely many KjK_jKj​ and ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. For worst=false\mathrm{worst}=\mathrm{false}worst=false, the minimized quantity is P(∣ΦL⟩⟨ΦL∣,(idL⊗D∘C)(∣ΦL⟩⟨ΦL∣))P(|\Phi_L\rangle\langle\Phi_L|,(\mathrm{id}_L\otimes\mathcal D\circ\mathcal C)(|\Phi_L\rangle\langle\Phi_L|))P(∣ΦL​⟩⟨ΦL​∣,(idL​⊗D∘C)(∣ΦL​⟩⟨ΦL​∣)), where ΦL(x,y)=d−1/21x=y\Phi_L(x,y)=d^{-1/2}\mathbf1_{x=y}ΦL​(x,y)=d−1/21x=y​; for worst=true\mathrm{worst}=\mathrm{true}worst=true, replace this quantity by its supremum over all unit vectors on L×LL\times LL×L. In both cases

P(ρ,σ)=1−(Re⁡Tr⁡ρ σρ)2.P(\rho,\sigma)= \sqrt{1-\left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}\right)^2}.P(ρ,σ)=1−(ReTrρ​σρ​​)2​.

The required conclusions are

(μn ⁣{U:∃S, ∣S∣=1, bn<Eworst(CS,U) or ∃p, bn<Eworst(Cp,U)})toReal≤e−cn,∀p,∫Eworst(Cp,U) dμn(U)≤bn.\left(\mu_n\!\left\{U: \exists S,\ |S|=1,\ b_n<\mathcal E_{\mathrm{worst}}(\mathcal C_{S,U}) \ \text{or}\ \exists p,\ b_n<\mathcal E_{\mathrm{worst}}(\mathcal C_{p,U}) \right\}\right)^{\mathrm{toReal}} \le e^{-cn}, \qquad \forall p,\quad \int\mathcal E_{\mathrm{worst}}(\mathcal C_{p,U})\,d\mu_n(U)\le b_n.(μn​{U:∃S, ∣S∣=1, bn​<Eworst​(CS,U​) or ∃p, bn​<Eworst​(Cp,U​)})toReal≤e−cn,∀p,∫Eworst​(Cp,U​)dμn​(U)≤bn​.

The first event permits its witnessing SSS or ppp to depend on UUU; the second bound holds for each fixed admissible ppp. The constants and n0n_0n0​ precede all choices of diagram, vector, and location law. This definition assumes neither probability normalization nor unitary support of μn\mu_nμn​, and states no separate integrability condition; the real measure conversion sends +∞+\infty+∞ to zero. It imposes no restriction d≥2d\ge2d≥2: for d=0d=0d=0 there are no eligible diagrams when n≥2n\ge2n≥2, and for d=1d=1d=1 the diagram inequality fails for all sufficiently large nnn. A zero-dimensional Specht space admits no unit vector, and division by a zero Schur dimension uses the total convention 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Extend50.P09.SUPerformance

For a Boolean flag www, any natural number ddd, and a family (μn)(\mu_n)(μn​) of measures on all complex matrices on ddd-ary words of length nnn, this defines the following proposition. For every real η>0\eta>0η>0, there exist real constants C,c>0C,c>0C,c>0 and a natural number n0n_0n0​ such that, for every n≥n0n\ge n_0n≥n0​, every supplied witness of 2≤n2\le n2≤n, every Young diagram λ\lambdaλ with n−1n-1n−1 cells and first-column length at most ddd satisfying

ηn≤n−rowLen⁡λ(0),\eta n\le n-\operatorname{rowLen}_\lambda(0),ηn≤n−rowLenλ​(0),

every vector ψ∈Crλ\psi\in\mathbb C^{r_\lambda}ψ∈Crλ​ of norm one, and every subset S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1} of cardinality one,

∫Ew(CV) dμn(V)≤bn,μn{V:bn<Ew(CV)}real≤e−cn,bn=d2−12n+Cn2.\int E_w(\mathcal C_V)\,d\mu_n(V)\le b_n,\qquad \mu_n\{V:b_n<E_w(\mathcal C_V)\}^{\mathrm{real}}\le e^{-cn}, \qquad b_n=\frac{\sqrt{d^2-1}}{2n}+\frac{C}{n^2}.∫Ew​(CV​)dμn​(V)≤bn​,μn​{V:bn​<Ew​(CV​)}real≤e−cn,bn​=2nd2−1​​+n2C​.

The map CV\mathcal C_VCV​ adjoins the matrix Aλ,ψ\mathcal A_{\lambda,\psi}Aλ,ψ​ on n−1n-1n−1 coordinates to a logical matrix on one ddd-dimensional coordinate, conjugates by VVV, and traces out the coordinates in SSS. The ancillary matrix is

Aλ,ψ=ℓλ−1∑l<ℓλ∣vl⟩⟨vl∣,vl(x)=∑r<rλD(λ,r,l),x‾ψr.\mathcal A_{\lambda,\psi} =\ell_\lambda^{-1}\sum_{l<\ell_\lambda}|v_l\rangle\langle v_l|, \qquad v_l(x)=\sum_{r<r_\lambda}\overline{\mathcal D_{(\lambda,r,l),x}}\psi_r.Aλ,ψ​=ℓλ−1​l<ℓλ​∑​∣vl​⟩⟨vl​∣,vl​(x)=r<rλ​∑​D(λ,r,l),x​​ψr​.

Its ingredients are defined for all Young diagrams μ\muμ of size n−1n-1n−1 and first-column length at most ddd: using their fixed cell numberings, let Rμ,CμR_\mu,C_\muRμ​,Cμ​ preserve rows and columns, define Yμ(g,h)=∑a∈Rμ,b∈Cμsgn⁡(b)1{g=hab}Y_\mu(g,h)=\sum_{a\in R_\mu,b\in C_\mu}\operatorname{sgn}(b)\mathbf1_{\{g=hab\}}Yμ​(g,h)=∑a∈Rμ​,b∈Cμ​​sgn(b)1{g=hab}​, let Tg(y,x)=1{y=x∘g−1}T_g(y,x)=\mathbf1_{\{y=x\circ g^{-1}\}}Tg​(y,x)=1{y=x∘g−1}​, and set Aμ=∑a,bsgn⁡(b)TabA_\mu=\sum_{a,b}\operatorname{sgn}(b)T_{ab}Aμ​=∑a,b​sgn(b)Tab​. Then rμ,ℓμr_\mu,\ell_\murμ​,ℓμ​ are the dimensions of the ranges of Yμ,AμY_\mu,A_\muYμ​,Aμ​. For their fixed selected orthonormal bases erμ,flμe^\mu_r,f^\mu_lerμ​,flμ​, set

Hx,(μ,r,l)=∑g∈Sn−1erμ(g)(Tgflμ)(x),D=f(H†H)H†,f(u)=(u)−1,H_{x,(\mu,r,l)} =\sum_{g\in S_{n-1}}e^\mu_r(g)(T_gf^\mu_l)(x), \qquad \mathcal D=f(H^\dagger H)H^\dagger,\quad f(u)=(\sqrt u)^{-1},Hx,(μ,r,l)​=g∈Sn−1​∑​erμ​(g)(Tg​flμ​)(x),D=f(H†H)H†,f(u)=(u​)−1,

with continuous functional calculus and f(0)=0f(0)=0f(0)=0. For a map C\mathcal CC from the logical system to the surviving system, the recovery errors in the assertion are

Efalse(C)=inf⁡Dd ⁣(∣Φd⟩⟨Φd∣,(id⁡⊗(D∘C))(∣Φd⟩⟨Φd∣)),Etrue(C)=inf⁡Dsup⁡∥ξ∥=1d ⁣(∣ξ⟩⟨ξ∣,(id⁡⊗(D∘C))(∣ξ⟩⟨ξ∣)),\begin{aligned} E_{\mathrm{false}}(\mathcal C) &=\inf_D d\!\left(|\Phi_d\rangle\langle\Phi_d|, (\operatorname{id}\otimes(D\circ\mathcal C)) (|\Phi_d\rangle\langle\Phi_d|)\right),\\ E_{\mathrm{true}}(\mathcal C) &=\inf_D\sup_{\|\xi\|=1}d\!\left(|\xi\rangle\langle\xi|, (\operatorname{id}\otimes(D\circ\mathcal C)) (|\xi\rangle\langle\xi|)\right), \end{aligned}Efalse​(C)Etrue​(C)​=Dinf​d(∣Φd​⟩⟨Φd​∣,(id⊗(D∘C))(∣Φd​⟩⟨Φd​∣)),=Dinf​∥ξ∥=1sup​d(∣ξ⟩⟨ξ∣,(id⊗(D∘C))(∣ξ⟩⟨ξ∣)),​

where Φd(x,y)=d−1/21{x=y}\Phi_d(x,y)=d^{-1/2}\mathbf1_{\{x=y\}}Φd​(x,y)=d−1/21{x=y}​, ξ\xiξ ranges over vectors on two copies of the logical system, and DDD ranges over channels back to it. Channels have finite Kraus forms X↦∑jKjXKj†X\mapsto\sum_jK_jXK_j^\daggerX↦∑j​Kj​XKj†​ with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I; the identity extension acts on reference-indexed matrix blocks. The distance is

d(ρ,σ)=1−(Re⁡Tr⁡ρ σρ)2,d(\rho,\sigma)= \sqrt{1-\left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt\rho\,\sigma\sqrt\rho}\right)^2},d(ρ,σ)=1−(ReTrρ​σρ​​)2​,

with real square roots zero on negative arguments. No probability, support, unitarity, or integrability assumption on μn\mu_nμn​ is included in this predicate; integration is the total Bochner integral, and extended measure values are converted to real numbers with infinity sent to zero. The constants and n0n_0n0​ are chosen before λ,ψ,S\lambda,\psi,Sλ,ψ,S. There is no assumption d≥2d\ge2d≥2: if there are no eligible diagrams or unit vectors, the corresponding universal requirements are vacuous; an ancillary sum with ℓλ=0\ell_\lambda=0ℓλ​=0 defines zero.

QAlgorithms.Papers.Independent.Extend50.P09.StarIndex

For any type JJJ and any function r:J→Nr:J\to\mathbb Nr:J→N, this abbreviates the dependent set of triples

{(j,v,w):j∈J, 0≤v<r(j), 0≤w<r(j)}.\{(j,v,w):j\in J,\ 0\le v<r(j),\ 0\le w<r(j)\}.{(j,v,w):j∈J, 0≤v<r(j), 0≤w<r(j)}.

Neither finiteness nor nonemptiness of JJJ is assumed, and a label jjj with r(j)=0r(j)=0r(j)=0 contributes no triples.

QAlgorithms.Papers.Independent.Extend50.P09.SymmetryBlockCoordinates

For any type JJJ and any functions l,r:J→Nl,r:J\to\mathbb Nl,r:J→N, this abbreviates the dependent set of triples

{(j,u,v):j∈J, 0≤u<l(j), 0≤v<r(j)}.\{(j,u,v):j\in J,\ 0\le u<l(j),\ 0\le v<r(j)\}.{(j,u,v):j∈J, 0≤u<l(j), 0≤v<r(j)}.

Neither finiteness nor nonemptiness of JJJ is assumed. A label jjj contributes no triples if either l(j)=0l(j)=0l(j)=0 or r(j)=0r(j)=0r(j)=0.

QAlgorithms.Papers.Independent.Extend50.P09.U1Group

For every natural number nnn and complex matrix UUU indexed by binary words of length nnn, this predicate means precisely that U†U=IU^\dagger U=IU†U=I and UQn=QnUUQ_n=Q_nUUQn​=Qn​U, where QnQ_nQn​ is the diagonal matrix with entry ∑i=0n−1xi\sum_{i=0}^{n-1}x_i∑i=0n−1​xi​ at word xxx. Here U†U^\daggerU† denotes conjugate transpose. For n=0n=0n=0, Qn=0Q_n=0Qn​=0, so the predicate requires only that the single scalar entry of UUU have modulus 111.

QAlgorithms.Papers.Independent.Extend50.P09.U1LocationPerformance

For a Boolean worst\mathrm{worst}worst and an arbitrary family (μn)n∈N(\mu_n)_{n\in\mathbb N}(μn​)n∈N​ of measures on complex matrices indexed by binary words of length nnn, this predicate has the following meaning; it does not itself require those measures to be probability measures or to be supported on unitaries. For every real aaa with 0<a<10<a<10<a<1, there exist real constants C,c>0C,c>0C,c>0 such that, for every four sequences Ni,ki,ti,αiN_i,k_i,t_i,\alpha_iNi​,ki​,ti​,αi​ of natural numbers satisfying Ni→∞N_i\to\inftyNi​→∞,

qi:=ki sti2Ni⟶0,s={1,worst=true,2,worst=false,q_i:=\frac{k_i^{\,s}t_i^2}{N_i}\longrightarrow0, \qquad s=\begin{cases}1,&\mathrm{worst}=\mathrm{true},\\2,&\mathrm{worst}=\mathrm{false},\end{cases}qi​:=Ni​kis​ti2​​⟶0,s={1,2,​worst=true,worst=false,​

and, for every iii,

0<Ni,0<ki≤Ni,0<ti≤Ni,αi≤Ni−ki,αi=aNi,0<N_i,\quad 0<k_i\le N_i,\quad 0<t_i\le N_i,\quad \alpha_i\le N_i-k_i,\quad \alpha_i=aN_i,0<Ni​,0<ki​≤Ni​,0<ti​≤Ni​,αi​≤Ni​−ki​,αi​=aNi​,

there is an index i0i_0i0​ such that the following holds for every i≥i0i\ge i_0i≥i0​, every supplied proof of ki≤Nik_i\le N_iki​≤Ni​, and every complex unit vector ψ\psiψ on binary words of length Ni−kiN_i-k_iNi​−ki​ whose amplitude is zero on every word whose number of ones differs from αi\alpha_iαi​. Define

bi={kiti,worst=true,tiki,worst=false4Nia(1−a)(1+Cqi).b_i= \frac{\begin{cases} k_i\sqrt{t_i},&\mathrm{worst}=\mathrm{true},\\ \sqrt{t_i k_i},&\mathrm{worst}=\mathrm{false} \end{cases}} {4N_i\sqrt{a(1-a)}}(1+Cq_i).bi​=4Ni​a(1−a)​{ki​ti​​,ti​ki​​,​worst=true,worst=false​​(1+Cqi​).

For a physical matrix UUU, encode a logical matrix XXX as U(X⊗∣ψ⟩⟨ψ∣)U†U(X\otimes|\psi\rangle\langle\psi|)U^\daggerU(X⊗∣ψ⟩⟨ψ∣)U†, with XXX on the first kik_iki​ sites, and let CS,U\mathcal C_{S,U}CS,U​ be the result after tracing out the sites in SSS. For any real probability weights pSp_SpS​ on subsets, supported on ∣S∣=ti|S|=t_i∣S∣=ti​, let Cp,U\mathcal C_{p,U}Cp,U​ be the flagged channel whose SSS-diagonal block is pSCS,U(X)p_S\mathcal C_{S,U}(X)pS​CS,U​(X) and whose blocks between different flags vanish. For any such map C:L→B\mathcal C:L\to BC:L→B, define Eworst(C)\mathcal E_{\mathrm{worst}}(\mathcal C)Eworst​(C) by infimizing over finite Kraus channels D:B→L\mathcal D:B\to LD:B→L: when worst=false\mathrm{worst}=\mathrm{false}worst=false, minimize the distance between ∣ΦL⟩⟨ΦL∣|\Phi_L\rangle\langle\Phi_L|∣ΦL​⟩⟨ΦL​∣ and its image under idL⊗(D∘C)\mathrm{id}_L\otimes(\mathcal D\circ\mathcal C)idL​⊗(D∘C); when worst=true\mathrm{worst}=\mathrm{true}worst=true, first take the supremum of that distance over all unit vectors on L×LL\times LL×L, using the same D\mathcal DD. Here ΦL(x,y)=∣L∣−1/21x=y\Phi_L(x,y)=|L|^{-1/2}\mathbf1_{x=y}ΦL​(x,y)=∣L∣−1/21x=y​, a finite Kraus channel has the form ∑jKj(⋅)Kj†\sum_jK_j(\cdot)K_j^\dagger∑j​Kj​(⋅)Kj†​ with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I, and the distance is

P(ρ,σ)=1−(Re⁡Tr⁡ρ σρ)2,P(\rho,\sigma)= \sqrt{1-\left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}\right)^2},P(ρ,σ)=1−(ReTrρ​σρ​​)2​,

with functional-calculus matrix square roots. The two required conclusions are

(μNi ⁣{U:∃S, ∣S∣=ti, bi<Eworst(CS,U),or ∃p, bi<Eworst(Cp,U)})toReal≤e−cNi,∀p,∫Eworst(Cp,U) dμNi(U)≤bi.\left(\mu_{N_i}\!\left\{U: \begin{array}{l} \exists S,\ |S|=t_i,\ b_i<\mathcal E_{\mathrm{worst}}(\mathcal C_{S,U}),\\ \text{or }\exists p,\ b_i<\mathcal E_{\mathrm{worst}}(\mathcal C_{p,U}) \end{array}\right\}\right)^{\mathrm{toReal}} \le e^{-cN_i}, \qquad \forall p,\quad \int \mathcal E_{\mathrm{worst}}(\mathcal C_{p,U})\,d\mu_{N_i}(U)\le b_i.(μNi​​{U:∃S, ∣S∣=ti​, bi​<Eworst​(CS,U​),or ∃p, bi​<Eworst​(Cp,U​)​})toReal≤e−cNi​,∀p,∫Eworst​(Cp,U​)dμNi​​(U)≤bi​.

The existentially quantified ppp in the event may depend on UUU, whereas the integral statement holds separately for every fixed admissible ppp. The notation toReal\mathrm{toReal}toReal converts an extended nonnegative measure value to a real number and sends +∞+\infty+∞ to zero; the integral is the total Bochner integral, with no separate integrability hypothesis in this predicate. The threshold i0i_0i0​ may depend on the four sequences, but precedes the choices of ψ\psiψ and ppp. The exact integer equality αi=aNi\alpha_i=aN_iαi​=aNi​, required at every index, makes the sequence hypotheses impossible for irrational aaa.

QAlgorithms.Papers.Independent.Extend50.P09.U1Performance

For a Boolean flag www and a family (μn)n∈N(\mu_n)_{n\in\mathbb N}(μn​)n∈N​ of measures on all complex matrices indexed by binary words of length nnn, this defines the following proposition. For every real aaa with 0<a<10<a<10<a<1, there exist real constants C,c>0C,c>0C,c>0 such that, for every four sequences Ni,ki,ti,αiN_i,k_i,t_i,\alpha_iNi​,ki​,ti​,αi​ of natural numbers satisfying

Ni⟶∞,rw(Ni,ki,ti)⟶0,N_i\longrightarrow\infty,\qquad r_w(N_i,k_i,t_i)\longrightarrow0,Ni​⟶∞,rw​(Ni​,ki​,ti​)⟶0,

and, for every iii,

0<Ni,0<ki≤Ni,0<ti≤Ni,αi≤Ni−ki,αi=aNi,0<N_i,\quad 0<k_i\le N_i,\quad 0<t_i\le N_i,\quad \alpha_i\le N_i-k_i,\quad \alpha_i=aN_i,0<Ni​,0<ki​≤Ni​,0<ti​≤Ni​,αi​≤Ni​−ki​,αi​=aNi​,

there is an index i0i_0i0​ such that the following holds for every i≥i0i\ge i_0i≥i0​, every supplied witness of ki≤Nik_i\le N_iki​≤Ni​, every unit vector ψ\psiψ on binary words of length Ni−kiN_i-k_iNi​−ki​ whose amplitudes vanish outside words of Hamming weight αi\alpha_iαi​, and every subset S⊆{0,…,Ni−1}S\subseteq\{0,\ldots,N_i-1\}S⊆{0,…,Ni​−1} of cardinality tit_iti​:

∫Ew(CU) dμNi(U)≤bi,μNi{U:bi<Ew(CU)}real≤e−cNi,\int E_w(\mathcal C_U)\,d\mu_{N_i}(U)\le b_i,\qquad \mu_{N_i}\{U:b_i<E_w(\mathcal C_U)\}^{\mathrm{real}} \le e^{-cN_i},∫Ew​(CU​)dμNi​​(U)≤bi​,μNi​​{U:bi​<Ew​(CU​)}real≤e−cNi​,

where

rw(N,k,t)={kt2/N,w=true,k2t2/N,w=false,bi={kiti,w=true,tiki,w=false4Nia(1−a) (1+Crw(Ni,ki,ti)).r_w(N,k,t)= \begin{cases}kt^2/N,&w=\mathrm{true},\\ k^2t^2/N,&w=\mathrm{false},\end{cases} \qquad b_i= \frac{\begin{cases}k_i\sqrt{t_i},&w=\mathrm{true},\\ \sqrt{t_i k_i},&w=\mathrm{false}\end{cases}} {4N_i\sqrt{a(1-a)}}\, \bigl(1+C r_w(N_i,k_i,t_i)\bigr).rw​(N,k,t)={kt2/N,k2t2/N,​w=true,w=false,​bi​=4Ni​a(1−a)​{ki​ti​​,ti​ki​​,​w=true,w=false​​(1+Crw​(Ni​,ki​,ti​)).

Here CU\mathcal C_UCU​ sends a logical matrix ρ\rhoρ on the first kik_iki​ binary coordinates to the matrix obtained by adjoining ∣ψ⟩⟨ψ∣|\psi\rangle\langle\psi|∣ψ⟩⟨ψ∣ on the remaining coordinates, conjugating by UUU, and tracing out precisely the coordinates in SSS; the surviving coordinates are ScS^cSc. The notation ∣v⟩⟨v∣|v\rangle\langle v|∣v⟩⟨v∣ means the matrix with entries vxvy‾v_x\overline{v_y}vx​vy​​. For any such map C\mathcal CC, define

Efalse(C)=inf⁡Dd ⁣(∣Φ⟩⟨Φ∣,(id⁡⊗(D∘C))(∣Φ⟩⟨Φ∣)),Etrue(C)=inf⁡Dsup⁡∥ξ∥=1d ⁣(∣ξ⟩⟨ξ∣,(id⁡⊗(D∘C))(∣ξ⟩⟨ξ∣)).\begin{aligned} E_{\mathrm{false}}(\mathcal C) &=\inf_D d\!\left(|\Phi\rangle\langle\Phi|, (\operatorname{id}\otimes(D\circ\mathcal C)) (|\Phi\rangle\langle\Phi|)\right),\\ E_{\mathrm{true}}(\mathcal C) &=\inf_D\sup_{\|\xi\|=1} d\!\left(|\xi\rangle\langle\xi|, (\operatorname{id}\otimes(D\circ\mathcal C)) (|\xi\rangle\langle\xi|)\right). \end{aligned}Efalse​(C)Etrue​(C)​=Dinf​d(∣Φ⟩⟨Φ∣,(id⊗(D∘C))(∣Φ⟩⟨Φ∣)),=Dinf​∥ξ∥=1sup​d(∣ξ⟩⟨ξ∣,(id⊗(D∘C))(∣ξ⟩⟨ξ∣)).​

Both infima range over channels from the surviving system to the logical system; the supremum ranges over vectors on two copies of the logical system; Φ=2−ki/2∑x∣x,x⟩\Phi=2^{-k_i/2}\sum_x|x,x\rangleΦ=2−ki​/2∑x​∣x,x⟩; and id⁡⊗Λ\operatorname{id}\otimes\Lambdaid⊗Λ applies Λ\LambdaΛ to each matrix block indexed by the reference coordinates. A channel is a map X↦∑jKjXKj†X\mapsto\sum_jK_jXK_j^\daggerX↦∑j​Kj​XKj†​ for a finite family satisfying ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. The distance used here is

d(ρ,σ)=1−(Re⁡Tr⁡ρ σρ)2.d(\rho,\sigma)= \sqrt{1-\left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}\right)^2}.d(ρ,σ)=1−(ReTrρ​σρ​​)2​.

The real square root is zero on negative arguments. The superscript “real” on a measure value means conversion from the extended nonnegative reals, with infinite mass converted to zero. The definition itself imposes no probability, support, unitarity, or integrability assumptions on the measures; the integrals use the total Bochner integral. The constants C,cC,cC,c precede the choice of sequences, while i0i_0i0​ precedes the choices of ψ\psiψ and SSS. The exact integer condition αi=aNi\alpha_i=aN_iαi​=aNi​ can make the sequence hypotheses impossible—for example when aaa is irrational—in which case that implication is vacuous.

QAlgorithms.Papers.Independent.Extend50.P09.append

For natural numbers d,n,kd,n,kd,n,k, a hypothesis k≤nk\le nk≤n, and any complex matrix AAA indexed by the words of length n−kn-kn−k over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, define a function from matrices on length-kkk words to matrices on length-nnn words by

[AA(ρ)]a,b=ρa<k,b<k Aa≥k,b≥k,[\mathcal A_A(\rho)]_{a,b} =\rho_{a_{<k},b_{<k}}\,A_{a_{\ge k},b_{\ge k}},[AA​(ρ)]a,b​=ρa<k​,b<k​​Aa≥k​,b≥k​​,

where a<k(i)=aia_{<k}(i)=a_ia<k​(i)=ai​ for i<ki<ki<k, and a≥k(i)=ak+ia_{\ge k}(i)=a_{k+i}a≥k​(i)=ak+i​ for i<n−ki<n-ki<n−k, with the same definitions for bbb. No positivity or normalization assumption is imposed on AAA or ρ\rhoρ. If k=nk=nk=n, AAA is a matrix on the singleton consisting of the empty word, so the function scales ρ\rhoρ by its sole entry; if k=0k=0k=0, it scales AAA by the sole entry of ρ\rhoρ. Zero alphabet sizes are also included, with a singleton word set at length 000 and an empty word set at positive length.

QAlgorithms.Papers.Independent.Extend50.P09.appendUnitaryEncoder

For natural numbers d,n,kd,n,kd,n,k, a hypothesis k≤nk\le nk≤n, any complex matrix AAA on length-n−kn-kn−k words, and any complex matrix UUU on length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, define the function

ρ⟼U TA(ρ) U†,[TA(ρ)]a,b=ρa<k,b<kAa≥k,b≥k,\rho\longmapsto U\,T_A(\rho)\,U^\dagger, \qquad [T_A(\rho)]_{a,b} =\rho_{a_{<k},b_{<k}}A_{a_{\ge k},b_{\ge k}},ρ⟼UTA​(ρ)U†,[TA​(ρ)]a,b​=ρa<k​,b<k​​Aa≥k​,b≥k​​,

where a<k(i)=aia_{<k}(i)=a_ia<k​(i)=ai​ and a≥k(i)=ak+ia_{\ge k}(i)=a_{k+i}a≥k​(i)=ak+i​, and likewise for bbb. Here ρ\rhoρ is any complex matrix on length-kkk words and U†U^\daggerU† is the conjugate transpose. No unitarity hypothesis is imposed on UUU, and neither AAA nor ρ\rhoρ is required to be a density matrix. The cases k=0k=0k=0, k=nk=nk=n, n=0n=0n=0, and d=0d=0d=0 are included, using the unique empty word whenever a register has length 000.

QAlgorithms.Papers.Independent.Extend50.P09.avgBasis

For arbitrary natural numbers n,t,qn,t,qn,t,q, this defines a complex diagonal matrix indexed by binary words v∈{0,1}tv\in\{0,1\}^tv∈{0,1}t, with diagonal entries

( n\dotminust q−w(v))(nq),w(v)=∑ℓ=0t−1vℓ,\frac{\binom{\,n\mathbin{\dotminus}t\,}{q-w(v)}}{\binom nq}, \qquad w(v)=\sum_{\ell=0}^{t-1}v_\ell,(qn​)(q−w(v)n\dotminust​)​,w(v)=ℓ=0∑t−1​vℓ​,

and all off-diagonal entries equal to 000. The displayed real values are embedded in C\mathbb CC. Here n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), q−w(v)q-w(v)q−w(v) is an integer difference, out-of-range binomial coefficients are 000, and division by 000 is 000. Consequently the matrix is zero when q>nq>nq>n. No condition t≤nt\le nt≤n is imposed, and t=0t=0t=0 gives a matrix on the single empty word.

QAlgorithms.Papers.Independent.Extend50.P09.avgChoi

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, let Wr={0,1}r\mathcal W_r=\{0,1\}^rWr​={0,1}r, represented as functions from {0,…,r−1}\{0,\ldots,r-1\}{0,…,r−1} to {0,1}\{0,1\}{0,1}, and put w(u)=∑ℓ=0r−1uℓw(u)=\sum_{\ell=0}^{r-1}u_\ellw(u)=∑ℓ=0r−1​uℓ​. This defines the complex diagonal matrix AAA indexed by Wk×Wt\mathcal W_k\times\mathcal W_tWk​×Wt​, with entries

A(u,v),(u′,v′)={2−k( n\dotminust w(u)+α−w(v))(nw(u)+α),(u,v)=(u′,v′),0,otherwise.A_{(u,v),(u',v')}= \begin{cases} \displaystyle 2^{-k}\frac{\binom{\,n\mathbin{\dotminus}t\,}{w(u)+\alpha-w(v)}}{\binom n{w(u)+\alpha}}, &(u,v)=(u',v'),\\ 0,&\text{otherwise}. \end{cases}A(u,v),(u′,v′)​=⎩⎨⎧​2−k(w(u)+αn​)(w(u)+α−w(v)n\dotminust​)​,0,​(u,v)=(u′,v′),otherwise.​

The displayed real diagonal value is embedded in C\mathbb CC. Here n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), the numerator’s lower argument is an integer difference, out-of-range binomial coefficients are 000, and division by 000 is 000. No relation among the parameters or normalization condition is assumed; zero-length words are included and have weight 000.

QAlgorithms.Papers.Independent.Extend50.P09.avgFullChoi

For arbitrary natural numbers n,k,αn,k,\alphan,k,α, let Πr,q\Pi_{r,q}Πr,q​ be the diagonal matrix indexed by binary words u∈{0,1}ru\in\{0,1\}^ru∈{0,1}r, with diagonal entry 111 when ∑ℓ=0r−1uℓ=q\sum_{\ell=0}^{r-1}u_\ell=q∑ℓ=0r−1​uℓ​=q and 000 otherwise. This defines the complex matrix indexed by {0,1}k×{0,1}n\{0,1\}^k\times\{0,1\}^n{0,1}k×{0,1}n

2−k∑j=0k(nj+α)−1(Πk,j⊗Πn,j+α).2^{-k}\sum_{j=0}^{k}\binom n{j+\alpha}^{-1} \bigl(\Pi_{k,j}\otimes\Pi_{n,j+\alpha}\bigr).2−kj=0∑k​(j+αn​)−1(Πk,j​⊗Πn,j+α​).

The binomial coefficients and the power of 222 are interpreted in C\mathbb CC, with integer exponent −k-k−k, and the inverse of 000 is 000. Thus terms with j+α>nj+\alpha>nj+α>n contribute 000. No relation among n,k,αn,k,\alphan,k,α or normalization hypothesis is imposed, and n=0n=0n=0 and k=0k=0k=0 are included.

QAlgorithms.Papers.Independent.Extend50.P09.basisDistance

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, write w(u)w(u)w(u) for the number of 111 coordinates of a binary word and define

h(q,i)=( n\dotminust q−i)(nq),c(i)=2−k∑j=0k(kj) h(j+α,i).h(q,i)=\frac{\binom{\,n\mathbin{\dotminus}t\,}{q-i}}{\binom nq}, \qquad c(i)=2^{-k}\sum_{j=0}^{k}\binom kj\,h(j+\alpha,i).h(q,i)=(qn​)(q−in\dotminust​)​,c(i)=2−kj=0∑k​(jk​)h(j+α,i).

Here n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), the numerator’s lower argument is an integer difference, out-of-range binomial coefficients are 000, and division by 000 is 000. Let DqD_qDq​ and CCC be diagonal matrices on {0,1}t\{0,1\}^t{0,1}t with entries h(q,w(v))h(q,w(v))h(q,w(v)) and c(w(v))c(w(v))c(w(v)), respectively. This defines

max⁡u∈{0,1}k 1−(Re⁡Tr⁡Dw(u)+α C Dw(u)+α)2 .\max_{u\in\{0,1\}^k} \sqrt{\,1- \left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{D_{w(u)+\alpha}}\,C\,\sqrt{D_{w(u)+\alpha}}}\right)^2\,}.u∈{0,1}kmax​1−(ReTrDw(u)+α​​CDw(u)+α​​​)2​.

Matrix square roots use continuous functional calculus, and a real square root of a negative number is 000. No parameter inequalities or normalization assumptions are required. The maximum is over a finite nonempty set even when k=0k=0k=0, when its sole element is the empty word.

QAlgorithms.Papers.Independent.Extend50.P09.blockProjector

Let JJJ be any finite type, let d,n∈Nd,n\in\mathbb Nd,n∈N, let l,r:J→Nl,r:J\to\mathbb Nl,r:J→N, and write Wd,n={0,…,d−1}{0,…,n−1}\mathcal W_{d,n}=\{0,\ldots,d-1\}^{\{0,\ldots,n-1\}}Wd,n​={0,…,d−1}{0,…,n−1}. For any complex matrix SSS whose rows are triples (j,u,v)(j,u,v)(j,u,v) with u<l(j)u<l(j)u<l(j) and v<r(j)v<r(j)v<r(j), and whose columns are words in Wd,n\mathcal W_{d,n}Wd,n​, and for any j∈Jj\in Jj∈J, this defines the square matrix PjP_jPj​ on Wd,n\mathcal W_{d,n}Wd,n​ by

(Pj)a,b=∑u=0l(j)−1∑v=0r(j)−1S(j,u,v),a‾ S(j,u,v),b.(P_j)_{a,b} =\sum_{u=0}^{l(j)-1}\sum_{v=0}^{r(j)-1} \overline{S_{(j,u,v),a}}\,S_{(j,u,v),b}.(Pj​)a,b​=u=0∑l(j)−1​v=0∑r(j)−1​S(j,u,v),a​​S(j,u,v),b​.

No isometry or unitarity assumption on SSS is part of this definition. If l(j)=0l(j)=0l(j)=0 or r(j)=0r(j)=0r(j)=0, the matrix is zero. The word set has one element when n=0n=0n=0, including when d=0d=0d=0, and is empty when d=0<nd=0<nd=0<n.

QAlgorithms.Papers.Independent.Extend50.P09.chargeHammingWeight

For every natural number nnn and word x:{0,…,n−1}→{0,1}x:\{0,\ldots,n-1\}\to\{0,1\}x:{0,…,n−1}→{0,1}, this defines its charge to be ∑i=0n−1xi\sum_{i=0}^{n-1}x_i∑i=0n−1​xi​, using the natural-number values of the symbols. Equivalently, it counts the coordinates equal to 111. For n=0n=0n=0, the unique empty word has charge 000.

QAlgorithms.Papers.Independent.Extend50.P09.chargeRotation

For every natural number nnn and real number θ\thetaθ, this defines the complex diagonal matrix indexed by binary words of length nnn with diagonal entries exp⁡ ⁣(−iθ∑i=0n−1xi)\exp\!\left(-\mathrm{i}\theta\sum_{i=0}^{n-1}x_i\right)exp(−iθ∑i=0n−1​xi​) at words xxx, and zero off-diagonal entries. For n=0n=0n=0, it is the identity on the one-dimensional space indexed by the empty word.

QAlgorithms.Papers.Independent.Extend50.P09.choiError

For any finite types L,BL,BL,B with decidable equality and any function CCC from complex L×LL\times LL×L matrices to complex B×BB\times BB×B matrices, define its error to be inf⁡Dp(ββ†,RD(ββ†))\inf_D p(\beta\beta^\dagger,\mathcal R_D(\beta\beta^\dagger))infD​p(ββ†,RD​(ββ†)). Here β∈CL×L\beta\in\mathbb C^{L\times L}β∈CL×L has amplitude βℓ,u=∣L∣−1/2\beta_{\ell,u}=|L|^{-1/2}βℓ,u​=∣L∣−1/2 when ℓ=u\ell=uℓ=u and 000 otherwise; RD(X)(ℓ,a),(ℓ′,a′)=[D(C(Xℓ,ℓ′))]a,a′\mathcal R_D(X)_{(\ell,a),(\ell',a')}=[D(C(X_{\ell,\ell'}))]_{a,a'}RD​(X)(ℓ,a),(ℓ′,a′)​=[D(C(Xℓ,ℓ′​))]a,a′​, where Xℓ,ℓ′(u,v)=X(ℓ,u),(ℓ′,v)X_{\ell,\ell'}(u,v)=X_{(\ell,u),(\ell',v)}Xℓ,ℓ′​(u,v)=X(ℓ,u),(ℓ′,v)​; and DDD ranges over functions admitting a finite Kraus representation D(Y)=∑j=0s−1KjYKj†D(Y)=\sum_{j=0}^{s-1}K_jYK_j^\daggerD(Y)=∑j=0s−1​Kj​YKj†​, with s∈Ns\in\mathbb Ns∈N, KjK_jKj​ an L×BL\times BL×B complex matrix, and ∑jKj†Kj=IB\sum_jK_j^\dagger K_j=I_B∑j​Kj†​Kj​=IB​. The function p(A,H)p(A,H)p(A,H) is 1−F(A,H)2\sqrt{1-F(A,H)^2}1−F(A,H)2​, where F(A,H)=Re⁡tr⁡S(S(A)HS(A))F(A,H)=\operatorname{Re}\operatorname{tr}\mathcal S(\mathcal S(A)H\mathcal S(A))F(A,H)=RetrS(S(A)HS(A)) and S\mathcal SS denotes real continuous functional calculus with the scalar square root; the outer real square root is 000 on negative arguments. The infimum is a real infimum and need not be attained. No channel condition is imposed on CCC, and neither type is assumed nonempty; for empty LLL, β\betaβ is the zero vector, and if no such DDD exists, the defining set is empty and its total real infimum is 000.

QAlgorithms.Papers.Independent.Extend50.P09.choiGammaCoefficient

For natural numbers n,k,tn,k,tn,k,t with k≤nk\le nk≤n and t≤nt\le nt≤n, arbitrary natural numbers α,i\alpha,iα,i, any complex Euclidean vector ψ\psiψ on binary words of length n−kn-kn−k, and binary words a,b,r,ea,b,r,ea,b,r,e of lengths n,t,k,tn,t,k,tn,t,k,t, respectively, this defines the complex number

∑0≤j≤ni≤j, j−i≤tα≤j, j−α≤k(tj−i)(kj−α)2k(nj) Bt,j−i(b,e) Bk,j−α(a<k,r) ψ(a≥k),\sum_{\substack{0\le j\le n\\ i\le j,\ j-i\le t\\ \alpha\le j,\ j-\alpha\le k}} \sqrt{\frac{\binom t{j-i}\binom k{j-\alpha}} {2^k\binom n j}}\, B_{t,j-i}(b,e)\, B_{k,j-\alpha}(a_{<k},r)\, \psi(a_{\ge k}),0≤j≤ni≤j, j−i≤tα≤j, j−α≤k​∑​2k(jn​)(j−it​)(j−αk​)​​Bt,j−i​(b,e)Bk,j−α​(a<k​,r)ψ(a≥k​),

where a<ka_{<k}a<k​ and a≥ka_{\ge k}a≥k​ are its prefix and suffix, and

Bs,q(x,y)={((sq))−1,x=y and x has q ones,0,otherwise.B_{s,q}(x,y)= \begin{cases} (\sqrt{\binom s q})^{-1},&x=y\text{ and }x\text{ has }q\text{ ones},\\ 0,&\text{otherwise}. \end{cases}Bs,q​(x,y)={((qs​)​)−1,0,​x=y and x has q ones,otherwise.​

All real factors are regarded as complex. No normalization of ψ\psiψ is assumed. The summation conditions ensure the displayed subtractions do not underflow and all binomial denominators are positive. Zero lengths are allowed; if i>ni>ni>n or α>n\alpha>nα>n, the value is zero.

QAlgorithms.Papers.Independent.Extend50.P09.choiKappaValue

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, with no inequalities imposed among them, this defines the real number

∑i=0 n\dotminust(∑j=0nCt(j−i) Ck(j−α)2k(nj))2,Cs(h)={(sh),h∈Z, h≥0,0,h<0,\sum_{i=0}^{\,n\mathbin{\dotminus}t} \left( \sum_{j=0}^{n} \frac{C_t(j-i)\,C_k(j-\alpha)} {\sqrt{2^k\binom n j}} \right)^2, \qquad C_s(h)= \begin{cases} \binom s h,&h\in\mathbb Z,\ h\ge0,\\ 0,&h<0, \end{cases}i=0∑n\dotminust​​j=0∑n​2k(jn​)​Ct​(j−i)Ck​(j−α)​​2,Cs​(h)={(hs​),0,​h∈Z, h≥0,h<0,​

where binomial coefficients are regarded as real and are zero when the lower nonnegative index exceeds the upper index. The differences j−ij-ij−i and j−αj-\alphaj−α are integer differences, while n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0) is truncated natural subtraction. Thus, even when t>nt>nt>n, the outer sum contains the term i=0i=0i=0. Zero parameters are included, and every denominator in the inner sum is positive because 0≤j≤n0\le j\le n0≤j≤n.

QAlgorithms.Papers.Independent.Extend50.P09.choiLambda

For natural numbers n,k,tn,k,tn,k,t satisfying k≤nk\le nk≤n and t≤nt\le nt≤n, and any complex Euclidean vector ψ\psiψ on binary words of length n−kn-kn−k, this defines a matrix indexed by ({0,1}n×{0,1}n)×({0,1}k×{0,1}t)(\{0,1\}^n\times\{0,1\}^n)\times(\{0,1\}^k\times\{0,1\}^t)({0,1}n×{0,1}n)×({0,1}k×{0,1}t). Its entry at row ((a,b),(r,u))((a,b),(r,u))((a,b),(r,u)) and column ((c,d),(s,v))((c,d),(s,v))((c,d),(s,v)) is

{2−kψ(a≥k)ψ(c≥k)‾(nw(a))(nw(c)),w(a)=w(b),w(c)=w(d),r=a<k,s=c<k,u=b<t,v=d<t,b≥t=d≥t,0,otherwise.\begin{cases} \displaystyle \frac{2^{-k}\psi(a_{\ge k})\overline{\psi(c_{\ge k})}} {\sqrt{\binom n{w(a)}\binom n{w(c)}}}, & \begin{gathered} w(a)=w(b),\quad w(c)=w(d),\\ r=a_{<k},\quad s=c_{<k},\\ u=b_{<t},\quad v=d_{<t},\quad b_{\ge t}=d_{\ge t}, \end{gathered}\\ 0,&\text{otherwise}. \end{cases}⎩⎨⎧​(w(a)n​)(w(c)n​)​2−kψ(a≥k​)ψ(c≥k​)​​,0,​w(a)=w(b),w(c)=w(d),r=a<k​,s=c<k​,u=b<t​,v=d<t​,b≥t​=d≥t​,​otherwise.​

Here a,b,c,da,b,c,da,b,c,d have length nnn, r,sr,sr,s have length kkk, u,vu,vu,v have length ttt, www counts 111's, and each prefix or suffix selects the indicated coordinates. No normalization of ψ\psiψ is required. All zero-length cases are included, with empty words interpreted uniquely.

QAlgorithms.Papers.Independent.Extend50.P09.choiMarginalCoefficient

For arbitrary natural numbers n,k,t,α,in,k,t,\alpha,in,k,t,α,i, this defines the real coefficient

2−k∑j=0k(kj) ( n\dotminust j+α−i)(nj+α).2^{-k}\sum_{j=0}^{k}\binom kj\, \frac{\binom{\,n\mathbin{\dotminus}t\,}{j+\alpha-i}}{\binom n{j+\alpha}}.2−kj=0∑k​(jk​)(j+αn​)(j+α−in\dotminust​)​.

Here n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), the numerator’s lower argument is an integer difference, binomial coefficients outside their usual range are 000, and division by 000 is 000. The power 2−k2^{-k}2−k uses the integer exponent −k-k−k. There are no further restrictions on the parameters; for k=0k=0k=0 the sum contains just the term j=0j=0j=0, and terms with j+α>nj+\alpha>nj+α>n contribute 000.

QAlgorithms.Papers.Independent.Extend50.P09.choiMarginalState

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, this defines a complex diagonal matrix indexed by binary words v∈{0,1}tv\in\{0,1\}^tv∈{0,1}t, whose diagonal entry at vvv is the real number

2−k∑j=0k(kj) ( n\dotminust j+α−w(v))(nj+α)2^{-k}\sum_{j=0}^{k}\binom kj\, \frac{\binom{\,n\mathbin{\dotminus}t\,}{j+\alpha-w(v)}}{\binom n{j+\alpha}}2−kj=0∑k​(jk​)(j+αn​)(j+α−w(v)n\dotminust​)​

embedded in C\mathbb CC; all off-diagonal entries are 000. Here w(v)w(v)w(v) is the sum of the ttt binary coordinates, n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), the numerator’s lower argument is an integer difference, out-of-range binomial coefficients are 000, and division by 000 is 000. No parameter inequalities or trace normalization are required. If k=0k=0k=0, the sum has one term; if t=0t=0t=0, the matrix has one index, the empty word.

QAlgorithms.Papers.Independent.Extend50.P09.chooseZ

For every natural number nnn and integer jjj, this defines

chooseZ⁡(n,j)={(nj),j≥0,0,j<0,\operatorname{chooseZ}(n,j)= \begin{cases} \binom nj,&j\ge0,\\ 0,&j<0, \end{cases}chooseZ(n,j)={(jn​),0,​j≥0,j<0,​

with the binomial coefficient regarded as a real number. When j≥0j\ge0j≥0, its integer value is converted to a natural number before taking the binomial coefficient. Thus the value is also 000 when j>nj>nj>n; n=0n=0n=0 is included.

QAlgorithms.Papers.Independent.Extend50.P09.collectiveQuditAction

For any natural numbers d,nd,nd,n and arbitrary complex d×dd\times dd×d matrix UUU, this defines the matrix indexed by length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} whose entry at words a,ba,ba,b is ∏i=0n−1Uai,bi\prod_{i=0}^{n-1}U_{a_i,b_i}∏i=0n−1​Uai​,bi​​. No unitarity assumption is imposed on UUU. When n=0n=0n=0, the empty product gives the one-by-one matrix with entry 111, including when d=0d=0d=0; when d=0d=0d=0 and n>0n>0n>0, there are no indexing words.

QAlgorithms.Papers.Independent.Extend50.P09.comparatorDistance

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, write w(u)w(u)w(u) for the number of 111 coordinates in a binary word, and set

h(q,i)=( n\dotminust q−i)(nq),c(i)=2−k∑j=0k(kj) h(j+α,i).h(q,i)=\frac{\binom{\,n\mathbin{\dotminus}t\,}{q-i}}{\binom nq}, \qquad c(i)=2^{-k}\sum_{j=0}^{k}\binom kj\,h(j+\alpha,i).h(q,i)=(qn​)(q−in\dotminust​)​,c(i)=2−kj=0∑k​(jk​)h(j+α,i).

Here natural subtraction n\dotminustn\mathbin{\dotminus}tn\dotminust means max⁡(n−t,0)\max(n-t,0)max(n−t,0), the numerator’s lower argument is an integer difference, out-of-range binomial coefficients are 000, and division by 000 is 000. Define diagonal matrices A,BA,BA,B on pairs (u,v)∈{0,1}k×{0,1}t(u,v)\in\{0,1\}^k\times\{0,1\}^t(u,v)∈{0,1}k×{0,1}t by diagonal entries 2−kh(w(u)+α,w(v))2^{-k}h(w(u)+\alpha,w(v))2−kh(w(u)+α,w(v)) and 2−kc(w(v))2^{-k}c(w(v))2−kc(w(v)). The definition returns

 1−(Re⁡Tr⁡A B A)2 ,\sqrt{\,1- \left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt A\,B\,\sqrt A}\right)^2\,},1−(ReTrA​BA​​)2​,

with matrix square roots defined by continuous functional calculus. There are no parameter inequalities or normalization assumptions; all zero parameters are included. The outer square root is the total real square-root function, which returns 000 for a negative argument.

QAlgorithms.Papers.Independent.Extend50.P09.comparatorFidelity

For arbitrary natural numbers n,k,t,αn,k,t,\alphan,k,t,α, write w(u)w(u)w(u) for the number of 111 coordinates in a binary word uuu, and define

h(q,i)=( n\dotminust q−i)(nq),c(i)=2−k∑j=0k(kj) h(j+α,i).h(q,i)=\frac{\binom{\,n\mathbin{\dotminus}t\,}{q-i}}{\binom nq}, \qquad c(i)=2^{-k}\sum_{j=0}^{k}\binom kj\,h(j+\alpha,i).h(q,i)=(qn​)(q−in\dotminust​)​,c(i)=2−kj=0∑k​(jk​)h(j+α,i).

Here n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), lower arguments such as q−iq-iq−i are integer differences, out-of-range binomial coefficients are 000, and division by 000 is 000. Let AAA and BBB be diagonal matrices indexed by pairs (u,v)∈{0,1}k×{0,1}t(u,v)\in\{0,1\}^k\times\{0,1\}^t(u,v)∈{0,1}k×{0,1}t, with diagonal entries 2−kh(w(u)+α,w(v))2^{-k}h(w(u)+\alpha,w(v))2−kh(w(u)+α,w(v)) and 2−kc(w(v))2^{-k}c(w(v))2−kc(w(v)), respectively. This definition returns

Re⁡Tr⁡A B A,\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt A\,B\,\sqrt A},ReTrA​BA​​,

where matrix square roots are given by continuous functional calculus. In particular, the factor 2−k2^{-k}2−k in BBB comes from the matrix 2−kI2^{-k}I2−kI on the kkk-bit register. No parameter restrictions or trace-one assumptions are imposed, and zero-length registers are allowed.

QAlgorithms.Papers.Independent.Extend50.P09.concat

For natural numbers d,n,td,n,td,n,t with t≤nt\le nt≤n, let Wds={0,…,d−1}{0,…,s−1}W_d^s=\{0,\ldots,d-1\}^{\{0,\ldots,s-1\}}Wds​={0,…,d−1}{0,…,s−1}. Given words x∈Wdtx\in W_d^tx∈Wdt​ and z∈Wdn−tz\in W_d^{n-t}z∈Wdn−t​, this defines their concatenation c∈Wdnc\in W_d^nc∈Wdn​ by

ci={xi,i<t,zi−t,t≤i<n.c_i=\begin{cases}x_i,&i<t,\\ z_{i-t},&t\le i<n.\end{cases}ci​={xi​,zi−t​,​i<t,t≤i<n.​

Zero lengths are allowed: t=0t=0t=0 gives zzz, and t=nt=nt=n gives xxx. If d=0d=0d=0, words of positive length do not exist, while the length-zero word is unique.

QAlgorithms.Papers.Independent.Extend50.P09.constantCoeff11

For every natural number α\alphaα, including α=0\alpha=0α=0, this defines the real number

constantCoeff11⁡(α)=−2−22 α+α(2α+1)+(α+1)(2α+1)22.\operatorname{constantCoeff11}(\alpha)= \frac{-\sqrt2-2\sqrt2\,\alpha+ \sqrt{\alpha(2\alpha+1)}+ \sqrt{(\alpha+1)(2\alpha+1)}}{2\sqrt2}.constantCoeff11(α)=22​−2​−22​α+α(2α+1)​+(α+1)(2α+1)​​.

QAlgorithms.Papers.Independent.Extend50.P09.constantCoeff22

For every natural number α\alphaα, including α=0\alpha=0α=0, this defines the real number

constantCoeff22⁡(α)=−2−2α+α(α+1)+(α+1)(α+2)2.\operatorname{constantCoeff22}(\alpha)= \frac{-2-2\alpha+\sqrt{\alpha(\alpha+1)} +\sqrt{(\alpha+1)(\alpha+2)}}2.constantCoeff22(α)=2−2−2α+α(α+1)​+(α+1)(α+2)​​.

QAlgorithms.Papers.Independent.Extend50.P09.embeddedSchurSpechtVector

For natural numbers d,md,md,m, a Young diagram λ\lambdaλ with mmm cells and first-column length at most ddd, an arbitrary vector ψ∈Crλ\psi\in\mathbb C^{r_\lambda}ψ∈Crλ​, and an index l∈{0,…,ℓλ−1}l\in\{0,\ldots,\ell_\lambda-1\}l∈{0,…,ℓλ​−1}, this defines a vector on ddd-ary words xxx of length mmm by

vλ,ψ,l(x)=∑r=0rλ−1D(λ,r,l),x‾ ψr.v_{\lambda,\psi,l}(x) =\sum_{r=0}^{r_\lambda-1} \overline{\mathcal D_{(\lambda,r,l),x}}\,\psi_r.vλ,ψ,l​(x)=r=0∑rλ​−1​D(λ,r,l),x​​ψr​.

Here the matrix D\mathcal DD is specified as follows, without an assumed unitarity property. For each Young diagram μ\muμ with mmm cells and first-column length at most ddd, use its fixed cell numbering to form the row-preserving and column-preserving permutation sets Rμ,CμR_\mu,C_\muRμ​,Cμ​. On complex functions on SmS_mSm​, let

Yμ(g,h)=∑a∈Rμ∑b∈Cμsgn⁡(b) 1{g=hab},Y_\mu(g,h)=\sum_{a\in R_\mu}\sum_{b\in C_\mu} \operatorname{sgn}(b)\,\mathbf1_{\{g=hab\}},Yμ​(g,h)=a∈Rμ​∑​b∈Cμ​∑​sgn(b)1{g=hab}​,

and on complex functions on ddd-ary words let

Tg(y,x)=1{y=x∘g−1},Aμ=∑a∈Rμ∑b∈Cμsgn⁡(b)Tab.T_g(y,x)=\mathbf1_{\{y=x\circ g^{-1}\}},\qquad A_\mu=\sum_{a\in R_\mu}\sum_{b\in C_\mu}\operatorname{sgn}(b)T_{ab}.Tg​(y,x)=1{y=x∘g−1}​,Aμ​=a∈Rμ​∑​b∈Cμ​∑​sgn(b)Tab​.

Set rμ=dim⁡Crange⁡(Yμ)r_\mu=\dim_{\mathbb C}\operatorname{range}(Y_\mu)rμ​=dimC​range(Yμ​) and ℓμ=dim⁡Crange⁡(Aμ)\ell_\mu=\dim_{\mathbb C}\operatorname{range}(A_\mu)ℓμ​=dimC​range(Aμ​), and denote by erμe^\mu_rerμ​ and flμf^\mu_lflμ​ the fixed orthonormal bases selected for these two ranges. With column index (μ,r,l)(\mu,r,l)(μ,r,l), form

Hx,(μ,r,l)=∑g∈Smerμ(g) (Tgflμ)(x),D=f(H†H)H†,f(u)=(u)−1,H_{x,(\mu,r,l)} =\sum_{g\in S_m}e^\mu_r(g)\,(T_g f^\mu_l)(x), \qquad \mathcal D=f(H^\dagger H)H^\dagger,\quad f(u)=(\sqrt u)^{-1},Hx,(μ,r,l)​=g∈Sm​∑​erμ​(g)(Tg​flμ​)(x),D=f(H†H)H†,f(u)=(u​)−1,

where f(H†H)f(H^\dagger H)f(H†H) uses continuous functional calculus and f(0)=0f(0)=0f(0)=0. The vector ψ\psiψ is not required to be normalized, and the resulting vector is not asserted to be normalized. Zero values of d,md,md,m are allowed whenever the supplied diagram and index exist; if rλ=0r_\lambda=0rλ​=0, the defining sum is empty and the resulting vector is zero, while if ℓλ=0\ell_\lambda=0ℓλ​=0, no index lll can be supplied.

QAlgorithms.Papers.Independent.Extend50.P09.erasureChoi

For natural numbers d,n,td,n,td,n,t with t≤nt\le nt≤n, let WdsW_d^sWds​ denote length-sss words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, and let a<ta_{<t}a<t​ and a≥ta_{\ge t}a≥t​ denote the first ttt and last n−tn-tn−t coordinates of a∈Wdna\in W_d^na∈Wdn​. This defines the complex matrix EEE indexed by Wdn×WdtW_d^n\times W_d^tWdn​×Wdt​ whose entries are

E(a,x),(b,y)={(dn)−1,a<t=x, b<t=y, a≥t=b≥t,0,otherwise.E_{(a,x),(b,y)} =\begin{cases} (d^n)^{-1},& a_{<t}=x,\ b_{<t}=y,\ a_{\ge t}=b_{\ge t},\\ 0,&\text{otherwise}. \end{cases}E(a,x),(b,y)​={(dn)−1,0,​a<t​=x, b<t​=y, a≥t​=b≥t​,otherwise.​

Equivalently, it starts with the vector having amplitude 1/dn1/\sqrt{d^n}1/dn​ on pairs of identical length-nnn words and zero elsewhere, forms its outer product, and sums over matching last n−tn-tn−t coordinates of the second register. All zero lengths are included; for n=t=0n=t=0n=t=0, the matrix has a single entry 111. For d=0<nd=0<nd=0<n, its indexing set is empty.

QAlgorithms.Papers.Independent.Extend50.P09.firstCoordinates

For natural numbers d,n,kd,n,kd,n,k, a hypothesis k≤nk\le nk≤n, and a word x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1}, define its first kkk coordinates to be the word i↦xii\mapsto x_ii↦xi​ for 0≤i<k0\le i<k0≤i<k. When k=0k=0k=0, this is the unique empty word; when k=nk=nk=n, it has all the coordinates of xxx.

QAlgorithms.Papers.Independent.Extend50.P09.firstTrace

For natural numbers d,n,td,n,td,n,t satisfying t≤nt\le nt≤n, write WdsW_d^sWds​ for the words of length sss over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. This defines a function from complex matrices indexed by WdnW_d^nWdn​ to complex matrices indexed by WdtW_d^tWdt​: for every input matrix XXX and x,y∈Wdtx,y\in W_d^tx,y∈Wdt​,

T(X)x,y=∑z∈Wdn−tXx∥z,  y∥z,\mathcal T(X)_{x,y} =\sum_{z\in W_d^{n-t}}X_{x\mathbin{\|}z,\;y\mathbin{\|}z},T(X)x,y​=z∈Wdn−t​∑​Xx∥z,y∥z​,

where x∥zx\mathbin{\|}zx∥z has coordinate xix_ixi​ for i<ti<ti<t and zi−tz_{i-t}zi−t​ otherwise. No positivity or normalization of XXX is required. When t=nt=nt=n, the sum has one term; when t=0t=0t=0, its sole output entry is tr⁡X\operatorname{tr}XtrX. Empty indexing sets are permitted, with empty sums equal to zero.

QAlgorithms.Papers.Independent.Extend50.P09.generalLambda

Let J,RJ,RJ,R be finite types, let d,n,t∈Nd,n,t\in\mathbb Nd,n,t∈N satisfy t≤nt\le nt≤n, let l,r:J→Nl,r:J\to\mathbb Nl,r:J→N, let SSS be a complex matrix with rows (j,u,v)(j,u,v)(j,u,v), u<l(j)u<l(j)u<l(j), v<r(j)v<r(j)v<r(j), and columns Wd,n={0,…,d−1}n\mathcal W_{d,n}=\{0,\ldots,d-1\}^nWd,n​={0,…,d−1}n, and let Ψ\PsiΨ be any square complex matrix on R×Wd,nR\times\mathcal W_{d,n}R×Wd,n​. Define

Ξ(j,v,w)(a,b)=dnr(j)∑u<l(j)S(j,u,v),aS(j,u,w),b‾.\Xi_{(j,v,w)}(a,b) =\sqrt{\frac{d^n}{r(j)}}\sum_{u<l(j)} S_{(j,u,v),a}\overline{S_{(j,u,w),b}}.Ξ(j,v,w)​(a,b)=r(j)dn​​u<l(j)∑​S(j,u,v),a​S(j,u,w),b​​.

For a word aaa, write a<ta_{<t}a<t​ for its first ttt coordinates and a≥ta_{\ge t}a≥t​ for its remaining n−tn-tn−t coordinates, and define

E(b,u),(e,v)=(dn)−11b<t=u1e<t=v1b≥t=e≥t.E_{(b,u),(e,v)} =(d^n)^{-1} \mathbf1_{b_{<t}=u}\mathbf1_{e_{<t}=v} \mathbf1_{b_{\ge t}=e_{\ge t}}.E(b,u),(e,v)​=(dn)−11b<t​=u​1e<t​=v​1b≥t​=e≥t​​.

This is the matrix obtained by applying the map that traces out the final n−tn-tn−t coordinates to the second half of the rank-one matrix of the vector having amplitude 1/dn1/\sqrt{d^n}1/dn​ on equal pairs of length-nnn words and zero elsewhere. The declaration defines a square matrix Λ\LambdaΛ on

{(j,v,w):j∈J, v,w<r(j)}×(R×Wd,t)\{(j,v,w):j\in J,\ v,w<r(j)\}\times(R\times\mathcal W_{d,t}){(j,v,w):j∈J, v,w<r(j)}×(R×Wd,t​)

by

Λ(ȷ,(h,u)),(ȷ′,(h′,v))=∑a,b,c,e∈Wd,nΞȷ(a,b)Ξȷ′(c,e)‾Ψ(h,a),(h′,c)E(b,u),(e,v).\Lambda_{(\jmath,(h,u)),(\jmath',(h',v))} = \sum_{a,b,c,e\in\mathcal W_{d,n}} \Xi_{\jmath}(a,b)\overline{\Xi_{\jmath'}(c,e)} \Psi_{(h,a),(h',c)}E_{(b,u),(e,v)}.Λ(,(h,u)),(′,(h′,v))​=a,b,c,e∈Wd,n​∑​Ξ​(a,b)Ξ′​(c,e)​Ψ(h,a),(h′,c)​E(b,u),(e,v)​.

No normalization, positivity, or unitarity assumption on Ψ\PsiΨ or SSS is imposed. Empty sums are zero, zero reciprocals are interpreted as zero, and the definition includes t=0t=0t=0, n=0n=0n=0, d=0d=0d=0, and empty JJJ or RRR.

QAlgorithms.Papers.Independent.Extend50.P09.generalXi

Let JJJ be any finite type, let d,n∈Nd,n\in\mathbb Nd,n∈N, let l,r:J→Nl,r:J\to\mathbb Nl,r:J→N, and let SSS be a complex matrix with rows (j,u,v)(j,u,v)(j,u,v), where u<l(j)u<l(j)u<l(j) and v<r(j)v<r(j)v<r(j), and columns length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. For an index ȷ=(j,v,w)\jmath=(j,v,w)=(j,v,w) with v,w<r(j)v,w<r(j)v,w<r(j), and any two such words a,ba,ba,b, this defines

Ξȷ(a,b)=dnr(j)∑u=0l(j)−1S(j,u,v),a S(j,u,w),b‾,\Xi_{\jmath}(a,b) = \sqrt{\frac{d^n}{r(j)}} \sum_{u=0}^{l(j)-1} S_{(j,u,v),a}\,\overline{S_{(j,u,w),b}},Ξ​(a,b)=r(j)dn​​u=0∑l(j)−1​S(j,u,v),a​S(j,u,w),b​​,

with the real square root regarded as a complex scalar. The existence of ȷ\jmath ensures r(j)>0r(j)>0r(j)>0; no positivity assumption on l(j)l(j)l(j) or isometry assumption on SSS is imposed, and the value is zero if l(j)=0l(j)=0l(j)=0. The definition includes n=0n=0n=0, with d0=1d^0=1d0=1, and d=0d=0d=0; for d=0<nd=0<nd=0<n, there are no words a,ba,ba,b.

QAlgorithms.Papers.Independent.Extend50.P09.hyper

For arbitrary natural numbers n,t,q,in,t,q,in,t,q,i, this defines

H(n,t,q,i)=( n\dotminust q−i)(nq),H(n,t,q,i)=\frac{\binom{\,n\mathbin{\dotminus}t\,}{q-i}}{\binom nq},H(n,t,q,i)=(qn​)(q−in\dotminust​)​,

where n\dotminust=max⁡(n−t,0)n\mathbin{\dotminus}t=\max(n-t,0)n\dotminust=max(n−t,0), the lower argument q−iq-iq−i in the numerator is an integer difference, and a binomial coefficient with negative lower argument or lower argument exceeding its upper argument is defined to be 000. Both coefficients are converted to real numbers before division. Division by 000 has value 000, so in particular H(n,t,q,i)=0H(n,t,q,i)=0H(n,t,q,i)=0 whenever q>nq>nq>n. No restriction such as t≤nt\le nt≤n, q≤nq\le nq≤n, or i≤qi\le qi≤q is assumed, and zero parameters are allowed.

QAlgorithms.Papers.Independent.Extend50.P09.initialChoi

For natural numbers n,kn,kn,k satisfying k≤nk\le nk≤n, and any complex Euclidean vector ψ\psiψ indexed by binary words of length n−kn-kn−k, this defines a vector Φ\PhiΦ indexed by pairs (r,a)(r,a)(r,a) of binary words of lengths kkk and nnn, respectively, by

Φ(r,a)={2−k/2ψ(a≥k),r=a<k,0,otherwise,\Phi(r,a)= \begin{cases} 2^{-k/2}\psi(a_{\ge k}),&r=a_{<k},\\ 0,&\text{otherwise}, \end{cases}Φ(r,a)={2−k/2ψ(a≥k​),0,​r=a<k​,otherwise,​

where a<k=(a0,…,ak−1)a_{<k}=(a_0,\ldots,a_{k-1})a<k​=(a0​,…,ak−1​) and a≥k=(ak,…,an−1)a_{\ge k}=(a_k,\ldots,a_{n-1})a≥k​=(ak​,…,an−1​). There is no normalization or support assumption on ψ\psiψ. The cases k=0k=0k=0, k=nk=nk=n, and n=0n=0n=0 are included, using the unique empty word for every length-zero register.

QAlgorithms.Papers.Independent.Extend50.P09.insertAt

For natural numbers d,td,td,t, a site j∈{0,…,t−1}j\in\{0,\ldots,t-1\}j∈{0,…,t−1}, an arbitrary complex d×dd\times dd×d matrix ρ\rhoρ, and an arbitrary complex matrix τ\tauτ indexed by length-(t−1)(t-1)(t−1) words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this defines a matrix on length-ttt words by

insertAt⁡(j,ρ,τ)a,b=ρaj,bj τa∖j,b∖j,(a∖j)i={ai,i<j,ai+1,i≥j.\operatorname{insertAt}(j,\rho,\tau)_{a,b} =\rho_{a_j,b_j}\,\tau_{a^{\setminus j},b^{\setminus j}}, \qquad (a^{\setminus j})_i= \begin{cases} a_i,&i<j,\\ a_{i+1},&i\ge j. \end{cases}insertAt(j,ρ,τ)a,b​=ρaj​,bj​​τa∖j,b∖j​,(a∖j)i​={ai​,ai+1​,​i<j,i≥j.​

Thus the word supplied to τ\tauτ is obtained by deleting site jjj, preserving the order of the other sites. No positivity, trace, or normalization conditions are imposed. The argument jjj forces t≥1t\ge1t≥1; when t=1t=1t=1, τ\tauτ is indexed by the unique empty word and contributes a scalar. When d=0d=0d=0, the length-ttt indexing set is empty.

QAlgorithms.Papers.Independent.Extend50.P09.isotypicState

For implicit natural numbers d,md,md,m and a Young diagram λ\lambdaλ having exactly mmm cells and first-column length at most ddd, this defines a matrix on words {0,…,d−1}m\{0,\ldots,d-1\}^m{0,…,d−1}m by

ρλ=1ℓλrλPλ,Pλ=rλm!∑π∈Smχλ(π−1)Tπ,(Tπ)y,x=1y=x∘π−1.\rho_\lambda=\frac1{\ell_\lambda r_\lambda}P_\lambda, \qquad P_\lambda=\frac{r_\lambda}{m!} \sum_{\pi\in S_m}\chi_\lambda(\pi^{-1})T_\pi, \qquad (T_\pi)_{y,x}=\mathbf1_{y=x\circ\pi^{-1}}.ρλ​=ℓλ​rλ​1​Pλ​,Pλ​=m!rλ​​π∈Sm​∑​χλ​(π−1)Tπ​,(Tπ​)y,x​=1y=x∘π−1​.

The quantities here are defined as follows: use the fixed bijection between the cells of λ\lambdaλ and {0,…,m−1}\{0,\ldots,m-1\}{0,…,m−1} chosen by the finite-cardinality equivalence; let Rλ,Cλ⊆SmR_\lambda,C_\lambda\subseteq S_mRλ​,Cλ​⊆Sm​ be the permutations preserving, respectively, the row and column of each numbered cell. Let Yλ=∑a∈Rλ,b∈Cλsgn⁡(b)TabY_\lambda=\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)T_{ab}Yλ​=∑a∈Rλ​,b∈Cλ​​sgn(b)Tab​, and let ℓλ\ell_\lambdaℓλ​ be the complex dimension of its range. On CSm\mathbb C^{S_m}CSm​, form the matrix JλJ_\lambdaJλ​ with entries (Jλ)g,h=∑a∈Rλ,b∈Cλsgn⁡(b)1g=hab(J_\lambda)_{g,h}=\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)\mathbf1_{g=hab}(Jλ​)g,h​=∑a∈Rλ​,b∈Cλ​​sgn(b)1g=hab​; let SλS_\lambdaSλ​ be its range, rλ=dim⁡CSλr_\lambda=\dim_{\mathbb C}S_\lambdarλ​=dimC​Sλ​, and Πλ\Pi_\lambdaΠλ​ the orthogonal projection onto SλS_\lambdaSλ​. Finally, χλ(π)=Tr⁡(LπΠλ)\chi_\lambda(\pi)=\operatorname{Tr}(L_\pi\Pi_\lambda)χλ​(π)=Tr(Lπ​Πλ​), where (Lπ)g,h=1g=πh(L_\pi)_{g,h}=\mathbf1_{g=\pi h}(Lπ​)g,h​=1g=πh​. No positivity or normalization assertion is included in this definition. Values d=0d=0d=0 and m=0m=0m=0 are not excluded, although a diagram satisfying the stated constraints must exist; if ℓλrλ=0\ell_\lambda r_\lambda=0ℓλ​rλ​=0, its reciprocal is defined as zero.

QAlgorithms.Papers.Independent.Extend50.P09.joinSites

For natural numbers d,nd,nd,n, a finite set S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1}, a configuration a:S→{0,…,d−1}a:S\to\{0,\ldots,d-1\}a:S→{0,…,d−1}, and a configuration b:Sc→{0,…,d−1}b:S^c\to\{0,\ldots,d-1\}b:Sc→{0,…,d−1}, define their joined length-nnn word xxx by xi=aix_i=a_ixi​=ai​ for i∈Si\in Si∈S and xi=bix_i=b_ixi​=bi​ for i∉Si\notin Si∈/S, where the complement is taken among the nnn sites. This includes S=∅S=\varnothingS=∅, when the result is bbb, and SSS equal to all sites, when the result is aaa. For n=0n=0n=0, all three configurations are the unique empty function; for d=0<nd=0<nd=0<n, no pair of configurations a,ba,ba,b exists.

QAlgorithms.Papers.Independent.Extend50.P09.jointUnitaryEntryMoment

For any finite index type III, any natural number sss, four functions a,b,c,e:{0,…,s−1}→Ia,b,c,e:\{0,\ldots,s-1\}\to Ia,b,c,e:{0,…,s−1}→I, and any complex matrix UUU indexed by I×II\times II×I, this defines

Ms,a,b,c,e(U)=(∏i=0s−1Uai,bi)(∏i=0s−1Uci,ei)‾.M_{s,a,b,c,e}(U) =\left(\prod_{i=0}^{s-1}U_{a_i,b_i}\right) \overline{\left(\prod_{i=0}^{s-1}U_{c_i,e_i}\right)}.Ms,a,b,c,e​(U)=(i=0∏s−1​Uai​,bi​​)(i=0∏s−1​Uci​,ei​​)​.

No unitarity assumption on UUU is present. Repeated indices are allowed. For s=0s=0s=0, both products are empty and the value is 111; if III is empty and s>0s>0s>0, the required index functions do not exist.

QAlgorithms.Papers.Independent.Extend50.P09.ldim

For arbitrary natural numbers d,nd,nd,n and a Young diagram λ\lambdaλ with nnn cells and first-column length at most ddd, this defines ℓλ\ell_\lambdaℓλ​ to be the complex dimension of the range of an operator on complex functions on words x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1}. Using the fixed numbering of the cells of λ\lambdaλ, let RλR_\lambdaRλ​ and CλC_\lambdaCλ​ be the permutations preserving each cell’s row and column, respectively. For π∈Sn\pi\in S_nπ∈Sn​, set

Tπ(y,x)={1,y=x∘π−1,0,otherwise.T_\pi(y,x)= \begin{cases}1,&y=x\circ\pi^{-1},\\0,&\text{otherwise}.\end{cases}Tπ​(y,x)={1,0,​y=x∘π−1,otherwise.​

Then the definition is

Aλ=∑a∈Rλ∑b∈Cλsgn⁡(b) Tab,ℓλ=dim⁡Crange⁡(Aλ).A_\lambda=\sum_{a\in R_\lambda}\sum_{b\in C_\lambda} \operatorname{sgn}(b)\,T_{ab}, \qquad \ell_\lambda=\dim_{\mathbb C}\operatorname{range}(A_\lambda).Aλ​=a∈Rλ​∑​b∈Cλ​∑​sgn(b)Tab​,ℓλ​=dimC​range(Aλ​).

No positivity assumptions on d,nd,nd,n are present. At n=0n=0n=0, the word set contains the unique empty word, including when d=0d=0d=0; at d=0<nd=0<nd=0<n, no admissible λ\lambdaλ exists.

QAlgorithms.Papers.Independent.Extend50.P09.locationFailure

For arbitrary natural numbers d,n,k,td,n,k,td,n,k,t, a Boolean worst\mathrm{worst}worst, a hypothesis k≤nk\le nk≤n, an arbitrary complex matrix anc\mathrm{anc}anc on the words {0,…,d−1} n−k\{0,\ldots,d-1\}^{\,n-k}{0,…,d−1}n−k, a real number bbb, and an arbitrary complex matrix UUU on the words {0,…,d−1} n\{0,\ldots,d-1\}^{\,n}{0,…,d−1}n, this predicate says that at least one of two kinds of recovery error exceeds bbb, strictly. To specify the errors, for a channel candidate C\mathcal CC from a logical register LLL to an output register BBB, put

Eworst(C)={inf⁡D a channel B→L sup⁡∥ψ∥=1P ⁣(∣ψ⟩⟨ψ∣,(idL⊗(D∘C))(∣ψ⟩⟨ψ∣)),worst=true,inf⁡D a channel B→LP ⁣(∣ΦL⟩⟨ΦL∣,(idL⊗(D∘C))(∣ΦL⟩⟨ΦL∣)),worst=false,\mathcal E_{\mathrm{worst}}(\mathcal C)= \begin{cases} \displaystyle\inf_{\mathcal D\text{ a channel }B\to L} \ \sup_{\|\psi\|=1} P\!\left(|\psi\rangle\langle\psi|, (\mathrm{id}_L\otimes(\mathcal D\circ\mathcal C)) (|\psi\rangle\langle\psi|)\right),&\mathrm{worst}=\mathrm{true},\\[2mm] \displaystyle\inf_{\mathcal D\text{ a channel }B\to L} P\!\left(|\Phi_L\rangle\langle\Phi_L|, (\mathrm{id}_L\otimes(\mathcal D\circ\mathcal C)) (|\Phi_L\rangle\langle\Phi_L|)\right),&\mathrm{worst}=\mathrm{false}, \end{cases}Eworst​(C)=⎩⎨⎧​D a channel B→Linf​ ∥ψ∥=1sup​P(∣ψ⟩⟨ψ∣,(idL​⊗(D∘C))(∣ψ⟩⟨ψ∣)),D a channel B→Linf​P(∣ΦL​⟩⟨ΦL​∣,(idL​⊗(D∘C))(∣ΦL​⟩⟨ΦL​∣)),​worst=true,worst=false,​

where the supremum ranges over complex unit vectors on L×LL\times LL×L, ΦL(ℓ,ℓ′)=∣L∣−1/2\Phi_L(\ell,\ell')=|L|^{-1/2}ΦL​(ℓ,ℓ′)=∣L∣−1/2 when ℓ=ℓ′\ell=\ell'ℓ=ℓ′ and is zero otherwise, and

P(ρ,σ)=1−(Re⁡Tr⁡ρ σρ)2.P(\rho,\sigma)= \sqrt{1-\left(\operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{\rho}\,\sigma\sqrt{\rho}}\right)^2}.P(ρ,σ)=1−(ReTrρ​σρ​​)2​.

The square roots are the supplied continuous functional calculus and real square root; in particular, the latter returns zero on negative inputs. A channel here means a map X↦∑jKjXKj†X\mapsto\sum_j K_jXK_j^\daggerX↦∑j​Kj​XKj†​ with finitely many matrices KjK_jKj​ satisfying ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. Let AU(X)=U(X⊗anc)U†\mathcal A_U(X)=U(X\otimes\mathrm{anc})U^\daggerAU​(X)=U(X⊗anc)U†, placing XXX on the first kkk sites. For a set SSS of physical sites, let CS,U(X)=Tr⁡SAU(X)\mathcal C_{S,U}(X)=\operatorname{Tr}_{S}\mathcal A_U(X)CS,U​(X)=TrS​AU​(X), whose output consists of the coordinates outside SSS. The first alternative is

∃S⊆{0,…,n−1},∣S∣=tandb<Eworst(CS,U).\exists S\subseteq\{0,\ldots,n-1\},\qquad |S|=t \quad\text{and}\quad b<\mathcal E_{\mathrm{worst}}(\mathcal C_{S,U}).∃S⊆{0,…,n−1},∣S∣=tandb<Eworst​(CS,U​).

The second alternative is the existence of real numbers pS≥0p_S\ge0pS​≥0, indexed by all subsets of the physical sites, with ∑SpS=1\sum_Sp_S=1∑S​pS​=1 and pS=0p_S=0pS​=0 whenever ∣S∣≠t|S|\ne t∣S∣=t, such that b<Eworst(Cp,U)b<\mathcal E_{\mathrm{worst}}(\mathcal C_{p,U})b<Eworst​(Cp,U​). Here Cp,U\mathcal C_{p,U}Cp,U​ has output labels (S,x)(S,x)(S,x), with xxx a word on the sites outside SSS, and matrix entries

Cp,U(X)(S,x),(T,y)={pS CS,U(X)x,y,S=T,0,S≠T.\mathcal C_{p,U}(X)_{(S,x),(T,y)} = \begin{cases} p_S\,\mathcal C_{S,U}(X)_{x,y},&S=T,\\ 0,&S\ne T. \end{cases}Cp,U​(X)(S,x),(T,y)​={pS​CS,U​(X)x,y​,0,​S=T,S=T.​

Thus the flag is part of the decoder’s input. No positivity or normalization of anc\mathrm{anc}anc, and no unitarity of UUU, is required by this definition. It includes k=0k=0k=0, t=0t=0t=0, t=nt=nt=n, and d=0d=0d=0; natural-number subtraction is truncated at zero, although k≤nk\le nk≤n is assumed. If t>nt>nt>n, neither alternative can hold. The infima and suprema defining the errors are taken in the real numbers, including their total empty-set conventions.

QAlgorithms.Papers.Independent.Extend50.P09.locationFlaggedErasureEncoder

For natural numbers d,n,kd,n,kd,n,k with k≤nk\le nk≤n, any complex matrix AAA indexed by length-(n−k)(n-k)(n−k) words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, any real-valued function ppp on subsets of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and any complex matrix UUU indexed by length-nnn words, this defines a function from matrices ρ\rhoρ on length-kkk words to matrices indexed by pairs (S,x)(S,x)(S,x), where xxx is a configuration on the complement ScS^cSc. First form

EU(ρ)=UBρU†,(Bρ)a,b=ρ(a0,…,ak−1),(b0,…,bk−1)A(ak,…,an−1),(bk,…,bn−1).E_U(\rho)=UB_\rho U^\dagger,\qquad (B_\rho)_{a,b} =\rho_{(a_0,\ldots,a_{k-1}),(b_0,\ldots,b_{k-1})} A_{(a_k,\ldots,a_{n-1}),(b_k,\ldots,b_{n-1})}.EU​(ρ)=UBρ​U†,(Bρ​)a,b​=ρ(a0​,…,ak−1​),(b0​,…,bk−1​)​A(ak​,…,an−1​),(bk​,…,bn−1​)​.

The output entries are

Φ(ρ)(S,x),(T,y)={p(S)∑z:S→{0,…,d−1}EU(ρ)x∪z,y∪z,S=T,0,S≠T,\Phi(\rho)_{(S,x),(T,y)} = \begin{cases} \displaystyle p(S)\sum_{z:S\to\{0,\ldots,d-1\}} E_U(\rho)_{x\cup z,y\cup z},&S=T,\\ 0,&S\ne T, \end{cases}Φ(ρ)(S,x),(T,y)​=⎩⎨⎧​p(S)z:S→{0,…,d−1}∑​EU​(ρ)x∪z,y∪z​,0,​S=T,S=T,​

where x∪zx\cup zx∪z is the unique full configuration equal to xxx on ScS^cSc and zzz on SSS; in the first branch yyy is identified with a configuration on the same complement. No unitarity assumption on UUU, density-matrix assumption on AAA or ρ\rhoρ, or probability-law assumption on ppp is imposed. The cases k=0k=0k=0, k=nk=nk=n, empty or full SSS, and d=0d=0d=0 are included, with sums and products taken over their actual, possibly empty, configuration sets.

QAlgorithms.Papers.Independent.Extend50.P09.logicalMatrix

For every natural number ddd and every complex matrix ρ\rhoρ indexed by {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this defines a matrix indexed by length-one words over that set through

logicalMatrix⁡(ρ)a,b=ρa0,b0.\operatorname{logicalMatrix}(\rho)_{a,b}=\rho_{a_0,b_0}.logicalMatrix(ρ)a,b​=ρa0​,b0​​.

There are no positivity or normalization assumptions. The definition includes d=0d=0d=0, in which case both matrix indexing sets are empty.

QAlgorithms.Papers.Independent.Extend50.P09.noisyEncoder

For natural numbers d,n,kd,n,kd,n,k with k≤nk\le nk≤n, an arbitrary complex matrix AAA indexed by length-(n−k)(n-k)(n−k) words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, a set S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1}, and an arbitrary complex matrix UUU indexed by length-nnn words, this defines a map on complex matrices indexed by length-kkk words. Given ρ\rhoρ, first form the matrix whose (a,b)(a,b)(a,b) entry is ρ(a<k,b<k)A(a≥k,b≥k)\rho(a_{<k},b_{<k})A(a_{\ge k},b_{\ge k})ρ(a<k​,b<k​)A(a≥k​,b≥k​), where the subscripts select the first kkk and last n−kn-kn−k coordinates; conjugate this matrix by UUU; then trace out the coordinates in SSS, retaining the coordinates in ScS^{c}Sc. Thus, writing the conjugated matrix as YYY, the output entry at words x,yx,yx,y on ScS^{c}Sc is ∑zY(x∪z,y∪z)\sum_zY(x\cup z,y\cup z)∑z​Y(x∪z,y∪z), with zzz ranging over words on SSS. There are no positivity, normalization, or unitarity assumptions on A,ρ,UA,\rho,UA,ρ,U. The definition includes k=0k=0k=0, k=nk=nk=n, n=0n=0n=0, and empty or full SSS.

QAlgorithms.Papers.Independent.Extend50.P09.oneErasureMeanChannel

For all natural numbers d,nd,nd,n, this defines a function on arbitrary complex d×dd\times dd×d matrices by

X⟼1nX+n−1ntr⁡(X)1dId.X\longmapsto \frac1n X+\frac{n-1}{n}\operatorname{tr}(X)\frac1d I_d.X⟼n1​X+nn−1​tr(X)d1​Id​.

The subtraction n−1n-1n−1 in this displayed expression is subtraction in C\mathbb CC, after converting nnn to a complex scalar. Every reciprocal is total, with 0−1=00^{-1}=00−1=0, so at n=0n=0n=0 the function is zero, and at n=1n=1n=1 it is the identity. The definition also includes d=0d=0d=0. No positivity, trace, or parameter restrictions are required.

QAlgorithms.Papers.Independent.Extend50.P09.optimalWorstRecoveryError

For any finite types L,BL,BL,B with decidable equality and any function CCC from complex L×LL\times LL×L matrices to complex B×BB\times BB×B matrices, define

inf⁡D sup⁡ψ∈CL×L∥ψ∥=1p ⁣(ψψ†,RD(ψψ†)).\inf_D\ \sup_{\substack{\psi\in\mathbb C^{L\times L}\\ \|\psi\|=1}} p\!\left(\psi\psi^\dagger,\mathcal R_D(\psi\psi^\dagger)\right).Dinf​ ψ∈CL×L∥ψ∥=1​sup​p(ψψ†,RD​(ψψ†)).

The norm is the Euclidean norm, and (ψψ†)a,b=ψaψb‾(\psi\psi^\dagger)_{a,b}=\psi_a\overline{\psi_b}(ψψ†)a,b​=ψa​ψb​​. The functions DDD in the infimum have finite Kraus representations D(Y)=∑j=0s−1KjYKj†D(Y)=\sum_{j=0}^{s-1}K_jYK_j^\daggerD(Y)=∑j=0s−1​Kj​YKj†​, with s∈Ns\in\mathbb Ns∈N, KjK_jKj​ an L×BL\times BL×B complex matrix, and ∑jKj†Kj=IB\sum_jK_j^\dagger K_j=I_B∑j​Kj†​Kj​=IB​. For a matrix XXX on L×LL\times LL×L, write Xℓ,ℓ′(u,v)=X(ℓ,u),(ℓ′,v)X_{\ell,\ell'}(u,v)=X_{(\ell,u),(\ell',v)}Xℓ,ℓ′​(u,v)=X(ℓ,u),(ℓ′,v)​; then RD(X)(ℓ,a),(ℓ′,a′)=[D(C(Xℓ,ℓ′))]a,a′\mathcal R_D(X)_{(\ell,a),(\ell',a')}=[D(C(X_{\ell,\ell'}))]_{a,a'}RD​(X)(ℓ,a),(ℓ′,a′)​=[D(C(Xℓ,ℓ′​))]a,a′​. Here p(A,H)=1−F(A,H)2p(A,H)=\sqrt{1-F(A,H)^2}p(A,H)=1−F(A,H)2​, with F(A,H)=Re⁡tr⁡S(S(A)HS(A))F(A,H)=\operatorname{Re}\operatorname{tr}\mathcal S(\mathcal S(A)H\mathcal S(A))F(A,H)=RetrS(S(A)HS(A)), where S\mathcal SS is real continuous functional calculus with the scalar square root and the outer real square root is 000 on negative arguments. Both extrema are real extrema, with no assertion of attainment, and CCC is not assumed to be a channel. Empty types are included: if LLL is empty there is no unit vector ψ\psiψ, so the inner supremum is 000; if there is no admissible DDD, the outer infimum is 000.

QAlgorithms.Papers.Independent.Extend50.P09.pdist

For any finite type III with decidable equality and arbitrary complex matrices ρ,σ\rho,\sigmaρ,σ indexed by III, define

p(ρ,σ)=1−(Re⁡tr⁡ ⁣[S ⁣(S(ρ) σ S(ρ))])2,p(\rho,\sigma)=\sqrt{1-\left(\operatorname{Re}\operatorname{tr}\!\left[\mathcal S\!\left(\mathcal S(\rho)\,\sigma\,\mathcal S(\rho)\right)\right]\right)^2},p(ρ,σ)=1−(Retr[S(S(ρ)σS(ρ))])2​,

where S(H)\mathcal S(H)S(H) is the matrix obtained by real continuous functional calculus with the scalar function x↦xx\mapsto\sqrt{x}x↦x​. No positivity, trace, or normalization condition is imposed on either matrix, and III may be empty. The outer square root is the total real square root, so the value is 000 if its argument is negative.

QAlgorithms.Papers.Independent.Extend50.P09.physicalSchurBlockCoordinates

For any natural numbers d,nd,nd,n, this defines a complex matrix SSS whose columns are length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} and whose rows are triples (λ,u,v)(\lambda,u,v)(λ,u,v), where λ\lambdaλ is a Young diagram with exactly nnn cells and at most ddd rows, u<lλu<l_\lambdau<lλ​, and v<rλv<r_\lambdav<rλ​, with the dimensions and entries constructed as follows. Choose the specified bijection between the cells of λ\lambdaλ and {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}; let Rλ\mathcal R_\lambdaRλ​ and Cλ\mathcal C_\lambdaCλ​ be the permutations preserving, respectively, each numbered cell’s row and column. On the space indexed by permutations of nnn objects, form

(Yλ)g,h=∑a∈Rλ∑b∈Cλ1g=habsgn⁡(b),(Y_\lambda)_{g,h} =\sum_{a\in\mathcal R_\lambda}\sum_{b\in\mathcal C_\lambda} \mathbf1_{g=hab}\operatorname{sgn}(b),(Yλ​)g,h​=a∈Rλ​∑​b∈Cλ​∑​1g=hab​sgn(b),

and let VλV_\lambdaVλ​ be its range, with rλ=dim⁡CVλr_\lambda=\dim_{\mathbb C}V_\lambdarλ​=dimC​Vλ​. On the word space, let (Tπ)y,x=1y=x∘π−1(T_\pi)_{y,x}=\mathbf1_{y=x\circ\pi^{-1}}(Tπ​)y,x​=1y=x∘π−1​, form

Aλ=∑a∈Rλ∑b∈Cλsgn⁡(b)Tab,A_\lambda=\sum_{a\in\mathcal R_\lambda}\sum_{b\in\mathcal C_\lambda} \operatorname{sgn}(b)T_{ab},Aλ​=a∈Rλ​∑​b∈Cλ​∑​sgn(b)Tab​,

and let WλW_\lambdaWλ​ be its range, with lλ=dim⁡CWλl_\lambda=\dim_{\mathbb C}W_\lambdalλ​=dimC​Wλ​. Using the specified standard orthonormal bases eλ,ve_{\lambda,v}eλ,v​ of VλV_\lambdaVλ​ and fλ,uf_{\lambda,u}fλ,u​ of WλW_\lambdaWλ​, define

Yx,(λ,v,u)=∑geλ,v(g)(Tgfλ,u)(x),D=f(Y†Y)Y†,f(s)=(s)−1,Y_{x,(\lambda,v,u)} =\sum_{g}e_{\lambda,v}(g)(T_gf_{\lambda,u})(x), \qquad D=f(Y^\dagger Y)Y^\dagger, \quad f(s)=(\sqrt{s})^{-1},Yx,(λ,v,u)​=g∑​eλ,v​(g)(Tg​fλ,u​)(x),D=f(Y†Y)Y†,f(s)=(s​)−1,

where f(Y†Y)f(Y^\dagger Y)f(Y†Y) is defined by continuous functional calculus and f(0)=0f(0)=0f(0)=0. The matrix in the declaration is

S(λ,u,v),a=D(λ,v,u),a.S_{(\lambda,u,v),a}=D_{(\lambda,v,u),a}.S(λ,u,v),a​=D(λ,v,u),a​.

All dimensions are natural numbers and zero-dimensional blocks contribute no rows. The definition includes n=0n=0n=0, when the diagram is empty, and d=0d=0d=0; when d=0<nd=0<nd=0<n, neither an admissible diagram nor a word exists.

QAlgorithms.Papers.Independent.Extend50.P09.rdim

For arbitrary natural numbers d,nd,nd,n and a Young diagram λ\lambdaλ having exactly nnn cells and first-column length at most ddd, this defines rλr_\lambdarλ​ to be the complex dimension of the range of the following matrix YλY_\lambdaYλ​ on functions on the permutation group SnS_nSn​. Use the fixed cell numbering λ≅{0,…,n−1}\lambda\cong\{0,\ldots,n-1\}λ≅{0,…,n−1} chosen in the definition, let RλR_\lambdaRλ​ be the permutations that preserve the row of every numbered cell, and let CλC_\lambdaCλ​ be those that preserve its column. Then

Yλ(g,h)=∑a∈Rλ∑b∈Cλ{sgn⁡(b),g=hab,0,g≠hab,rλ=dim⁡Crange⁡(Yλ).Y_\lambda(g,h)= \sum_{a\in R_\lambda}\sum_{b\in C_\lambda} \begin{cases} \operatorname{sgn}(b),&g=hab,\\ 0,&g\ne hab, \end{cases} \qquad r_\lambda=\dim_{\mathbb C}\operatorname{range}(Y_\lambda).Yλ​(g,h)=a∈Rλ​∑​b∈Cλ​∑​{sgn(b),0,​g=hab,g=hab,​rλ​=dimC​range(Yλ​).

The range is taken in the Euclidean space of complex functions on SnS_nSn​. Neither ddd nor nnn is assumed positive; n=0n=0n=0 is included, whereas a diagram with positive size and first-column length at most 000 does not exist.

QAlgorithms.Papers.Independent.Extend50.P09.remainingCoordinates

For natural numbers d,n,kd,n,kd,n,k and a word x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1}, define the remaining-coordinate word by i↦xk+ii\mapsto x_{k+i}i↦xk+i​ for 0≤i<n−k0\le i<n-k0≤i<n−k, where n−kn-kn−k is natural-number subtraction, truncated at 000. There is no hypothesis k≤nk\le nk≤n: if k≥nk\ge nk≥n, the result is the unique empty word, and if k=0k=0k=0, it contains all coordinates of xxx.

QAlgorithms.Papers.Independent.Extend50.P09.removeSite

For implicit natural numbers d,td,td,t, a site j∈{0,…,t−1}j\in\{0,\ldots,t-1\}j∈{0,…,t−1}, and a word x:{0,…,t−1}→{0,…,d−1}x:\{0,\ldots,t-1\}\to\{0,\ldots,d-1\}x:{0,…,t−1}→{0,…,d−1}, this defines a word of length t−1t-1t−1 by deleting site jjj:

(removeSite⁡jx)i={xi,i<j,xi+1,j≤i,0≤i<t−1.(\operatorname{removeSite}_j x)_i= \begin{cases} x_i,&i<j,\\ x_{i+1},&j\le i, \end{cases} \qquad 0\le i<t-1.(removeSitej​x)i​={xi​,xi+1​,​i<j,j≤i,​0≤i<t−1.

The subtraction t−1t-1t−1 is natural-number subtraction truncated at zero. Supplying jjj requires t>0t>0t>0; when t=1t=1t=1, the result is the unique empty word. If d=0d=0d=0, no input word exists for such a positive ttt.

QAlgorithms.Papers.Independent.Extend50.P09.retain

For natural numbers d,nd,nd,n and a finite set S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1}, define a function taking any complex matrix ρ\rhoρ on length-nnn words over {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} to the matrix on configurations on SSS whose entries are

[TS(ρ)]a,b=∑z:Sc→{0,…,d−1}ρjoin⁡(a,z),join⁡(b,z).[\mathcal T_S(\rho)]_{a,b} =\sum_{z:S^c\to\{0,\ldots,d-1\}} \rho_{\operatorname{join}(a,z),\operatorname{join}(b,z)}.[TS​(ρ)]a,b​=z:Sc→{0,…,d−1}∑​ρjoin(a,z),join(b,z)​.

Here join⁡(a,z)\operatorname{join}(a,z)join(a,z) equals aaa on SSS and zzz on its complement. No positivity or normalization hypothesis is imposed on ρ\rhoρ. If S=∅S=\varnothingS=∅, the output is a matrix on the singleton empty configuration with sole entry tr⁡ρ\operatorname{tr}\rhotrρ; if SSS is all sites, the sum has one term and returns ρ\rhoρ under the natural identification. Empty configuration sets, including those arising from d=0d=0d=0, are allowed, and sums over them are 000.

QAlgorithms.Papers.Independent.Extend50.P09.schmidtKet

For every natural number ddd and every real-valued function ppp on {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this defines a vector in Cd×d\mathbb C^{d\times d}Cd×d with coordinates

ψa,b={pa,a=b,0,a≠b.\psi_{a,b}= \begin{cases} \sqrt{p_a},&a=b,\\ 0,&a\ne b. \end{cases}ψa,b​={pa​​,0,​a=b,a=b.​

The real square root is embedded in C\mathbb CC; it equals zero for negative arguments. No nonnegativity or sum condition is imposed on ppp, and no normalization is asserted. For d=0d=0d=0, this is the zero vector in the space with empty coordinate set.

QAlgorithms.Papers.Independent.Extend50.P09.schmidtLeading

For every natural number ddd and every real-valued function ppp on {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, this defines

d2∑i=0d−1∑j=0d−1pipjpi+pj−14.\sqrt{\frac d2\sum_{i=0}^{d-1}\sum_{j=0}^{d-1} \frac{p_ip_j}{p_i+p_j}-\frac14}.2d​i=0∑d−1​j=0∑d−1​pi​+pj​pi​pj​​−41​​.

There are no assumptions on ppp. Division by zero is interpreted as zero, including when pi+pj=0p_i+p_j=0pi​+pj​=0, and the real square root is zero whenever its argument is nonpositive. In particular, when d=0d=0d=0, the sums are empty and the defined value is zero.

QAlgorithms.Papers.Independent.Extend50.P09.sdp

For finite types AAA and BBB, each with decidable equality, and any complex matrix ρ\rhoρ indexed by A×BA\times BA×B, this defines the real number

inf⁡{Re⁡Tr⁡σ:σ∈CB×B,σ⪰0,IA⊗σ−ρ⪰0}.\inf\left\{\operatorname{Re}\operatorname{Tr}\sigma: \sigma\in\mathbb C^{B\times B},\quad \sigma\succeq0,\quad I_A\otimes\sigma-\rho\succeq0\right\}.inf{ReTrσ:σ∈CB×B,σ⪰0,IA​⊗σ−ρ⪰0}.

Here ⪰0\succeq0⪰0 means positive semidefinite and IAI_AIA​ is the identity matrix on AAA. Neither index type is required to be nonempty, and no positivity, Hermiticity, or trace condition is imposed on ρ\rhoρ. The infimum is taken in the real numbers; if the feasible set is empty, its value under the convention used here is 000.

QAlgorithms.Papers.Independent.Extend50.P09.sectorBell

For arbitrary natural numbers m,qm,qm,q, this defines a complex Euclidean vector Bm,qB_{m,q}Bm,q​ indexed by pairs of binary length-mmm words:

Bm,q(a,b)={1(mq),a=b and ∑i=0m−1ai=q,0,otherwise.B_{m,q}(a,b)= \begin{cases} \displaystyle\frac{1}{\sqrt{\binom m q}},& a=b\ \text{and}\ \sum_{i=0}^{m-1}a_i=q,\\ 0,&\text{otherwise}. \end{cases}Bm,q​(a,b)=⎩⎨⎧​(qm​)​1​,0,​a=b and ∑i=0m−1​ai​=q,otherwise.​

The normalization factor uses the inverse of a real square root, then is regarded as complex. If q>mq>mq>m, the vector is zero; the total inverse convention also assigns 000 to the inverse of the zero normalization denominator. For m=q=0m=q=0m=q=0, its sole amplitude is 111.

QAlgorithms.Papers.Independent.Extend50.P09.selectedRecoveryError

For finite types L,BL,BL,B with decidable equality, a Boolean www, and any function CCC from complex L×LL\times LL×L matrices to complex B×BB\times BB×B matrices, select inf⁡Dsup⁡∥ψ∥=1p(ψψ†,RD(ψψ†))\inf_D\sup_{\|\psi\|=1}p(\psi\psi^\dagger,\mathcal R_D(\psi\psi^\dagger))infD​sup∥ψ∥=1​p(ψψ†,RD​(ψψ†)) when www is true, and select inf⁡Dp(ββ†,RD(ββ†))\inf_Dp(\beta\beta^\dagger,\mathcal R_D(\beta\beta^\dagger))infD​p(ββ†,RD​(ββ†)) when www is false. Here ψ\psiψ ranges over Euclidean vectors indexed by L×LL\times LL×L; βℓ,u=∣L∣−1/2\beta_{\ell,u}=|L|^{-1/2}βℓ,u​=∣L∣−1/2 for ℓ=u\ell=uℓ=u and is 000 otherwise; and a vector’s outer product has entries ψaψb‾\psi_a\overline{\psi_b}ψa​ψb​​. Each DDD has the form D(Y)=∑j=0s−1KjYKj†D(Y)=\sum_{j=0}^{s-1}K_jYK_j^\daggerD(Y)=∑j=0s−1​Kj​YKj†​, where s∈Ns\in\mathbb Ns∈N, Kj∈CL×BK_j\in\mathbb C^{L\times B}Kj​∈CL×B, and ∑jKj†Kj=IB\sum_jK_j^\dagger K_j=I_B∑j​Kj†​Kj​=IB​. For blocks Xℓ,ℓ′(u,v)=X(ℓ,u),(ℓ′,v)X_{\ell,\ell'}(u,v)=X_{(\ell,u),(\ell',v)}Xℓ,ℓ′​(u,v)=X(ℓ,u),(ℓ′,v)​, the extended recovered matrix satisfies RD(X)(ℓ,a),(ℓ′,a′)=[D(C(Xℓ,ℓ′))]a,a′\mathcal R_D(X)_{(\ell,a),(\ell',a')}=[D(C(X_{\ell,\ell'}))]_{a,a'}RD​(X)(ℓ,a),(ℓ′,a′)​=[D(C(Xℓ,ℓ′​))]a,a′​. The comparison function is p(A,H)=1−[Re⁡tr⁡S(S(A)HS(A))]2p(A,H)=\sqrt{1-[\operatorname{Re}\operatorname{tr}\mathcal S(\mathcal S(A)H\mathcal S(A))]^2}p(A,H)=1−[RetrS(S(A)HS(A))]2​, where S\mathcal SS is real continuous functional calculus with scalar square root, and the outer real square root is 000 on negative arguments. No channel assumption is imposed on CCC, no extremum is asserted to be attained, and empty types are allowed; empty real infima and suprema take the value 000.

QAlgorithms.Papers.Independent.Extend50.P09.shapeEntropy

For natural numbers d,md,md,m and a Young diagram λ\lambdaλ having exactly mmm cells and at most ddd rows, this defines

−∑i=0d−1λimlog⁡2 ⁣(λim),-\sum_{i=0}^{d-1} \frac{\lambda_i}{m}\log_2\!\left(\frac{\lambda_i}{m}\right),−i=0∑d−1​mλi​​log2​(mλi​​),

where λi\lambda_iλi​ is the length of row iii, with rows numbered from zero. The real logarithm is the total logarithm used in the code, so log⁡20=0\log_2 0=0log2​0=0, and real division by zero is zero. In particular, when m=0m=0m=0, the diagram is empty and the value is zero; an empty sum, including the case d=0d=0d=0, is also zero.

QAlgorithms.Papers.Independent.Extend50.P09.simpleInitial

For natural numbers n,kn,kn,k with k≤nk\le nk≤n, any complex Euclidean vector ψ\psiψ on binary words of length n−kn-kn−k, and any complex Euclidean vector vvv on binary words of length kkk, this defines a vector FFF indexed by a singleton register and a binary length-nnn word:

F(∗,a)=v(a<k)ψ(a≥k).F(*,a)=v(a_{<k})\psi(a_{\ge k}).F(∗,a)=v(a<k​)ψ(a≥k​).

The prefix a<ka_{<k}a<k​ consists of coordinates 0,…,k−10,\ldots,k-10,…,k−1, and the suffix a≥ka_{\ge k}a≥k​ consists of coordinates k,…,n−1k,\ldots,n-1k,…,n−1. Neither vector is assumed normalized. The cases k=0k=0k=0, k=nk=nk=n, and n=0n=0n=0 are permitted, using unique empty words.

QAlgorithms.Papers.Independent.Extend50.P09.simpleLambda

For natural numbers n,k,tn,k,tn,k,t with k≤nk\le nk≤n and t≤nt\le nt≤n, and arbitrary complex Euclidean vectors ψ\psiψ and vvv indexed by binary words of lengths n−kn-kn−k and kkk, respectively, this defines a matrix indexed by ({0,1}n×{0,1}n)×({∗}×{0,1}t)(\{0,1\}^n\times\{0,1\}^n)\times(\{*\}\times\{0,1\}^t)({0,1}n×{0,1}n)×({∗}×{0,1}t). Its entry at row ((a,b),(∗,u))((a,b),(*,u))((a,b),(∗,u)) and column ((c,d),(∗,z))((c,d),(*,z))((c,d),(∗,z)) is

{v(a<k)ψ(a≥k)v(c<k)ψ(c≥k)‾(nw(a))(nw(c)),w(a)=w(b),w(c)=w(d),b<t=u,d<t=z,b≥t=d≥t,0,otherwise.\begin{cases} \displaystyle \frac{v(a_{<k})\psi(a_{\ge k}) \overline{v(c_{<k})\psi(c_{\ge k})}} {\sqrt{\binom n{w(a)}\binom n{w(c)}}}, & \begin{gathered} w(a)=w(b),\quad w(c)=w(d),\\ b_{<t}=u,\quad d_{<t}=z,\quad b_{\ge t}=d_{\ge t}, \end{gathered}\\ 0,&\text{otherwise}. \end{cases}⎩⎨⎧​(w(a)n​)(w(c)n​)​v(a<k​)ψ(a≥k​)v(c<k​)ψ(c≥k​)​​,0,​w(a)=w(b),w(c)=w(d),b<t​=u,d<t​=z,b≥t​=d≥t​,​otherwise.​

Here a,b,c,da,b,c,da,b,c,d have length nnn, u,zu,zu,z have length ttt, www counts 111's, and prefixes and suffixes retain the indicated coordinates. No normalization of ψ\psiψ or vvv is assumed. Zero lengths are included.

QAlgorithms.Papers.Independent.Extend50.P09.suAncilla

For natural numbers d,md,md,m, a Young diagram λ\lambdaλ with mmm cells and first-column length at most ddd, and an arbitrary vector ψ∈Crλ\psi\in\mathbb C^{r_\lambda}ψ∈Crλ​, this defines the matrix

Aλ,ψ=ℓλ−1∑l=0ℓλ−1∣vλ,ψ,l⟩⟨vλ,ψ,l∣,vλ,ψ,l(x)=∑r=0rλ−1D(λ,r,l),x‾ψr,\mathcal A_{\lambda,\psi} =\ell_\lambda^{-1} \sum_{l=0}^{\ell_\lambda-1} |v_{\lambda,\psi,l}\rangle \langle v_{\lambda,\psi,l}|, \qquad v_{\lambda,\psi,l}(x) =\sum_{r=0}^{r_\lambda-1} \overline{\mathcal D_{(\lambda,r,l),x}}\psi_r,Aλ,ψ​=ℓλ−1​l=0∑ℓλ​−1​∣vλ,ψ,l​⟩⟨vλ,ψ,l​∣,vλ,ψ,l​(x)=r=0∑rλ​−1​D(λ,r,l),x​​ψr​,

on ddd-ary words of length mmm, where (∣v⟩⟨v∣)xy=vxvy‾(|v\rangle\langle v|)_{xy}=v_x\overline{v_y}(∣v⟩⟨v∣)xy​=vx​vy​​. To specify all quantities in this formula, for every Young diagram μ\muμ of size mmm and first-column length at most ddd, take the fixed cell numbering and its row-preserving and column-preserving permutation sets Rμ,CμR_\mu,C_\muRμ​,Cμ​. Define

Yμ(g,h)=∑a∈Rμ∑b∈Cμsgn⁡(b)1{g=hab},Tg(y,x)=1{y=x∘g−1},Aμ=∑a∈Rμ∑b∈Cμsgn⁡(b)Tab.\begin{aligned} Y_\mu(g,h)&=\sum_{a\in R_\mu}\sum_{b\in C_\mu} \operatorname{sgn}(b)\mathbf1_{\{g=hab\}},\\ T_g(y,x)&=\mathbf1_{\{y=x\circ g^{-1}\}},& A_\mu&=\sum_{a\in R_\mu}\sum_{b\in C_\mu} \operatorname{sgn}(b)T_{ab}. \end{aligned}Yμ​(g,h)Tg​(y,x)​=a∈Rμ​∑​b∈Cμ​∑​sgn(b)1{g=hab}​,=1{y=x∘g−1}​,​Aμ​​=a∈Rμ​∑​b∈Cμ​∑​sgn(b)Tab​.​

Here g,h∈Smg,h\in S_mg,h∈Sm​, and x,yx,yx,y are ddd-ary words of length mmm. The numbers rμ,ℓμr_\mu,\ell_\murμ​,ℓμ​ are the complex dimensions of the ranges of Yμ,AμY_\mu,A_\muYμ​,Aμ​, respectively. For the fixed orthonormal bases erμ,flμe^\mu_r,f^\mu_lerμ​,flμ​ selected for those ranges, put

Hx,(μ,r,l)=∑g∈Smerμ(g)(Tgflμ)(x),D=f(H†H)H†,f(u)=(u)−1,H_{x,(\mu,r,l)} =\sum_{g\in S_m}e^\mu_r(g)(T_g f^\mu_l)(x), \qquad \mathcal D=f(H^\dagger H)H^\dagger,\quad f(u)=(\sqrt u)^{-1},Hx,(μ,r,l)​=g∈Sm​∑​erμ​(g)(Tg​flμ​)(x),D=f(H†H)H†,f(u)=(u​)−1,

using continuous functional calculus and f(0)=0f(0)=0f(0)=0. No normalization hypothesis on ψ\psiψ, and no trace-one conclusion for Aλ,ψ\mathcal A_{\lambda,\psi}Aλ,ψ​, is part of this definition. In particular, if ℓλ=0\ell_\lambda=0ℓλ​=0, both the sum and the scalar inverse are zero, so the defined matrix is zero. The parameters d,md,md,m may be zero whenever an admissible diagram exists.

QAlgorithms.Papers.Independent.Extend50.P09.suMarginalFormula

For natural numbers d,n,td,n,td,n,t with n≥2n\ge2n≥2 and 1≤t≤n1\le t\le n1≤t≤n, a Young diagram λ\lambdaλ with n−1n-1n−1 cells and at most ddd rows, and any complex d×dd\times dd×d matrix ρ\rhoρ, this defines the following matrix on length-ttt words:

1n∑j=0t−1Ins⁡j ⁣(ρ,Tr⁡last (n−t)Ωλ)+{n−tn Tr⁡last (n−1−t)Ωλ,t<n,0,t=n.\frac1n\sum_{j=0}^{t-1} \operatorname{Ins}_j\!\left(\rho,\operatorname{Tr}_{\mathrm{last}\,(n-t)}\Omega_\lambda\right) + \begin{cases} \displaystyle\frac{n-t}{n}\, \operatorname{Tr}_{\mathrm{last}\,(n-1-t)}\Omega_\lambda,&t<n,\\ 0,&t=n. \end{cases}n1​j=0∑t−1​Insj​(ρ,Trlast(n−t)​Ωλ​)+⎩⎨⎧​nn−t​Trlast(n−1−t)​Ωλ​,0,​t<n,t=n.​

Here Ins⁡j(ρ,τ)a,b=ρaj,bjτa∖j,b∖j\operatorname{Ins}_j(\rho,\tau)_{a,b}=\rho_{a_j,b_j}\tau_{a^{\setminus j},b^{\setminus j}}Insj​(ρ,τ)a,b​=ρaj​,bj​​τa∖j,b∖j​, where deletion preserves the other coordinates, and tracing down to qqq coordinates means (Tr⁡last (n−1−q)Z)x,y=∑zZx∥z,y∥z(\operatorname{Tr}_{\mathrm{last}\,(n-1-q)}Z)_{x,y}=\sum_z Z_{x\mathbin{\|}z,y\mathbin{\|}z}(Trlast(n−1−q)​Z)x,y​=∑z​Zx∥z,y∥z​. The matrix Ωλ\Omega_\lambdaΩλ​ is defined explicitly as follows. Put m=n−1m=n-1m=n−1, number the cells of each relevant diagram by a fixed chosen bijection with {0,…,m−1}\{0,\ldots,m-1\}{0,…,m−1}, and let Rλ,CλR_\lambda,C_\lambdaRλ​,Cλ​ be the permutations preserving, respectively, each numbered cell’s row and column. On the symmetric group SmS_mSm​, form Yλ(g,h)=∑a∈Rλ,b∈Cλsgn⁡(b)1g=habY_\lambda(g,h)=\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)\mathbf1_{g=hab}Yλ​(g,h)=∑a∈Rλ​,b∈Cλ​​sgn(b)1g=hab​, let Sλ=range⁡Yλ\mathcal S_\lambda=\operatorname{range}Y_\lambdaSλ​=rangeYλ​, and let Πλ\Pi_\lambdaΠλ​ be its orthogonal projector. Define Lg(h′,h)=1h′=ghL_g(h',h)=\mathbf1_{h'=gh}Lg​(h′,h)=1h′=gh​, χλ(g)=tr⁡(LgΠλ)\chi_\lambda(g)=\operatorname{tr}(L_g\Pi_\lambda)χλ​(g)=tr(Lg​Πλ​), and rλ=dim⁡CSλr_\lambda=\dim_{\mathbb C}\mathcal S_\lambdarλ​=dimC​Sλ​. On length-mmm words let Tg(y,x)=1y=x∘g−1T_g(y,x)=\mathbf1_{y=x\circ g^{-1}}Tg​(y,x)=1y=x∘g−1​, and put Hλ=range⁡(∑a∈Rλ,b∈Cλsgn⁡(b)Tab)\mathcal H_\lambda=\operatorname{range}\bigl(\sum_{a\in R_\lambda,b\in C_\lambda}\operatorname{sgn}(b)T_{ab}\bigr)Hλ​=range(∑a∈Rλ​,b∈Cλ​​sgn(b)Tab​) and ℓλ=dim⁡CHλ\ell_\lambda=\dim_{\mathbb C}\mathcal H_\lambdaℓλ​=dimC​Hλ​. Then

Ωλ=1ℓλrλ rλm!∑g∈Smχλ(g−1)Tg.\Omega_\lambda =\frac1{\ell_\lambda r_\lambda}\, \frac{r_\lambda}{m!}\sum_{g\in S_m}\chi_\lambda(g^{-1})T_g.Ωλ​=ℓλ​rλ​1​m!rλ​​g∈Sm​∑​χλ​(g−1)Tg​.

All scalar reciprocals here use the convention 0−1=00^{-1}=00−1=0. No density-matrix assumption is made on ρ\rhoρ. The case t=1t=1t=1 uses a scalar partial trace in each insertion, and t=nt=nt=n omits the final summand.

QAlgorithms.Papers.Independent.Extend50.P09.superposition

For any natural number kkk, any words x,y:{0,…,k−1}→{0,1}x,y:\{0,\ldots,k-1\}\to\{0,1\}x,y:{0,…,k−1}→{0,1}, and any complex number zzz, this defines the vector

v=∣x⟩+z∣y⟩2,v(a)=1a=x+z1a=y2,v=\frac{|x\rangle+z|y\rangle}{\sqrt2}, \qquad v(a)=\frac{\mathbf1_{a=x}+z\mathbf1_{a=y}}{\sqrt2},v=2​∣x⟩+z∣y⟩​,v(a)=2​1a=x​+z1a=y​​,

in the complex Euclidean space indexed by all length-kkk binary words; ∣x⟩|x\rangle∣x⟩ denotes the vector with coordinate 111 at xxx and 000 elsewhere. There is no restriction on zzz and no requirement that x≠yx\ne yx=y, so normalization is not asserted; when x=yx=yx=y, the vector is (1+z)∣x⟩/2(1+z)|x\rangle/\sqrt2(1+z)∣x⟩/2​, including the zero vector when z=−1z=-1z=−1. For k=0k=0k=0, there is one word, and hence necessarily x=yx=yx=y.

QAlgorithms.Papers.Independent.Extend50.P09.u1ChargeOperator

For every natural number nnn, this defines the complex diagonal matrix indexed by binary words of length nnn whose diagonal entry at xxx is ∑i=0n−1xi\sum_{i=0}^{n-1}x_i∑i=0n−1​xi​, viewed as a complex number, and whose off-diagonal entries are zero. For n=0n=0n=0, this is the zero matrix on the one-dimensional space indexed by the empty word.

QAlgorithms.Papers.Independent.Extend50.P09.u1Lambda

For any finite type RRR, which may be empty, natural numbers n,tn,tn,t with t≤nt\le nt≤n, and any complex matrix Ψ\PsiΨ indexed by R×{0,1}nR\times\{0,1\}^nR×{0,1}n, this defines a complex matrix Λ\LambdaΛ indexed by ({0,1}n×{0,1}n)×(R×{0,1}t)(\{0,1\}^n\times\{0,1\}^n)\times(R\times\{0,1\}^t)({0,1}n×{0,1}n)×(R×{0,1}t). For binary length-nnn words a,b,c,da,b,c,da,b,c,d, elements r,s∈Rr,s\in Rr,s∈R, and binary length-ttt words u,vu,vu,v, its entries are

Λ((a,b),(r,u)),((c,d),(s,v))={Ψ(r,a),(s,c)(nw(a))(nw(c)),w(a)=w(b),w(c)=w(d),b<t=u,d<t=v,b≥t=d≥t,0,otherwise.\Lambda_{((a,b),(r,u)),((c,d),(s,v))} = \begin{cases} \displaystyle \frac{\Psi_{(r,a),(s,c)}} {\sqrt{\binom n{w(a)}\binom n{w(c)}}}, & \begin{gathered} w(a)=w(b),\quad w(c)=w(d),\\ b_{<t}=u,\quad d_{<t}=v,\quad b_{\ge t}=d_{\ge t}, \end{gathered}\\ 0,&\text{otherwise}. \end{cases}Λ((a,b),(r,u)),((c,d),(s,v))​=⎩⎨⎧​(w(a)n​)(w(c)n​)​Ψ(r,a),(s,c)​​,0,​w(a)=w(b),w(c)=w(d),b<t​=u,d<t​=v,b≥t​=d≥t​,​otherwise.​

Here www counts 111's, and the subscripts <t<t<t and ≥t\ge t≥t select the first ttt and remaining n−tn-tn−t coordinates. No positivity, Hermiticity, or normalization of Ψ\PsiΨ is assumed. Zero lengths are allowed, and the binomial denominators in existing entries are positive.

QAlgorithms.Papers.Independent.Extend50.P09.u1Leading

For a Boolean parameter worst\mathrm{worst}worst, an arbitrary real number aaa, and arbitrary natural numbers n,k,tn,k,tn,k,t, this defines

{kt,worst=true,tk,worst=false4na(1−a).\frac{ \begin{cases} k\sqrt t,&\mathrm{worst}=\mathrm{true},\\ \sqrt{tk},&\mathrm{worst}=\mathrm{false} \end{cases} }{ 4n\sqrt{a(1-a)} }.4na(1−a)​{kt​,tk​,​worst=true,worst=false​​.

Natural numbers in this expression are converted to real numbers. No positivity condition on n,k,tn,k,tn,k,t or interval restriction on aaa is assumed. Real square roots of negative arguments are 000, and division by 000 is 000; hence the value is 000 when n=0n=0n=0 or a∉(0,1)a\notin(0,1)a∈/(0,1), and it is also 000 when k=0k=0k=0 or t=0t=0t=0.

QAlgorithms.Papers.Independent.Extend50.P09.u1Ratio

For a Boolean flag www and arbitrary natural numbers n,k,tn,k,tn,k,t, this defines the real number

rw(n,k,t)={kt2/n,w=true,k2t2/n,w=false.r_w(n,k,t)= \begin{cases} kt^2/n,&w=\mathrm{true},\\ k^2t^2/n,&w=\mathrm{false}. \end{cases}rw​(n,k,t)={kt2/n,k2t2/n,​w=true,w=false.​

The natural numbers are converted to real numbers before these operations. Zero values are allowed; in particular, division by zero has its total real-field meaning, so rw(0,k,t)=0r_w(0,k,t)=0rw​(0,k,t)=0.

QAlgorithms.Papers.Independent.Extend50.P09.u1SectorProjector

For any natural numbers n,jn,jn,j, this defines the complex diagonal matrix indexed by binary words of length nnn whose diagonal entry at xxx is 111 if ∑i=0n−1xi=j\sum_{i=0}^{n-1}x_i=j∑i=0n−1​xi​=j, and 000 otherwise. All off-diagonal entries are zero. In particular, it is zero when j>nj>nj>n; when n=0n=0n=0, it is the identity for j=0j=0j=0 and zero for j>0j>0j>0.

QAlgorithms.Papers.Independent.Extend50.P09.u1Xi

For every natural number nnn and binary words a,ba,ba,b of length nnn, let w(a)=∑i=0n−1aiw(a)=\sum_{i=0}^{n-1}a_iw(a)=∑i=0n−1​ai​, viewing each binary coordinate as 000 or 111. This defines the complex number

ξn(a,b)={2n(nw(a)),w(a)=w(b),0,w(a)≠w(b).\xi_n(a,b)= \begin{cases} \displaystyle\sqrt{\frac{2^n}{\binom n{w(a)}}},&w(a)=w(b),\\ 0,&w(a)\ne w(b). \end{cases}ξn​(a,b)=⎩⎨⎧​(w(a)n​)2n​​,0,​w(a)=w(b),w(a)=w(b).​

The displayed square root is real and then regarded as complex. Since 0≤w(a)≤n0\le w(a)\le n0≤w(a)≤n, its binomial denominator is positive. At n=0n=0n=0, both words are empty and the value is 111.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 2026

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

View graph

Get started

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

About Prove2Me

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

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me