Definitions for A purification postulate for quantum mechanics with indefinite causal order
DefinitionQAlgorithms_Papers_Independent_Intake100_P46The objects the formalized statements of A purification postulate for quantum mechanics with indefinite causal order (arXiv:1611.08535) are stated in. Each was checked against the paper by a blind read-back and a moderator.
ProcessWireDimensions: PDF pp.2,10: positive dimensions in wire order P, AI, AO, BI, BO, F.ProcessBasis: PDF p.2: the fixed computational basis of all six wires.ProcessMatrix: PDF p.2: a process operator, without any validity condition imposed by its type.processCoordinates: PDF pp.2–3: coordinate insertion in the fixed six-wire order.unitaryChannelProjector: PDF p.10, Eq.(40): |U>><<U| in input-first order, with no dimension factor.IsReversibleMatrix: PDF pp.3–4: reversible unitarity between possibly differently labelled finite bases. Both equations are required; an isometry into a larger space is excluded.IsIsometricMatrix: PDF p.4: an isometry need only satisfy the first of the two unitary equations.IsCPTPChoi: PDF p.11, before Eq.(45): the independent finite Choi criterion for a local CPTP map.IsUnitaryChoi: PDF pp.3,10: the CJ operator of some reversible unitary channel.linkLaboratories: PDF p.2, Eq.(1), and p.11, Eq.(43): link W with arbitrary ancillary local CJ operators. The laboratory indices are contracted bilinearly (no conjugation). All off-diagonal blocks of the ancillary wires are retained.IsValidProcess: PDF pp.2–3,11: operational process validity, independently of LV. Every positive ancillary dimension and every pair of local CPTP operators is tested.IsPureProcess: PDF p.3, Definition 1: purity tests all compatible unitary laboratories on all ancillary wires, including the enlarged SWAP laboratories in Eq.(9). Validity is kept separate so Theorem 2 does not silently assume arbitrary unitaries are processes.processProjector: PDF pp.3–4: a matrix from P AO BO to AI BI F, in its input-first CJ wire order.replaceWires: PDF p.11, Eq.(53): replace the wires in s by maximally mixed identity factors, preserving the order of every other wire. Strictly positive dimensions guard division.validSubspaceProjector: PDF p.12, Eq.(64): the complete bipartite linear normalization projector. The order of wire labels is P, AI, AO, BI, BO, F.invalidSubspaceProjector: PDF p.6, before Eq.(21): the complementary projector 1-LV.vectorOuter: PDF pp.5–6: a process-vector outer product; these vectors are unnormalized.processVectorPairing: PDF pp.5–6, Eq.(24): the usual conjugate-linear-first finite inner product.laboratorySignature: PDF pp.4–6: fixed laboratory dimensions, with independently specified global wires.recoverProcess: PDF p.4, Definition 3, specialized to trivial original P,F: insert |0> in Pprime and trace Fprime. The two new global dimensions are independent.IsPurifiable: PDF p.4, Definition 3: physical purification by an operationally valid pure process, with unrestricted positive new-past and new-future dimensions.SupportSpectrum: PDF pp.5–6, Eq.(19): the complete positive spectral support, with multiplicity. This is chosen spectral data, not extra unproved process constraints.canonicalVector: PDF pp.5–6, Eqs.(20),(23): the canonical positive-matrix purification, with future basis indexed by the spectral support. There is no normalization to trace one.IsCompletion: PDF p.6, Eqs.(23)–(24): all prescribed vectors, bilinear LV constraints and orthogonality with squared norm dAO*dBO.reconstructedUnitary: PDF p.6, Eq.(25): the actual matrix reconstructed by using wi as the past slices. Its input basis is Pprime AO BO and its output basis AI BI Fprime.stateOutputSignature: PDF p.4: a concrete dimension-increasing isometry, with every laboratory wire and P trivial, and F two-dimensional.stateOutputIsometry: PDF p.4: the isometry sends the only global input basis vector to future |0>.IsTotallyIsotropic: PDF pp.12–13: total isotropy is a zero compression, not invariance or membership in the kernel of C. Zero-dimensional ambient spaces are permitted.positiveCount: PDF p.12: positive eigenvalues counted with multiplicity.negativeCount: PDF p.12: strictly negative eigenvalues counted with multiplicity.zeroCount: PDF p.12: zero eigenvalues counted with multiplicity.nullSquareSize: PDF p.12: the claimed greatest null-square size, expressed without any supremum.vectorizedComplement: PDF p.6, Eq.(26): matrix of 1-LV on input-first vectorized operators. The coordinate pair (a,b) represents the operator entry (b,a).purificationKernelOperator: PDF p.6, Eq.(28): OW is computed from the canonical vector. Its ket factor is conjugated w0, so its bra factor is w0, using the conjugate-linear-first convention.KernelBasisData: PDF p.6, Eqs.(28)–(30): an explicit orthonormal basis of the entire kernel of OW. No basis-independence of the eventual numerical bound is asserted.compressedOperator: PDF p.6, Eq.(30): (conj R tensor R) Pi (transpose R tensor adjoint R), with Ria=conj(ri(a)). The entry formula retains the source's conjugations and factor order.CompressionSpectrum: PDF p.7, Eq.(31): a full orthonormal eigenbasis of the computed compression. Filtering its strictly nonzero eigenvalues below gives exactly the source's mk family.NonzeroModes: PDF p.7, Eq.(31): the complete nonzero-eigenvalue index set, possibly empty.modeMatrix: PDF p.7, Eq.(32): |transpose Mk>>=mk, with the same input-first CJ ordering. The intervening printed bra identity has a transpose discrepancy in this convention; only the printed reshaping and its inertia counts are used here. Transposing every constraint leaves its eigenvalues and the test bound unchanged.constraintMatrix: PDF p.7, Eq.(32): M+M† for false and i(M-M†) for true. Writing the latter as (iM)+(iM)† gives a Hermitian matrix by construction, without adding a hypothesis.testBound: PDF p.7, Eq.(34): the actual minimum over the explicit Hermitian constraints. Only the empty-family extension is top, rather than a junk natural-number zero; the footnote theorem treats that case separately.liftKernelVector: PDF pp.6–7: lift the kernel coordinates back to the laboratory/future vector.qubitSignature: PDF p.7, §6: four qubit laboratory wires, with trivial P and F.laboratoryTensor: PDF p.7, §6: a four-wire tensor, in AI AO BI BO order. Reuse the frozen Bool-indexed Pauli gates, with computational labels 0=false and 1=true.ocbProcess: PDF p.7, Eq.(35): the exact OCB matrix; the factor is 1/4, not 1/16.optProcess: PDF p.7, Eq.(37): the exact Wopt matrix, without a claim about purifiability.qubitLaboratories: PDF p.7: the common qubit laboratory dimensions, independently of global wires.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
/-!
Statements from Araújo, Feix, Navascués and Brukner, arXiv:1611.08535v4.
The local process interface uses fixed finite computational bases and unnormalized,
input-first Choi operators. Physical dimensions are positive natural numbers.
Theorem 4 below is explicitly restricted to the balanced domain required by
its proof; the unrestricted printed statement remains deferred.
Pauli gates come from the frozen Gates module. Other local names distinguish
this six-wire, arbitrary-ancilla process interface from incompatible accepted
interfaces with coincidentally matching short names.
-/
noncomputable section
open scoped Matrix ComplexConjugate ComplexOrder
attribute [local instance] Classical.decEq Classical.propDecidable
namespace QAlgorithms.Papers.Independent.Intake100.P46
/-- PDF pp.2,10: positive dimensions in wire order P, AI, AO, BI, BO, F. -/
abbrev ProcessWireDimensions := Fin 6 → ℕ+
/-- PDF p.2: the fixed computational basis of all six wires. -/
abbrev ProcessBasis (d : ProcessWireDimensions) := (s : Fin 6) → Fin (d s : ℕ)
/-- PDF p.2: a process operator, without any validity condition imposed by its type. -/
abbrev ProcessMatrix (d : ProcessWireDimensions) := Matrix (ProcessBasis d) (ProcessBasis d) ℂ
/-- PDF pp.2–3: coordinate insertion in the fixed six-wire order. -/
def processCoordinates (d : ProcessWireDimensions) (p : Fin (d 0 : ℕ)) (ai : Fin (d 1 : ℕ))
(ao : Fin (d 2 : ℕ)) (bi : Fin (d 3 : ℕ)) (bo : Fin (d 4 : ℕ))
(f : Fin (d 5 : ℕ)) : ProcessBasis d :=
Fin.cases p (Fin.cases ai (Fin.cases ao (Fin.cases bi
(Fin.cases bo (Fin.cases f (fun i => Fin.elim0 i))))))
/-- PDF p.10, Eq.(40): |U>><<U| in input-first order, with no dimension factor. -/
def unitaryChannelProjector {I O : Type*} (U : Matrix O I ℂ) : Matrix (I × O) (I × O) ℂ :=
fun x y => U x.2 x.1 * conj (U y.2 y.1)
/-- PDF pp.3–4: reversible unitarity between possibly differently labelled finite bases.
Both equations are required; an isometry into a larger space is excluded. -/
def IsReversibleMatrix {I O : Type*} [Fintype I] [Fintype O] [DecidableEq I]
[DecidableEq O] (U : Matrix O I ℂ) : Prop :=
Uᴴ * U = 1 ∧ U * Uᴴ = 1
/-- PDF p.4: an isometry need only satisfy the first of the two unitary equations. -/
def IsIsometricMatrix {I O : Type*} [Fintype O] [DecidableEq I]
(V : Matrix O I ℂ) : Prop := Vᴴ * V = 1
/-- PDF p.11, before Eq.(45): the independent finite Choi criterion for a local CPTP map. -/
def IsCPTPChoi {I O : Type*} [Fintype I] [Fintype O] [DecidableEq I]
(J : Matrix (I × O) (I × O) ℂ) : Prop :=
J.PosSemidef ∧ ∀ i j, (∑ o, J (i,o) (j,o)) = if i = j then 1 else 0
/-- PDF pp.3,10: the CJ operator of some reversible unitary channel. -/
def IsUnitaryChoi {I O : Type*} [Fintype I] [Fintype O] [DecidableEq I]
[DecidableEq O] (J : Matrix (I × O) (I × O) ℂ) : Prop :=
∃ U : Matrix O I ℂ, IsReversibleMatrix U ∧ J = unitaryChannelProjector U
/-- PDF p.2, Eq.(1), and p.11, Eq.(43): link W with arbitrary ancillary local CJ
operators. The laboratory indices are contracted bilinearly (no conjugation).
All off-diagonal blocks of the ancillary wires are retained. -/
def linkLaboratories (d : ProcessWireDimensions) (aIn aOut bIn bOut : ℕ+) (W : ProcessMatrix d)
(A : Matrix ((Fin (d 1 : ℕ) × Fin (aIn : ℕ)) ×
(Fin (d 2 : ℕ) × Fin (aOut : ℕ)))
((Fin (d 1 : ℕ) × Fin (aIn : ℕ)) ×
(Fin (d 2 : ℕ) × Fin (aOut : ℕ))) ℂ)
(B : Matrix ((Fin (d 3 : ℕ) × Fin (bIn : ℕ)) ×
(Fin (d 4 : ℕ) × Fin (bOut : ℕ)))
((Fin (d 3 : ℕ) × Fin (bIn : ℕ)) ×
(Fin (d 4 : ℕ) × Fin (bOut : ℕ))) ℂ) :
Matrix ((Fin (d 0 : ℕ) × Fin (aIn : ℕ) × Fin (bIn : ℕ)) ×
(Fin (d 5 : ℕ) × Fin (aOut : ℕ) × Fin (bOut : ℕ)))
((Fin (d 0 : ℕ) × Fin (aIn : ℕ) × Fin (bIn : ℕ)) ×
(Fin (d 5 : ℕ) × Fin (aOut : ℕ) × Fin (bOut : ℕ))) ℂ :=
fun u v => ∑ x : ProcessBasis d, ∑ y : ProcessBasis d,
if x 0 = u.1.1 ∧ y 0 = v.1.1 ∧ x 5 = u.2.1 ∧ y 5 = v.2.1 then
W x y * A ((x 1,u.1.2.1),(x 2,u.2.2.1))
((y 1,v.1.2.1),(y 2,v.2.2.1)) *
B ((x 3,u.1.2.2),(x 4,u.2.2.2))
((y 3,v.1.2.2),(y 4,v.2.2.2)) else 0
/-- PDF pp.2–3,11: operational process validity, independently of LV. Every positive
ancillary dimension and every pair of local CPTP operators is tested. -/
def IsValidProcess {d : ProcessWireDimensions} (W : ProcessMatrix d) : Prop :=
∀ (aIn aOut bIn bOut : ℕ+) A B,
IsCPTPChoi A → IsCPTPChoi B → IsCPTPChoi (linkLaboratories d aIn aOut bIn bOut W A B)
/-- PDF p.3, Definition 1: purity tests all compatible unitary laboratories on all
ancillary wires, including the enlarged SWAP laboratories in Eq.(9). Validity is
kept separate so Theorem 2 does not silently assume arbitrary unitaries are processes. -/
def IsPureProcess {d : ProcessWireDimensions} (W : ProcessMatrix d) : Prop :=
∀ (aIn aOut bIn bOut : ℕ+) U V,
IsReversibleMatrix U → IsReversibleMatrix V →
IsUnitaryChoi (linkLaboratories d aIn aOut bIn bOut W (unitaryChannelProjector U) (unitaryChannelProjector V))
/-- PDF pp.3–4: a matrix from P AO BO to AI BI F, in its input-first CJ wire order. -/
def processProjector {d : ProcessWireDimensions}
(U : Matrix (Fin (d 1 : ℕ) × Fin (d 3 : ℕ) × Fin (d 5 : ℕ))
(Fin (d 0 : ℕ) × Fin (d 2 : ℕ) × Fin (d 4 : ℕ)) ℂ) : ProcessMatrix d :=
fun x y => U (x 1,x 3,x 5) (x 0,x 2,x 4) *
conj (U (y 1,y 3,y 5) (y 0,y 2,y 4))
/-- PDF p.11, Eq.(53): replace the wires in s by maximally mixed identity factors,
preserving the order of every other wire. Strictly positive dimensions guard division. -/
def replaceWires {d : ProcessWireDimensions} (s : Finset (Fin 6)) (W : ProcessMatrix d) :
ProcessMatrix d :=
fun x y => if ∀ i ∈ s, x i = y i then
((∏ i ∈ s, (d i : ℕ) : ℕ) : ℂ)⁻¹ *
∑ z : ProcessBasis d,
if ∀ i, i ∉ s → z i = x i then
W z (fun i => if i ∈ s then z i else y i) else 0
else 0
/-- PDF p.12, Eq.(64): the complete bipartite linear normalization projector.
The order of wire labels is P, AI, AO, BI, BO, F. -/
def validSubspaceProjector {d : ProcessWireDimensions} (W : ProcessMatrix d) : ProcessMatrix d :=
W - replaceWires {5} W + replaceWires {2,5} W + replaceWires {4,5} W -
replaceWires {2,4,5} W - replaceWires {1,2,5} W + replaceWires {1,2,4,5} W -
replaceWires {3,4,5} W + replaceWires {2,3,4,5} W -
replaceWires {1,2,3,4,5} W + replaceWires {0,1,2,3,4,5} W
/-- PDF p.6, before Eq.(21): the complementary projector 1-LV. -/
def invalidSubspaceProjector {d : ProcessWireDimensions} (W : ProcessMatrix d) : ProcessMatrix d :=
W - validSubspaceProjector W
/-- PDF pp.5–6: a process-vector outer product; these vectors are unnormalized. -/
def vectorOuter {I : Type*} (v w : I → ℂ) : Matrix I I ℂ :=
fun x y => v x * conj (w y)
/-- PDF pp.5–6, Eq.(24): the usual conjugate-linear-first finite inner product. -/
def processVectorPairing {I : Type*} [Fintype I] (v w : I → ℂ) : ℂ :=
∑ x, conj (v x) * w x
/-- PDF pp.4–6: fixed laboratory dimensions, with independently specified global wires. -/
def laboratorySignature (d : Fin 4 → ℕ+) (p f : ℕ+) : ProcessWireDimensions :=
![p,d 0,d 1,d 2,d 3,f]
-- the wire dimensions of the two signatures are compared by unfolding `![...]`; prove2me's checker needs more than
-- the default 200000 heartbeats here
set_option maxHeartbeats 800000 in
/-- PDF p.4, Definition 3, specialized to trivial original P,F: insert |0> in Pprime
and trace Fprime. The two new global dimensions are independent. -/
def recoverProcess {d : Fin 4 → ℕ+} {p f : ℕ+}
(S : ProcessMatrix (laboratorySignature d p f)) :
ProcessMatrix (laboratorySignature d 1 1) :=
fun x y => ∑ t : Fin (f : ℕ),
S (processCoordinates (laboratorySignature d p f) 0 (x 1) (x 2) (x 3) (x 4) t)
(processCoordinates (laboratorySignature d p f) 0 (y 1) (y 2) (y 3) (y 4) t)
/-- PDF p.4, Definition 3: physical purification by an operationally valid pure process,
with unrestricted positive new-past and new-future dimensions. -/
def IsPurifiable {d : Fin 4 → ℕ+}
(W : ProcessMatrix (laboratorySignature d 1 1)) : Prop :=
∃ (p f : ℕ+) (S : ProcessMatrix (laboratorySignature d p f)),
IsValidProcess S ∧ IsPureProcess S ∧ recoverProcess S = W
/-- PDF pp.5–6, Eq.(19): the complete positive spectral support, with multiplicity.
This is chosen spectral data, not extra unproved process constraints. -/
structure SupportSpectrum {d : Fin 4 → ℕ+}
(W : ProcessMatrix (laboratorySignature d 1 1)) where
rank : ℕ+
rank_eq : (rank : ℕ) = Matrix.rank W
values : Fin (rank : ℕ) → ℝ
positive : ∀ i, 0 < values i
vectors : Fin (rank : ℕ) → ProcessBasis (laboratorySignature d 1 1) → ℂ
orthonormal : ∀ i j, processVectorPairing (vectors i) (vectors j) = if i = j then 1 else 0
decomposition : ∀ x y, W x y = ∑ i, (values i : ℂ) * vectors i x * conj (vectors i y)
/-- PDF pp.5–6, Eqs.(20),(23): the canonical positive-matrix purification, with future
basis indexed by the spectral support. There is no normalization to trace one. -/
def canonicalVector {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} (e : SupportSpectrum W) :
ProcessBasis (laboratorySignature d 1 e.rank) → ℂ :=
fun x => (Real.sqrt (e.values (x 5)) : ℂ) *
e.vectors (x 5) (processCoordinates (laboratorySignature d 1 1) 0 (x 1) (x 2) (x 3) (x 4) 0)
/-- PDF p.6, Eqs.(23)–(24): all prescribed vectors, bilinear LV constraints and
orthogonality with squared norm dAO*dBO. -/
def IsCompletion {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} (e : SupportSpectrum W)
(w : Fin (e.rank : ℕ) → ProcessBasis (laboratorySignature d 1 e.rank) → ℂ) : Prop :=
w 0 = canonicalVector e ∧ ∀ i j,
invalidSubspaceProjector (vectorOuter (w i) (w j)) = 0 ∧
processVectorPairing (w i) (w j) = if i = j then ((d 1 : ℕ) * (d 3 : ℕ) : ℂ) else 0
/-- PDF p.6, Eq.(25): the actual matrix reconstructed by using wi as the past slices.
Its input basis is Pprime AO BO and its output basis AI BI Fprime. -/
def reconstructedUnitary {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} (e : SupportSpectrum W)
(w : Fin (e.rank : ℕ) → ProcessBasis (laboratorySignature d 1 e.rank) → ℂ) :
Matrix (Fin (d 0 : ℕ) × Fin (d 2 : ℕ) × Fin (e.rank : ℕ))
(Fin (e.rank : ℕ) × Fin (d 1 : ℕ) × Fin (d 3 : ℕ)) ℂ :=
fun o i => w i.1
(processCoordinates (laboratorySignature d 1 e.rank) 0 o.1 i.2.1 o.2.1 i.2.2 o.2.2)
/-- PDF p.4: a concrete dimension-increasing isometry, with every laboratory wire
and P trivial, and F two-dimensional. -/
def stateOutputSignature : ProcessWireDimensions := ![1,1,1,1,1,2]
/-- PDF p.4: the isometry sends the only global input basis vector to future |0>. -/
def stateOutputIsometry :
Matrix (Fin (stateOutputSignature 1 : ℕ) × Fin (stateOutputSignature 3 : ℕ) ×
Fin (stateOutputSignature 5 : ℕ))
(Fin (stateOutputSignature 0 : ℕ) × Fin (stateOutputSignature 2 : ℕ) ×
Fin (stateOutputSignature 4 : ℕ)) ℂ :=
fun o _ => if o.2.2 = 0 then 1 else 0
/-- PDF pp.12–13: total isotropy is a zero compression, not invariance or membership
in the kernel of C. Zero-dimensional ambient spaces are permitted. -/
def IsTotallyIsotropic {I : Type*} [Fintype I] (C : Matrix I I ℂ)
(S : Submodule ℂ (I → ℂ)) : Prop :=
∀ v ∈ S, ∀ w ∈ S, ∑ i, ∑ j, conj (v i) * C i j * w j = 0
/-- PDF p.12: positive eigenvalues counted with multiplicity. -/
def positiveCount {I : Type*} [Fintype I] [DecidableEq I]
{C : Matrix I I ℂ} (hC : C.IsHermitian) : ℕ :=
(Finset.univ.filter fun i => 0 < hC.eigenvalues i).card
/-- PDF p.12: strictly negative eigenvalues counted with multiplicity. -/
def negativeCount {I : Type*} [Fintype I] [DecidableEq I]
{C : Matrix I I ℂ} (hC : C.IsHermitian) : ℕ :=
(Finset.univ.filter fun i => hC.eigenvalues i < 0).card
/-- PDF p.12: zero eigenvalues counted with multiplicity. -/
def zeroCount {I : Type*} [Fintype I] [DecidableEq I]
{C : Matrix I I ℂ} (hC : C.IsHermitian) : ℕ :=
(Finset.univ.filter fun i => hC.eigenvalues i = 0).card
/-- PDF p.12: the claimed greatest null-square size, expressed without any supremum. -/
def nullSquareSize {I : Type*} [Fintype I] [DecidableEq I]
{C : Matrix I I ℂ} (hC : C.IsHermitian) : ℕ :=
min (positiveCount hC) (negativeCount hC) + zeroCount hC
/-- PDF p.6, Eq.(26): matrix of 1-LV on input-first vectorized operators.
The coordinate pair (a,b) represents the operator entry (b,a). -/
def vectorizedComplement {d : ProcessWireDimensions} :
Matrix (ProcessBasis d × ProcessBasis d) (ProcessBasis d × ProcessBasis d) ℂ :=
fun a b => invalidSubspaceProjector (Matrix.single b.2 b.1 1) a.2 a.1
/-- PDF p.6, Eq.(28): OW is computed from the canonical vector. Its ket factor
is conjugated w0, so its bra factor is w0, using the conjugate-linear-first convention. -/
def purificationKernelOperator {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} (e : SupportSpectrum W) :
ProcessMatrix (laboratorySignature d 1 e.rank) :=
fun v w => ∑ a, ∑ b, canonicalVector e a *
vectorizedComplement (a,v) (b,w) * conj (canonicalVector e b)
/-- PDF p.6, Eqs.(28)–(30): an explicit orthonormal basis of the entire kernel of OW.
No basis-independence of the eventual numerical bound is asserted. -/
structure KernelBasisData {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} (e : SupportSpectrum W) where
dimension : ℕ
vectors : Fin dimension → ProcessBasis (laboratorySignature d 1 e.rank) → ℂ
orthonormal : ∀ i j, processVectorPairing (vectors i) (vectors j) = if i = j then 1 else 0
kernel_span : (Submodule.span ℂ (Set.range vectors) :
Set (ProcessBasis (laboratorySignature d 1 e.rank) → ℂ)) =
{v | (purificationKernelOperator e).mulVec v = 0}
/-- PDF p.6, Eq.(30): (conj R tensor R) Pi (transpose R tensor adjoint R), with
Ria=conj(ri(a)). The entry formula retains the source's conjugations and factor order. -/
def compressedOperator {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
(b : KernelBasisData e) :
Matrix (Fin b.dimension × Fin b.dimension) (Fin b.dimension × Fin b.dimension) ℂ :=
fun i j => ∑ a, ∑ v, ∑ c, ∑ w,
b.vectors i.1 a * conj (b.vectors i.2 v) * vectorizedComplement (a,v) (c,w) *
conj (b.vectors j.1 c) * b.vectors j.2 w
/-- PDF p.7, Eq.(31): a full orthonormal eigenbasis of the computed compression.
Filtering its strictly nonzero eigenvalues below gives exactly the source's mk family. -/
structure CompressionSpectrum {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
(b : KernelBasisData e) where
values : (Fin b.dimension × Fin b.dimension) → ℝ
vectors : (Fin b.dimension × Fin b.dimension) → (Fin b.dimension × Fin b.dimension) → ℂ
orthonormal : ∀ i j, processVectorPairing (vectors i) (vectors j) = if i = j then 1 else 0
spans : Submodule.span ℂ (Set.range vectors) = ⊤
eigenvectors : ∀ i, (compressedOperator b).mulVec (vectors i) =
(values i : ℂ) • vectors i
/-- PDF p.7, Eq.(31): the complete nonzero-eigenvalue index set, possibly empty. -/
abbrev NonzeroModes {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
{b : KernelBasisData e} (s : CompressionSpectrum b) :=
{i : Fin b.dimension × Fin b.dimension // s.values i ≠ 0}
/-- PDF p.7, Eq.(32): |transpose Mk>>=mk, with the same input-first CJ ordering.
The intervening printed bra identity has a transpose discrepancy in this convention;
only the printed reshaping and its inertia counts are used here. Transposing every
constraint leaves its eigenvalues and the test bound unchanged. -/
def modeMatrix {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
{b : KernelBasisData e} (s : CompressionSpectrum b) (k : NonzeroModes s) :
Matrix (Fin b.dimension) (Fin b.dimension) ℂ := fun i j => s.vectors k.val (i,j)
/-- PDF p.7, Eq.(32): M+M† for false and i(M-M†) for true. Writing the latter as
(iM)+(iM)† gives a Hermitian matrix by construction, without adding a hypothesis. -/
def constraintMatrix {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
{b : KernelBasisData e} (s : CompressionSpectrum b) (k : NonzeroModes s × Bool) :
Matrix (Fin b.dimension) (Fin b.dimension) ℂ :=
let M := if k.2 then Complex.I • modeMatrix s k.1 else modeMatrix s k.1
M + Mᴴ
/-- PDF p.7, Eq.(34): the actual minimum over the explicit Hermitian constraints.
Only the empty-family extension is top, rather than a junk natural-number zero;
the footnote theorem treats that case separately. -/
def testBound {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
{b : KernelBasisData e} (s : CompressionSpectrum b) : WithTop ℕ :=
Finset.univ.inf fun k : NonzeroModes s × Bool =>
(nullSquareSize (C := constraintMatrix s k)
(Matrix.isHermitian_add_transpose_self
(if k.2 then Complex.I • modeMatrix s k.1 else modeMatrix s k.1)) : WithTop ℕ)
/-- PDF pp.6–7: lift the kernel coordinates back to the laboratory/future vector. -/
def liftKernelVector {d : Fin 4 → ℕ+}
{W : ProcessMatrix (laboratorySignature d 1 1)} {e : SupportSpectrum W}
(b : KernelBasisData e) (v : Fin b.dimension → ℂ) :
ProcessBasis (laboratorySignature d 1 e.rank) → ℂ :=
fun x => ∑ i, v i * b.vectors i x
/-- PDF p.7, §6: four qubit laboratory wires, with trivial P and F. -/
def qubitSignature : ProcessWireDimensions := ![1,2,2,2,2,1]
/-- PDF p.7, §6: a four-wire tensor, in AI AO BI BO order. Reuse the frozen
Bool-indexed Pauli gates, with computational labels 0=false and 1=true. -/
def laboratoryTensor (A B C D : Matrix Bool Bool ℂ) : ProcessMatrix qubitSignature :=
fun x y => A (decide (x 1 ≠ 0)) (decide (y 1 ≠ 0)) *
B (decide (x 2 ≠ 0)) (decide (y 2 ≠ 0)) *
C (decide (x 3 ≠ 0)) (decide (y 3 ≠ 0)) *
D (decide (x 4 ≠ 0)) (decide (y 4 ≠ 0))
/-- PDF p.7, Eq.(35): the exact OCB matrix; the factor is 1/4, not 1/16. -/
def ocbProcess : ProcessMatrix qubitSignature :=
(1 / 4 : ℂ) • (laboratoryTensor 1 1 1 1 + (1 / (Real.sqrt 2 : ℂ)) •
(laboratoryTensor 1 pauliZ pauliZ 1 + laboratoryTensor pauliZ 1 pauliX pauliZ))
/-- PDF p.7, Eq.(37): the exact Wopt matrix, without a claim about purifiability. -/
def optProcess : ProcessMatrix qubitSignature :=
(1 / 4 : ℂ) • (laboratoryTensor 1 1 1 1 + (1 / (Real.sqrt 3 : ℂ)) •
laboratoryTensor pauliZ 1 pauliX pauliZ + (((Real.sqrt 3 : ℂ) - 1) / 3) •
(laboratoryTensor 1 pauliX pauliX 1 + laboratoryTensor 1 pauliY pauliY 1 +
laboratoryTensor 1 pauliZ pauliZ 1))
/-- PDF p.7: the common qubit laboratory dimensions, independently of global wires. -/
def qubitLaboratories : Fin 4 → ℕ+ := ![2,2,2,2]
/-- Sanity: an empty mode family has top bound, never natural-number zero. -/
example {d : Fin 4 → ℕ+} {W : ProcessMatrix (laboratorySignature d 1 1)}
{e : SupportSpectrum W} {b : KernelBasisData e} (s : CompressionSpectrum b)
(hempty : ∀ k, s.values k = 0) : testBound s = ⊤ := by
letI : IsEmpty (NonzeroModes s) := ⟨fun k => k.property (hempty k.val)⟩
simp [testBound]
/-- Sanity: the qubit signature agrees exactly with the laboratory/past/future split. -/
example : laboratorySignature qubitLaboratories 1 1 = qubitSignature := by
ext i
fin_cases i <;> rfl
/-- Sanity: the tensor identity has diagonal entry one, without a normalization factor. -/
example (x : ProcessBasis qubitSignature) : laboratoryTensor 1 1 1 1 x x = 1 := by
simp [laboratoryTensor, Matrix.one_apply_eq]
/-- Sanity: dependent coordinate insertion selects the future wire without a cast. -/
example (d : ProcessWireDimensions) (p : Fin (d 0 : ℕ)) (ai : Fin (d 1 : ℕ))
(ao : Fin (d 2 : ℕ)) (bi : Fin (d 3 : ℕ)) (bo : Fin (d 4 : ℕ))
(f : Fin (d 5 : ℕ)) : processCoordinates d p ai ao bi bo f 5 = f := by
rfl
/-- Sanity: the imported Pauli convention sends |1> to -i|0> under Y. -/
example : QAlgorithms.pauliY false true = -Complex.I := by
rfl
/-- Sanity: the one-dimensional identity has unnormalized CJ entry one. -/
example : unitaryChannelProjector (1 : Matrix (Fin 1) (Fin 1) ℂ) (0,0) (0,0) = 1 := by
simp [unitaryChannelProjector]
/-- Sanity: both inverse equations hold for the identity, in every finite dimension. -/
example {I : Type*} [Fintype I] [DecidableEq I] :
IsReversibleMatrix (1 : Matrix I I ℂ) := by
simp [IsReversibleMatrix]
/-- Sanity: a zero process vector gives the zero operator, without a hidden offset. -/
example {d : ProcessWireDimensions} : processProjector (d := d) 0 = 0 := by
ext x y
simp [processProjector]
/-- Sanity: the zero Hermitian form is totally isotropic on every subspace. -/
example {I : Type*} [Fintype I] (S : Submodule ℂ (I → ℂ)) :
IsTotallyIsotropic (0 : Matrix I I ℂ) S := by
intro v hv w hw
simp
end QAlgorithms.Papers.Independent.Intake100.P46
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intake100.P46.CompressionSpectrum
Let be positive integers, let be the set of six-tuples with wire dimensions , and let be a complex matrix indexed by . The supplied support-spectrum data consist of a positive integer , positive real numbers , and vectors , for , satisfying and . Thus these data require positive rank. Put , where , and put . For matrices on , let mean partial trace over the wires in , followed by insertion of the identity on those wires divided by , restoring the original wire positions, and define
Writing for the matrix whose only nonzero entry is in row , column , set and . The supplied data consist of a natural number , which may be zero, and vectors , , satisfying , whose complex span is exactly . Define the matrix , indexed by , by
A value of CompressionSpectrum for this consists of real numbers and complex vectors , one of each for every , such that , the complex span of all is the whole space , and for every . The numbers need not be positive or nonzero; when , the indexing set is empty and the vector conditions are vacuous in the zero-dimensional space.
QAlgorithms.Papers.Independent.Intake100.P46.IsCPTPChoi
For finite types and , with decidable equality on , and a complex matrix indexed on both sides by , this predicate means that is positive semidefinite and that
Empty types are included: if is empty, the unique matrix satisfies the predicate; if is nonempty and is empty, the diagonal normalization equations would require , so the predicate cannot hold.
QAlgorithms.Papers.Independent.Intake100.P46.IsCompletion
For any four positive integers , any complex matrix indexed by tuples of dimensions , supplied data consisting of a positive integer , positive real numbers , and functions satisfying and , and any family of functions indexed by , where has coordinate dimensions , this predicate imposes the following conditions. For a matrix on , define unless for every , and otherwise define
The function with index zero must satisfy
Furthermore, for every , the matrix must satisfy
as an equality of matrices, and the functions must also satisfy
The index zero exists because ; all pairs , including equal indices, are included in both requirements.
QAlgorithms.Papers.Independent.Intake100.P46.IsIsometricMatrix
For an arbitrary type equipped with decidable equality, a finite type , and a complex matrix with rows indexed by and columns indexed by , this predicate means
Thus the columns are orthonormal in . The type is not assumed finite, although the equation cannot hold for infinite because is finite. If is empty, the equation holds for every such matrix; if is empty and is nonempty, it cannot hold.
QAlgorithms.Papers.Independent.Intake100.P46.IsPureProcess
For any positive integer dimensions , put and , and let be any complex matrix indexed by . This predicate means the following universal condition. For every four positive integers , let be their respective index sets , and put , , , and . For every complex matrix with rows in and columns in , and every complex matrix with rows in and columns in , if
then, writing and , there exists a complex matrix with rows in and columns in such that
and, for every and in ,
The witness need not be unique. All dimensions include and exclude ; for fixed auxiliary dimensions, the hypotheses on and are impossible unless and , so the implication is vacuous whenever either equality fails.
QAlgorithms.Papers.Independent.Intake100.P46.IsPurifiable
For any four positive integers and any complex matrix indexed by tuples of dimensions , this predicate means that there exist positive integers and a complex matrix indexed by tuples of dimensions satisfying the following requirements. To express them, for any four positive auxiliary dimensions , set
For matrices on and on , define a matrix on , where and , by
where every summation index is a nonnegative integer. A matrix on an input-output product satisfies the required channel condition precisely when it is positive semidefinite and
The first requirement on is that, for every choice of the four positive auxiliary dimensions and every satisfying this condition on their respective input-output products, also satisfies this condition. The second requirement is that, for every such choice of auxiliary dimensions and every complex matrix and satisfying
there exists a complex matrix satisfying and , such that
For auxiliary dimensions admitting no such or , this second requirement is vacuous. The final requirement is
QAlgorithms.Papers.Independent.Intake100.P46.IsReversibleMatrix
For finite types and , each equipped with decidable equality, and a complex matrix with rows indexed by and columns indexed by , this predicate means that both
hold, where is the conjugate transpose. Empty index types are allowed: both equations hold for the unique matrix when both types are empty, whereas they cannot both hold when the two finite types have different cardinalities.
QAlgorithms.Papers.Independent.Intake100.P46.IsTotallyIsotropic
For any finite type , any complex matrix , and any complex linear subspace , this predicate means that every pair satisfies
There is no Hermitian assumption on . The zero subspace is allowed; if is empty, the sums are empty and the condition holds.
QAlgorithms.Papers.Independent.Intake100.P46.IsUnitaryChoi
For finite types and , each equipped with decidable equality, and a complex matrix indexed on both sides by , this predicate means that there exists a complex matrix with rows indexed by and columns indexed by such that
The witness is required to exist but is not required to be unique. The predicate cannot hold when ; when both types are empty, it holds for the unique matrix .
QAlgorithms.Papers.Independent.Intake100.P46.IsValidProcess
For any positive integer dimensions , put and , and let be any complex matrix indexed by . This predicate means the following universal condition. For every four positive integers , let be their respective index sets , and put , , , and . For every complex matrix indexed by and every complex matrix indexed by , if and are positive semidefinite and satisfy
then the matrix indexed by , where and , and defined by
is positive semidefinite and satisfies for every . Here is when and otherwise. All dimensions quantified in this condition include and exclude .
QAlgorithms.Papers.Independent.Intake100.P46.KernelBasisData
Let be positive integers, put , and let be a complex matrix indexed by . Fix data consisting of a positive integer , positive real numbers , and functions , , such that
Put , , and . For matrices indexed by , define
where uses on and elsewhere, and set
With denoting the matrix having a single at row , column , define . An object of this structure consists of a natural number , functions for , and proofs that
The value is allowed; then the family is empty, its span is the zero subspace, and the required span equality says that the kernel of is the zero subspace.
QAlgorithms.Papers.Independent.Intake100.P46.NonzeroModes
Let be positive integers, the six-wire basis with dimensions , and a complex matrix on . The supplied data specify a positive rank , positive real numbers , and orthonormal vectors such that . Let have wire dimensions , and define . For , let trace out those wires and insert their identity divided by , in their original positions, and set
With denoting the matrix unit in row , column , put and . The supplied specifies a natural number and an orthonormal family , , whose complex span is . On , define
The supplied specifies real numbers and an orthonormal spanning family , indexed by , with . Here orthonormality means that the sum of the conjugate of the first vector times the second is the corresponding Kronecker delta. NonzeroModes is the type of indices
each accompanied by the condition that its assigned real eigenvalue is nonzero. It includes both positive and negative eigenvalues, and is empty if all assigned eigenvalues are zero, including when .
QAlgorithms.Papers.Independent.Intake100.P46.ProcessBasis
For any function , the process basis is the set of functions assigning to every an integer with . Equivalently, this is the Cartesian product . It has elements and is nonempty because every is positive.
QAlgorithms.Papers.Independent.Intake100.P46.ProcessMatrix
For any six positive integer dimensions , a process matrix is an arbitrary complex matrix whose rows and columns are both indexed by tuples satisfying for every . Thus it is a square complex matrix of size . This definition imposes no positivity, normalization, or other condition on its entries.
QAlgorithms.Papers.Independent.Intake100.P46.ProcessWireDimensions
A choice of process wire dimensions is a function . Thus it specifies six positive integer dimensions ; each dimension may equal , and none may equal .
QAlgorithms.Papers.Independent.Intake100.P46.SupportSpectrum
For any four positive integers and any complex matrix indexed by , an instance of this structure consists of a positive integer , an equality , positive real numbers for every , and functions , together with the identities
for all and all . Since is required to be positive, no instance can have .
QAlgorithms.Papers.Independent.Intake100.P46.canonicalVector
For any four positive integers , any complex matrix indexed by tuples of dimensions , and supplied data consisting of a positive integer , positive real numbers , and functions on those tuples satisfying
this definition produces the function on tuples of dimensions given by
where the square root is the real square root, regarded as a complex scalar. Here , and all the other coordinates range over their specified dimensions.
QAlgorithms.Papers.Independent.Intake100.P46.compressedOperator
Let be positive integers, put , and let be a complex matrix indexed by . Fix data consisting of a positive integer , positive real numbers , and functions , , satisfying
Put , , and . For a matrix indexed by , define
where uses on and elsewhere, and set
Let have a single at row , column , and define . The argument consists of a natural number and functions , , satisfying
The definition gives a complex matrix whose rows and columns are indexed by pairs from , with entries
The case is included, in which case this matrix has empty row and column index sets.
QAlgorithms.Papers.Independent.Intake100.P46.constraintMatrix
Let be positive integers, the basis with dimensions , and a complex matrix on . The supplied support data give a positive rank , positive real numbers , and orthonormal vectors with . Let have dimensions , put , and let trace out wires and reinsert their identity divided by , in their original positions. Define
For matrix units , put and . The supplied gives a natural number and orthonormal vectors , , spanning . On , put
The supplied gives real numbers and orthonormal vectors spanning , with ; orthonormality throughout means . Given with and a Boolean flag , define . constraintMatrix returns the matrix
where denotes conjugate transpose and . Both choices are Hermitian. When , or when all vanish, there is no permissible and hence no input pair for this definition.
QAlgorithms.Papers.Independent.Intake100.P46.invalidSubspaceProjector
For any six positive integers and any complex matrix indexed by , let be zero when some satisfies , and otherwise let
The definition assigns to the matrix
which is minus the specified alternating-sum matrix defining the valid-subspace operation.
QAlgorithms.Papers.Independent.Intake100.P46.laboratorySignature
Given a function and positive integers , this definition produces the six-coordinate positive-integer dimension function with values
at coordinates , respectively. Each supplied dimension may equal , and none may equal .
QAlgorithms.Papers.Independent.Intake100.P46.laboratoryTensor
For any four complex matrices whose rows and columns are indexed by the Boolean values , laboratoryTensor defines a complex matrix indexed by six-tuples with wire dimensions . For a coordinate , let when and when . Its entries are
The coordinates on wires and are necessarily zero. No normalization, positivity, or other condition is imposed on the four input matrices.
QAlgorithms.Papers.Independent.Intake100.P46.liftKernelVector
Let be positive integers, the basis with dimensions , and a complex matrix on . The supplied gives a positive integer , positive real numbers , and orthonormal vectors , , satisfying . Let have dimensions and put . Let trace out wires and insert their identity divided by , in the original positions, and define
Writing for the matrix unit in row , column , define
The supplied consists of a natural number and vectors , , satisfying , whose complex span equals . Given any coefficient vector , without a normalization or nonzero requirement, liftKernelVector returns the function on defined by
When , the coefficient vector has empty domain and the returned function is identically zero.
QAlgorithms.Papers.Independent.Intake100.P46.linkLaboratories
Given positive integers , write , , , , , and . For arbitrary complex matrices indexed by , indexed by , and indexed by , this defines a complex matrix indexed on both sides by . For and , its entry is
All coordinates range over the corresponding sets just specified. The definition imposes no positivity or normalization conditions on , , or .
QAlgorithms.Papers.Independent.Intake100.P46.modeMatrix
Let be positive integers, the basis with wire dimensions , and a complex matrix on . The supplied consists of a positive integer , positive real numbers , and orthonormal vectors satisfying . On the basis with dimensions , put . Let trace out wires and insert the identity on those wires divided by , in the original positions, and define
For the matrix unit , put and . The supplied consists of a natural number and orthonormal vectors , , spanning exactly . Define and
The supplied consists of real numbers and orthonormal vectors spanning , with ; all vector orthonormality uses the pairing . Given an index with , modeMatrix returns the complex matrix
Thus it reshapes the selected vector into a matrix using the ordered pair of indices directly. The required index can exist only if and some assigned eigenvalue is nonzero.
QAlgorithms.Papers.Independent.Intake100.P46.negativeCount
For any finite type with decidable equality, any complex matrix indexed by , and a supplied proof that is Hermitian, let , , be the eigenvalues supplied by the Hermitian spectral construction associated with . This definition returns
It counts indices, so repeated eigenvalues contribute according to their multiplicity; zero eigenvalues are excluded. If is empty, the count is .
QAlgorithms.Papers.Independent.Intake100.P46.nullSquareSize
For any finite type with decidable equality, any complex matrix indexed by , and a supplied proof that is Hermitian, let , , be the eigenvalues supplied by the Hermitian spectral construction associated with . This definition returns the natural number
All counts include multiplicities through their indexing by . If is empty, the result is .
QAlgorithms.Papers.Independent.Intake100.P46.ocbProcess
On the six-wire basis with dimensions , identify a basis tuple with its four coordinates on wires , each in . In the Boolean order , let
For four such matrices, write . ocbProcess is the complex matrix
where is the nonnegative real square root, regarded as a complex scalar.
QAlgorithms.Papers.Independent.Intake100.P46.optProcess
On the six-wire basis with dimensions , identify a basis tuple with its four coordinates on wires , each in . In the Boolean order , let
where , and write . optProcess is the complex matrix
where is the nonnegative real square root, regarded as a complex scalar.
QAlgorithms.Papers.Independent.Intake100.P46.positiveCount
For any finite type with decidable equality, any complex matrix indexed by , and a supplied proof that is Hermitian, let , , be the eigenvalues supplied by the Hermitian spectral construction associated with . This definition returns
It counts indices, so repeated eigenvalues contribute according to their multiplicity; zero eigenvalues are excluded. If is empty, the count is .
QAlgorithms.Papers.Independent.Intake100.P46.processCoordinates
Given six positive integer dimensions and indices satisfying , , , , , and , this defines the process basis element by
QAlgorithms.Papers.Independent.Intake100.P46.processProjector
For any six positive integers , let . Given any complex matrix whose rows are indexed by triples in and whose columns are indexed by triples in , this definition produces the complex matrix on with entries
There is no assumption on , such as unitarity or normalization.
QAlgorithms.Papers.Independent.Intake100.P46.processVectorPairing
For any index type equipped with a finite enumeration and any functions , this definition assigns the complex number
There are no normalization assumptions on or ; if is empty, the sum is zero.
QAlgorithms.Papers.Independent.Intake100.P46.purificationKernelOperator
Let be positive integers, put , and let be a complex matrix indexed by . The argument consists of a positive integer , positive real numbers , and functions , , satisfying
Put , , and define
For a matrix indexed by , define
where uses on and outside , and set
Writing for the matrix with a single at row , column , the definition gives the complex matrix indexed by with entries
QAlgorithms.Papers.Independent.Intake100.P46.qubitLaboratories
qubitLaboratories is the function from to the positive integers that takes the value at every argument.
QAlgorithms.Papers.Independent.Intake100.P46.qubitSignature
qubitSignature is the function from the six wire labels to the positive integers whose values, in that order, are
Thus wires and each have one basis value, and wires each have two.
QAlgorithms.Papers.Independent.Intake100.P46.reconstructedUnitary
Let be positive integers, and put . Let be a complex matrix indexed by . The argument consists of a positive integer , positive real numbers , and functions , indexed by , satisfying
For any family of functions , where , the definition gives the complex matrix whose rows are indexed by , whose columns are indexed by , and whose entries are
Thus has rows and columns; the family is arbitrary.
QAlgorithms.Papers.Independent.Intake100.P46.recoverProcess
For any four positive integers , any positive integers , and any complex matrix indexed by tuples of dimensions , this definition produces a complex matrix indexed by tuples of dimensions , with entries
Thus the first coordinate of both indices of is fixed to , while the last coordinate is summed with equal values on both indices. No hypothesis is imposed on , and the sum is nonempty because .
QAlgorithms.Papers.Independent.Intake100.P46.replaceWires
For any six positive integers , any subset , and any complex matrix indexed by , this definition produces a matrix as follows. For , let denote the tuple whose -th coordinate is if and otherwise. Then
The dimensions are positive, so the denominator is nonzero. The subset may be empty, in which case ; if , the result is times the identity matrix.
QAlgorithms.Papers.Independent.Intake100.P46.stateOutputIsometry
This definition gives a complex matrix whose row indices are triples with and , and whose column indices are the single triple . Its entry is when the third row coordinate is , and otherwise:
QAlgorithms.Papers.Independent.Intake100.P46.stateOutputSignature
This definition specifies six positive integer wire dimensions, indexed by , as
QAlgorithms.Papers.Independent.Intake100.P46.testBound
Let be positive integers, the basis with dimensions , and a complex matrix on . The supplied gives a positive rank , positive real numbers , and orthonormal vectors such that . On the basis with dimensions , put . Let trace out wires and insert their identity divided by , restoring the original wire positions, and set
For matrix units , define and . The supplied gives a natural number and orthonormal vectors , , whose span is exactly . On , define
The supplied gives real numbers and orthonormal vectors spanning , with ; orthonormality uses . For every with , form and the two Hermitian matrices and . For a Hermitian matrix , let count its strictly positive, strictly negative, and zero eigenvalues, respectively, with multiplicities. testBound is the following element of :
For a nonempty indexing set this is the minimum of the displayed natural numbers. For an empty indexing set it is , including when or when all are zero.
QAlgorithms.Papers.Independent.Intake100.P46.unitaryChannelProjector
For arbitrary types and and any complex matrix with rows indexed by and columns indexed by , this defines a complex matrix with rows and columns indexed by , whose entries are
Neither index type is required to be finite or nonempty, and no reversibility or normalization condition is imposed on .
QAlgorithms.Papers.Independent.Intake100.P46.validSubspaceProjector
For any six positive integers and any complex matrix indexed by , define, for a subset , the matrix to have entry zero unless for every , and otherwise to have entry
where for and otherwise. The definition assigns to the matrix
No additional condition is imposed on .
QAlgorithms.Papers.Independent.Intake100.P46.vectorOuter
For any index type and any two functions , this definition produces the complex matrix indexed by whose entries are
The index type need not be finite or nonempty, and neither function is subject to a normalization or other hypothesis.
QAlgorithms.Papers.Independent.Intake100.P46.vectorizedComplement
For any six positive integers , put . For a complex matrix indexed by and a subset , define to have coordinate for and otherwise, and set
Define the following explicit linear expression in :
For , let be the matrix with entry at row , column , and elsewhere. The definition gives the complex matrix indexed by with entries
All six dimensions are positive, so the denominators in the displayed replacement formula are nonzero.
QAlgorithms.Papers.Independent.Intake100.P46.zeroCount
For any finite type with decidable equality, any complex matrix indexed by , and a supplied proof that is Hermitian, let , , be the eigenvalues supplied by the Hermitian spectral construction associated with . This definition returns
It counts indices, including every occurrence of a repeated zero eigenvalue. If is empty, the count is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.