Definitions for Optimal Universal Quantum Error Correction via Bounded Reference Frames
DefinitionQAlgorithms_Papers_Independent_Extend50_P15The objects the formalized statements of Optimal Universal Quantum Error Correction via Bounded Reference Frames (arXiv:2007.09154) are stated in. Each was checked against the paper by a blind read-back and a moderator.
FlaggedRegister: Erasure output space: a tensor product of local direct sums, retaining every mixed surviving/erased pattern (PDF pp.8,22).noneis the orthogonal erasure flag.IsNormalizedHaar: Normalized Haar law, with its left and right translation invariance, not Haar volume. The Borel space is fixed above; on this compact group this specifies the unique probability Haar measure (PDF pp.3,10).worstFidelity: A1, PDF p.10. Infimum over all density matrices and all positive finite reference sizes. For lawful channels on nonempty finite spaces this set is nonempty and bounded in [0,1]. No theorem uses the empty-input default of a real infimum.stabilizedHalfDiamondError: A3--A4, PDF p.11: half the stabilized trace distance, equal to half the diamond norm for differences of channels. Stabilization includes arbitrary entangled references. For channels the supremum is nonempty and bounded by 1.entanglementError: A5, PDF p.11; the factor 1/2 acts on normalized Choi states.choiPairFidelity: A2, PDF p.10: squared Uhlmann fidelity of the normalized Choi states.IsSUChannelCovariant: Full SU(d) covariance, not covariance under just one chosen generator (A.6 preamble, PDF p.18).maskedTransversalMatrix: U on selected physical sites and identity on idle sites (A14, PDF p.12). The mask is fixed independently of U and of the logical input.CovariantCode: A14, PDF p.12, and the general-code lower-bound setting on pp.22,26. The encoder is CPTP and exactly covariant under the indicated transversal action. The decoder is an arbitrary CPTP recovery on the full flagged tensor space.covariantError: A16, PDF p.13: worst error over all logical gates, computed from the actual code and actual physical noise. In the channel regimes below the set is nonempty, compact in its gate parameter, and bounded by 1; the supremum equals the source's maximum.localErasureKraus: Kraus family for the single-qudit flagged erasure channel (B1,C1, PDF pp.21,24). The indexnoneis the surviving Kraus operator;some aerases basis component a. The parameter is used only in [0,1].localErasure: Local erasure, with orthogonal flag (C1, PDF p.24).subsetErasure: Erase exactly the sites in s, retaining the other sites. This tensor definition acts on all operators, including entangled inputs (B1, PDF p.21).uniformSubsetErasure: B19--B20, PDF p.23: uniform distribution on exactly k-element subsets. There is no independent-site assumption and no no-erasure atom when k≥1.iidErasure: Independent erasure of every physical qudit (C1, PDF p.24).flaggedGate: The physical gate extended by identity on the orthogonal erasure flag (PDF p.8).flaggedTransversal: Transversal implementation on the full tensor product of flagged local spaces (PDF p.8). Idle sites and erasure flags are fixed.erasurePatternProjector: Joint projector onto the known erasure pattern s, including mixed patterns (PDF p.8).referenceOrbitSpan: Vector-orbit support under U on one half and identity on the other (D2--D3, PDF p.29). The rank of the twirled pure state is this dimension. SOURCE CORRECTION: D1 prints the span of density operators. Its proof uses the vector-orbit support instead. These dimensions differ; independent moderation is required.sineCoefficient: Raw sine coefficients B8, PDF p.21, evaluated on integer indices. They are not asserted to form a normalized law on the paper's declared [M]={1,...,M}.sineOverlapError: B10, PDF p.22. The cutoff is 2n0; it is not the total physical code size. Natural subtraction in the endpoint is used only for sufficiently large M.schurCharacter: SU(d) character of the actual Young-symmetrizer Schur module, not a free character variable (A12, PDF p.12).canonicalEstimateDensity: Canonical A12 estimate density for a finite support L and probability weights q. At the true gate I the character is evaluated on U inverse (PDF pp.12,15).costRepresentation: The actual UC tensor UL-star representation (A36, PDF p.15).map conjis entrywise complex conjugation, not adjoint.referenceCostChannel: A36--A37, PDF p.15: channel induced by the canonical surviving-frame estimate law. Only lawful normalized q and Haar measure are used in the results.indexedDifference: A39, PDF p.15: encode each integer shift in [-n0,n0] by a finite index. The zero-sum constraint is imposed bydifferenceIndices.differenceIndices: Sdiff, A39, PDF p.15, a finite nonempty set containing the zero shift.shiftedMass: Extend q by zero to integer row vectors; different shifted diagrams are not silently truncated into Young shapes (A39, PDF p.15).interiorShapes: Sint: positive support with every pair of distinct rows separated by more than 3n0 (A38, PDF p.15). Thei ≠ jguard is essential.minimumInteriorOverlap: Attained finite minimum in Lemma 2. Sint may be empty, giving a zero sum; Sdiff is never empty (A38--A39, PDF p.15).schurWeylShiftedRow: Shifted integer rows in C6 (PDF p.25), with one-based source row j=i.val+1.schurWeylMass: Integer Schur--Weyl law C6, PDF p.25. This formula has no fractional Young shapes and no interpolation of factorials. The factorial product includes 0!=1.schurWeylConstant: Gamma in C8, PDF p.25. The d=1 case is not used.computationSize: The integer convention for nC=n^gamma, with bounded downward rounding (C.1, PDF p.24). The positive regime begins at the theorem's threshold.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_FiniteRegisters
import Definitions.Def_QAlgorithms_Defs_SchurModules
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P75
/-!
Statements from Yang et al., arXiv:2007.09154v2.
Paper-specific objects below are local; matching accepted definitions are imported. Channels use the accepted finite Kraus
semantics. Fidelities are squared Uhlmann fidelities. Stabilization ranges over every
positive finite reference dimension; the two error measures contain the factor 1/2.
Deferred nodes, including source defects, are recorded in the unit's HARD.md and GAPS.json.
No source correction here is certified by independent moderation. Compilation is pending.
-/
noncomputable section
open MeasureTheory
open scoped Matrix ComplexConjugate Matrix.Norms.L2Operator
namespace QAlgorithms.Papers.Independent.Extend50.P15
open QAlgorithms.Papers.Independent.Information100.P67 (squaredFidelity)
open QAlgorithms.Papers.Independent.Information100.P56 (normalizedChoi)
open QAlgorithms.Papers.Independent.Information100.P75 (Register)
attribute [local instance] Classical.propDecidable
attribute [local instance] Classical.decEq
/-- Erasure output space: a tensor product of local direct sums, retaining every mixed
surviving/erased pattern (PDF pp.8,22). `none` is the orthogonal erasure flag. -/
abbrev FlaggedRegister (d n : ℕ) := Fin n → Option (Fin d)
/-- Fixed Borel sigma algebra on SU(d) (PDF p.10). -/
instance specialUnitaryMeasurable (d : ℕ) : MeasurableSpace (Matrix.specialUnitaryGroup (Fin d) ℂ) := borel _
/-- Normalized Haar law, with its left and right translation invariance, not Haar volume.
The Borel space is fixed above; on this compact group this specifies the unique probability
Haar measure (PDF pp.3,10). -/
def IsNormalizedHaar {d : ℕ} (mu : Measure (Matrix.specialUnitaryGroup (Fin d) ℂ)) : Prop :=
mu Set.univ = 1 ∧
(∀ V : (Matrix.specialUnitaryGroup (Fin d) ℂ), Measure.map (fun U => V * U) mu = mu) ∧
(∀ V : (Matrix.specialUnitaryGroup (Fin d) ℂ), Measure.map (fun U => U * V) mu = mu)
/-- A1, PDF p.10. Infimum over all density matrices and all positive finite reference
sizes. For lawful channels on nonempty finite spaces this set is nonempty and bounded in
[0,1]. No theorem uses the empty-input default of a real infimum. -/
def worstFidelity {i o : Type*} [Fintype i] [Fintype o] [DecidableEq o]
(A B : Superop i o) : ℝ :=
sInf {v : ℝ | ∃ k : ℕ, 0 < k ∧
∃ rho : Matrix (Fin k × i) (Fin k × i) ℂ, IsDensityMatrix rho ∧
v = squaredFidelity (idTensorSuperop (R := Fin k) A rho)
(idTensorSuperop (R := Fin k) B rho)}
/-- A3--A4, PDF p.11: half the stabilized trace distance, equal to half the diamond
norm for differences of channels. Stabilization includes arbitrary entangled references.
For channels the supremum is nonempty and bounded by 1. -/
def stabilizedHalfDiamondError {i o : Type*} [Fintype i] [Fintype o] [DecidableEq o]
(A B : Superop i o) : ℝ :=
sSup {v : ℝ | ∃ k : ℕ, 0 < k ∧
∃ rho : Matrix (Fin k × i) (Fin k × i) ℂ, IsDensityMatrix rho ∧
v = traceNorm (idTensorSuperop (R := Fin k) A rho -
idTensorSuperop (R := Fin k) B rho) / 2}
/-- A5, PDF p.11; the factor 1/2 acts on normalized Choi states. -/
def entanglementError (d : ℕ) (hd : 0 < d) (A B : Superop (Fin d) (Fin d)) : ℝ :=
traceNorm (normalizedChoi A - normalizedChoi B) / 2
/-- A2, PDF p.10: squared Uhlmann fidelity of the normalized Choi states. -/
def choiPairFidelity (d : ℕ) (hd : 0 < d) (A B : Superop (Fin d) (Fin d)) : ℝ :=
squaredFidelity (normalizedChoi A) (normalizedChoi B)
/-- Full SU(d) covariance, not covariance under just one chosen generator
(A.6 preamble, PDF p.18). -/
def IsSUChannelCovariant {d : ℕ} (A : Superop (Fin d) (Fin d)) : Prop :=
∀ U : (Matrix.specialUnitaryGroup (Fin d) ℂ),
A ∘ conjSuperop (U : Matrix (Fin d) (Fin d) ℂ) =
conjSuperop (U : Matrix (Fin d) (Fin d) ℂ) ∘ A
/-- U on selected physical sites and identity on idle sites (A14, PDF p.12).
The mask is fixed independently of U and of the logical input. -/
def maskedTransversalMatrix {d n : ℕ} (active : Fin n → Bool) (U : Matrix (Fin d) (Fin d) ℂ) :
Matrix ((Register (fun _ : Fin n => d))) ((Register (fun _ : Fin n => d))) ℂ :=
fun x y => ∏ j, if active j then U (x j) (y j) else if x j = y j then 1 else 0
/-- A14, PDF p.12, and the general-code lower-bound setting on pp.22,26.
The encoder is CPTP and exactly covariant under the indicated transversal action.
The decoder is an arbitrary CPTP recovery on the full flagged tensor space. -/
structure CovariantCode (d n : ℕ) where
active : Fin n → Bool
encoder : Superop (Fin d) ((Register (fun _ : Fin n => d)))
decoder : Superop (FlaggedRegister d n) (Fin d)
encoder_channel : IsChannel encoder
decoder_channel : IsChannel decoder
encoder_covariance : ∀ U : (Matrix.specialUnitaryGroup (Fin d) ℂ),
encoder ∘ conjSuperop (U : Matrix (Fin d) (Fin d) ℂ) =
conjSuperop (maskedTransversalMatrix active (U : Matrix (Fin d) (Fin d) ℂ)) ∘ encoder
/-- A16, PDF p.13: worst error over all logical gates, computed from the actual code
and actual physical noise. In the channel regimes below the set is nonempty, compact in
its gate parameter, and bounded by 1; the supremum equals the source's maximum. -/
def covariantError {d n : ℕ} (code : CovariantCode d n)
(noise : Superop ((Register (fun _ : Fin n => d))) (FlaggedRegister d n)) : ℝ :=
sSup {v : ℝ | ∃ U : (Matrix.specialUnitaryGroup (Fin d) ℂ),
v = stabilizedHalfDiamondError (code.decoder ∘ noise ∘
conjSuperop (maskedTransversalMatrix code.active (U : Matrix (Fin d) (Fin d) ℂ)) ∘ code.encoder)
(conjSuperop (U : Matrix (Fin d) (Fin d) ℂ))}
/-- Kraus family for the single-qudit flagged erasure channel (B1,C1, PDF pp.21,24).
The index `none` is the surviving Kraus operator; `some a` erases basis component a.
The parameter is used only in [0,1]. -/
def localErasureKraus (d : ℕ) (p : ℝ) :
Option (Fin d) → Matrix (Option (Fin d)) (Fin d) ℂ
| none => fun y x => if y = some x then (Real.sqrt (1 - p) : ℂ) else 0
| some a => fun y x => if y = none ∧ x = a then (Real.sqrt p : ℂ) else 0
/-- Local erasure, with orthogonal flag (C1, PDF p.24). -/
def localErasure (d : ℕ) (p : ℝ) : Superop (Fin d) (Option (Fin d)) :=
krausApply (localErasureKraus d p)
/-- Erase exactly the sites in s, retaining the other sites. This tensor definition
acts on all operators, including entangled inputs (B1, PDF p.21). -/
def subsetErasure (d n : ℕ) (s : Finset (Fin n)) :
Superop ((Register (fun _ : Fin n => d))) (FlaggedRegister d n) :=
piSuperop fun j => localErasure d (if j ∈ s then 1 else 0)
/-- B19--B20, PDF p.23: uniform distribution on exactly k-element subsets.
There is no independent-site assumption and no no-erasure atom when k≥1. -/
def uniformSubsetErasure (d n k : ℕ) : Superop ((Register (fun _ : Fin n => d))) (FlaggedRegister d n) :=
fun X => ∑ s ∈ (Finset.univ : Finset (Fin n)).powersetCard k,
(((Nat.choose n k : ℝ)⁻¹ : ℂ)) • subsetErasure d n s X
/-- Independent erasure of every physical qudit (C1, PDF p.24). -/
def iidErasure (d n : ℕ) (p : ℝ) : Superop ((Register (fun _ : Fin n => d))) (FlaggedRegister d n) :=
piSuperop fun _ => localErasure d p
/-- The physical gate extended by identity on the orthogonal erasure flag
(PDF p.8). -/
def flaggedGate {d : ℕ} (U : Matrix (Fin d) (Fin d) ℂ) :
Matrix (Option (Fin d)) (Option (Fin d)) ℂ
| some i, some j => U i j
| none, none => 1
| _, _ => 0
/-- Transversal implementation on the full tensor product of flagged local spaces
(PDF p.8). Idle sites and erasure flags are fixed. -/
def flaggedTransversal {d n : ℕ} (active : Fin n → Bool)
(U : Matrix (Fin d) (Fin d) ℂ) :
Matrix (FlaggedRegister d n) (FlaggedRegister d n) ℂ :=
fun x y => ∏ j, if active j then flaggedGate U (x j) (y j)
else if x j = y j then 1 else 0
/-- Joint projector onto the known erasure pattern s, including mixed patterns
(PDF p.8). -/
def erasurePatternProjector (d n : ℕ) (s : Finset (Fin n)) :
Matrix (FlaggedRegister d n) (FlaggedRegister d n) ℂ :=
Matrix.diagonal fun x => if ∀ j, (x j = none ↔ j ∈ s) then 1 else 0
/-- Vector-orbit support under U on one half and identity on the other
(D2--D3, PDF p.29). The rank of the twirled pure state is this dimension.
SOURCE CORRECTION: D1 prints the span of density operators. Its proof uses the
vector-orbit support instead. These dimensions differ; independent moderation is required. -/
def referenceOrbitSpan {d r : ℕ}
(psi : EuclideanSpace ℂ ((Register (fun _ : Fin r => d)) × (Register (fun _ : Fin r => d)))) :
Submodule ℂ (EuclideanSpace ℂ ((Register (fun _ : Fin r => d)) × (Register (fun _ : Fin r => d)))) :=
Submodule.span ℂ (Set.range fun U : (Matrix.specialUnitaryGroup (Fin d) ℂ) =>
act (Matrix.kronecker (piKron r (U : Matrix (Fin d) (Fin d) ℂ))
(1 : Matrix ((Register (fun _ : Fin r => d))) ((Register (fun _ : Fin r => d))) ℂ)) psi)
/-- Raw sine coefficients B8, PDF p.21, evaluated on integer indices. They are not
asserted to form a normalized law on the paper's declared [M]={1,...,M}. -/
def sineCoefficient (M : ℕ) (k : ℤ) : ℝ :=
2 / ((M : ℝ) + 1) *
Real.sin (Real.pi * (2 * (k : ℝ) + 1) / (2 * ((M : ℝ) + 1))) ^ 2
/-- B10, PDF p.22. The cutoff is 2n0; it is not the total physical code size.
Natural subtraction in the endpoint is used only for sufficiently large M. -/
def sineOverlapError (n0 M : ℕ) (delta : ℤ) : ℝ :=
1 - ∑ k ∈ Finset.Icc (2 * n0) (M - 2 * n0),
Real.sqrt (sineCoefficient M k * sineCoefficient M ((k : ℤ) + delta))
/-- SU(d) character of the actual Young-symmetrizer Schur module, not a free
character variable (A12, PDF p.12). -/
def schurCharacter {d m : ℕ} (lambda : QAlgorithms.Schur.Partition d m)
(U : (Matrix.specialUnitaryGroup (Fin d) ℂ)) : ℂ :=
LinearMap.trace ℂ (QAlgorithms.Schur.schurModule lambda)
(QAlgorithms.Schur.polynomialRepresentation lambda (U : Matrix (Fin d) (Fin d) ℂ))
/-- Canonical A12 estimate density for a finite support L and probability weights q.
At the true gate I the character is evaluated on U inverse (PDF pp.12,15). -/
def canonicalEstimateDensity {d m : ℕ} (L : Finset (QAlgorithms.Schur.Partition d m))
(q : QAlgorithms.Schur.Partition d m → ℝ) (U : (Matrix.specialUnitaryGroup (Fin d) ℂ)) : ℝ :=
Complex.normSq (∑ lambda ∈ L, (Real.sqrt (q lambda) : ℂ) * schurCharacter lambda U⁻¹)
/-- The actual UC tensor UL-star representation (A36, PDF p.15).
`map conj` is entrywise complex conjugation, not adjoint. -/
def costRepresentation (d nC : ℕ) (U : (Matrix.specialUnitaryGroup (Fin d) ℂ)) :
Matrix ((Register (fun _ : Fin nC => d)) × Fin d) ((Register (fun _ : Fin nC => d)) × Fin d) ℂ :=
Matrix.kronecker (piKron nC (U : Matrix (Fin d) (Fin d) ℂ))
((U : Matrix (Fin d) (Fin d) ℂ).map conj)
/-- A36--A37, PDF p.15: channel induced by the canonical surviving-frame estimate
law. Only lawful normalized q and Haar measure are used in the results. -/
def referenceCostChannel {d m : ℕ} (mu : Measure (Matrix.specialUnitaryGroup (Fin d) ℂ)) (nC : ℕ)
(L : Finset (QAlgorithms.Schur.Partition d m))
(q : QAlgorithms.Schur.Partition d m → ℝ) :
Superop ((Register (fun _ : Fin nC => d)) × Fin d) ((Register (fun _ : Fin nC => d)) × Fin d) :=
fun X => ∫ U, (canonicalEstimateDensity L q U : ℂ) • conjSuperop (costRepresentation d nC U) X ∂mu
/-- A39, PDF p.15: encode each integer shift in [-n0,n0] by a finite index.
The zero-sum constraint is imposed by `differenceIndices`. -/
def indexedDifference {d n0 : ℕ} (x : Fin d → Fin (2 * n0 + 1)) : Fin d → ℤ :=
fun i => (x i : ℤ) - (n0 : ℤ)
/-- Sdiff, A39, PDF p.15, a finite nonempty set containing the zero shift. -/
def differenceIndices (d n0 : ℕ) : Finset (Fin d → Fin (2 * n0 + 1)) :=
Finset.univ.filter fun x => ∑ i, indexedDifference x i = 0
/-- Extend q by zero to integer row vectors; different shifted diagrams are not
silently truncated into Young shapes (A39, PDF p.15). -/
def shiftedMass {d m : ℕ} (L : Finset (QAlgorithms.Schur.Partition d m))
(q : QAlgorithms.Schur.Partition d m → ℝ)
(lambda : QAlgorithms.Schur.Partition d m) (delta : Fin d → ℤ) : ℝ :=
∑ nu ∈ L, if ∀ i : Fin d,
(nu.val.rowLen i.val : ℤ) = (lambda.val.rowLen i.val : ℤ) + delta i then q nu else 0
/-- Sint: positive support with every pair of distinct rows separated by more than
3n0 (A38, PDF p.15). The `i ≠ j` guard is essential. -/
def interiorShapes {d m : ℕ} (n0 : ℕ) (L : Finset (QAlgorithms.Schur.Partition d m))
(q : QAlgorithms.Schur.Partition d m → ℝ) : Finset (QAlgorithms.Schur.Partition d m) :=
L.filter fun lambda => 0 < q lambda ∧ ∀ i j : Fin d, i ≠ j →
(3 * n0 : ℤ) < |(lambda.val.rowLen i.val : ℤ) - (lambda.val.rowLen j.val : ℤ)|
/-- Attained finite minimum in Lemma 2. Sint may be empty, giving a zero sum;
Sdiff is never empty (A38--A39, PDF p.15). -/
def minimumInteriorOverlap {d m : ℕ} (n0 : ℕ)
(L : Finset (QAlgorithms.Schur.Partition d m))
(q : QAlgorithms.Schur.Partition d m → ℝ) : ℝ :=
(differenceIndices d n0).inf'
(by
refine ⟨fun _ => ⟨n0, by omega⟩, ?_⟩
simp [differenceIndices, indexedDifference])
(fun x => ∑ lambda ∈ interiorShapes n0 L q,
Real.sqrt (q lambda * shiftedMass L q lambda (indexedDifference x)))
/-- Shifted integer rows in C6 (PDF p.25), with one-based source row j=i.val+1. -/
def schurWeylShiftedRow {d s : ℕ} (lambda : QAlgorithms.Schur.Partition d s) (i : Fin d) : ℕ :=
lambda.val.rowLen i.val + (d - 1 - i.val)
/-- Integer Schur--Weyl law C6, PDF p.25. This formula has no fractional Young
shapes and no interpolation of factorials. The factorial product includes 0!=1. -/
def schurWeylMass {d s : ℕ} (lambda : QAlgorithms.Schur.Partition d s) : ℝ :=
(Nat.factorial s : ℝ) *
(∏ i : Fin d, ∏ j : Fin d, if i < j then
((schurWeylShiftedRow lambda i : ℝ) - (schurWeylShiftedRow lambda j : ℝ)) ^ 2 else 1) /
((d : ℝ) ^ s * (∏ i : Fin d, (Nat.factorial (schurWeylShiftedRow lambda i) : ℝ)) *
(∏ i : Fin d, (Nat.factorial i.val : ℝ)))
/-- Gamma in C8, PDF p.25. The d=1 case is not used. -/
def schurWeylConstant (d : ℕ) : ℝ :=
(d : ℝ) ^ (d * (d - 1) / 2) / ∏ i : Fin d, (Nat.factorial i.val : ℝ)
/-- The integer convention for nC=n^gamma, with bounded downward rounding
(C.1, PDF p.24). The positive regime begins at the theorem's threshold. -/
def computationSize (gamma : ℝ) (n : ℕ) : ℕ := Nat.floor ((n : ℝ) ^ gamma)
/-- Sanity check for squared fidelity, A1, PDF p.10. -/
example : squaredFidelity (1 : Matrix Unit Unit ℂ) 1 = 1 := by
simp [squaredFidelity, rootFidelity, cfc_one]
example {d : ℕ} (U : Matrix (Fin d) (Fin d) ℂ) : flaggedGate U none none = 1 := rfl
example (d : ℕ) (a : Fin d) : localErasureKraus d 1 none (some a) a = 0 := by
simp [localErasureKraus]
example (d n0 : ℕ) : (differenceIndices d n0).Nonempty := by
refine ⟨fun _ => ⟨n0, by omega⟩, ?_⟩
simp [differenceIndices, indexedDifference]
example (d : ℕ) (U : Matrix (Fin d) (Fin d) ℂ) (x y : (Register (fun _ : Fin 0 => d))) :
maskedTransversalMatrix (fun _ => true) U x y = 1 := by
simp [maskedTransversalMatrix]
example : schurWeylConstant 2 = 2 := by
norm_num [schurWeylConstant, Fin.prod_univ_two]
end QAlgorithms.Papers.Independent.Extend50.P15
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P15.CovariantCode
For natural numbers , this structure consists of a Boolean function on the positions, an encoder mapping complex matrices to matrices indexed by -tuples of indices below , and a decoder mapping matrices indexed by -tuples of elements of to complex matrices. Each of must admit a finite Kraus representation for every input matrix , with rectangular matrices of the appropriate input and output dimensions satisfying . It also contains the requirement that, for every and every matrix ,
The parameters allow , with a singleton tuple register and empty product . They also allow , although then the decoder’s Kraus normalization cannot be satisfied, since its flagged input index set is nonempty and its output index set is empty.
QAlgorithms.Papers.Independent.Extend50.P15.FlaggedRegister
For natural numbers , a flagged register is a function from to : each of its positions contains either a distinguished flag or an index below . When , there is exactly one such register, the empty function; when , there is exactly one such register for every , with every position flagged.
QAlgorithms.Papers.Independent.Extend50.P15.IsNormalizedHaar
For a natural number and a measure on the Borel measurable space of , this predicate means that and that, for every , both the pushforward of under and its pushforward under equal . The definition includes .
QAlgorithms.Papers.Independent.Extend50.P15.IsSUChannelCovariant
For any natural number and any map from complex matrices to themselves, this predicate requires that, for every and every complex matrix ,
The predicate itself imposes no channel or linearity condition on , and it includes .
QAlgorithms.Papers.Independent.Extend50.P15.canonicalEstimateDensity
For arbitrary natural numbers , a finite set of Young diagrams having cells and first-column length at most , any real-valued function on all such diagrams, and , this defines
Here the squared modulus is the complex norm squared. To define , number the diagram’s cells by the fixed bijection with , let be the row-preserving and column-preserving permutation sets, and put , where is exactly when . Then is the trace on of , with denoting orthogonal projection and . The function has no positivity or normalization hypothesis; the real square root is zero on negative arguments. If is empty, the defined value is zero.
QAlgorithms.Papers.Independent.Extend50.P15.choiPairFidelity
For a natural number , a supplied hypothesis , and arbitrary maps from complex matrices to themselves, put , where is the corresponding matrix unit, and write for the total continuous functional calculus. The defined quantity is
The supplied positivity hypothesis on does not occur in the formula, and no channel assumption is imposed on either map.
QAlgorithms.Papers.Independent.Extend50.P15.computationSize
For every real number and natural number , this defines the natural-number floor of the real power : the greatest natural number at most , with the natural-number floor returning zero for a negative argument. No restriction is imposed on or . In particular, for , the total real-power convention gives value one when and value zero when .
QAlgorithms.Papers.Independent.Extend50.P15.costRepresentation
For arbitrary natural numbers and a complex unitary matrix of determinant , this defines the matrix
on , where and means entrywise complex conjugation. Explicitly,
The definition includes , when the product equals and the matrix identifies with , and , when its coordinate index set is empty.
QAlgorithms.Papers.Independent.Extend50.P15.covariantError
For natural numbers , write and . A code consists of an activity mask , an encoder from complex matrices to matrices on , and a decoder from matrices on to complex matrices. Both maps have finite Kraus representations with , and the encoder satisfies for every and every , where
For any function from matrices on to matrices on , with no channel assumption on , the defined error is
where is indexed by , , and . Here the extension means applying separately to each matrix block indexed by the reference coordinates, even when is merely a function. Both suprema are real suprema, using the real-valued convention of returning for an empty or unbounded-above set. No positivity of or is imposed separately; the code’s fields must still exist, and products over zero coordinates equal .
QAlgorithms.Papers.Independent.Extend50.P15.differenceIndices
For arbitrary natural numbers , this defines the finite set
where each subtraction and the sum are taken in the integers. Thus the coordinates encode shifts in whose sum is zero. The constant function is included; when , the set contains the unique empty function, and when , it contains only the zero function.
QAlgorithms.Papers.Independent.Extend50.P15.entanglementError
For a natural number , a supplied hypothesis , and arbitrary maps from complex matrices to themselves, define , indexed by pairs of indices below , by
where has entry at and zero elsewhere. The defined error is
The positivity hypothesis on is an argument of the definition but does not occur in this formula; no channel assumption is imposed on or .
QAlgorithms.Papers.Independent.Extend50.P15.erasurePatternProjector
For natural numbers and any subset , this defines the diagonal matrix on flagged strings by
Thus it retains precisely the coordinate basis vectors whose -positions are exactly . This includes the empty and full subsets. For , the only subset is empty and the matrix is ; for , it is if is the full coordinate set and otherwise.
QAlgorithms.Papers.Independent.Extend50.P15.flaggedGate
For any natural number and any complex matrix , this defines a matrix indexed by , with
There is no unitarity hypothesis on . When , this is the identity matrix on the sole index .
QAlgorithms.Papers.Independent.Extend50.P15.flaggedTransversal
For natural numbers , any activity mask , and any complex matrix , this defines a matrix on flagged strings by
where , , and all mixed entries are zero. No unitarity of or nonemptiness of the active coordinates is required. When , the product is empty and the resulting matrix is the identity on the singleton set of empty strings; when , the flagged register likewise contains only the all- string and the matrix is .
QAlgorithms.Papers.Independent.Extend50.P15.iidErasure
For all natural numbers and real numbers , this defines a function from matrices on to matrices on the flagged register . With and , its action on any matrix is
Thus it applies at every coordinate the Kraus map whose non-erasure coefficient is and whose erasure coefficient is . No assumption is imposed, so the definition does not itself assert that this is a channel for every . When , the product is and the map preserves scalar matrices; when , the input index set is empty and the output is zero.
QAlgorithms.Papers.Independent.Extend50.P15.indexedDifference
For arbitrary natural numbers and any function , this defines the integer-valued function
The subtraction takes place in the integers, so every coordinate lies between and , inclusively. If , this is the unique function on the empty set; if , all coordinates are zero.
QAlgorithms.Papers.Independent.Extend50.P15.interiorShapes
For natural numbers , a finite set of Young diagrams having exactly cells and at most rows, and an arbitrary real-valued function on all such diagrams, this defines the subset
where is the length of row , with absent rows having length zero. The row-length difference is taken in the integers. No normalization or nonnegativity assumption is imposed on outside the strict positivity test for retained diagrams. When or , the condition on distinct rows is vacuous; when is empty, the resulting set is empty.
QAlgorithms.Papers.Independent.Extend50.P15.localErasure
For every natural number and real number , this defines the function on arbitrary complex matrices
where sends the basis vector to , and sends the basis vector to and all other basis vectors to zero. Equivalently, its entries are
with all mixed entries zero. No restriction on , normalization of , or channel property is asserted here. For , the output is the zero matrix on the singleton index set .
QAlgorithms.Papers.Independent.Extend50.P15.localErasureKraus
For every natural number and real number , this defines matrices , with columns indexed by and rows and labels indexed by , by
The real square roots are regarded as complex entries. There is no assumption ; the real square root of a negative number is . When , only the label remains, and its matrix has no columns.
QAlgorithms.Papers.Independent.Extend50.P15.maskedTransversalMatrix
For natural numbers , a Boolean function on , and any complex matrix , this definition gives a matrix indexed by functions , with entries
No unitarity assumption is made on . For , the index set is a singleton and the empty product gives the matrix ; for , the index set is empty.
QAlgorithms.Papers.Independent.Extend50.P15.minimumInteriorOverlap
For natural numbers , a finite set of Young diagrams with cells and at most rows, and an arbitrary real function on those diagrams, let consist of the such that and for all distinct row indices , where missing rows have length zero. This defines the real number
The minimum is over a finite nonempty set, since it contains the zero vector; in the code, with . No sign or normalization assumptions are made on , and the real square root is the total function that returns zero on negative inputs. If is empty, the value is zero. The definition includes , when the unique shift is the empty vector and the row conditions are vacuous, and , when only the zero shift is available.
QAlgorithms.Papers.Independent.Extend50.P15.referenceCostChannel
For arbitrary natural numbers , any measure on the Borel measurable space , a finite set of Young diagrams with cells and first-column length at most , and any real-valued function on all such diagrams, this defines a function on complex matrices indexed by by
Here , denotes conjugate transpose, and consists of unitary matrices of determinant . For each , use the fixed numbering of its cells, form , summing over row-preserving and column-preserving , where exactly when ; then is the trace on of the map , with orthogonal projection and tensor entries . No normalization or invariance of , and no positivity or normalization of , is assumed; real square roots of negative numbers are zero. The integral is the Bochner integral, assigned zero when the integrand is not integrable. Empty products equal , and gives the zero function.
QAlgorithms.Papers.Independent.Extend50.P15.referenceOrbitSpan
For arbitrary natural numbers , let and let , where is the set of functions from to . For any vector , this defines the complex linear subspace
Here consists of complex unitary matrices with determinant , and the vector associated with has coordinates
No normalization of is required. The definition includes and ; empty products equal , and when the subspace is simply the span of .
QAlgorithms.Papers.Independent.Extend50.P15.schurCharacter
For arbitrary natural numbers , a Young diagram with exactly cells and first-column length at most , and a complex unitary matrix of determinant , this defines a complex number as follows. Use the fixed bijection selected in the definitions between the cells of and . Let be the permutations preserving each cell’s row and those preserving each cell’s column under this numbering. On , define by if , and otherwise, and set
Writing for orthogonal projection onto , the defined number is
Zero values of or are included whenever such a diagram exists, with empty products equal to .
QAlgorithms.Papers.Independent.Extend50.P15.schurWeylConstant
For every natural number , this defines the real number
The exponent is computed in the natural numbers: subtraction is truncated at zero and division by two is natural-number division; is even, so the exponent is an integer. Factorials and the base are converted to real numbers for the displayed expression. For , the empty denominator product and both equal one, so the value is one.
QAlgorithms.Papers.Independent.Extend50.P15.schurWeylMass
For natural numbers and a Young diagram having exactly cells and at most rows, write for its row lengths, using zero for absent rows, and put for . This defines the real number
Factorials and offsets are computed in the natural numbers and then converted to real numbers; the differences in the numerator are real differences. Empty products equal one, and division uses the total real division operation, under which division by zero returns zero. The definition has no positivity assumptions on or ; when , its value is one, while no diagram satisfying the stated conditions exists when .
QAlgorithms.Papers.Independent.Extend50.P15.schurWeylShiftedRow
For natural numbers , a Young diagram with exactly cells and at most rows, and an index , this defines the natural number
where is the length of row , or zero if that row is absent. The subtractions in the definition are natural-number subtraction, truncated at zero, although the bound makes the displayed offset nonnegative. When , there is no possible index .
QAlgorithms.Papers.Independent.Extend50.P15.shiftedMass
For arbitrary natural numbers , a finite set of Young diagrams with exactly cells and first-column length at most , any real-valued function on all such diagrams, one such diagram , and any integer-valued function , this defines
Row lengths are regarded as integers in these equalities, so subtraction is not truncated and a negative prescribed row length admits no matching diagram. The diagram need not belong to , the shifts have no assumed bound or zero-sum condition, and has no positivity or normalization requirement. If no diagram matches, including when is empty, the value is zero; when , the row-equality condition is vacuous.
QAlgorithms.Papers.Independent.Extend50.P15.sineCoefficient
For every natural number , including , and every integer , this defines the real number
The integer is unrestricted, including negative integers and integers outside ; the denominator is always positive.
QAlgorithms.Papers.Independent.Extend50.P15.sineOverlapError
For arbitrary natural numbers and any integer , this defines
The upper endpoint uses natural-number subtraction, so it is truncated at zero. The sum is zero when the interval is empty, in which case . The shifted index is an integer and is not restricted to the summation interval.
QAlgorithms.Papers.Independent.Extend50.P15.specialUnitaryMeasurable
For every natural number , the measurable space assigned to the group of complex special unitary matrices is its Borel measurable space, generated by the open sets of its topology. This includes , where the group consists of the unique empty matrix.
QAlgorithms.Papers.Independent.Extend50.P15.stabilizedHalfDiamondError
Let be finite types, with decidable equality on , and let be arbitrary maps from complex matrices to complex matrices. Define
The defined quantity is the real supremum of over every integer and every positive semidefinite matrix indexed by with trace . No channel or linearity assumption is imposed on the maps. Empty types are allowed; if is empty, the set is empty and its real supremum is . The real supremum operation is also total, taking value for a set unbounded above.
QAlgorithms.Papers.Independent.Extend50.P15.subsetErasure
For natural numbers and any subset , this defines a function from complex matrices on to matrices on the flagged register , by applying at coordinate the local Kraus map with parameter if and parameter otherwise. Explicitly, for every matrix ,
The ket notation denotes the corresponding coordinate matrix units. The empty subset erases no coordinates, while the full subset produces times the matrix unit at the all- string. When , both register index sets are singletons and the map preserves the scalar matrix; when , the input index set is empty and the output is zero.
QAlgorithms.Papers.Independent.Extend50.P15.uniformSubsetErasure
For all natural numbers , this defines the function
from matrices indexed by to matrices indexed by the flagged strings . Here is specified on matrix units by
where replaces coordinates in by and replaces every other coordinate by ; the map is extended linearly to arbitrary matrices. The reciprocal is taken in and then regarded as a complex scalar. In particular, if , the sum is empty and , whose reciprocal is defined to be , so the resulting map is zero. If , no coordinate is erased; if , every coordinate is erased. These definitions also include and .
QAlgorithms.Papers.Independent.Extend50.P15.worstFidelity
Let be finite types, with decidable equality on , and let be arbitrary maps from complex matrices indexed by to complex matrices indexed by . Write , using the total continuous functional calculus, and set . For a positive integer , define the reference extension of either map by
The defined quantity is the real infimum of over all integers and all positive semidefinite matrices indexed by with . No channel, linearity, or positivity assumption is imposed on or . The types may be empty; if is empty, no such exists and the real infimum of the empty set is defined to be .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.