Definitions for Approximate recovery with locality and symmetry constraints
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P44The objects the formalized statements of Approximate recovery with locality and symmetry constraints (arXiv:1806.10324) are stated in. Each was checked against the paper by a blind read-back and a moderator.
ObservableAlgebra: PDF p.3: unital dagger algebra with its canonical Hilbert--Schmidt orthogonal projection channel. Range and orthogonality uniquely specify it.IsPhysicalChannel: PDF p.3, Definition 1; no condition is imposed on forbidden output coherences.FixesObservables: PDF pp.7--8: fixing an observable algebra is a Heisenberg condition.fixedFidelity: Root entanglement fidelity on the specified normalized input, retaining the identity reference. PDF p.4, Eq.(5).Comparison: The two comparison domains in Eqs.(5)--(6), PDF pp.3--4. An encoding is an isometry; no surjectivity or fixed-charge assumption occurs.comparisonRootFidelity: PDF p.4, Eq.(6): infimum over ALL normalized logical densities. For channels the value set is nonempty and contained in [0,1]; compactness makes this infimum a minimum. The fixed branch uses ROOT fidelity as well.SameMaximum: Equality of attained maxima, avoiding totalized real suprema on empty sets. This includes the existence of both optimizers stated on PDF pp.5,8--9.IsChannelDilation: A true Stinespring dilation of N, on every matrix. PDF pp.4,8.krausComplement: Ordinary complementary channel of a normalized Kraus family. The entry (i,j) is Tr(E_j† E_i rho), PDF p.4, Eq.(9).IsGeneralizedComplement: PDF p.4: complements include channels reversibly postprocessable to a Stinespring complement, with BOTH postprocessings CPTP.localComplement: PDF p.8, Definition 3, Eq.(33): the local environment retains B TOGETHER with the dilation environment, rather than the environment alone.Sectors: PDF p.5, Section III B: nonzero orthogonal sector projectors, with pairwise distinct real charge eigenvalues.sectorProject: PDF p.5, Eq.(14), the canonical blind charge measurement.sectorChargeObservable: PDF p.5: the charge is computed from the sector data.PhysicallyCorrectable: Exact PHYSICAL correction to P on the encoded space, PDF pp.3,5. Equality on all logical matrices is equivalent by linearity to equality on all logical density matrices; reference extensions are thereby retained.ChargeStateCondition: PDF p.5, Eqs.(18),(20): each conditional output is normalized only AFTER summing its classical output sectors. Individual blocks need not have trace 1.ChargeCoefficients: PDF p.5, Eq.(21): one coefficient family, uniform in all subsequent indices.constantChannel: PDF p.9, Eq.(48): constant-output channel, on ALL matrices.TensorCorrectable: PDF pp.9--10: tensor-local exact correction on an arbitrary JOINT code.codeSlice: PDF p.10, Eq.(51): W_n = (I tensor <n|) W.Fermions: PDF pp.2--3: a finite spinless-fermion CAR representation on its actual 2^n-dimensional Fock space. Minimal dimension prevents extra spectator sectors.totalParity: PDF pp.2--3: total parity, up to the immaterial global sign convention. i^n times the ordered product of 2n Majoranas is a Hermitian involution. Printed, PDF p.2 Eq.(1): i^(|omega|-1) for Majorana labels. Changed: i^n on 2n ordered modes. Why: the printed four-mode value is anti-Hermitian and squares to -I; parity must be a Hermitian involution.parityProject: PDF p.3: blind parity measurement.DefiniteParity: PDF p.3, Proposition 1: both preserving and flipping parity are allowed.evenRegion: PDF pp.2--3,10: the even algebra supported on a set of Majorana indices. Repeated indices are harmless under CAR; the empty word supplies the identity.StrongLocal: PDF p.7, Definition 2: strong locality retains BOTH clauses.siteModes: The two Majoranas for each fermionic SITE in omega, PDF pp.2--3,10.regionParity: PDF p.10: regional parity for site regions, including the empty region. Printed, PDF p.2 Eq.(1): i^(|omega|-1) for Majorana labels. Changed: i^m on the 2m ordered modes of m sites, up to overall sign. Why: the printed four-mode value is anti-Hermitian and squares to -I, contrary to the source's parity involution and sector-projector conventions.paritySector: PDF pp.3,10: plus sector indexed by false, minus by true.StrongCorrectable: PDF pp.9--10: exact strong-local correction of the algebra A vee A'. For the even algebra of a SITE region this target is regional parity dephasing.RegionalStateCondition: PDF p.10, Eq.(53); one normalized environmental state per regional sector. The order X_ij E_i† B E_j is copied from the rendered page.RegionalCoefficients: PDF p.10, Eq.(54): the coefficient family is UNIFORM in the commutant observable Y. Sector compression is on both sides, without division by its weight.ringGap: PDF pp.6,10: number of paired Majoranas strictly between adjacent free modes.RingLayout: PDF pp.6--7,10--11: ordered free modes and the alternating nearest-neighbor paired intervals between them. Even gaps give the alternating pairing types.modeAt: Cyclic mode at a specified offset.pairingProjector: PDF pp.6--7,10--11: ACTUAL pairing-ground projector. Each paired nearest-neighbor fermion is initialized in its vacuum. The ordered bond (a,b) has vacuum projector (I-i w_a w_b)/2; reversing bond orientation changes its sign. The free modes receive no projector, so ALL their states are encoded.RingCode: PDF pp.6--7: an isometry ONTO the computed pairing ground code, not an arbitrary invariant subspace. Logical dimension is exactly 2^k.minimumGap: PDF p.10: shortest paired interval. Initial bound 2n dominates every gap; the nonempty list has length 2k. Empty paired intervals therefore give d=0.HasIntervalSupport: PDF p.10: a WHOLE Kraus operator is an even polynomial supported in one cyclic interval containing length modes; length=0 permits only scalar operators.poisoning: PDF pp.6--7: equally weighted jumps on the first two unpaired Majoranas.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P60
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P48
import Definitions.Def_QAlgorithms_Papers_Independent_Renew46_P43
/-!
Statements from Bény, Zimborás and Pastawski, arXiv:1806.10324v2.
All spaces are finite matrix spaces. Nonempty ambient and logical index types
are explicit theorem assumptions. New interfaces are paper-local.
The independent-paper override permits imports from the pinned accepted library;
exactly matching matrix, tensor, adjoint and purification interfaces are reused.
The four source-ambiguity nodes are recorded in HARD.md, not asserted here.
-/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intakethird100.P44
open scoped Matrix ComplexConjugate ComplexOrder
open QAlgorithms.Papers.Independent.Information100.P60 (Mat)
open QAlgorithms.Papers.Independent.Information100.P67 (mapFirst)
open QAlgorithms.Papers.Independent.Claimed50.P48 (operatorTraceDual)
open QAlgorithms.Papers.Independent.Renew46.P43 (purification)
variable {H K L J E F B : Type*}
variable [Fintype H] [DecidableEq H] [Fintype K] [DecidableEq K]
variable [Fintype L] [DecidableEq L] [Fintype J] [DecidableEq J]
variable [Fintype E] [DecidableEq E] [Fintype F] [DecidableEq F]
variable [Fintype B] [DecidableEq B]
/-- PDF p.3: unital dagger algebra with its canonical Hilbert--Schmidt
orthogonal projection channel. Range and orthogonality uniquely specify it. -/
structure ObservableAlgebra (H : Type*) [Fintype H] [DecidableEq H] where
algebra : StarSubalgebra ℂ (Mat H)
project : Superop H H
channel : IsChannel project
range_mem : ∀ X, project X ∈ algebra
orthogonal : ∀ X Y, Y ∈ algebra → ((X - project X)ᴴ * Y).trace = 0
/-- PDF p.3, Definition 1; no condition is imposed on forbidden output coherences. -/
def IsPhysicalChannel (P : Superop H H) (Q : Superop K K) (N : Superop H K) : Prop :=
∀ X, Q (N (P X)) = Q (N X)
/-- PDF pp.7--8: fixing an observable algebra is a Heisenberg condition. -/
def FixesObservables (A : Set (Mat H)) (N : Superop H H) : Prop :=
∀ X ∈ A, operatorTraceDual N X = X
/-- Root entanglement fidelity on the specified normalized input, retaining
the identity reference. PDF p.4, Eq.(5). -/
def fixedFidelity (rho : Mat H) (N M : Superop H K) : ℝ :=
rootFidelity (idTensorSuperop N (purification rho))
(idTensorSuperop M (purification rho))
/-- The two comparison domains in Eqs.(5)--(6), PDF pp.3--4.
An encoding is an isometry; no surjectivity or fixed-charge assumption occurs. -/
inductive Comparison (H : Type*) [Fintype H] [DecidableEq H] where
| fixed (rho : Mat H) (normalized : IsDensityMatrix rho)
| code (k : ℕ) (positive : 0 < k) (W : Matrix H (Fin k) ℂ)
(isometry : Wᴴ * W = 1)
/-- PDF p.4, Eq.(6): infimum over ALL normalized logical densities.
For channels the value set is nonempty and contained in [0,1]; compactness
makes this infimum a minimum. The fixed branch uses ROOT fidelity as well. -/
def comparisonRootFidelity (c : Comparison H) (N M : Superop H K) : ℝ :=
match c with
| .fixed rho _ => fixedFidelity rho N M
| .code k _ W _ =>
sInf {t : ℝ | ∃ rho : Mat (Fin k), IsDensityMatrix rho ∧
t = fixedFidelity rho (N ∘ conjSuperop W) (M ∘ conjSuperop W)}
/-- Equality of attained maxima, avoiding totalized real suprema on empty sets.
This includes the existence of both optimizers stated on PDF pp.5,8--9. -/
def SameMaximum {X Y : Type*} (allowedX : X → Prop) (f : X → ℝ)
(allowedY : Y → Prop) (g : Y → ℝ) : Prop :=
∃ x y, allowedX x ∧ allowedY y ∧ f x = g y ∧
(∀ x2, allowedX x2 → f x2 ≤ f x) ∧
(∀ y2, allowedY y2 → g y2 ≤ g y)
/-- A true Stinespring dilation of N, on every matrix. PDF pp.4,8. -/
def IsChannelDilation (N : Superop H K) (V : Matrix (K × E) H ℂ) : Prop :=
Vᴴ * V = 1 ∧ ∀ X, N X = traceRight (conjSuperop V X)
/-- Ordinary complementary channel of a normalized Kraus family. The entry
(i,j) is Tr(E_j† E_i rho), PDF p.4, Eq.(9). -/
def krausComplement (A : J → Matrix K H ℂ) : Superop H J :=
fun X i j => (A i * X * (A j)ᴴ).trace
/-- PDF p.4: complements include channels reversibly postprocessable to a
Stinespring complement, with BOTH postprocessings CPTP. -/
def IsGeneralizedComplement (N : Superop H K) (C : Superop H E) : Prop :=
∃ (m : ℕ) (A : Fin m → Matrix K H ℂ), IsKrausFamily A ∧ N = krausApply A ∧
∃ (R : Superop (Fin m) E) (S : Superop E (Fin m)),
IsChannel R ∧ IsChannel S ∧ C = R ∘ krausComplement A ∧
krausComplement A = S ∘ C
/-- PDF p.8, Definition 3, Eq.(33): the local environment retains B TOGETHER
with the dilation environment, rather than the environment alone. -/
def localComplement (A : ObservableAlgebra H) (V : Matrix (H × E) H ℂ) :
Superop H (H × E) :=
mapFirst A.project ∘ conjSuperop V
/-- PDF p.5, Section III B: nonzero orthogonal sector projectors, with
pairwise distinct real charge eigenvalues. -/
structure Sectors (H : Type*) [Fintype H] [DecidableEq H] (r : ℕ) where
P : Fin r → Mat H
hermitian : ∀ i, (P i)ᴴ = P i
nonzero : ∀ i, P i ≠ 0
orthogonal : ∀ i j, P i * P j = if i = j then P i else 0
complete : ∑ i, P i = 1
values : Fin r → ℝ
distinct : Function.Injective values
/-- PDF p.5, Eq.(14), the canonical blind charge measurement. -/
def sectorProject {r : ℕ} (s : Sectors H r) : Superop H H :=
fun X => ∑ i, s.P i * X * s.P i
/-- PDF p.5: the charge is computed from the sector data. -/
def sectorChargeObservable {r : ℕ} (s : Sectors H r) : Mat H :=
∑ i, (s.values i : ℂ) • s.P i
/-- Exact PHYSICAL correction to P on the encoded space, PDF pp.3,5.
Equality on all logical matrices is equivalent by linearity to equality on
all logical density matrices; reference extensions are thereby retained. -/
def PhysicallyCorrectable (P : Superop H H) (N : Superop H H) (W : Matrix H L ℂ) : Prop :=
∃ R : Superop H H, IsChannel R ∧ IsPhysicalChannel P P R ∧
∀ X : Mat L, R (N (conjSuperop W X)) = P (conjSuperop W X)
/-- PDF p.5, Eqs.(18),(20): each conditional output is normalized only
AFTER summing its classical output sectors. Individual blocks need not have trace 1. -/
def ChargeStateCondition {r : ℕ} (s : Sectors H r) (A : J → Mat H)
(W : Matrix H L ℂ) : Prop :=
∃ sigma : Fin r → Fin r → Mat J,
(∀ i j, (sigma i j).PosSemidef) ∧
(∀ i, ∑ j, (sigma i j).trace = 1) ∧
∀ j n m, Wᴴ * (A n)ᴴ * s.P j * A m * W =
∑ i, (sigma i j n m) • (Wᴴ * s.P i * W)
/-- PDF p.5, Eq.(21): one coefficient family, uniform in all subsequent indices. -/
def ChargeCoefficients {r : ℕ} (s : Sectors H r) (A : J → Mat H)
(W : Matrix H L ℂ) : Prop :=
∃ c : Fin r → Fin r → J → J → ℂ,
∀ j n m, Wᴴ * (A n)ᴴ * s.P j * A m * W =
∑ i, c i j n m • (Wᴴ * s.P i * W)
/-- PDF p.9, Eq.(48): constant-output channel, on ALL matrices. -/
def constantChannel (sigma : Mat K) : Superop H K :=
fun X => X.trace • sigma
/-- PDF pp.9--10: tensor-local exact correction on an arbitrary JOINT code. -/
def TensorCorrectable (N : Superop H H) (W : Matrix (H × B) L ℂ) : Prop :=
∃ R : Superop H H, IsChannel R ∧ ∀ X : Mat L,
mapFirst (R ∘ N) (conjSuperop W X) = conjSuperop W X
/-- PDF p.10, Eq.(51): W_n = (I tensor <n|) W. -/
def codeSlice (W : Matrix (H × B) L ℂ) (n : B) : Matrix H L ℂ :=
fun a l => W (a, n) l
/-- PDF pp.2--3: a finite spinless-fermion CAR representation on its actual
2^n-dimensional Fock space. Minimal dimension prevents extra spectator sectors. -/
structure Fermions (n : ℕ) where
w : Fin (2 * n) → Mat (Fin (2 ^ n))
hermitian : ∀ j, (w j)ᴴ = w j
car : ∀ i j, w i * w j + w j * w i =
if i = j then (2 : ℂ) • 1 else 0
/-- PDF pp.2--3: total parity, up to the immaterial global sign convention.
i^n times the ordered product of 2n Majoranas is a Hermitian involution.
Printed, PDF p.2 Eq.(1): i^(|omega|-1) for Majorana labels.
Changed: i^n on 2n ordered modes. Why: the printed four-mode value is
anti-Hermitian and squares to -I; parity must be a Hermitian involution. -/
def totalParity {n : ℕ} (f : Fermions n) : Mat (Fin (2 ^ n)) :=
(Complex.I ^ n) • (List.ofFn f.w).prod
/-- PDF p.3: blind parity measurement. -/
def parityProject (C : Mat H) : Superop H H :=
fun X => (1 / 2 : ℂ) • (X + C * X * C)
/-- PDF p.3, Proposition 1: both preserving and flipping parity are allowed. -/
def DefiniteParity (C X : Mat H) : Prop :=
X * C = C * X ∨ X * C = -(C * X)
/-- PDF pp.2--3,10: the even algebra supported on a set of Majorana indices.
Repeated indices are harmless under CAR; the empty word supplies the identity. -/
def evenRegion {n : ℕ} (f : Fermions n) (S : Finset (Fin (2 * n))) :
Submodule ℂ (Mat (Fin (2 ^ n))) :=
Submodule.span ℂ {X | ∃ word : List (Fin (2 * n)),
(∀ j ∈ word, j ∈ S) ∧ Even word.length ∧ X = (word.map f.w).prod}
/-- PDF p.7, Definition 2: strong locality retains BOTH clauses. -/
def StrongLocal (A : Set (Mat H)) (N : Superop H H) : Prop :=
IsChannel N ∧ (∀ X ∈ A, operatorTraceDual N X ∈ A) ∧
FixesObservables (Set.centralizer A) N
/-- The two Majoranas for each fermionic SITE in omega, PDF pp.2--3,10. -/
def siteModes {n : ℕ} (omega : Finset (Fin n)) : Finset (Fin (2 * n)) :=
Finset.univ.filter fun j => ∃ s ∈ omega, j.val / 2 = s.val
/-- PDF p.10: regional parity for site regions, including the empty region.
Printed, PDF p.2 Eq.(1): i^(|omega|-1) for Majorana labels.
Changed: i^m on the 2m ordered modes of m sites, up to overall sign.
Why: the printed four-mode value is anti-Hermitian and squares to -I,
contrary to the source's parity involution and sector-projector conventions. -/
def regionParity {n : ℕ} (f : Fermions n) (omega : Finset (Fin n)) :
Mat (Fin (2 ^ n)) :=
(Complex.I ^ omega.card) •
(((List.finRange (2 * n)).filter fun j => j ∈ siteModes omega).map f.w).prod
/-- PDF pp.3,10: plus sector indexed by false, minus by true. -/
def paritySector (C : Mat H) (k : Bool) : Mat H :=
(1 / 2 : ℂ) • (1 + (if k then -C else C))
/-- PDF pp.9--10: exact strong-local correction of the algebra A vee A'.
For the even algebra of a SITE region this target is regional parity dephasing. -/
def StrongCorrectable (A : Set (Mat H)) (C : Mat H)
(N : Superop H H) (W : Matrix H L ℂ) : Prop :=
∃ R : Superop H H, StrongLocal A R ∧ ∀ X : Mat L,
R (N (conjSuperop W X)) = parityProject C (conjSuperop W X)
/-- PDF p.10, Eq.(53); one normalized environmental state per regional sector.
The order X_ij E_i† B E_j is copied from the rendered page. -/
def RegionalStateCondition (A : Set (Mat H)) (C : Mat H)
(noise : J → Mat H) (W : Matrix H L ℂ) : Prop :=
∃ rho : Bool → Mat J, (∀ k, IsDensityMatrix (rho k)) ∧
∀ (Y : Mat H), Y ∈ Set.centralizer A → ∀ X : Mat J,
(∑ i, ∑ j, X i j • (Wᴴ * (noise i)ᴴ * Y * noise j * W)) =
∑ k : Bool, (rho k * X).trace •
(Wᴴ * paritySector C k * Y * paritySector C k * W)
/-- PDF p.10, Eq.(54): the coefficient family is UNIFORM in the commutant
observable Y. Sector compression is on both sides, without division by its weight. -/
def RegionalCoefficients (A : Set (Mat H)) (C : Mat H)
(noise : J → Mat H) (W : Matrix H L ℂ) : Prop :=
∃ lambda : J → J → Bool → ℂ, ∀ i j k (Y : Mat H), Y ∈ Set.centralizer A →
Wᴴ * (noise i)ᴴ * noise j * (paritySector C k * Y * paritySector C k) * W =
lambda i j k • (Wᴴ * (paritySector C k * Y * paritySector C k) * W)
/-- PDF pp.6,10: number of paired Majoranas strictly between adjacent free modes. -/
def ringGap {n k : ℕ} (free : Fin (2 * k) → Fin (2 * n))
(j : Fin (2 * k)) : ℕ :=
((free (finRotate (2 * k) j)).val + 2 * n - (free j).val - 1) % (2 * n)
/-- PDF pp.6--7,10--11: ordered free modes and the alternating nearest-neighbor
paired intervals between them. Even gaps give the alternating pairing types. -/
structure RingLayout (n k : ℕ) where
sites_pos : 0 < n
logical_pos : 0 < k
free : Fin (2 * k) → Fin (2 * n)
ordered : StrictMono free
even_gaps : ∀ j, Even (ringGap free j)
/-- Cyclic mode at a specified offset. -/
def modeAt {n : ℕ} (hn : 0 < n) (j : Fin (2 * n)) (offset : ℕ) : Fin (2 * n) :=
⟨(j.val + offset) % (2 * n), Nat.mod_lt _ (by omega)⟩
/-- PDF pp.6--7,10--11: ACTUAL pairing-ground projector. Each paired
nearest-neighbor fermion is initialized in its vacuum. The ordered bond (a,b)
has vacuum projector (I-i w_a w_b)/2; reversing bond orientation changes its sign.
The free modes receive no projector, so ALL their states are encoded. -/
def pairingProjector {n k : ℕ} (f : Fermions n) (r : RingLayout n k) :
Mat (Fin (2 ^ n)) :=
(((List.finRange (2 * k)).flatMap fun j =>
(List.range (ringGap r.free j / 2)).map fun t =>
(1 / 2 : ℂ) • (1 - Complex.I •
(f.w (modeAt r.sites_pos (r.free j) (1 + 2 * t)) *
f.w (modeAt r.sites_pos (r.free j) (2 + 2 * t)))))).prod
/-- PDF pp.6--7: an isometry ONTO the computed pairing ground code, not an
arbitrary invariant subspace. Logical dimension is exactly 2^k. -/
structure RingCode {n k : ℕ} (f : Fermions n) (r : RingLayout n k) where
W : Matrix (Fin (2 ^ n)) (Fin (2 ^ k)) ℂ
isometry : Wᴴ * W = 1
onto_pairing_ground : W * Wᴴ = pairingProjector f r
/-- PDF p.10: shortest paired interval. Initial bound 2n dominates every gap;
the nonempty list has length 2k. Empty paired intervals therefore give d=0. -/
def minimumGap {n k : ℕ} (r : RingLayout n k) : ℕ :=
(List.ofFn (ringGap r.free)).foldl min (2 * n)
/-- PDF p.10: a WHOLE Kraus operator is an even polynomial supported in one
cyclic interval containing length modes; length=0 permits only scalar operators. -/
def HasIntervalSupport {n : ℕ} (f : Fermions n)
(X : Mat (Fin (2 ^ n))) (length : ℕ) : Prop :=
∃ start : Fin (2 * n), X ∈ evenRegion f
(Finset.univ.filter fun j =>
(j.val + 2 * n - start.val) % (2 * n) < length)
/-- PDF pp.6--7: equally weighted jumps on the first two unpaired Majoranas. -/
def poisoning {n k : ℕ} (f : Fermions n) (r : RingLayout n k) :
Superop (Fin (2 ^ n)) (Fin (2 ^ n)) :=
let a : Fin (2 * k) := ⟨0, by have := r.logical_pos; omega⟩
let b : Fin (2 * k) := ⟨1, by have := r.logical_pos; omega⟩
fun X => (1 / 2 : ℂ) •
(conjSuperop (f.w (r.free a)) X + conjSuperop (f.w (r.free b)) X)
/-- Sanity check for the reused trace adjoint on matrix units. -/
example (N : Superop H K) (X : Mat K) (i j : H) :
operatorTraceDual N X i j = (N (Matrix.single j i 1) * X).trace := by
rfl
example {n k : ℕ} (f : Fermions n) (r : RingLayout n k)
(hz : ∀ j, ringGap r.free j = 0) : pairingProjector f r = 1 := by
simp only [pairingProjector, hz, Nat.zero_div, List.range_zero, List.map_nil]
have hempty : ∀ js : List (Fin (2 * k)),
js.flatMap (fun _ => ([] : List (Mat (Fin (2 ^ n))))) = [] := by
intro js
induction js with
| nil => rfl
| cons j js ih => simpa only [List.flatMap_cons, List.nil_append] using ih
rw [hempty]
rfl
example (N : Superop H K) : IsPhysicalChannel id id N := by
intro X
rfl
example (N : Superop H K) (X : Mat (H × B)) (i j : K) (b b2 : B) :
mapFirst N X (i, b) (j, b2) = N (fun a a2 => X (a, b) (a2, b2)) i j := by
rfl
example (sigma : Mat K) : constantChannel (H := H) sigma (0 : Mat H) = 0 := by
simp [constantChannel]
example (W : Matrix (H × B) L ℂ) (a : H) (b : B) (l : L) :
codeSlice W b a l = W (a, b) l := by
rfl
example (f : Fermions 0) : totalParity f = 1 := by
simp [totalParity]
example {n : ℕ} (f : Fermions n) : regionParity f ∅ = 1 := by
simp [regionParity, siteModes]
example : paritySector (1 : Mat H) true = 0 := by
simp [paritySector]
example (C : Mat H) : DefiniteParity C 1 := by
exact Or.inl (by simp)
end QAlgorithms.Papers.Independent.Intakethird100.P44
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P44.ChargeCoefficients
Let be a finite index type with decidable equality, index types, and a natural number. Let , , be nonzero Hermitian projections, mutually orthogonal and summing to , with pairwise distinct real values . Given matrices , indexed by , and a complex matrix , the coefficient condition means that there exist complex numbers , indexed by and , such that
The coefficients have no positivity, Hermitian symmetry, or normalization requirements. No isometry condition on or Kraus normalization of the is imposed. If is empty, the equalities are vacuous; is also permitted when is empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.ChargeStateCondition
Let be a finite index type with decidable equality, a finite index type, an index type, and a natural number. Let , , be nonzero Hermitian projections with for and , carrying pairwise distinct real values . Given matrices , indexed by , and a complex matrix , the condition means that there exist matrices , for every , such that each is positive semidefinite, for each , and
No isometry condition on or Kraus normalization of is imposed by this definition. If is empty and , the trace normalization is impossible; if , all the displayed requirements are vacuous, with the sector data forcing to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.Comparison
For a finite type with decidable equality, a comparison is data of exactly one of two forms: either a square complex matrix indexed by , together with proofs that is positive semidefinite and ; or a natural number , together with a complex matrix having rows indexed by and columns indexed by , satisfying . Thus the second form specifies an isometric embedding of a positive-dimensional space. If is empty, neither form can be supplied; is excluded.
QAlgorithms.Papers.Independent.Intakethird100.P44.DefiniteParity
For complex square matrices on an index type , this predicate means
The disjunction is inclusive: both equations may hold, as happens when or . No normalization, Hermiticity, or invertibility condition is imposed on either matrix.
QAlgorithms.Papers.Independent.Intakethird100.P44.Fermions
For every natural number , this structure consists of complex matrices , together with the requirements that every is Hermitian and that, for all ,
Thus each , and distinct matrices anticommute. The case is included: the underlying matrices have size , but there are no , so both requirements are vacuous.
QAlgorithms.Papers.Independent.Intakethird100.P44.FixesObservables
For a finite index type with decidable equality, a set , and an arbitrary map , this predicate means that for every and every ,
where is the matrix with entry at row , column , and zero elsewhere. No channel or linearity assumption on is part of the predicate. The set may be empty, in which case the condition is vacuous.
QAlgorithms.Papers.Independent.Intakethird100.P44.HasIntervalSupport
For every natural number , a family of Hermitian complex matrices satisfying when and otherwise, a complex matrix , and a natural number , this predicate says that there exists a starting index such that belongs to the complex linear span of all products
Here is any natural number, repeated indices and arbitrary ordering are permitted, and the empty product is . Thus permits precisely scalar multiples of when a starting index exists; for and , every mode index is permitted. For , the predicate is false because there is no starting index.
QAlgorithms.Papers.Independent.Intakethird100.P44.IsChannelDilation
For finite index types with decidable equality, an arbitrary map , and a complex matrix with rows indexed by and columns indexed by , this predicate means
for every matrix and all . The equality concerns every input matrix. Empty index types are permitted, subject to the displayed isometry equation.
QAlgorithms.Papers.Independent.Intakethird100.P44.IsGeneralizedComplement
For finite index types with decidable equality and maps , , this predicate asserts the existence of a natural number , matrices for , and maps , , such that
where . Both and must be channels: each has a finite Kraus representation with on its input space. All map equalities hold on every input matrix. The definition allows and empty ambient index types whenever these conditions can hold.
QAlgorithms.Papers.Independent.Intakethird100.P44.IsPhysicalChannel
For finite index types with decidable equality and arbitrary maps , , and , this predicate means
where denotes the square complex matrices indexed by . It imposes no channel, linearity, positivity, or normalization requirement on these maps, and ranges over all matrices, not merely density matrices; empty index types are included.
QAlgorithms.Papers.Independent.Intakethird100.P44.ObservableAlgebra
For a finite type with decidable equality, an observable algebra consists of a unital complex star subalgebra of the square complex matrices indexed by , together with a map on those matrices satisfying three conditions: is a channel, meaning that there are and matrices with and for every matrix ; for every ; and
The quantification over permits the empty type, and the Kraus family may be empty when its completeness equation holds.
QAlgorithms.Papers.Independent.Intakethird100.P44.PhysicallyCorrectable
Let be a finite index type with decidable equality, a finite index type, arbitrary maps, and an arbitrary complex matrix with rows indexed by and columns by . Physical correctability means that there exists a map admitting a finite Kraus representation with , such that
There is no requirement here that be an isometry or that themselves be channels; the second equality is required for all complex matrices , including matrices that are not density matrices. Empty index types are permitted.
QAlgorithms.Papers.Independent.Intakethird100.P44.RegionalCoefficients
For finite index types with decidable equality, a set of complex matrices, matrices and , and a family of complex matrices, this condition means that there exist complex scalars , indexed by and Boolean , such that, for every such and every complex matrix commuting with every element of ,
No positivity, normalization, or compatibility conditions on the scalars are required. In particular, when is empty, the condition holds vacuously.
QAlgorithms.Papers.Independent.Intakethird100.P44.RegionalStateCondition
For finite index types with decidable equality, a set of complex matrices, matrices and , and a family of complex matrices, this condition means that there exist two positive semidefinite matrices , each of trace , such that, for every matrix commuting with every element of and every complex matrix ,
The matrices need not be states or Hermitian. There are no normalization assumptions on the noise family or ; if is empty, the required trace-one matrices cannot exist.
QAlgorithms.Papers.Independent.Intakethird100.P44.RingCode
For natural numbers , a family of Hermitian complex matrices satisfying for and otherwise, and a ring layout with , a strictly increasing function , and even gaps , a ring code consists of a complex matrix and proofs that
Here is the cyclic successor, denotes subtraction truncated at zero, and the product follows increasing within increasing , with empty products equal to . Thus the required matrix is an isometry whose range projection equals exactly the displayed ordered product.
QAlgorithms.Papers.Independent.Intakethird100.P44.RingLayout
For natural numbers , a ring layout consists of proofs that and , a strictly increasing function , and a proof that every number
is even, where is the cyclic successor and denotes subtraction truncated at zero. Strict increase implies injectivity and hence . There are no layouts with , , or .
QAlgorithms.Papers.Independent.Intakethird100.P44.SameMaximum
For arbitrary types , predicates , , and real-valued functions , , this predicate asserts that there exist and such that , , , every satisfying has , and every satisfying has . Thus both maxima must be attained and equal; uniqueness is not required. If either allowed domain is empty, the predicate is false.
QAlgorithms.Papers.Independent.Intakethird100.P44.Sectors
For a finite index type with decidable equality and a natural number , sector data consist of complex matrices and real numbers , indexed by , such that every is Hermitian and nonzero,
and the values are pairwise distinct. In particular, the matrices are mutually orthogonal projections. The definition permits ; then completeness requires , which holds precisely when is empty. If is empty, the nonzero requirement prevents .
QAlgorithms.Papers.Independent.Intakethird100.P44.StrongCorrectable
For finite index types with decidable equality, a set of complex matrices, a complex matrix , a function from complex matrices to themselves, and a complex matrix , this condition means that there exists a function on complex matrices with a finite Kraus representation , where , such that its trace dual
maps every into and fixes every matrix commuting with all elements of , and such that, for every complex matrix ,
Here denotes the matrix unit. The quantifier over includes arbitrary matrices, and the definition imposes no channel assumption on , no isometry assumption on , and no Hermiticity or involution assumption on .
QAlgorithms.Papers.Independent.Intakethird100.P44.StrongLocal
For a finite index type with decidable equality, an arbitrary set of complex matrices on , and a map on those matrices, this predicate requires that be a channel, that its trace dual
belong to whenever , and that for every matrix commuting with every member of . Here is the matrix unit, and being a channel means admitting a finite representation with . The set is not required to be an algebra or nonempty; if , the preservation condition is vacuous and the fixed-observable condition applies to every matrix.
QAlgorithms.Papers.Independent.Intakethird100.P44.TensorCorrectable
For finite index types , with decidable equality, a map and a complex matrix , this predicate means that there exists a channel on such that, for every complex matrix ,
Here applying a map to the first factor means that the entry of its result on is . A channel means a map admitting a finite representation with . The predicate imposes no channel assumption on , no isometry assumption on , and no nonemptiness assumption on the index types; its equality concerns all , including matrices that are not density matrices.
QAlgorithms.Papers.Independent.Intakethird100.P44.codeSlice
For index types , a complex matrix with rows indexed by and columns indexed by , and any , the slice at is the matrix with rows indexed by and columns indexed by whose entries are
No normalization, positivity, or isometry condition on is required.
QAlgorithms.Papers.Independent.Intakethird100.P44.comparisonRootFidelity
For finite index types with decidable equality, a comparison on , and arbitrary maps , let denote square-root continuous functional calculus, put , and define , where , , and the reference extension applies the map separately to each matrix block indexed by the reference coordinates. If is the fixed form with positive semidefinite trace-one matrix , the declared value is . If is the code form with and , its value is the real infimum
No channel assumption on , and no attainment of this infimum, is included.
QAlgorithms.Papers.Independent.Intakethird100.P44.constantChannel
For a finite input index type , an output index type , and any complex matrix , this defines the map
No positivity or trace normalization of is assumed, and no channel property is asserted. If is empty, its trace is zero and the map is identically zero.
QAlgorithms.Papers.Independent.Intakethird100.P44.evenRegion
For every natural number , a family of Hermitian matrices , , satisfying , and a finite subset , this definition gives the complex linear span of all matrices
The indices may repeat, and their order is retained. The empty word is allowed and contributes ; consequently, when , the defined space is the span of . This also describes the case .
QAlgorithms.Papers.Independent.Intakethird100.P44.fixedFidelity
For finite index types with decidable equality, any matrix , and arbitrary maps , define to be the continuous functional calculus of the real square-root function applied to , and define the matrix on by
For any map , its reference extension is defined entrywise by
The declared real number is
There is no density-matrix assumption on , no channel assumption on , and no nonemptiness assumption on the index types; the functional calculus is used with its total definition for all matrices.
QAlgorithms.Papers.Independent.Intakethird100.P44.krausComplement
For finite index types with decidable equality and any family of complex matrices with rows indexed by and columns indexed by , this definition gives the map whose entries are
No equation , channel assumption, or restriction on the input matrix is imposed. The indexing family may be empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.localComplement
For finite index types with decidable equality, let consist of a unital complex star subalgebra and a map admitting a finite Kraus representation , , such that and for every matrix and every . For any matrix with rows indexed by and columns indexed by , the declared map is
No isometry condition on is imposed here, and empty index types are included.
QAlgorithms.Papers.Independent.Intakethird100.P44.minimumGap
For natural numbers and a ring layout , let for . A ring layout requires , , the indices to be strictly increasing, and every cyclic gap
to be even. The defined natural number is
computed by starting at and successively taking the minimum with each gap in increasing index order. Zero gaps are allowed; the gap list is nonempty because .
QAlgorithms.Papers.Independent.Intakethird100.P44.modeAt
For every natural number with a supplied proof that , every index , and every natural-number offset , this defines the index
Offsets may be zero or arbitrarily large; they wrap around modulo . The supplied positivity proof ensures the modulus is nonzero and the result is a valid index.
QAlgorithms.Papers.Independent.Intakethird100.P44.pairingProjector
For natural numbers , a family of Hermitian complex matrices satisfying for and otherwise, and a ring layout consisting of , a strictly increasing function , and even gaps , this defines the matrix
Here is natural subtraction truncated at zero, is the cyclic successor, and the factors are multiplied first in increasing within each gap and then in increasing . A zero gap contributes no factors, and if all gaps are zero, the result is .
QAlgorithms.Papers.Independent.Intakethird100.P44.parityProject
For a finite index type with decidable equality and any complex matrix on , this definition assigns the map
on all complex matrices on . It assumes no Hermiticity, unitarity, or involution property of ; the rightmost factor is itself.
QAlgorithms.Papers.Independent.Intakethird100.P44.paritySector
For a finite index type with decidable equality, every complex matrix indexed by , and every Boolean , this defines
where false corresponds to and true to . Thus and . No Hermiticity or involution assumption on is imposed.
QAlgorithms.Papers.Independent.Intakethird100.P44.poisoning
For natural numbers , let consist of Hermitian complex matrices , indexed by , with , and let be a ring layout: , its free indices are strictly increasing for , and all cyclic gaps are even. The defined map sends every complex matrix to
The two selected free indices have zero-based positions and ; their existence follows from . No positivity or normalization condition is imposed on the argument .
QAlgorithms.Papers.Independent.Intakethird100.P44.regionParity
For every natural number , every family of complex matrices satisfying and when , and otherwise, and every finite set , this defines
The multiplication order is the increasing order of the selected mode indices. The empty product is , so , including the case , gives .
QAlgorithms.Papers.Independent.Intakethird100.P44.ringGap
For natural numbers , any function , and any , this defines
where is the cyclic successor of , and is natural-number subtraction, performed in the displayed order. No injectivity, ordering, or positivity hypotheses are imposed. When , there is no index ; when , a function together with such a cannot exist.
QAlgorithms.Papers.Independent.Intakethird100.P44.sectorChargeObservable
Let be a finite index type with decidable equality, a natural number, and suppose the sector data comprise nonzero Hermitian matrices , mutually orthogonal with and , and pairwise distinct real numbers , for . The associated charge observable is the complex matrix
For , this is the empty sum , and the sector assumptions require to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.sectorProject
Let be a finite index type with decidable equality, a natural number, and let be nonzero Hermitian matrices satisfying when , otherwise, and , together with pairwise distinct real values . The associated map on all complex matrices on is
The values do not enter this formula. For , the sum is zero and the sector assumptions force to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.siteModes
For every natural number , including , and every subset of , this defines the finite set
Thus each site contributes the two indices and . If is empty, including necessarily when , the result is empty.
QAlgorithms.Papers.Independent.Intakethird100.P44.totalParity
For any natural number and any family of Hermitian matrices , indexed by , satisfying , this definition assigns the matrix
with the factors multiplied in increasing index order. For , the product is empty and on the one-dimensional space.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.