Definitions for Efficient multi port-based teleportation schemes
DefinitionQAlgorithms_Papers_Independent_Extend50_P18The objects the formalized statements of Efficient multi port-based teleportation schemes (arXiv:2008.00984) are stated in. Each was checked against the paper by a blind read-back and a moderator.
ProtocolIndex: Alice's N ports and the ordered k input registers (PDF pp.5-6).PortChoice: Ordered distinct port choices; l-th input is paired with i(l) (PDF p.5, (4)).mpbtSignal: Signal density (7), in computational coordinates. The Bell projectors each contribute 1/d and the unused registers contribute 1/d^(N-k), giving 1/d^N (PDF p.6). This definition is used only under k <= N and d > 0.mpbtOperator: Sum of all ordered signals, without an ensemble-probability factor (PDF p.6, (8)).inverseRoot: Support inverse square root, with value zero at the zero eigenvalue (PDF p.6, (10)).srmRaw: Uncompleted square-root measurement effect, distinct from the completed Pi (PDF p.6, (10)-(11)).srmRemainder: Equal distribution of the support-complement effect (PDF p.6, (11)).srmEffect: Completed deterministic SRM effect (PDF p.6, (10)).protocolFidelity: Entanglement fidelity functional (9), valid for the fixed normalized Bell resource and Bob's ordered port selection, with no further correction (PDF pp.5-6). The real part extracts the real trace of physical products.irrepDim: Physical irrep dimension, not an independently supplied scalar (PDF p.9, (28),(30)).mpbtSchurMultiplicity: Physical Schur-Weyl multiplicity, including all tensor copies (PDF p.9, (29)-(30)).YoungPaths: Saturated paths in the height-d Young lattice from alpha to mu. A path has one box added at each step, and is counted once, not weighted by its length (PDF pp.8-9, (58)-(59)).pathCount: Number of saturated paths (PDF pp.8-9, (58)-(59)).fidelityExpression: Explicit value of the deterministic performance formula. The outer sum is outside the square and path multiplicities are outside the square root (PDF p.18, (134), independently (140),(154)).ContractionIndex: Contraction registers: r untouched, k middle, k output, so n=r+2k (PDF p.9, (37)).reverseWord: Reversal of the output order in the explicitly paired systems of (37) (PDF p.9).pairedContraction: Product of partially transposed swaps, namely d^k times the normalized Bell projector on the paired registers, with untouched identities (37). Its entries are 0 or 1; there is no additional normalization (PDF p.9).liftInput: Embed an arbitrary operator on the first r+k registers, adding identity on the final k outputs (PDF p.9, (38)).liftSurvivor: Embed an operator on the untouched r registers by identities on both paired blocks (PDF p.9, (38)).spechtActionMatrix: Irrep matrices in the frozen orthonormal Specht basis. Fact 2 is independent of any branching convention (PDF pp.9-10, (32),(42)).physicalBlock: The physical block I_(U_lambda) tensor X, extended by zero, expressed via the frozen independently constructed Schur transform, not defined by the Fourier sum whose identity is being stated (PDF pp.9-10, (30),(42)).includePermutation: Embed S(t) into S(t+1), fixing the final register (PDF p.10, (50)-(51)).restrictionProjector: Character-defined beta-restriction projector inside the actual mu Specht module. This is the coordinate-independent restriction block of Lemma 3, not an arbitrarily supplied projection (PDF p.10, (46),(51)).weightedTranspositions: Weighted transposition sum: a=n contributes d times the identity, not one (PDF p.10, (45),(47)).traceFinalQudits: Unnormalized trace of the last k factors of an r+k factor operator. In Lemma 9/Corollary 10 these are the middle registers of n=r+2k (PDF pp.12-13).permuteChoice: Relabel all ordered selected ports by the actual permutation, preserving input order (PDF p.7, (22)).portPermutation: Physical permutation of Alice's ports, leaving the ordered inputs fixed (PDF p.7, (22)-(23)).mixedTensorAction: U on every Alice register and entrywise conjugate U on every input (PDF p.7, §IV).eigenvalueExpression: Eigenvalue expression (119), computed from physical dimensions (PDF p.17). The count |I| is (r+k)!/r!, with N=r+k.reciprocalMinimum: Minimum of the entire reciprocal eigenvalue expression over occurring extensions. Under d>0, every alpha admits an extension (add k boxes to row 1), the set is finite nonempty and all eigenvalues are positive. Thus no empty or unbounded sInf default is involved on theorem inputs (PDF pp.19-20, (141),(144)).successExpression: Optimal success probability expression, the minimum applies to the whole quotient m_alpha*d_alpha/lambda_mu(alpha) (PDF p.19, (141)).PortFrames: Coordinate conventions for selected and unused ports. These are arbitrary register enumerations, with selected registers in the specified input order; they do not constrain measurements or the resource (PDF pp.5-7).successEffect: Selected Bell projector tensor an operator on the remaining registers, transported through an explicit port enumeration (PDF p.6, (13)).FeasibleSuccess: Complete feasible family in the source's perfect-success model: each theta is PSD and the residual failure effect is PSD (PDF pp.6-7, (13)-(15)).mpbtAverageSuccess: Average success (12), or equivalently (14) since each Bell projector has trace one (PDF pp.6-7).optimalTheta: Proof-supported optimal unused-register effect: coefficient (d^k/d^N)*b_alpha, not the probability prefactor printed in (142). Printed: |I|/d^(2N); changed: d^(k-N). Why: (143)-(145) give the feasible saturating coefficient and (146)-(149) its matching upper bound (PDF pp.19-20). Independent moderation of this correction remains required.FiniteUnitaryRepresentation: Finite-dimensional unitary matrix representation (PDF p.11, (60)).MatrixIrreducible: Irreducibility for a unitary representation: only trivial invariant orthogonal projections. Positive dimension excludes the zero module (PDF p.11).SubgroupBlockIndex: Coordinate space grouped first by H-irrep type, then multiplicity copy, then irrep coordinate (PDF p.11, (60)-(61)).subgroupBlockMatrix: Repeated copies use the same fixed realization; zero off each diagonal copy, including distinct copies of the same irrep (PDF p.11, (60)-(61)).
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Defs_SchurWeylDecomposition
noncomputable section
open scoped BigOperators Matrix ComplexOrder
namespace QAlgorithms.Papers.Independent.Extend50.P18
attribute [local instance] Classical.propDecidable
/-- Alice's N ports and the ordered k input registers (PDF pp.5-6). -/
abbrev ProtocolIndex (d N k : ℕ) := (Fin N → Fin d) × (Fin k → Fin d)
/-- Ordered distinct port choices; l-th input is paired with i(l) (PDF p.5, (4)). -/
abbrev PortChoice (N k : ℕ) := Fin k ↪ Fin N
/-- Signal density (7), in computational coordinates. The Bell projectors each
contribute 1/d and the unused registers contribute 1/d^(N-k), giving 1/d^N
(PDF p.6). This definition is used only under k <= N and d > 0. -/
def mpbtSignal {d N k : ℕ} (i : PortChoice N k) :
Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
Matrix.of fun x y =>
if (∀ a : Fin N, (∀ l : Fin k, i l ≠ a) → x.1 a = y.1 a) ∧
(∀ l : Fin k, x.1 (i l) = x.2 l) ∧
(∀ l : Fin k, y.1 (i l) = y.2 l)
then ((d : ℂ) ^ N)⁻¹ else 0
/-- Sum of all ordered signals, without an ensemble-probability factor
(PDF p.6, (8)). -/
def mpbtOperator (d N k : ℕ) : Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
∑ i : PortChoice N k, mpbtSignal i
/-- Support inverse square root, with value zero at the zero eigenvalue
(PDF p.6, (10)). -/
def inverseRoot (d N k : ℕ) : Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
cfc (fun t : ℝ => (Real.sqrt t)⁻¹) (mpbtOperator d N k)
/-- Uncompleted square-root measurement effect, distinct from the completed Pi
(PDF p.6, (10)-(11)). -/
def srmRaw {d N k : ℕ} (i : PortChoice N k) :
Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
inverseRoot d N k * mpbtSignal i * inverseRoot d N k
/-- Equal distribution of the support-complement effect (PDF p.6, (11)). -/
def srmRemainder (d N k : ℕ) : Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
((Fintype.card (PortChoice N k) : ℂ)⁻¹) •
(1 - ∑ i : PortChoice N k, srmRaw (d := d) i)
/-- Completed deterministic SRM effect (PDF p.6, (10)). -/
def srmEffect {d N k : ℕ} (i : PortChoice N k) :
Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
srmRaw i + srmRemainder d N k
/-- Entanglement fidelity functional (9), valid for the fixed normalized Bell
resource and Bob's ordered port selection, with no further correction
(PDF pp.5-6). The real part extracts the real trace of physical products. -/
def protocolFidelity {d N k : ℕ}
(effects : PortChoice N k → Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ) : ℝ :=
(∑ i : PortChoice N k, (effects i * mpbtSignal i).trace.re) / (d : ℝ) ^ (2*k)
/-- A positive local dimension has a single scalar signal when d=1. -/
example {N k : ℕ} (i : PortChoice N k) :
mpbtSignal (d := 1) i = (1 : Matrix (ProtocolIndex 1 N k) (ProtocolIndex 1 N k) ℂ) := by
ext x y
have hxy : x = y := Subsingleton.elim _ _
subst y
have hlocal : ∀ a b : Fin 1, a = b := fun _ _ => Subsingleton.elim _ _
have hpaired : ∀ l : Fin k, x.1 (i l) = x.2 l := fun _ => hlocal _ _
simp [mpbtSignal, Matrix.one_apply, hpaired]
/-- Physical irrep dimension, not an independently supplied scalar
(PDF p.9, (28),(30)). -/
def irrepDim {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) : ℕ :=
Module.finrank ℂ (QAlgorithms.Schur.spechtSpace lambda)
/-- Physical Schur-Weyl multiplicity, including all tensor copies
(PDF p.9, (29)-(30)). -/
def mpbtSchurMultiplicity {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) : ℕ :=
Module.finrank ℂ (QAlgorithms.Schur.schurModule lambda)
/-- Saturated paths in the height-d Young lattice from alpha to mu. A path has
one box added at each step, and is counted once, not weighted by its length
(PDF pp.8-9, (58)-(59)). -/
def YoungPaths {d r k : ℕ} (alpha : QAlgorithms.Schur.Partition d r)
(mu : QAlgorithms.Schur.Partition d (r+k)) :=
{p : (j : Fin (k+1)) → QAlgorithms.Schur.Partition d (r+j.val) //
(p 0).val = alpha.val ∧ (p (Fin.last k)).val = mu.val ∧
∀ j : Fin k, (p j.castSucc).val ≤ (p j.succ).val}
/-- Paths form a finite type, ruling out Nat.card's infinite-type default. -/
instance youngPathsFinite {d r k : ℕ} (alpha : QAlgorithms.Schur.Partition d r)
(mu : QAlgorithms.Schur.Partition d (r+k)) : Finite (YoungPaths alpha mu) := by
unfold YoungPaths
infer_instance
/-- Number of saturated paths (PDF pp.8-9, (58)-(59)). -/
def pathCount {d r k : ℕ} (alpha : QAlgorithms.Schur.Partition d r)
(mu : QAlgorithms.Schur.Partition d (r+k)) : ℕ :=
Nat.card (YoungPaths alpha mu)
/-- Explicit value of the deterministic performance formula. The outer sum is
outside the square and path multiplicities are outside the square root
(PDF p.18, (134), independently (140),(154)). -/
def fidelityExpression (d r k : ℕ) : ℝ :=
(∑ alpha : QAlgorithms.Schur.Partition d r,
(∑ mu : QAlgorithms.Schur.Partition d (r+k),
(pathCount alpha mu : ℝ) *
Real.sqrt ((mpbtSchurMultiplicity mu : ℝ) * (irrepDim mu : ℝ))) ^ 2) /
(d : ℝ) ^ (r+k+2*k)
/-- Contraction registers: r untouched, k middle, k output, so n=r+2k
(PDF p.9, (37)). -/
abbrev ContractionIndex (d r k : ℕ) := (Fin r → Fin d) × ((Fin k → Fin d) × (Fin k → Fin d))
/-- Reversal of the output order in the explicitly paired systems of (37)
(PDF p.9). -/
def reverseWord {d k : ℕ} (w : (Fin k → Fin d)) : (Fin k → Fin d) := fun l => w l.rev
/-- Product of partially transposed swaps, namely d^k times the normalized
Bell projector on the paired registers, with untouched identities (37).
Its entries are 0 or 1; there is no additional normalization (PDF p.9). -/
def pairedContraction (d r k : ℕ) :
Matrix (ContractionIndex d r k) (ContractionIndex d r k) ℂ :=
Matrix.of fun x y => if x.1 = y.1 ∧ x.2.1 = reverseWord x.2.2 ∧
y.2.1 = reverseWord y.2.2 then 1 else 0
/-- Embed an arbitrary operator on the first r+k registers, adding identity
on the final k outputs (PDF p.9, (38)). -/
def liftInput {d r k : ℕ} (X : Matrix ((Fin r → Fin d) × (Fin k → Fin d)) ((Fin r → Fin d) × (Fin k → Fin d)) ℂ) :
Matrix (ContractionIndex d r k) (ContractionIndex d r k) ℂ :=
Matrix.of fun x y => X (x.1,x.2.1) (y.1,y.2.1) * if x.2.2 = y.2.2 then 1 else 0
/-- Embed an operator on the untouched r registers by identities on both
paired blocks (PDF p.9, (38)). -/
def liftSurvivor {d r k : ℕ} (X : Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ) :
Matrix (ContractionIndex d r k) (ContractionIndex d r k) ℂ :=
Matrix.of fun x y => X x.1 y.1 * if x.2 = y.2 then 1 else 0
/-- In local dimension one the contraction has exactly the scalar value one. -/
example (r k : ℕ) (x y : ContractionIndex 1 r k) : pairedContraction 1 r k x y = 1 := by
simp [pairedContraction, Subsingleton.elim x.1 y.1,
Subsingleton.elim x.2.1 (reverseWord x.2.2),
Subsingleton.elim y.2.1 (reverseWord y.2.2)]
/-- Irrep matrices in the frozen orthonormal Specht basis. Fact 2 is independent
of any branching convention (PDF pp.9-10, (32),(42)). -/
def spechtActionMatrix {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n)
(pi : Equiv.Perm (Fin n)) : Matrix (Fin (irrepDim lambda)) (Fin (irrepDim lambda)) ℂ :=
Matrix.of fun i j => inner ℂ
(stdOrthonormalBasis ℂ (QAlgorithms.Schur.spechtSpace lambda) i)
(QAlgorithms.Schur.spechtRepresentation lambda pi
(stdOrthonormalBasis ℂ (QAlgorithms.Schur.spechtSpace lambda) j))
/-- The physical block I_(U_lambda) tensor X, extended by zero, expressed via
the frozen independently constructed Schur transform, not defined by the
Fourier sum whose identity is being stated (PDF pp.9-10, (30),(42)). -/
def physicalBlock {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n)
(X : Matrix (Fin (irrepDim lambda)) (Fin (irrepDim lambda)) ℂ) :
Matrix ((Fin n → Fin d)) ((Fin n → Fin d)) ℂ :=
Matrix.of fun x y =>
∑ a : Fin (mpbtSchurMultiplicity lambda), ∑ i : Fin (irrepDim lambda),
∑ j : Fin (irrepDim lambda),
star (QAlgorithms.Schur.decomposition d n ⟨lambda,(i,a)⟩ x) * X i j *
QAlgorithms.Schur.decomposition d n ⟨lambda,(j,a)⟩ y
/-- The independently defined physical block sends the zero operator to zero. -/
example {d n : ℕ} (lambda : QAlgorithms.Schur.Partition d n) :
physicalBlock lambda 0 = 0 := by
ext x y
simp [physicalBlock]
/-- Embed S(t) into S(t+1), fixing the final register (PDF p.10, (50)-(51)). -/
def includePermutation {t : ℕ} (tau : Equiv.Perm (Fin t)) : Equiv.Perm (Fin (t+1)) :=
finSumFinEquiv.symm.trans
((Equiv.sumCongr tau (Equiv.refl (Fin 1))).trans finSumFinEquiv)
/-- Character-defined beta-restriction projector inside the actual mu Specht
module. This is the coordinate-independent restriction block of Lemma 3,
not an arbitrarily supplied projection (PDF p.10, (46),(51)). -/
def restrictionProjector {d t : ℕ} (mu : QAlgorithms.Schur.Partition d (t+1))
(beta : QAlgorithms.Schur.Partition d t) :
Matrix (Fin (irrepDim mu)) (Fin (irrepDim mu)) ℂ :=
((irrepDim beta : ℂ) / (t.factorial : ℂ)) •
∑ tau : Equiv.Perm (Fin t),
QAlgorithms.Schur.spechtCharacter beta tau⁻¹ • spechtActionMatrix mu (includePermutation tau)
/-- Weighted transposition sum: a=n contributes d times the identity, not one
(PDF p.10, (45),(47)). -/
def weightedTranspositions {d t : ℕ} (mu : QAlgorithms.Schur.Partition d (t+1)) :
Matrix (Fin (irrepDim mu)) (Fin (irrepDim mu)) ℂ :=
∑ a : Fin (t+1), (if a = Fin.last t then (d : ℂ) else 1) •
spechtActionMatrix mu (Equiv.swap a (Fin.last t))
/-- Unnormalized trace of the last k factors of an r+k factor operator. In
Lemma 9/Corollary 10 these are the middle registers of n=r+2k (PDF pp.12-13). -/
def traceFinalQudits {d r k : ℕ} (X : Matrix ((Fin (r+k) → Fin d)) ((Fin (r+k) → Fin d)) ℂ) :
Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ :=
QAlgorithms.traceRight (Matrix.of fun (a b : (Fin r → Fin d) × (Fin k → Fin d)) =>
X (Fin.addCases a.1 a.2) (Fin.addCases b.1 b.2))
/-- Relabel all ordered selected ports by the actual permutation, preserving
input order (PDF p.7, (22)). -/
def permuteChoice {N k : ℕ} (tau : Equiv.Perm (Fin N)) (i : PortChoice N k) : PortChoice N k :=
⟨fun l => tau (i l), tau.injective.comp i.injective⟩
/-- Physical permutation of Alice's ports, leaving the ordered inputs fixed
(PDF p.7, (22)-(23)). -/
def portPermutation {d N k : ℕ} (tau : Equiv.Perm (Fin N)) :
Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
Matrix.of fun x y => if x.1 = y.1 ∘ tau.symm ∧ x.2 = y.2 then 1 else 0
/-- U on every Alice register and entrywise conjugate U on every input
(PDF p.7, §IV). -/
def mixedTensorAction {d N k : ℕ} (U : Matrix.unitaryGroup (Fin d) ℂ) :
Matrix (ProtocolIndex d N k) (ProtocolIndex d N k) ℂ :=
Matrix.of fun x y =>
(∏ a : Fin N, (U : Matrix (Fin d) (Fin d) ℂ) (x.1 a) (y.1 a)) *
∏ l : Fin k, star ((U : Matrix (Fin d) (Fin d) ℂ) (x.2 l) (y.2 l))
/-- Eigenvalue expression (119), computed from physical dimensions (PDF p.17).
The count |I| is (r+k)!/r!, with N=r+k. -/
def eigenvalueExpression {d r k : ℕ} (alpha : QAlgorithms.Schur.Partition d r)
(mu : QAlgorithms.Schur.Partition d (r+k)) : ℝ :=
((r+k).factorial : ℝ) / (r.factorial : ℝ) / (d : ℝ) ^ (r+k) *
((mpbtSchurMultiplicity mu : ℝ) * (irrepDim alpha : ℝ)) /
((mpbtSchurMultiplicity alpha : ℝ) * (irrepDim mu : ℝ))
/-- Minimum of the entire reciprocal eigenvalue expression over occurring
extensions. Under d>0, every alpha admits an extension (add k boxes to row 1),
the set is finite nonempty and all eigenvalues are positive. Thus no empty or
unbounded sInf default is involved on theorem inputs (PDF pp.19-20, (141),(144)). -/
def reciprocalMinimum {d r k : ℕ} (alpha : QAlgorithms.Schur.Partition d r) : ℝ :=
sInf {b : ℝ | ∃ mu : QAlgorithms.Schur.Partition d (r+k),
0 < pathCount alpha mu ∧ b = (eigenvalueExpression alpha mu)⁻¹}
/-- Optimal success probability expression, the minimum applies to the whole
quotient m_alpha*d_alpha/lambda_mu(alpha) (PDF p.19, (141)). -/
def successExpression (d r k : ℕ) : ℝ :=
((r+k).factorial : ℝ) / (r.factorial : ℝ) / (d : ℝ) ^ (2*(r+k)) *
∑ alpha : QAlgorithms.Schur.Partition d r,
(mpbtSchurMultiplicity alpha : ℝ) * (irrepDim alpha : ℝ) * reciprocalMinimum (k := k) alpha
/-- Coordinate conventions for selected and unused ports. These are arbitrary
register enumerations, with selected registers in the specified input order;
they do not constrain measurements or the resource (PDF pp.5-7). -/
def PortFrames (N k r : ℕ) :=
(i : PortChoice N k) → {e : Fin N ≃ Fin k ⊕ Fin r // ∀ l : Fin k, e (i l) = Sum.inl l}
/-- Selected Bell projector tensor an operator on the remaining registers,
transported through an explicit port enumeration (PDF p.6, (13)). -/
def successEffect {d r k : ℕ} (frames : PortFrames (r+k) k r)
(theta : (i : PortChoice (r+k) k) → Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ)
(i : PortChoice (r+k) k) :
Matrix (ProtocolIndex d (r+k) k) (ProtocolIndex d (r+k) k) ℂ :=
Matrix.of fun x y =>
if (∀ l : Fin k, x.1 (i l) = x.2 l) ∧ (∀ l : Fin k, y.1 (i l) = y.2 l)
then ((d : ℂ) ^ k)⁻¹ * theta i
(fun a => x.1 ((frames i).val.symm (Sum.inr a)))
(fun a => y.1 ((frames i).val.symm (Sum.inr a)))
else 0
/-- Complete feasible family in the source's perfect-success model: each theta
is PSD and the residual failure effect is PSD (PDF pp.6-7, (13)-(15)). -/
def FeasibleSuccess {d r k : ℕ} (frames : PortFrames (r+k) k r)
(theta : (i : PortChoice (r+k) k) → Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ) : Prop :=
(∀ i, (theta i).PosSemidef) ∧
(1 - ∑ i : PortChoice (r+k) k, successEffect frames theta i).PosSemidef
/-- Average success (12), or equivalently (14) since each Bell projector has
trace one (PDF pp.6-7). -/
def mpbtAverageSuccess {d r k : ℕ} (frames : PortFrames (r+k) k r)
(theta : (i : PortChoice (r+k) k) → Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ) : ℝ :=
(∑ i : PortChoice (r+k) k, (successEffect frames theta i).trace.re) /
(d : ℝ) ^ (r+2*k)
/-- Proof-supported optimal unused-register effect: coefficient
(d^k/d^N)*b_alpha, not the probability prefactor printed in (142).
Printed: |I|/d^(2N); changed: d^(k-N). Why: (143)-(145) give the feasible
saturating coefficient and (146)-(149) its matching upper bound
(PDF pp.19-20). Independent moderation of this correction remains required. -/
def optimalTheta (d r k : ℕ) : Matrix ((Fin r → Fin d)) ((Fin r → Fin d)) ℂ :=
∑ alpha : QAlgorithms.Schur.Partition d r,
(((d : ℂ)^k / (d : ℂ)^(r+k)) * (reciprocalMinimum (k := k) alpha : ℂ)) •
QAlgorithms.Schur.isotypicProjector alpha
/-- Zero unused-register operator gives zero success effect, including all
possible off-diagonal Bell entries. -/
example {d r k : ℕ} (frames : PortFrames (r+k) k r) (i : PortChoice (r+k) k) :
successEffect (d := d) frames (fun _ => 0) i = 0 := by
ext x y
simp [successEffect]
/-- Finite-dimensional unitary matrix representation (PDF p.11, (60)). -/
structure FiniteUnitaryRepresentation (G : Type*) [Group G] (m : ℕ) where
matrix : G → Matrix (Fin m) (Fin m) ℂ
map_one : matrix 1 = 1
map_mul : ∀ g h, matrix (g*h) = matrix g * matrix h
unitary : ∀ g, (matrix g)ᴴ * matrix g = 1 ∧ matrix g * (matrix g)ᴴ = 1
/-- Irreducibility for a unitary representation: only trivial invariant
orthogonal projections. Positive dimension excludes the zero module
(PDF p.11). -/
def MatrixIrreducible {G : Type*} [Group G] {m : ℕ} (rho : FiniteUnitaryRepresentation G m) : Prop :=
0 < m ∧ ∀ P : Matrix (Fin m) (Fin m) ℂ,
Pᴴ = P → P*P = P → (∀ g, P * rho.matrix g = rho.matrix g * P) → P = 0 ∨ P = 1
/-- Coordinate space grouped first by H-irrep type, then multiplicity copy,
then irrep coordinate (PDF p.11, (60)-(61)). -/
abbrev SubgroupBlockIndex {a : ℕ} (dims copies : Fin a → ℕ) :=
(label : Fin a) × (Fin (copies label) × Fin (dims label))
/-- Repeated copies use the same fixed realization; zero off each diagonal
copy, including distinct copies of the same irrep (PDF p.11, (60)-(61)). -/
def subgroupBlockMatrix {G : Type*} [Group G] {a : ℕ} (dims copies : Fin a → ℕ)
(reps : (label : Fin a) → FiniteUnitaryRepresentation G (dims label)) (g : G) :
Matrix (SubgroupBlockIndex dims copies) (SubgroupBlockIndex dims copies) ℂ :=
Matrix.of fun x y => if h : y.1 = x.1 then
if x.2.1 = h ▸ y.2.1 then (reps x.1).matrix g x.2.2 (h ▸ y.2.2) else 0 else 0
end QAlgorithms.Papers.Independent.Extend50.P18
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P18.ContractionIndex
For arbitrary natural numbers , writing , the defined index type is the set of triples
A word of length zero is the unique empty function. Thus, when , this index set is empty if either or , and is a singleton if .
QAlgorithms.Papers.Independent.Extend50.P18.FeasibleSuccess
For natural numbers , let , for every injection , be a bijection from to satisfying , and let be arbitrary complex matrices indexed by length- words over . This predicate means that every is positive semidefinite and that
is positive semidefinite. Here is indexed by pairs of words of lengths and , respectively, and its entry at , is if and for every , and is zero otherwise, where and likewise for . The identity matrix acts on this pair-indexed space. Zero parameters are allowed, with empty conditions interpreted vacuously, , and zero inverse equal to zero.
QAlgorithms.Papers.Independent.Extend50.P18.FiniteUnitaryRepresentation
For a type equipped with a group structure and a natural number , this structure consists of a function assigning each a complex matrix , together with the requirements
and
where denotes conjugate transpose. The group is not required to be finite, and is allowed, in which case the matrices have empty index sets.
QAlgorithms.Papers.Independent.Extend50.P18.MatrixIrreducible
For any type equipped with a group structure, any natural number , and a function supplied with the identities , , and , this predicate means that and every complex matrix satisfying
satisfies or . There is no finiteness assumption on ; when , the predicate is false because of the explicit requirement .
QAlgorithms.Papers.Independent.Extend50.P18.PortChoice
For any natural numbers , this defines the set of injective functions . Thus the selected positions are distinct and indexed in order by . This set is empty when and contains exactly one function when , including when .
QAlgorithms.Papers.Independent.Extend50.P18.PortFrames
For natural numbers , this defines the type of families assigning to every injection a bijection
such that is the element in the first summand for every . Thus the inverse images of the second summand enumerate the remaining positions. No equation is assumed in the definition: if injections exist but , no such family exists; if , there are no such injections and the family requirement is vacuous. Zero values of any of the three parameters are allowed.
QAlgorithms.Papers.Independent.Extend50.P18.ProtocolIndex
For any natural numbers , this defines the index set : an index consists of a word of length and a word of length , both with symbols in . Zero values are allowed. There is exactly one word of length zero, including when ; when and either word has positive length, the index set is empty.
QAlgorithms.Papers.Independent.Extend50.P18.SubgroupBlockIndex
For a natural number and functions , this abbreviates the type of triples with
Thus each label contributes one index for every pair consisting of a copy index and a dimension index. No positivity assumptions are imposed: gives an empty type, and a label contributes no indices if either its copy count or its dimension is zero.
QAlgorithms.Papers.Independent.Extend50.P18.YoungPaths
For any natural numbers , any Young diagram with cells and first-column length at most , and any Young diagram with cells and first-column length at most , this defines the type of sequences such that is a Young diagram with exactly cells and first-column length at most , , , and as sets of cells for every . The inclusions are non-strict conditions; the specified sizes differ by one at each step. The type may be empty. When , there are no inclusion conditions, and a sequence exists exactly when , in which case it consists of that single diagram.
QAlgorithms.Papers.Independent.Extend50.P18.eigenvalueExpression
For natural numbers , a Young diagram with cells and at most rows, and a Young diagram with cells and at most rows, this defines the real number
Here the numbers are defined as follows for each diagram with cells: use the chosen bijection between its cells and , let be the permutations preserving each cell’s row and column, respectively, and define as the complex dimension of the range of the operator on sending
Define as the complex dimension of the range of on , where . There are no positivity assumptions on or these dimensions; zero parameters are allowed whenever the specified diagrams exist, division by zero is defined to be zero, and .
QAlgorithms.Papers.Independent.Extend50.P18.fidelityExpression
For arbitrary natural numbers , let be the set of Young diagrams with cells and at most rows, and write . For , use the cell numbering selected in the definitions to identify its cells with , and let be the permutations preserving, respectively, the row and column of every numbered cell. Define to be the complex dimension of the range of the operator on sending each coordinate vector to . Define to be the complex dimension of the range of on , where . If counts the sequences of nested diagrams from to , with intermediate diagram sizes and at most rows, then the defined real number is
No positivity assumptions are imposed on . Empty sums are zero, zeroth powers are , and division by zero in this real-valued definition gives zero.
QAlgorithms.Papers.Independent.Extend50.P18.includePermutation
For every natural number and every permutation of , this definition gives the permutation of that applies to the first elements and fixes the last element:
This includes , when the resulting permutation is the identity on the singleton .
QAlgorithms.Papers.Independent.Extend50.P18.inverseRoot
For any natural numbers , this defines a complex matrix by applying continuous functional calculus with the real scalar function to the matrix . Here ranges over injections from into , and, on pairs of words of lengths over , has entry when agree outside the range of and , for every , and has entry zero otherwise. The scalar conventions are for , , and ; in particular, the functional calculus assigns zero to a zero eigenvalue rather than requiring invertibility. Zero dimensions and empty index sets are permitted, and when , and .
QAlgorithms.Papers.Independent.Extend50.P18.irrepDim
For any natural numbers and any Young diagram with exactly cells and first-column length at most , this defines a natural number as the complex dimension of the following subspace of , equipped with its Euclidean inner product. Use the chosen bijection from the cells of to , let be the permutations preserving the row coordinate of every numbered cell, and let be those preserving its column coordinate. Define the matrix
The subspace whose dimension is taken is the range of multiplication by . There is no positivity assumption on or : when , the diagram is empty and this range has dimension ; when , no diagram argument satisfies the required conditions.
QAlgorithms.Papers.Independent.Extend50.P18.liftInput
For all natural numbers , write . Given any complex matrix indexed by pairs , with and , its defined lift is the matrix on triples , where also , whose entries are
No Hermitian, positivity, or normalization assumption is imposed on . Empty words are allowed, so for this agrees with under the identification with words of length ; empty index sets are also allowed.
QAlgorithms.Papers.Independent.Extend50.P18.liftSurvivor
For all natural numbers , write . Given any complex matrix indexed by words , its defined lift to triples , with , has entries
There are no additional assumptions on . For , both extra words are empty and the lift agrees with under the natural identification; the definition also permits empty index sets.
QAlgorithms.Papers.Independent.Extend50.P18.mixedTensorAction
For all natural numbers and every unitary complex matrix , meaning , this definition gives the complex matrix indexed by pairs of words of lengths over , with entries
Zero values of all three parameters are allowed, and each empty product equals . In particular, when the resulting matrix is the singleton matrix with entry ; if and either word length is positive, its index set is empty.
QAlgorithms.Papers.Independent.Extend50.P18.mpbtAverageSuccess
For natural numbers , a family of bijections , one for every injection , satisfying , and arbitrary complex matrices indexed by length- words over , this defines
The matrix has indices , with a length- word and a length- word over that alphabet. Its entry at , is if and for all , and zero otherwise, where . No feasibility or positivity assumption is imposed. Zero parameters are included; empty sums are zero, , and division by zero is zero.
QAlgorithms.Papers.Independent.Extend50.P18.mpbtOperator
For any natural numbers , this defines the complex matrix , where the sum runs over all injections . Rows and columns are pairs of length- and length- words over , and equals precisely when and agree outside the range of , for every , and for every ; otherwise it is zero. All scalars here are complex, with and . If , the sum is empty and . If , there is one summand and . The matrix index set is empty when and .
QAlgorithms.Papers.Independent.Extend50.P18.mpbtSchurMultiplicity
For any natural numbers and any Young diagram with exactly cells and first-column length at most , this defines a natural number as the complex dimension of a subspace of the Euclidean space whose coordinates are words . Using the chosen bijection from the cells of to , let and be the permutations preserving, respectively, every cell’s row coordinate and every cell’s column coordinate. The subspace is the range of the matrix
Zero values of are allowed: when , there is one empty word and this range has dimension , including when ; when , no diagram argument satisfies the required conditions.
QAlgorithms.Papers.Independent.Extend50.P18.mpbtSignal
For any natural numbers and any injection , this defines a complex matrix indexed by pairs and , where are length- words and are length- words over . Its entry is
The coefficient is computed in , with and , including . When , the conditions indexed by are vacuous and the matrix is . When , its index set is empty unless , in which case it is the one-by-one matrix with entry . An injection argument cannot exist when .
QAlgorithms.Papers.Independent.Extend50.P18.optimalTheta
For all natural numbers , this defines the complex matrix on length- words over
For any -cell diagram , use its chosen cell numbering to define the row-preserving and column-preserving groups . Let on send to , let be the orthogonal projection onto its range, and put . Let and . On the space with basis the length- words over , put and . Finally,
where counts nested sequences of diagrams from to , with cells at step and at most rows throughout. Real coefficients in these formulas are embedded in when used as matrix scalars. Zero parameters are allowed; empty sums and empty real infima are zero, division and inversion at zero give zero, and .
QAlgorithms.Papers.Independent.Extend50.P18.pairedContraction
For arbitrary natural numbers , write and index rows and columns by triples , where and . The defined complex matrix has entries
For , the reversal conditions are vacuous and this is the identity matrix on the words of length . When the index set is empty, the definition gives the unique matrix with that empty index set.
QAlgorithms.Papers.Independent.Extend50.P18.pathCount
For all natural numbers , a Young diagram with cells and at most rows, and a Young diagram with cells and at most rows, is the natural-number cardinality of the finite set of sequences satisfying , having at most rows at every step, starting at , ending at , and satisfying for . Its value is zero when no such sequence exists; for , it is if and otherwise.
QAlgorithms.Papers.Independent.Extend50.P18.permuteChoice
For all natural numbers , every permutation of , and every injection , this definition gives the injection
It includes , when the injection has empty domain. If , there is no injection to which the definition can be applied.
QAlgorithms.Papers.Independent.Extend50.P18.physicalBlock
For all natural numbers , write and let be the Young diagrams with cells and at most rows. For each , use its selected cell numbering to define row-preserving and column-preserving permutation sets . Let be the range of , and let be the range of , where . Write , , and let and be the orthonormal bases selected by the standard orthonormal basis construction for these spaces. Define a matrix , with rows indexed by words and columns indexed by triples , by
where uses continuous functional calculus and . For every and every complex matrix , the defined matrix on words of length has entries
There are no further assumptions on . The definition includes , with its single empty word, and any sum over a zero-dimensional space is zero.
QAlgorithms.Papers.Independent.Extend50.P18.portPermutation
For all natural numbers and every permutation of , this definition gives a complex matrix indexed by pairs , where and , with entries
All zero parameter values are allowed. A word of length zero is unique; if and either word length is positive, the matrix’s index set is empty.
QAlgorithms.Papers.Independent.Extend50.P18.protocolFidelity
For any natural numbers and any assignment of a complex matrix to each injection , with all matrices indexed by pairs of words of lengths over , this defines the real number
Here equals the complex scalar exactly when agree outside and , for every , and is zero otherwise. No positivity, normalization, or sum condition is imposed on the matrices . Empty sums are zero, inverses of zero are zero, and zeroth powers are one. Consequently, the value is zero when , and also when and , since division by zero in gives zero.
QAlgorithms.Papers.Independent.Extend50.P18.reciprocalMinimum
For natural numbers and a Young diagram with cells and at most rows, this defines
Here is the number of sequences of Young diagrams , each with at most rows, such that has cells, , , and for every . To define for an -cell diagram, number its cells by the chosen bijection with , and let preserve rows and columns, respectively. Then is the complex dimension of the range of on , and is the complex dimension of the range of on the space with basis indexed by words , where . The infimum is the real infimum, with value zero for the empty set; inverses and divisions by zero are zero, and . In particular, the definition does not require any eligible to exist.
QAlgorithms.Papers.Independent.Extend50.P18.restrictionProjector
For natural numbers , a Young diagram with cells and at most rows, and a Young diagram with cells and at most rows, this definition gives the complex matrix
Here acts as on and fixes . To define the other quantities, for either diagram of size , use its fixed cell numbering to let be the permutations preserving each numbered cell’s row and column, respectively. Let , let , and put . Write for orthogonal projection onto , and let . Then , and, in the chosen standard orthonormal basis of , . There is no containment assumption relating and . The definition includes , with ; for , no diagram of the required positive size exists.
QAlgorithms.Papers.Independent.Extend50.P18.reverseWord
For all natural numbers and every word , the defined reversed word is
For , this is the unique empty word. If and , there is no word to which the definition can be applied.
QAlgorithms.Papers.Independent.Extend50.P18.spechtActionMatrix
For all natural numbers , every Young diagram with cells and at most rows, and every permutation , use the cell numbering selected in the definitions to let be the permutations preserving each numbered cell’s row and column, respectively. In the Euclidean space , let be the range of the operator
let , and let be the orthonormal basis selected by the standard orthonormal basis construction. If is orthogonal projection onto and , then the defined complex matrix has entries
with the inner product conjugate-linear in its first argument. This includes ; if the resulting dimension is zero, the matrix has an empty index set.
QAlgorithms.Papers.Independent.Extend50.P18.srmEffect
For any natural numbers and any injection , this defines
where is the set of all such injections and all matrices are indexed by pairs of words of lengths over . The entry is when agree outside and , for every , and is zero otherwise. The matrix is the continuous functional calculus of for . Cardinalities and coefficients in the matrix formula are complex scalars; inverses of zero and square roots of nonpositive reals are zero, and zeroth powers are one. The definition allows and empty matrix index sets, but its injection argument cannot exist when .
QAlgorithms.Papers.Independent.Extend50.P18.srmRaw
For any natural numbers and any injection , this defines the complex matrix . Its rows and columns are pairs of words of lengths over . For every injection , the entry is if agree outside and , for every , and is zero otherwise; is the continuous functional calculus of for . Real square roots are zero for nonpositive inputs, inverses of zero are zero, and zeroth powers are one. Thus singular matrices are included in the definition. The index set is empty if and ; when , is the one-by-one identity matrix. There is no injection argument when .
QAlgorithms.Papers.Independent.Extend50.P18.srmRemainder
For any natural numbers , let be the finite set of injections from to . This defines
as a complex matrix on pairs of words of lengths over , with the cardinality cast into . Here equals when agree outside and , for every , and equals zero otherwise; is obtained from by continuous functional calculus for . Square roots of nonpositive reals and inverses of zero are zero, and zeroth powers are one. In particular, if , then is empty, its cardinality has inverse zero, and . Empty matrix index sets, including those arising from and , are allowed.
QAlgorithms.Papers.Independent.Extend50.P18.subgroupBlockMatrix
For any group , any natural number , any functions , any family of representations satisfying , , and for every , and any , this defines a complex matrix indexed by triples with , , and , whose entries are
Here denotes conjugate transpose; indices belonging to equal labels are identified when comparing their copy indices or evaluating the entry. Thus each label contributes copies of its representation matrix. The definition permits , zero dimensions, and zero copy counts; these yield no indices for the affected labels, and the entire indexing set may be empty. The group need not be finite.
QAlgorithms.Papers.Independent.Extend50.P18.successEffect
For natural numbers , suppose that every injection has an assigned bijection satisfying . Given any family of complex matrices indexed in both coordinates by words , and one such injection , this defines a complex matrix . Its indices are pairs , where and . For , its entries are
The scalar is taken in . There are no positivity or normalization assumptions on ; zero parameters are allowed, universal conditions over empty sets are vacuous, , and the inverse of zero is zero.
QAlgorithms.Papers.Independent.Extend50.P18.successExpression
For all natural numbers , this defines the real number
The number counts sequences of diagrams with at most rows, with and . For an -cell diagram , use its chosen cell numbering to form the row-preserving and column-preserving permutation groups . The number is the complex dimension of the range of the operator on ; the number is the complex dimension of the range of on the space with basis the length- words over , where . All zero parameters are included. Empty sums and empty real infima are zero, division or inversion at zero gives zero, and .
QAlgorithms.Papers.Independent.Extend50.P18.traceFinalQudits
For all natural numbers and every complex matrix indexed by words of length over , this definition gives the matrix indexed by words of length whose entries are
where is the word taking its first entries from and its final entries from . No positivity, Hermitian, or normalization assumption is imposed on . Zero values of are allowed: there is exactly one word of length zero, while there are no positive-length words over an empty alphabet; the displayed sum follows these conventions.
QAlgorithms.Papers.Independent.Extend50.P18.weightedTranspositions
For natural numbers and a Young diagram with cells and at most rows, this definition gives the complex matrix
where swaps and , and is the identity when . Here the fixed numbering of ’s cells determines the row-preserving and column-preserving permutation sets ; the space is the range of the matrix , and . If is orthogonal projection onto this space, , and is its chosen standard orthonormal basis, then . This includes , when the sum has only its term; for , no required diagram exists.
QAlgorithms.Papers.Independent.Extend50.P18.youngPathsFinite
For all natural numbers , every Young diagram with cells and at most rows, and every Young diagram with cells and at most rows, the following set is finite: sequences of Young diagrams such that has cells and at most rows, , , and for every . The set may be empty. When , its only possible sequence consists of a single diagram, and it exists exactly when .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.