Definitions for Testing symmetry on quantum computers
DefinitionQAlgorithms_Papers_Independent_Extend50_P47The objects the formalized statements of Testing symmetry on quantum computers (arXiv:2105.12758) are stated in. Each was checked against the paper by a blind read-back and a moderator.
IsProjectiveUnitaryLift: pp.3–4: unitary projective lift; scalar multipliers have modulus one.symmetryControlAverage: pp.3–4, (1),(19): raw average, used as a projector only with an ordinary law.Bose: p.7, (40): normalized Bose states, with support in P.Sym: p.8, (46): normalized states invariant under conjugation.Extension: pp.3–4: normalized extension, tracing out exactly R.BSE: p.4, Definition 2.2.SE: p.3, Definition 2.1.conjugateTensorAction: p.5, (22): phases cancel in U tensor conjugate U.controlReturnProbability: pp.6–7: control preparation, controlled U, and return-to-control amplitude K have acceptance Tr(K† K rho). This definition also applies to weighted controls.firstChannel: pp.8–12: N acts on the purifying register only, preserving all S blocks.proverValues: pp.8–12: all allowed prover operations; private environments are discarded.symmetryFidelityValues: p.7: attained comparison values, with normalized comparison states in Q.TestIdentity: pp.9–12: equality of attained operational and squared-fidelity maxima.symTest: p.9: returned S-hat first, retained S second.seTest: p.11: returned R,R-hat,S-hat first; retained S second.hsChannelAdjoint: pp.33–36: Hilbert–Schmidt adjoint in the computational matrix-unit basis.BoseChannel: p.33, Definition 7.1: CPTP and N†(Qout) ≥ Qin in Löwner order.IsOperatorCovariant: p.15, (110): covariance as equality on every operator.ChannelExtension: p.35, (233): a channel extension includes the marginal identity on all operators.SEChannel: pp.34–35, Definition 7.2, with the fixed reference representations retained.BSEChannel: p.36, Definition 7.3, with the adjoint inequality, rather than covariance.densityPreparation: p.33: the preparation channel from a fully trivial input.replaceReference: p.35: replace R with its normalized identity and retain S, also on entangled inputs.StandardStep: p.5: placed gates from H,CNOT,T and the replacement T†.conjugateStep: p.5: replace T by T†; real H,CNOT are unchanged.standardStepOperator: p.5: actual matrices of the placed gates.standardCircuit: p.5: head is applied first, hence reverse product.incoherentClock: pp.9–10, (55): cyclic phase-shift family in the incoherent basis.symmetryTensorCopies: p.13: independent copies of a density in their computational basis.permutation: p.13: the frozen tensor-permutation matrix, transported from a finite basis labeling. Its convention sends |x> to |x composed with pi inverse>.tensorSymmetrizer: p.13, (15): symmetric-subspace projection.pureBipFamily: p.13, (79)–(80): permute only the B shares of k copies of AB.bipartiteAcceptance: p.13: actual control-return acceptance on k pure AB copies.kFamily: pp.4,14: full extension basis is (remaining B copies, retained AB).separableExtension: p.14, (94): the extension computed from the pure-product mixture.multiPureFamily: p.14, (89): independent permutations of each party's k copies.multiCopies: p.14: regroup k copies so each party's copies are adjacent.multiProjector: p.14: tensor product of the local symmetric projections.multiFamily: p.15, (97)–(107): remaining copies first, first copy of every party retained.choiFamily: p.16, (121): conjugate input representation tensor output representation.outcomeMatrix: p.16: the supplied outcome-label permutation representation.povmOutcomeChannel: p.16, (124): the quantum-to-classical measurement channel.qcBlockMatrix: p.17: quantum-classical blocks are subnormalized; only their sum has trace one.rootValues: p.18: root-fidelity values, distinct from the squared operational values.stateSDP: p.18, (142)–(143): every SDP block and constraint, including the orientation of X†.extensionSDP: p.18, (144)–(145): X,rho act on S, omega on RS, with Tr_R omega in the block.IsIrreducibleUnitaryLift: pp.18–19: irreducibility means no nontrivial invariant subspace, expressed by its orthogonal projector. No scalar-commutant conclusion is assumed.InequivalentFamilies: pp.18–19: inequivalent irreducible unitary families have no unitary intertwiner.IsotypicData: pp.18–19, (146)–(148): isotypic data defined through unitary intertwining and inequivalent irreducibility, rather than the desired state parameterization. The block families inherit the actual project's multiplier through intertwining.isotypicDensity: p.18, (154): the state computed from multiplicity blocks.schurBlocks: p.18, (153): trace out the irrep factor, retaining the multiplicity factor.TrivialBlock: p.19, (155)–(157): a multiplicity block is Bose-allowed only for the trivial irrep.booleanSinglet: p.23: normalized two-qubit singlet in the computational basis.collectiveSU2Average: p.23, (160): normalized Haar average of the collective SU(2) action.pauliAxisRotation: p.23, (165): rotation about the Pauli axis a by theta.bilateral: p.23, (163): bilateral rotation at the paper's sign convention.twelveRotations: p.23, (166): literal list of twelve products, retaining their matrix phases.bitHammingWeight: pp.26–28: the number of one bits.weightProjector: pp.26–28: projector onto the entire weight-k sector.collectiveZRotation: p.26, (175)–(178): collective phase; subtraction takes place in the reals.collectiveZAverage: p.26, (174): normalized integral over the complete 4pi period.finitePhase: p.26, (183): the literal finite unitary family; no odd-n group law is asserted.collectiveZTwirl: p.27, (197): continuous collective dephasing.KChannel: p.35, (244)–(245): k-extendible channels through their actual copy permutations.KBoseChannel: p.36, (255)–(258): k-Bose channels use symmetric support, not covariance.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Defs_TensorPermutationRepresentations
import Definitions.Def_QAlgorithms_Defs_Circuit
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P60
/-!
Statements from LaBorde–Rethinasamy–Wilde, arXiv:2105.12758v3.
Paper-specific objects are local; identical Mat, copies, and normalizedChoi
objects are imported from the pinned accepted library. All page references are PDF pages.
The operational model uses all CPTP maps on the purifying register, equivalently
all prover isometries with a discarded private environment. No operation acts on
retained S. Maxima are expressed by IsGreatest, which includes attainment.
Raw Bose averages require an ordinary representation; conjugation results permit
projective lifts. Fidelity always means rootFidelity squared unless explicitly root.
-/
noncomputable section
namespace QAlgorithms.Papers.Independent.Extend50.P47
open scoped ComplexConjugate ComplexOrder Matrix Matrix.Norms.L2Operator Manifold ContDiff
open MeasureTheory
open QAlgorithms.Papers.Independent.Information100.P60 (Mat)
open QAlgorithms.Papers.Independent.Information100.P56 (normalizedChoi)
variable {G S R P T A B C D R2 S2 : Type*}
variable [Fintype G] [Group G] [DecidableEq G]
variable [Fintype S] [DecidableEq S] [Nonempty S]
variable [Fintype R] [DecidableEq R] [Nonempty R]
variable [Fintype P] [DecidableEq P] [Nonempty P]
variable [Fintype T] [DecidableEq T] [Nonempty T]
variable [Fintype A] [DecidableEq A] [Nonempty A]
variable [Fintype B] [DecidableEq B] [Nonempty B]
variable [Fintype C] [DecidableEq C] [Nonempty C]
variable [Fintype D] [DecidableEq D] [Nonempty D]
variable [Fintype R2] [DecidableEq R2] [Nonempty R2]
variable [Fintype S2] [DecidableEq S2] [Nonempty S2]
/-- pp.3–4: unitary projective lift; scalar multipliers have modulus one. -/
def IsProjectiveUnitaryLift (U : G → Matrix.unitaryGroup S ℂ) : Prop :=
∀ g h, ∃ z : ℂ, ‖z‖ = 1 ∧
(U (g * h) : Mat S) = z • ((U g : Mat S) * (U h : Mat S))
/-- pp.3–4, (1),(19): raw average, used as a projector only with an ordinary law. -/
def symmetryControlAverage (U : G → Mat S) : Mat S :=
(Fintype.card G : ℂ)⁻¹ • ∑ g, U g
/-- p.7, (40): normalized Bose states, with support in P. -/
def Bose (Q : Mat S) (rho : Mat S) : Prop :=
IsDensityMatrix rho ∧ rho = Q * rho * Q
/-- p.8, (46): normalized states invariant under conjugation. -/
def Sym (U : G → Mat S) (rho : Mat S) : Prop :=
IsDensityMatrix rho ∧ ∀ g, rho = U g * rho * (U g)ᴴ
/-- pp.3–4: normalized extension, tracing out exactly R. -/
def Extension (Q : Mat (R × S) → Prop) (rho : Mat S) : Prop :=
IsDensityMatrix rho ∧ ∃ omega, Q omega ∧ traceLeft omega = rho
/-- p.4, Definition 2.2. -/
def BSE (U : G → Mat (R × S)) (rho : Mat S) : Prop :=
Extension (Bose (symmetryControlAverage U)) rho
/-- p.3, Definition 2.1. -/
def SE (U : G → Mat (R × S)) (rho : Mat S) : Prop :=
Extension (Sym U) rho
/-- p.5, (22): phases cancel in U tensor conjugate U. -/
def conjugateTensorAction (U : G → Mat S) (g : G) : Mat (S × S) :=
Matrix.kronecker (U g) ((U g).map conj)
/-- pp.6–7: control preparation, controlled U, and return-to-control amplitude K
have acceptance Tr(K† K rho). This definition also applies to weighted controls. -/
def controlReturnProbability (K rho : Mat S) : ℝ := effectProb (Kᴴ * K) rho
/-- pp.8–12: N acts on the purifying register only, preserving all S blocks. -/
def firstChannel (N : Superop P T) : Superop (P × S) (T × S) :=
fun X => Matrix.of fun a b =>
N (Matrix.of fun p q => X (p, a.2) (q, b.2)) a.1 b.1
/-- pp.8–12: all allowed prover operations; private environments are discarded. -/
def proverValues (psi : EuclideanSpace ℂ (P × S)) (K : Mat (T × S)) : Set ℝ :=
{v | ∃ N : Superop P T, IsChannel N ∧
v = controlReturnProbability K (firstChannel N (pureDensity psi))}
/-- p.7: attained comparison values, with normalized comparison states in Q. -/
def symmetryFidelityValues (rho : Mat S) (Q : Mat S → Prop) : Set ℝ :=
{v | ∃ sigma, Q sigma ∧ v = rootFidelity rho sigma ^ 2}
/-- pp.9–12: equality of attained operational and squared-fidelity maxima. -/
def TestIdentity (psi : EuclideanSpace ℂ (P × S)) (K : Mat (T × S))
(rho : Mat S) (Q : Mat S → Prop) : Prop :=
∃ v, IsGreatest (proverValues psi K) v ∧ IsGreatest (symmetryFidelityValues rho Q) v
/-- p.9: returned S-hat first, retained S second. -/
def symTest (U : G → Mat S) : Mat (S × S) :=
symmetryControlAverage fun g => (conjugateTensorAction U g).submatrix Prod.swap Prod.swap
/-- p.11: returned R,R-hat,S-hat first; retained S second. -/
def seTest (U : G → Mat (R × S)) : Mat ((R × (R × S)) × S) :=
(symmetryControlAverage (conjugateTensorAction U)).submatrix
(fun p => ((p.1.1, p.2), p.1.2)) (fun p => ((p.1.1, p.2), p.1.2))
/-- pp.33–36: Hilbert–Schmidt adjoint in the computational matrix-unit basis. -/
def hsChannelAdjoint (N : Superop A B) (Y : Mat B) : Mat A :=
Matrix.of fun i j => ∑ a, ∑ b, conj (N (Matrix.single i j 1) a b) * Y a b
/-- p.33, Definition 7.1: CPTP and N†(Qout) ≥ Qin in Löwner order. -/
def BoseChannel (Qin : Mat A) (Qout : Mat B) (N : Superop A B) : Prop :=
IsChannel N ∧ (hsChannelAdjoint N Qout - Qin).PosSemidef
/-- p.15, (110): covariance as equality on every operator. -/
def IsOperatorCovariant (U : G → Mat A) (V : G → Mat B) (N : Superop A B) : Prop :=
∀ g X, N (U g * X * (U g)ᴴ) = V g * N X * (V g)ᴴ
/-- p.35, (233): a channel extension includes the marginal identity on all operators. -/
def ChannelExtension (N : Superop S S2) (M : Superop (R × S) (R2 × S2)) : Prop :=
IsChannel M ∧ ∀ X, traceLeft (M X) = N (traceLeft X)
/-- pp.34–35, Definition 7.2, with the fixed reference representations retained. -/
def SEChannel (U : G → Mat (R × S)) (V : G → Mat (R2 × S2))
(N : Superop S S2) : Prop :=
IsChannel N ∧ ∃ M, ChannelExtension N M ∧ IsOperatorCovariant U V M
/-- p.36, Definition 7.3, with the adjoint inequality, rather than covariance. -/
def BSEChannel (U : G → Mat (R × S)) (V : G → Mat (R2 × S2))
(N : Superop S S2) : Prop :=
IsChannel N ∧ ∃ M, ChannelExtension N M ∧
(hsChannelAdjoint M (symmetryControlAverage V) - symmetryControlAverage U).PosSemidef
/-- p.33: the preparation channel from a fully trivial input. -/
def densityPreparation (rho : Mat S) : Superop Unit S := fun X => X.trace • rho
/-- p.35: replace R with its normalized identity and retain S, also on entangled inputs. -/
def replaceReference (X : Mat (R × S)) : Mat (R × S) :=
Matrix.kronecker ((Fintype.card R : ℂ)⁻¹ • (1 : Mat R)) (traceLeft X)
example (Q rho : Mat S) : Bose Q rho ↔
IsDensityMatrix rho ∧ rho = Q * rho * Q := Iff.rfl
example (rho : Mat S) (X : Mat Unit) : densityPreparation rho X = X.trace • rho := rfl
example (N : Superop P T) (X : Mat (P × S)) (a b : T × S) :
firstChannel N X a b = N (fun p q => X (p, a.2) (q, b.2)) a.1 b.1 := rfl
/-- p.5: placed gates from H,CNOT,T and the replacement T†. -/
inductive StandardStep (n : ℕ) where
| h (q : Fin n)
| t (q : Fin n)
| td (q : Fin n)
| cx (w : Fin 2 ↪ Fin n)
/-- p.5: replace T by T†; real H,CNOT are unchanged. -/
def conjugateStep {n : ℕ} : StandardStep n → StandardStep n
| .h q => .h q
| .t q => .td q
| .td q => .t q
| .cx w => .cx w
/-- p.5: actual matrices of the placed gates. -/
def standardStepOperator {n : ℕ} : StandardStep n → Mat (Qubits n)
| .h q => embedOp (Gate.ofMatrix1 hadamard).mat
(show Fin 1 ↪ Fin n from
⟨fun _ => q, fun _ _ _ => Subsingleton.elim _ _⟩)
| .t q => embedOp (Gate.ofMatrix1 gateT).mat
(show Fin 1 ↪ Fin n from
⟨fun _ => q, fun _ _ _ => Subsingleton.elim _ _⟩)
| .td q => embedOp (Gate.ofMatrix1 gateTᴴ).mat
(show Fin 1 ↪ Fin n from
⟨fun _ => q, fun _ _ _ => Subsingleton.elim _ _⟩)
| .cx w => embedOp (Gate.ofMatrix2 cnot).mat w
/-- p.5: head is applied first, hence reverse product. -/
def standardCircuit {n : ℕ} (c : List (StandardStep n)) : Mat (Qubits n) :=
(c.map standardStepOperator).reverse.prod
example {n : ℕ} (q : Fin n) : conjugateStep (.t q) = .td q := rfl
example (n : ℕ) : standardCircuit ([] : List (StandardStep n)) = 1 := rfl
/-- pp.9–10, (55): cyclic phase-shift family in the incoherent basis. -/
def incoherentClock (d : ℕ) (z : Fin d) : Mat (Fin d) :=
Matrix.diagonal fun j => Complex.exp (2 * Real.pi * Complex.I * j.val * z.val / d)
/-- p.13: independent copies of a density in their computational basis. -/
def symmetryTensorCopies (rho : Mat S) (k : ℕ) : Mat (Fin k → S) :=
QAlgorithms.Papers.Independent.Information100.P60.copies k rho
/-- p.13: the frozen tensor-permutation matrix, transported from a finite basis
labeling. Its convention sends |x> to |x composed with pi inverse>. -/
def permutation (k : ℕ) (pi : Equiv.Perm (Fin k)) : Mat (Fin k → S) :=
(Schur.tensorPermutation (Fintype.card S) k pi).submatrix
(fun x i => Fintype.equivFin S (x i)) (fun x i => Fintype.equivFin S (x i))
/-- p.13, (15): symmetric-subspace projection. -/
def tensorSymmetrizer (S : Type*) [Fintype S] [DecidableEq S] (k : ℕ) :
Mat (Fin k → S) := symmetryControlAverage (permutation (S := S) k)
/-- p.13, (79)–(80): permute only the B shares of k copies of AB. -/
def pureBipFamily (k : ℕ) (pi : Equiv.Perm (Fin k)) : Mat (Fin k → A × B) :=
Matrix.of fun y x =>
if (∀ i, (y i).1 = (x i).1) ∧ (∀ i, (y i).2 = (x (pi.symm i)).2) then 1 else 0
/-- p.13: actual control-return acceptance on k pure AB copies. -/
def bipartiteAcceptance (psi : EuclideanSpace ℂ (A × B)) (k : ℕ) : ℝ :=
controlReturnProbability (symmetryControlAverage (pureBipFamily (A := A) (B := B) k)) (symmetryTensorCopies (pureDensity psi) k)
example (rho : Mat S) (x y : Fin 1 → S) : symmetryTensorCopies rho 1 x y = rho (x 0) (y 0) := by
simp [symmetryTensorCopies, QAlgorithms.Papers.Independent.Information100.P60.copies]
/-- pp.4,14: full extension basis is (remaining B copies, retained AB). -/
def kFamily (n : ℕ) (pi : Equiv.Perm (Fin (n + 1))) :
Mat ((Fin n → B) × (A × B)) :=
Matrix.of fun y x =>
if y.2.1 = x.2.1 ∧ Fin.cases y.2.2 y.1 = (Fin.cases x.2.2 x.1) ∘ pi.symm
then 1 else 0
/-- p.14, (94): the extension computed from the pure-product mixture. -/
def separableExtension {X : Type*} [Fintype X] (p : X → ℝ)
(a : X → EuclideanSpace ℂ A) (b : X → EuclideanSpace ℂ B) (n : ℕ) :
Mat ((Fin n → B) × (A × B)) :=
Matrix.of fun y z => ∑ x, (p x : ℂ) * pureDensity (a x) y.2.1 z.2.1 *
∏ i : Fin (n + 1), pureDensity (b x) (Fin.cases y.2.2 y.1 i) (Fin.cases z.2.2 z.1 i)
/-- p.14, (89): independent permutations of each party's k copies. -/
def multiPureFamily {m : ℕ} (d : Fin m → ℕ) (k : ℕ)
(pi : Fin m → Equiv.Perm (Fin k)) : Mat ((i : Fin m) → Fin k → Fin (d i)) :=
Matrix.of fun y x => if ∀ i, y i = x i ∘ (pi i).symm then 1 else 0
/-- p.14: regroup k copies so each party's copies are adjacent. -/
def multiCopies {m : ℕ} {d : Fin m → ℕ} (rho : Mat ((i : Fin m) → Fin (d i)))
(k : ℕ) : Mat ((i : Fin m) → Fin k → Fin (d i)) :=
Matrix.of fun x y => ∏ t, rho (fun i => x i t) (fun i => y i t)
/-- p.14: tensor product of the local symmetric projections. -/
def multiProjector {m : ℕ} (d : Fin m → ℕ) (k : ℕ) :
Mat ((i : Fin m) → Fin k → Fin (d i)) :=
Matrix.of fun x y => ∏ i, tensorSymmetrizer (Fin (d i)) k (x i) (y i)
/-- p.15, (97)–(107): remaining copies first, first copy of every party retained. -/
def multiFamily {m : ℕ} (d n : Fin m → ℕ)
(pi : (i : Fin m) → Equiv.Perm (Fin (n i + 1))) :
Mat (((i : Fin m) → Fin (n i) → Fin (d i)) × ((i : Fin m) → Fin (d i))) :=
Matrix.of fun y x =>
if ∀ i, Fin.cases (y.2 i) (y.1 i) = (Fin.cases (x.2 i) (x.1 i)) ∘ (pi i).symm
then 1 else 0
/-- p.16, (121): conjugate input representation tensor output representation. -/
def choiFamily (U : G → Mat A) (V : G → Mat B) (g : G) : Mat (A × B) :=
Matrix.kronecker ((U g).map conj) (V g)
/-- p.16: the supplied outcome-label permutation representation. -/
def outcomeMatrix {X : Type*} [DecidableEq X] (pi : Equiv.Perm X) : Mat X :=
Matrix.of fun y x => if y = pi x then 1 else 0
/-- p.16, (124): the quantum-to-classical measurement channel. -/
def povmOutcomeChannel {X : Type*} [Fintype X] [DecidableEq X]
(L : X → Mat S) : Superop S X :=
fun rho => Matrix.diagonal fun x => (L x * rho).trace
/-- p.17: quantum-classical blocks are subnormalized; only their sum has trace one. -/
def qcBlockMatrix {X : Type*} [DecidableEq X] (b : X → Mat S) : Mat (S × X) :=
Matrix.of fun x y => if x.2 = y.2 then b x.2 x.1 y.1 else 0
/-- p.18: root-fidelity values, distinct from the squared operational values. -/
def rootValues (rho : Mat S) (Q : Mat S → Prop) : Set ℝ :=
{v | ∃ sigma, Q sigma ∧ v = rootFidelity rho sigma}
/-- p.18, (142)–(143): every SDP block and constraint, including the orientation of X†. -/
def stateSDP (rho : Mat S) (Q : Mat S → Prop) : Set ℝ :=
{v | ∃ (X sigma : Mat S), sigma.PosSemidef ∧ sigma.trace = 1 ∧ Q sigma ∧
(Matrix.fromBlocks rho Xᴴ X sigma).PosSemidef ∧ v = X.trace.re}
/-- p.18, (144)–(145): X,rho act on S, omega on RS, with Tr_R omega in the block. -/
def extensionSDP (rho : Mat S) (Q : Mat (R × S) → Prop) : Set ℝ :=
{v | ∃ (X : Mat S) (omega : Mat (R × S)), omega.PosSemidef ∧ omega.trace = 1 ∧
Q omega ∧ (Matrix.fromBlocks rho Xᴴ X (traceLeft omega)).PosSemidef ∧ v = X.trace.re}
example (rho : Mat S) (Q : Mat S → Prop) (v : ℝ) : v ∈ stateSDP rho Q ↔
∃ X sigma, sigma.PosSemidef ∧ sigma.trace = 1 ∧ Q sigma ∧
(Matrix.fromBlocks rho Xᴴ X sigma).PosSemidef ∧ v = X.trace.re := Iff.rfl
/-- pp.18–19: irreducibility means no nontrivial invariant subspace, expressed
by its orthogonal projector. No scalar-commutant conclusion is assumed. -/
def IsIrreducibleUnitaryLift {d : ℕ} (U : G → Matrix.unitaryGroup (Fin d) ℂ) : Prop :=
∀ Q : Mat (Fin d), Qᴴ = Q → Q * Q = Q →
(∀ g, Q * (U g : Mat (Fin d)) = (U g : Mat (Fin d)) * Q) → Q = 0 ∨ Q = 1
/-- pp.18–19: inequivalent irreducible unitary families have no unitary intertwiner. -/
def InequivalentFamilies {d e : ℕ}
(U : G → Matrix.unitaryGroup (Fin d) ℂ) (V : G → Matrix.unitaryGroup (Fin e) ℂ) : Prop :=
¬ ∃ X : Matrix (Fin d) (Fin e) ℂ, Xᴴ * X = 1 ∧ X * Xᴴ = 1 ∧
∀ g, (U g : Mat (Fin d)) * X = X * (V g : Mat (Fin e))
/-- pp.18–19, (146)–(148): isotypic data defined through unitary intertwining
and inequivalent irreducibility, rather than the desired state parameterization.
The block families inherit the actual project's multiplier through intertwining. -/
structure IsotypicData (U : G → Mat S) where
count : ℕ
mult : Fin count → ℕ
dim : Fin count → ℕ
mult_pos : ∀ l, 0 < mult l
dim_pos : ∀ l, 0 < dim l
rep : (l : Fin count) → G → Matrix.unitaryGroup (Fin (dim l)) ℂ
irreducible : ∀ l, IsIrreducibleUnitaryLift (rep l)
inequivalent : ∀ l k, l ≠ k → InequivalentFamilies (rep l) (rep k)
W : Matrix S (Σ l : Fin count, Fin (mult l) × Fin (dim l)) ℂ
left_unitary : Wᴴ * W = 1
right_unitary : W * Wᴴ = 1
intertwines : ∀ g, U g = W *
(Matrix.blockDiagonal' fun l => Matrix.kronecker (1 : Mat (Fin (mult l)))
(rep l g : Mat (Fin (dim l)))) * Wᴴ
/-- p.18, (154): the state computed from multiplicity blocks. -/
def isotypicDensity {U : G → Mat S} (E : IsotypicData U)
(b : (l : Fin E.count) → Mat (Fin (E.mult l))) : Mat S :=
E.W * (Matrix.blockDiagonal' fun l => Matrix.kronecker (b l)
((E.dim l : ℂ)⁻¹ • (1 : Mat (Fin (E.dim l))))) * E.Wᴴ
/-- p.18, (153): trace out the irrep factor, retaining the multiplicity factor. -/
def schurBlocks {U : G → Mat S} (E : IsotypicData U) (rho : Mat S)
(l : Fin E.count) : Mat (Fin (E.mult l)) :=
traceRight ((E.Wᴴ * rho * E.W).submatrix (fun x => ⟨l, x⟩) (fun x => ⟨l, x⟩))
/-- p.19, (155)–(157): a multiplicity block is Bose-allowed only for the trivial irrep. -/
def TrivialBlock {U : G → Mat S} (E : IsotypicData U) (l : Fin E.count) : Prop :=
∀ g, (E.rep l g : Mat (Fin (E.dim l))) = 1
/-- p.23: normalized two-qubit singlet in the computational basis. -/
def booleanSinglet : EuclideanSpace ℂ (Bool × Bool) :=
WithLp.toLp 2 fun p => if p = (false, true) then ((Real.sqrt 2)⁻¹ : ℂ)
else if p = (true, false) then -((Real.sqrt 2)⁻¹ : ℂ) else 0
/-- PDF p.23, (160): SU(2) Haar integration uses the Borel sigma-algebra. -/
local instance su2MeasurableSpace : MeasurableSpace (Matrix.specialUnitaryGroup Bool ℂ) :=
borel (Matrix.specialUnitaryGroup Bool ℂ)
/-- PDF p.23, (160): the chosen SU(2) sigma-algebra is Borel by construction. -/
local instance su2BorelSpace : BorelSpace (Matrix.specialUnitaryGroup Bool ℂ) :=
⟨rfl⟩
/-- PDF p.24, (171): U(2) Haar integration uses the Borel sigma-algebra. -/
local instance u2MeasurableSpace : MeasurableSpace (Matrix.unitaryGroup Bool ℂ) :=
borel (Matrix.unitaryGroup Bool ℂ)
/-- PDF p.24, (171): the chosen U(2) sigma-algebra is Borel by construction. -/
local instance u2BorelSpace : BorelSpace (Matrix.unitaryGroup Bool ℂ) :=
⟨rfl⟩
example : su2MeasurableSpace = borel (Matrix.specialUnitaryGroup Bool ℂ) := rfl
example : u2MeasurableSpace = borel (Matrix.unitaryGroup Bool ℂ) := rfl
/-- p.23, (160): normalized Haar average of the collective SU(2) action. -/
def collectiveSU2Average (mu : Measure (Matrix.specialUnitaryGroup Bool ℂ)) : Mat (Bool × Bool) :=
∫ U, Matrix.kronecker (U : Mat Bool) (U : Mat Bool) ∂mu
/-- p.23, (165): rotation about the Pauli axis a by theta. -/
def pauliAxisRotation (a : Mat Bool) (theta : ℝ) : Mat Bool :=
(Real.cos (theta / 2) : ℂ) • 1 - (Complex.I * Real.sin (theta / 2)) • a
/-- p.23, (163): bilateral rotation at the paper's sign convention. -/
def bilateral (a : Mat Bool) : Mat (Bool × Bool) :=
Matrix.kronecker (pauliAxisRotation a (-Real.pi / 2)) (pauliAxisRotation a (-Real.pi / 2))
/-- p.23, (166): literal list of twelve products, retaining their matrix phases. -/
def twelveRotations : List (Mat (Bool × Bool)) :=
let x := bilateral pauliX
let y := bilateral pauliY
let z := bilateral pauliZ
[1, x*x, y*y, z*z, x*y, y*z, z*x, y*x,
x*y*x*y, y*z*y*z, z*x*z*x, y*x*y*x]
example : twelveRotations.length = 12 := rfl
/-- pp.26–28: the number of one bits. -/
def bitHammingWeight {n : ℕ} (x : Qubits n) : ℕ := (Finset.univ.filter fun i => x i = true).card
/-- pp.26–28: projector onto the entire weight-k sector. -/
def weightProjector (n k : ℕ) : Mat (Qubits n) :=
Matrix.diagonal fun x => if bitHammingWeight x = k then 1 else 0
/-- p.26, (175)–(178): collective phase; subtraction takes place in the reals. -/
def collectiveZRotation (n : ℕ) (phi : ℝ) : Mat (Qubits n) :=
Matrix.diagonal fun x => Complex.exp
(Complex.I * (((2 * (bitHammingWeight x : ℝ) - (n : ℝ)) * phi / 2 : ℝ) : ℂ))
/-- p.26, (174): normalized integral over the complete 4pi period. -/
def collectiveZAverage (n : ℕ) : Mat (Qubits n) :=
(4 * Real.pi : ℂ)⁻¹ • ∫ phi in (0 : ℝ)..(4 * Real.pi), collectiveZRotation n phi
/-- p.26, (183): the literal finite unitary family; no odd-n group law is asserted. -/
def finitePhase (n : ℕ) (y : Fin (n + 1)) : Mat (Qubits n) :=
Matrix.diagonal fun x => Complex.exp (Complex.I *
((Real.pi * (2 * (y.val : ℝ) - (n : ℝ)) *
(2 * (bitHammingWeight x : ℝ) - (n : ℝ)) / ((n : ℝ) + 1) : ℝ) : ℂ))
/-- p.27, (197): continuous collective dephasing. -/
def collectiveZTwirl (n : ℕ) (rho : Mat (Qubits n)) : Mat (Qubits n) :=
(4 * Real.pi : ℂ)⁻¹ • ∫ phi in (0 : ℝ)..(4 * Real.pi),
collectiveZRotation n phi * rho * (collectiveZRotation n phi)ᴴ
example : bitHammingWeight (fun _ : Fin 0 => false) = 0 := rfl
example (n k : ℕ) (x : Qubits n) : weightProjector n k x x =
(if bitHammingWeight x = k then 1 else 0) := by simp [weightProjector]
/-- p.35, (244)–(245): k-extendible channels through their actual copy permutations. -/
def KChannel (n : ℕ) (N : Superop (A × B) (C × D)) : Prop :=
IsChannel N ∧ ∃ M : Superop ((Fin n → B) × (A × B)) ((Fin n → D) × (C × D)),
IsChannel M ∧ (∀ X, traceLeft (M X) = N (traceLeft X)) ∧
∀ pi X, M (kFamily (A := A) (B := B) n pi * X * (kFamily (A := A) (B := B) n pi)ᴴ) =
kFamily (A := C) (B := D) n pi * M X * (kFamily (A := C) (B := D) n pi)ᴴ
/-- p.36, (255)–(258): k-Bose channels use symmetric support, not covariance. -/
def KBoseChannel (n : ℕ) (N : Superop (A × B) (C × D)) : Prop :=
IsChannel N ∧ ∃ M : Superop ((Fin n → B) × (A × B)) ((Fin n → D) × (C × D)),
IsChannel M ∧ (∀ X, traceLeft (M X) = N (traceLeft X)) ∧
(hsChannelAdjoint M (symmetryControlAverage (kFamily (A := C) (B := D) n)) -
symmetryControlAverage (kFamily (A := A) (B := B) n)).PosSemidef
/-- Small definition checks, separate from the admitted source statements. -/
example : symmetryControlAverage (fun _ : Unit => (1 : Mat Bool)) = 1 := by simp [symmetryControlAverage]
example (rho : Mat S) : controlReturnProbability (1 : Mat S) rho = rho.trace.re := by
simp [controlReturnProbability, effectProb]
example (X : Mat (P × S)) : firstChannel (fun Y : Mat P => Y) X = X := by
ext a b
rfl
example (Y : Mat Bool) : hsChannelAdjoint (fun X : Mat Bool => X) Y false true = Y false true := by
simp [hsChannelAdjoint, Matrix.single_apply]
example : normalizedChoi (fun X : Mat Unit => X) ((), ()) ((), ()) = 1 := by
simp [QAlgorithms.Papers.Independent.Information100.P56.normalizedChoi]
example {X : Type*} [Fintype X] [DecidableEq X] (L : X → Mat S) (rho : Mat S) (x : X) :
povmOutcomeChannel L rho x x = (L x * rho).trace := by
simp [povmOutcomeChannel]
example (b : Bool → Mat S) (i j : S) : qcBlockMatrix b (i, false) (j, true) = 0 := rfl
example (rho : Mat S) (x y : Fin 0 → S) : symmetryTensorCopies rho 0 x y = 1 := by simp [symmetryTensorCopies, QAlgorithms.Papers.Independent.Information100.P60.copies]
example : booleanSinglet (false, false) = 0 := by simp [booleanSinglet]
example (a : Mat Bool) : pauliAxisRotation a 0 = 1 := by simp [pauliAxisRotation]
example (phi : ℝ) : collectiveZRotation 0 phi = 1 := by
ext x y
have h : x = y := Subsingleton.elim _ _
subst y
simp [collectiveZRotation, bitHammingWeight]
example : finitePhase 0 0 = 1 := by
ext x y
have h : x = y := Subsingleton.elim _ _
subst y
simp [finitePhase, bitHammingWeight]
end QAlgorithms.Papers.Independent.Extend50.P47
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P47.BSE
For finite index types , a family of complex square matrices indexed by , and a complex square matrix indexed by , put . This predicate means that is positive semidefinite with trace , and there exists a positive semidefinite matrix indexed by , also of trace , such that
No unitary or representation conditions are imposed on . If any of is empty, the predicate cannot hold; for empty , the average is zero.
QAlgorithms.Papers.Independent.Extend50.P47.BSEChannel
For finite index types , with decidable equality on , arbitrary matrix families on and on , and a function from matrices on to matrices on , this predicate requires that admit a finite normalized Kraus representation and that there exist a function from matrices on to matrices on admitting such a representation, satisfying
Here a finite normalized Kraus representation means for every , with ; partial trace means summing entries with equal reference indices; and ; and
No unitarity, representation, or projector conditions are imposed on the families or their averages. If is empty, both averages vanish and the positive-semidefinite condition is automatically satisfied.
QAlgorithms.Papers.Independent.Extend50.P47.Bose
For a finite index type and arbitrary complex square matrices indexed by , this predicate means that is positive semidefinite, has trace , and satisfies
The matrix is not required to be Hermitian or idempotent. If is empty, the trace condition cannot hold.
QAlgorithms.Papers.Independent.Extend50.P47.BoseChannel
For finite index types , with decidable equality on , matrices and , and a function , this predicate requires both a finite Kraus representation
for some natural number , and positive semidefiniteness of the matrix whose entry is
Here is the matrix unit on . Neither nor is assumed to be a projector, positive semidefinite, or normalized; the Kraus sum may be empty when its normalization equation permits this.
QAlgorithms.Papers.Independent.Extend50.P47.ChannelExtension
Let be finite index types, with decidable equality on , and let and be functions. This predicate means that admits a finite Kraus representation , with , and that, for every complex matrix on ,
The equality applies to all matrices . There is no separate channel assumption on ; empty index types and an empty Kraus family are included wherever the displayed requirements hold.
QAlgorithms.Papers.Independent.Extend50.P47.Extension
For finite index types , a predicate on complex square matrices indexed by , and a complex square matrix indexed by , this predicate means that is positive semidefinite with trace , and there exists a complex square matrix indexed by such that holds and
There is no separate density matrix requirement on beyond whatever asserts. If or is empty, these conditions cannot hold.
QAlgorithms.Papers.Independent.Extend50.P47.InequivalentFamilies
For natural numbers , an index type , and families and of unitary matrices of sizes and , respectively, this property means that there does not exist a complex matrix such that
No multiplication law for either family is required by this definition. The dimensions may be zero; unequal dimensions automatically preclude such an , while for the unique empty matrix satisfies all the displayed equations, so the property is false.
QAlgorithms.Papers.Independent.Extend50.P47.IsIrreducibleUnitaryLift
For a natural number , an index type , and a family of unitary complex matrices, this property means that every complex matrix satisfying , , and for every must satisfy or . No multiplication law for the family is included in this property. The case is allowed: the unique empty matrix is both zero and the identity, so the property holds in that case.
QAlgorithms.Papers.Independent.Extend50.P47.IsOperatorCovariant
For an index type , finite index types , arbitrary matrix families and , and any function , this predicate means
for every and every complex matrix . No group structure on , representation or unitarity condition on the families, or linearity or channel condition on is required. If is empty, the condition is vacuous.
QAlgorithms.Papers.Independent.Extend50.P47.IsProjectiveUnitaryLift
For a group , a finite index type with decidable equality, and a family of unitary complex matrices indexed by , this predicate means that for every , there exists a complex number , possibly depending on , such that
QAlgorithms.Papers.Independent.Extend50.P47.IsotypicData
For an index type , a finite index type with the required decidable equality, and an arbitrary family of complex matrices on , an object of this structure consists of a natural number ; positive natural numbers for each ; unitary matrices of size for every ; and a complex matrix whose rows are indexed by and columns by triples with and . These data must satisfy: every Hermitian idempotent matrix commuting with all is either zero or the identity; for any distinct , there is no complex matrix satisfying , , and for every ; and
No multiplication law in is separately imposed on or the families . The value is allowed syntactically; then the equation forces to be empty.
QAlgorithms.Papers.Independent.Extend50.P47.KBoseChannel
Let be finite index types with decidable equality, let be an integer, and let be a function from complex matrices indexed by to those indexed by . Write and . For each permutation of , define a matrix on as follows: for , form the list , where the last entries are ; then if has the same -coordinate as and for every , and it is otherwise. Define by replacing with , and set
The predicate asserts that is a channel and there exists a channel from matrices on to matrices on such that, for every complex matrix on , , and is positive semidefinite, where
and is the matrix with its sole nonzero entry equal to at . Here a channel means a function admitting finitely many rectangular complex matrices , with , such that and for every ; and . No nonemptiness of is stipulated. When , the extra registers are singletons and the permutation sum contains only the identity permutation.
QAlgorithms.Papers.Independent.Extend50.P47.KChannel
For every natural number , including , and every map from complex matrices indexed by to those indexed by , where are the ambient finite index types with decidable equality, this predicate means the following. The map is a channel, and there exists a channel from matrices indexed by to matrices indexed by , such that for every input matrix ,
and, for every permutation of and every matrix ,
Here a channel means that some finite collection of complex matrices satisfies and for all matrices , and partial trace sums entries over equal auxiliary indices. To define , write a basis label as with , and form the sequence ; its matrix entry at row , column , is exactly when and , and is otherwise. Define by the same rule with . The matrices are unrestricted, and no nonemptiness assumptions on are included. When , each auxiliary function type has one element and the sole permutation makes the covariance condition automatic.
QAlgorithms.Papers.Independent.Extend50.P47.SE
For an indexing type , finite index types , a family of complex square matrices indexed by , and a complex square matrix indexed by , this predicate means that is positive semidefinite with trace , and there exists a positive semidefinite matrix indexed by , of trace , satisfying
No unitary or representation conditions are imposed on . For empty , the invariance condition is vacuous; for empty or , no such extension exists.
QAlgorithms.Papers.Independent.Extend50.P47.SEChannel
For an index type , finite index types , with decidable equality on , arbitrary matrix families on and on , and a function , this predicate requires that admit a finite normalized Kraus representation and that there exist a function on the enlarged matrix spaces also admitting a finite normalized Kraus representation. A finite normalized Kraus representation of a map means for every , with equal to the input identity. The required must satisfy, for every matrix on ,
where , and similarly for . No unitarity or representation condition on is imposed, and the covariance condition is vacuous for empty .
QAlgorithms.Papers.Independent.Extend50.P47.StandardStep
For every natural number , this defines a type of instructions with exactly four constructors: an instruction labelled carrying an index ; an instruction labelled carrying such an index; an instruction labelled carrying such an index; and an instruction labelled carrying an injection , so that its two ordered wire indices are distinct. The definition itself assigns no matrix to these instructions. For there are no instructions, and for there are no instructions.
QAlgorithms.Papers.Independent.Extend50.P47.Sym
For an indexing type , a finite index type , a family of complex square matrices indexed by , and a complex square matrix indexed by , this predicate means that is positive semidefinite, has trace , and satisfies
The matrices are not assumed to be unitary or to obey a multiplication law. If is empty, the invariance condition is vacuous; if is empty, the trace condition is impossible.
QAlgorithms.Papers.Independent.Extend50.P47.TestIdentity
Let be finite index types, with decidable equality on and , let , let be a complex matrix indexed by , let be a complex matrix indexed by , and let be any predicate on such matrices. This predicate means that two sets of real numbers have a common attained greatest value . The first set consists of
as ranges over all maps admitting a finite Kraus representation
for some natural number , including . The second set consists of
as ranges over all matrices satisfying , where each square root is the matrix continuous functional calculus for the real square-root function. Thus some such and some such attain , and every value in either set is at most . No normalization of , density-matrix condition on or , or nonemptiness of the index types is assumed.
QAlgorithms.Papers.Independent.Extend50.P47.TrivialBlock
Let be a family of complex matrices on a finite index set , and let provide finitely many blocks with positive multiplicities , positive dimensions , unitary families , and a unitary satisfying . The data require that the only Hermitian idempotents commuting with each family are zero and identity, and that distinct families have no two-sided unitary intertwiner. For a chosen block index , the proposition defined here is exactly
It imposes this condition on the entire family in that block. An empty collection of blocks supplies no possible .
QAlgorithms.Papers.Independent.Extend50.P47.bilateral
For any complex matrix , indexed by the Boolean values, this definition returns the matrix on Boolean pairs
No condition is imposed on .
QAlgorithms.Papers.Independent.Extend50.P47.bipartiteAcceptance
For finite index types , any vector , and any natural number , this defines the real number
where exactly when and for all , and is zero otherwise. No normalization assumption is imposed on . For , the matrices in this formula have their unique entry equal to , so the defined value is .
QAlgorithms.Papers.Independent.Extend50.P47.bitHammingWeight
For every natural number and every Boolean string , the value is the number of indices for which . For , the index set is empty, there is one empty string, and its weight is .
QAlgorithms.Papers.Independent.Extend50.P47.booleanSinglet
This definition gives the vector with coordinates
QAlgorithms.Papers.Independent.Extend50.P47.choiFamily
For index types , matrix families and , and , this defines the matrix on by
The bar denotes entrywise complex conjugation. The definition imposes no unitarity or representation condition on either family.
QAlgorithms.Papers.Independent.Extend50.P47.collectiveSU2Average
For any measure on the group of complex unitary matrices of determinant one, with rows and columns indexed by the Boolean values, this definition returns the complex matrix on Boolean pairs
Its entry at is the corresponding matrix-valued integral of . No Haar, probability, or integrability assumption is imposed by this definition; the integral uses the total Bochner-integral convention, which returns zero when its integrand is not integrable.
QAlgorithms.Papers.Independent.Extend50.P47.collectiveZAverage
For every natural number , is the complex matrix
where is indexed by Boolean strings of length , is zero off the diagonal, and has diagonal entry , with the number of true coordinates of . The integral is with respect to the usual real volume measure. This definition includes , for which is the one-dimensional identity.
QAlgorithms.Papers.Independent.Extend50.P47.collectiveZRotation
For every natural number and real number , is the diagonal complex matrix indexed by Boolean strings of length , with diagonal entry
where counts the true coordinates of ; all off-diagonal entries are zero. For , this is the one-dimensional identity for every .
QAlgorithms.Papers.Independent.Extend50.P47.collectiveZTwirl
For every natural number and every complex matrix indexed by Boolean strings of length , with no positivity or normalization assumption, the definition is
where is diagonal with entry , and counts the true coordinates of . The integral uses the usual real volume measure. For , the result is .
QAlgorithms.Papers.Independent.Extend50.P47.conjugateStep
For every natural number , this defines a function on instructions of the four forms , with , and , with injective. It fixes and , sends to , and sends to , preserving every wire index and injection. This also defines the unique function on the empty instruction type when .
QAlgorithms.Papers.Independent.Extend50.P47.conjugateTensorAction
For index types , a family of complex square matrices indexed by , and , this definition returns , where the bar denotes entrywise complex conjugation. Explicitly, its entries are
No unitarity or multiplication law is required of .
QAlgorithms.Papers.Independent.Extend50.P47.controlReturnProbability
For a finite index type and arbitrary complex square matrices indexed by , this definition returns the real number
Neither a density matrix condition on nor a bound on is required, so the definition does not require this number to lie in . For empty , it is zero.
QAlgorithms.Papers.Independent.Extend50.P47.densityPreparation
For an index type and any complex matrix indexed by , this defines the function from complex matrices on the singleton type to matrices on given by
No density-matrix condition on is assumed.
QAlgorithms.Papers.Independent.Extend50.P47.extensionSDP
For finite index types with the required decidable equalities, an arbitrary complex matrix on , and an arbitrary predicate on matrices indexed by , this defines
The trace equation is a complex equality, and no density-matrix hypothesis on is imposed. The variable is an arbitrary complex matrix subject to the displayed block positivity condition. The set is empty if the constraints are infeasible, including whenever or is empty.
QAlgorithms.Papers.Independent.Extend50.P47.finitePhase
For every natural number and every integer index , is the diagonal complex matrix indexed by Boolean strings of length , with entries
where counts the true coordinates of ; all off-diagonal entries are zero. The denominator is always positive. For , the only index is , and the matrix is the one-dimensional identity.
QAlgorithms.Papers.Independent.Extend50.P47.firstChannel
For index types and an arbitrary function from complex square matrices indexed by to complex square matrices indexed by , this definition returns a function from matrices indexed by to matrices indexed by . For an input matrix , its output is specified by
The function is not required to be linear or to be a channel.
QAlgorithms.Papers.Independent.Extend50.P47.hsChannelAdjoint
Let be an index type with decidable equality, let be a finite index type, let be any function from complex matrices to complex matrices, and let . This defines the matrix
where has entry at and zero elsewhere. The definition imposes no linearity or channel condition on . If is empty, every entry of the resulting matrix is zero.
QAlgorithms.Papers.Independent.Extend50.P47.incoherentClock
For every natural number and every index , this defines the complex diagonal matrix , indexed by , with entries
The indices are interpreted as natural numbers inside the complex exponential. Although ranges over all natural numbers, no argument exists when ; for , the only resulting matrix is the identity.
QAlgorithms.Papers.Independent.Extend50.P47.isotypicDensity
Let be a family of complex matrices on a finite index set , and let consist of a natural number , positive integers for , unitary families on , and a unitary matrix , such that . The data require that every Hermitian idempotent commuting with all is either zero or the identity, and that for distinct there is no rectangular matrix satisfying , , and for every . For any family of complex matrices of size , this definition returns
No positivity or trace condition is imposed on the . The number may be zero when the unitary-matrix requirements permit an empty decomposition.
QAlgorithms.Papers.Independent.Extend50.P47.kFamily
For index types , any natural number , and a permutation of , this defines a complex matrix indexed by . Write an index as , and form its ordered -tuple of length by and . For , form in the same way. The matrix entry is
This includes , when the only permutation is the identity and the resulting matrix is the identity on .
QAlgorithms.Papers.Independent.Extend50.P47.multiCopies
For any natural number , any dimensions , any complex matrix indexed by , and any natural number , this defines a matrix indexed by arrays , with entries
There is no assumption that is Hermitian, positive semidefinite, or normalized. For , the index set is a singleton and the empty product gives its sole matrix entry the value . Zero dimensions and are also allowed; when , the sole entry is the -th power of the sole entry of .
QAlgorithms.Papers.Independent.Extend50.P47.multiFamily
For any natural number , any natural-number families indexed by , and any permutations of , this defines a complex matrix on , where and . For a row and column , form the length- lists and by putting , respectively , at coordinate , followed by the coordinates of , respectively . The entries are
No positivity assumptions are imposed. In particular, gives a one-coordinate permutation condition for subsystem ; gives a singleton index set and sole entry ; and if some , the matrix index set is empty.
QAlgorithms.Papers.Independent.Extend50.P47.multiProjector
For any natural numbers and any dimensions , this defines a complex matrix indexed by arrays , by
where is the set of all permutations of and the indicator is when its condition holds and otherwise. Thus each factor is the corresponding entry of the average of all permutation matrices on the coordinates of the -th subsystem. No dimensions or counts are required to be positive. For , the empty product is ; for , each permutation average has its sole entry equal to ; and if and some , the matrix index set is empty.
QAlgorithms.Papers.Independent.Extend50.P47.multiPureFamily
For any natural number , any dimensions indexed by , any natural number , and any choice of a permutation of for each , this defines a complex matrix whose rows and columns are arrays with , by
No positivity assumptions on are imposed. If or , the array index set is a singleton and this matrix has its sole entry equal to ; if and some , the array index set is empty.
QAlgorithms.Papers.Independent.Extend50.P47.outcomeMatrix
For any index type with decidable equality and any permutation , this defines a complex matrix with entries
No finiteness or nonemptiness assumption on is required; the empty index type is included.
QAlgorithms.Papers.Independent.Extend50.P47.pauliAxisRotation
For any complex matrix , indexed by the Boolean values, and any real number , this definition returns
No assumption that is a Pauli matrix, Hermitian, or unitary is imposed.
QAlgorithms.Papers.Independent.Extend50.P47.permutation
For a finite type , a natural number , and a permutation of , this defines the complex matrix indexed by whose entries are
The construction identifies with using its finite enumeration and restricts the corresponding permutation matrix along that identification. For , this is the one-entry matrix , including when is empty.
QAlgorithms.Papers.Independent.Extend50.P47.povmOutcomeChannel
For a finite index type , a finite index type with decidable equality, and any family of complex matrices on , this defines a map from complex matrices on to complex matrices on by
The trace here is complex-valued. There is no assumption that the are positive semidefinite or sum to the identity, or that is a density matrix; the definition itself asserts no channel property. Empty index types are allowed.
QAlgorithms.Papers.Independent.Extend50.P47.proverValues
For finite index types , with the decidable equality needed on , a complex vector indexed by , and a complex square matrix indexed by , this definition is the set of real numbers for which there exists a function from matrices indexed by to matrices indexed by having a finite Kraus representation: there exist and matrices , , such that and for every matrix . The required value is
No normalization condition on or contraction condition on is imposed. The Kraus count is included, with empty sums interpreted as zero.
QAlgorithms.Papers.Independent.Extend50.P47.pureBipFamily
For index types , a natural number , and a permutation of , this defines a complex matrix indexed by -tuples of pairs from , with
The -coordinates remain at their original positions, while the -coordinates are permuted as displayed. When , both coordinate conditions are vacuous and the unique entry is .
QAlgorithms.Papers.Independent.Extend50.P47.qcBlockMatrix
For index types , with decidable equality on , and any family of complex matrices on , this defines a complex matrix on by
No positivity, normalization, finiteness, or nonemptiness condition is imposed.
QAlgorithms.Papers.Independent.Extend50.P47.replaceReference
For finite index types , with decidable equality on , and any complex matrix indexed by , this defines
Thus its entry is . The inverse of is taken in , with . No positivity or trace normalization of , and no nonemptiness of , is required.
QAlgorithms.Papers.Independent.Extend50.P47.rootValues
For a finite index type with decidable equality, an arbitrary complex matrix on , and an arbitrary predicate on such matrices, this defines the set of real numbers
Here is the total continuous functional calculus, and the real square root is zero on negative inputs. Neither nor is required by this definition to be a density matrix or positive semidefinite. The set can be empty if no matrix satisfies ; if is empty, it is when holds of the unique empty matrix, and otherwise is empty.
QAlgorithms.Papers.Independent.Extend50.P47.schurBlocks
Let be a family of complex matrices on a finite index set , and let provide a natural number , positive multiplicities , positive dimensions , unitary families , and a unitary matrix , with . These families have only zero and identity as commuting Hermitian idempotents, and distinct families admit no intertwiner that is unitary on both sides. For any complex matrix on and any block index , this definition takes the diagonal block of and traces out its -dimensional factor. Explicitly, its output has entries
The input need not be positive, Hermitian, or normalized; if , there is no possible block index .
QAlgorithms.Papers.Independent.Extend50.P47.seTest
For a finite index type , index types , and any family of complex matrices indexed by , this defines a matrix indexed by . It averages and reindexes a basis label as . Consequently,
No unitarity or representation property is assumed. An empty gives the zero matrix.
QAlgorithms.Papers.Independent.Extend50.P47.separableExtension
For index types , a finite type , arbitrary real weights , vectors and , and any natural number , this defines a matrix on as follows. For indices and , set and ; then
There are no assumptions that the weights are nonnegative or sum to , or that the vectors are normalized. If is empty, the matrix is zero. When , the product still contains the distinguished -coordinate, so .
QAlgorithms.Papers.Independent.Extend50.P47.standardCircuit
For every natural number and every finite list of instructions on wires, this defines the complex matrix
indexed by -bit strings, with the empty list giving the identity matrix. The instruction matrices apply , , or at the specified wire for instructions , respectively, with entries zero unless all other bits agree; a instruction, for an injection , has entry exactly when the output preserves all bits except that the bit at becomes the exclusive-or of the input bits at and , and has entry otherwise. When , only the empty instruction list exists, and its matrix is the identity on the singleton set of empty bit strings.
QAlgorithms.Papers.Independent.Extend50.P47.standardStepOperator
For every natural number , this assigns to each instruction a complex matrix whose rows and columns are indexed by -bit strings . For a one-wire instruction at , its entry is unless for every ; otherwise it is , where for , for , and for , with
in the order . For , where is injective, the entry is precisely when outside the image of , , and , and is otherwise. Here denotes Boolean exclusive-or. There is no instruction argument when .
QAlgorithms.Papers.Independent.Extend50.P47.stateSDP
For a finite index type with the required decidable equality, an arbitrary complex matrix on , and an arbitrary predicate on such matrices, this defines the set
The trace equation is a complex equality. No hypothesis on is imposed in the definition, and need not itself be Hermitian or positive semidefinite. Infeasible constraints give the empty set; in particular, the set is empty when is empty because then every matrix has trace zero.
QAlgorithms.Papers.Independent.Extend50.P47.symTest
For a finite index type , an index type , and any family , this defines a matrix on by averaging and swapping the two factors in both matrix indices. Explicitly,
The inverse of is taken in . No unitarity or representation property of is required. If is empty, the average is the zero matrix, using .
QAlgorithms.Papers.Independent.Extend50.P47.symmetryControlAverage
For a finite indexing type and a family of complex square matrices indexed by , this definition returns the matrix
There are no conditions on the matrices . If is empty, the sum and the result are zero, using the convention .
QAlgorithms.Papers.Independent.Extend50.P47.symmetryFidelityValues
For a finite index type with decidable equality, an arbitrary complex square matrix indexed by , and an arbitrary predicate on such matrices, this definition is the set
where denotes the real continuous functional calculus for the real square-root function, using its total convention when its applicability conditions fail. Neither nor the matrices satisfying are separately required to be density matrices. If no matrix satisfies , this set is empty.
QAlgorithms.Papers.Independent.Extend50.P47.symmetryTensorCopies
For an index type , a complex matrix indexed by , and any natural number , this defines a matrix indexed by functions , with entries
No positivity, trace, or normalization condition is imposed on . When , the indexing type contains the unique empty function and the single matrix entry is the empty product .
QAlgorithms.Papers.Independent.Extend50.P47.tensorSymmetrizer
For any finite type with decidable equality and any natural number , this defines the complex matrix on
Thus its entries are the averages of these explicitly specified permutation-matrix entries. The definition includes , when , and includes empty .
QAlgorithms.Papers.Independent.Extend50.P47.twelveRotations
In the ordered Boolean basis , put
and define , , and . This definition returns the following ordered list of twelve matrices on Boolean pairs:
All products are matrix products in the displayed order; the definition specifies a list and makes no distinctness assertion about its entries.
QAlgorithms.Papers.Independent.Extend50.P47.weightProjector
For every pair of natural numbers , is the complex matrix indexed by Boolean strings of length whose entries are
In particular, it is zero when ; for , it is the one-dimensional identity when and zero otherwise.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.