Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Deterministic transformations between unitary operations: Exponential advantage with adaptive quantum circuits and the power of indefinite causality

Definition
QAlgorithms_Papers_Independent_Extend50_P06

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Deterministic transformations between unitary operations: Exponential advantage with adaptive quantum circuits and the power of indefinite causality (arXiv:2109.08202) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Target: PDF pp.10–14: a unitary-valued target with the Borel measurability implicit in the Haar averages. Continuity is not assumed for a general target: bounded measurable kernels are integrable under probability Haar measure. For the homomorphic and anti-homomorphic results, measurability implies the usual continuity of finite-dimensional unitary representations.
  • Homomorphic: PDF pp.14,16: multiplicativity or reversed multiplicativity on SU(d).
  • Antihomomorphic
  • transformationChoi: PDF p.4, Eq.(3): J(U) = |U⟩⟩⟨⟨U|, input index first.
  • QueryRegister
  • TransformationWires
  • TransformationProcess
  • Mask
  • overwrite: A mask selects named wires for tracing and replacing, PDF p.9, Eq.(14).
  • replace: Trace selected wires and tensor with their normalized identities. Summing all z duplicates unselected coordinates; division by the full dimension cancels that multiplicity. This is exactly the trace-and-replace of Eq.(14).
  • futureMask
  • outputsMask
  • pastMask
  • allMask
  • tailMask: Wires after slot t, including F, and optionally O_t; Eq.(12).
  • slotProductChoi: Product of k independent channel Choi matrices; each slot is used once.
  • insertSlots: PDF p.4, Eq.(5), contracting all IO wires (entry formula includes the shared-wire transpose). There is no oracle-dependent choice in S.
  • unitarySlots
  • StrategyClass
  • TransformationAdmissible: Definitions 2–4, PDF pp.6–9. Parallel and sequential domains use the exact linear trace constraints (10),(12); general uses Definition 4, including PSD, which supplies complete positivity also for ancillary extensions.
  • targetChoiFidelity: PDF p.11, Eq.(15): channel fidelity, normalized by target dimension e².
  • pointFidelity
  • transformationAverage: PDF p.11, Eq.(17): normalized Haar average.
  • performance: PDF pp.13–14, Eq.(24), explicitly in P,I,O,F wire order.
  • scores: The set of actually attained fidelities, not an unconstrained real supremum.
  • transposeTarget: Canonical targets in the computational basis, PDF pp.15,17,21.
  • inverseTarget
  • conjugateTarget
  • ParallelTester: PDF p.10: normalized parallel testers (positive effects summing to σ⊗I). They characterize arbitrary finite-memory probes and normalized POVMs.
  • ParallelMeasurePrepare: Definition 5, PDF p.10: prepare the channel R_a after the tester outcome a. Transposition is absorbed into the tester convention, as explained in the text.
  • Estimator: PDF p.17, Eqs.(46),(47): a finite normalized parallel tester with fixed unitary guesses, equivalent to a unit probe and POVM by p.10.
  • estimateScore
  • estimationScores
  • OrthogonalCommutantBasis: A basis may be orthogonal without unit Hilbert–Schmidt norm; PDF p.15.
  • targetTensorRepresentation: Tensor representation on k query wires followed by one target wire.
  • place: Named IP/OF or crossed OP/IF placement, PDF Eqs.(31),(41).
  • commutantExpansion: Hilbert–Schmidt expansion; every denominator is nonzero for a basis member.
  • queryTargetPairProjector: PDF p.32, Eq.(113): symmetric/antisymmetric projectors, index 0/1.
  • queryTargetBellProjector: PDF p.33, Eq.(115): maximally entangled projector / its complement.
  • Triple
  • permTriple: PDF p.32, Eq.(112): permutation matrix with its inverse action explicit. The tuple a records π^{-1}(0),π^{-1}(1),π^{-1}(2).
  • rBasis: PDF p.32, Eq.(114), in order R+,R-,R0,R1,R2,R3.
  • sBasis: PDF p.33, Eq.(116), in order S+,S-,S0,S1,S2,S3. X=I₁⊗J(I)₂₃, V=F₁₂⊗I₃; the third physical wire is never silently swapped.
  • sixExpansion: Eqs.(119),(122),(125). Zero members are omitted before division (not asserted to form a six-element basis at d=2). The imaginary member 3 has minus sign; Hilbert–Schmidt norms equal the printed projector/Pauli denominators.
  • PBTProtocol: PDF p.24: deterministic PBT with k ports, a pure unit resource and a normalized k-outcome POVM on target × Alice's k registers.
  • PBTCovariant: Eq.(70), PDF p.24: U on the measured resource halves equals Uᵀ on the retained resource halves.
  • pbtChoi: Select one retained port, discard the others, and condition on the POVM. The redundant z_a summation is canceled by division by d.
  • pbtProcess: The corrected p.24 transposition circuit: query Alice's measured halves, measure P together with queried O, and retain the unqueried auxiliary port. Printed p.24 instead says to measure auxiliaries; that gives the direct-U orientation, contrary to Eq.(70). This wire-label correction needs moderation.
  • queriedResource
  • pbtScore: Entanglement (channel) fidelity, not average pure-state fidelity.
  • pbtScores
  • Certified: A four-decimal certification is a conservative absolute error bound.
  • StrictAdvantage: A comparison of attained optima in Definition 4's mathematical domain.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P17
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P21
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P05
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P47

/-!
Statements from Quintino and Ebler, arXiv:2109.08202v3.
Pinned matrix, SU(d), Haar, channel-Choi and projector definitions are reused.
The remaining paper-specific definitions are local. Physical wire order is P,I,O,F, with
I and O each comprising k qudits. Choi vectors are input first and unnormalized.
-/

namespace QAlgorithms.Papers.Independent.Extend50.P06

open scoped BigOperators ComplexConjugate Matrix ComplexOrder
open MeasureTheory

noncomputable section

attribute [local instance] Classical.propDecidable

-- Exact accepted interfaces; no duplicate SU subtype or ambient-coordinate Haar law.
open QAlgorithms.Papers.Independent.Information100.P47 (Mat)
open QAlgorithms.Papers.Independent.Claimed50.P21 (SU HaarLaw)
open QAlgorithms.Papers.Independent.Dependency50.P05 (ChannelChoi)

/-- Borel matrix coordinates for the target Haar pushforward, PDF pp.11–12. -/
local instance targetMatrixMeasurable (d : ℕ) : MeasurableSpace (Mat d) := borel _

/-- PDF pp.10–14: a unitary-valued target with the Borel measurability
implicit in the Haar averages. Continuity is not assumed for a general target:
bounded measurable kernels are integrable under probability Haar measure.
For the homomorphic and anti-homomorphic results, measurability implies the
usual continuity of finite-dimensional unitary representations. -/
structure Target (d e : ℕ) where
  value : SU d → Mat e
  measurable : Measurable value
  specialUnitary : ∀ U, value U ∈ Matrix.specialUnitaryGroup (Fin e) ℂ

/-- PDF pp.14,16: multiplicativity or reversed multiplicativity on SU(d). -/
def Homomorphic {d e : ℕ} (f : Target d e) : Prop :=
  ∀ U V W : SU d, W.val = U.val * V.val → f.value W = f.value U * f.value V

def Antihomomorphic {d e : ℕ} (f : Target d e) : Prop :=
  ∀ U V W : SU d, W.val = U.val * V.val → f.value W = f.value V * f.value U

/-- PDF p.4, Eq.(3): J(U) = |U⟩⟩⟨⟨U|, input index first. -/
def transformationChoi {d : ℕ} (U : Mat d) : Matrix (Fin d × Fin d) (Fin d × Fin d) ℂ :=
  QAlgorithms.pureDensity (WithLp.toLp 2 (fun x : Fin d × Fin d => U x.2 x.1))

abbrev QueryRegister (k d : ℕ) := Fin k → Fin d
abbrev TransformationWires (k d e : ℕ) := Fin e × QueryRegister k d × QueryRegister k d × Fin e
abbrev TransformationProcess (k d e : ℕ) := Matrix (TransformationWires k d e) (TransformationWires k d e) ℂ
abbrev Mask (k : ℕ) := Bool × (Fin k → Bool) × (Fin k → Bool) × Bool

/-- A mask selects named wires for tracing and replacing, PDF p.9, Eq.(14). -/
def overwrite {k d e : ℕ} (m : Mask k) (x z : TransformationWires k d e) : TransformationWires k d e :=
  (if m.1 then z.1 else x.1,
   (fun j => if m.2.1 j then z.2.1 j else x.2.1 j),
   (fun j => if m.2.2.1 j then z.2.2.1 j else x.2.2.1 j),
   if m.2.2.2 then z.2.2.2 else x.2.2.2)

/-- Trace selected wires and tensor with their normalized identities. Summing
all z duplicates unselected coordinates; division by the full dimension cancels
that multiplicity. This is exactly the trace-and-replace of Eq.(14). -/
def replace {k d e : ℕ} (m : Mask k) (S : TransformationProcess k d e) : TransformationProcess k d e :=
  fun x y => if (m.1 = true → x.1 = y.1) ∧
      (∀ j, m.2.1 j = true → x.2.1 j = y.2.1 j) ∧
      (∀ j, m.2.2.1 j = true → x.2.2.1 j = y.2.2.1 j) ∧
      (m.2.2.2 = true → x.2.2.2 = y.2.2.2)
    then (∑ z : TransformationWires k d e, S (overwrite m x z) (overwrite m y z)) /
      (Fintype.card (TransformationWires k d e) : ℂ)
    else 0

def futureMask (k : ℕ) : Mask k := (false, fun _ => false, fun _ => false, true)

def outputsMask (k : ℕ) : Mask k := (false, fun _ => false, fun _ => true, true)

def pastMask (k : ℕ) : Mask k := (false, fun _ => true, fun _ => true, true)

def allMask (k : ℕ) : Mask k := (true, fun _ => true, fun _ => true, true)

/-- Wires after slot t, including F, and optionally O_t; Eq.(12). -/
def tailMask {k : ℕ} (t : Fin k) (includeOutput : Bool) : Mask k :=
  (false, fun j => decide (t < j),
   fun j => decide (t < j) || (includeOutput && decide (j = t)), true)

/-- Product of k independent channel Choi matrices; each slot is used once. -/
def slotProductChoi {k d : ℕ}
    (C : Fin k → Matrix (Fin d × Fin d) (Fin d × Fin d) ℂ) :
    Matrix (QueryRegister k d × QueryRegister k d) (QueryRegister k d × QueryRegister k d) ℂ :=
  fun x y => ∏ t, C t (x.1 t,x.2 t) (y.1 t,y.2 t)

/-- PDF p.4, Eq.(5), contracting all IO wires (entry formula includes the
shared-wire transpose). There is no oracle-dependent choice in S. -/
def insertSlots {k d e : ℕ} (S : TransformationProcess k d e)
    (C : Matrix (QueryRegister k d × QueryRegister k d) (QueryRegister k d × QueryRegister k d) ℂ) :
    Matrix (Fin e × Fin e) (Fin e × Fin e) ℂ :=
  fun x y => ∑ i, ∑ j, ∑ o, ∑ v, S (x.1,i,o,x.2) (y.1,j,v,y.2) * C (i,o) (j,v)

def unitarySlots {k d : ℕ} (U : Mat d) := slotProductChoi (k := k) (fun _ => transformationChoi U)

inductive StrategyClass where
  | parallel | sequential | general
  deriving DecidableEq

/-- Definitions 2–4, PDF pp.6–9. Parallel and sequential domains use the exact
linear trace constraints (10),(12); general uses Definition 4, including PSD,
which supplies complete positivity also for ancillary extensions. -/
def TransformationAdmissible {k d e : ℕ} (c : StrategyClass) (S : TransformationProcess k d e) : Prop :=
  S.PosSemidef ∧ match c with
  | .parallel => replace (futureMask k) S = replace (outputsMask k) S ∧
      replace (pastMask k) S = replace (allMask k) S ∧ S.trace = (e * d ^ k : ℕ)
  | .sequential => (∀ t, replace (tailMask t false) S = replace (tailMask t true) S) ∧
      replace (pastMask k) S = replace (allMask k) S ∧ S.trace = (e * d ^ k : ℕ)
  | .general => ∀ C : Fin k → Matrix (Fin d × Fin d) (Fin d × Fin d) ℂ,
      (∀ t, ChannelChoi (C t)) → ChannelChoi (insertSlots S (slotProductChoi C))

/-- PDF p.11, Eq.(15): channel fidelity, normalized by target dimension e². -/
def targetChoiFidelity {e : ℕ} (C : Matrix (Fin e × Fin e) (Fin e × Fin e) ℂ)
    (V : Mat e) : ℝ := (Matrix.trace (C * transformationChoi V)).re / (e : ℝ)^2

def pointFidelity {k d e : ℕ} (S : TransformationProcess k d e) (f : SU d → Mat e) (U : SU d) : ℝ :=
  targetChoiFidelity (insertSlots S (unitarySlots U.val)) (f U)

/-- PDF p.11, Eq.(17): normalized Haar average. -/
def transformationAverage {k d e : ℕ} (H : HaarLaw d) (f : SU d → Mat e) (S : TransformationProcess k d e) : ℝ :=
  ∫ U, pointFidelity S f U ∂H.law

/-- PDF pp.13–14, Eq.(24), explicitly in P,I,O,F wire order. -/
def performance {k d e : ℕ} (H : HaarLaw d) (f : SU d → Mat e) : TransformationProcess k d e :=
  ((e : ℂ)^2)⁻¹ • ∫ U : SU d, (fun (x y : TransformationWires k d e) => transformationChoi (f U) (x.1,x.2.2.2) (y.1,y.2.2.2) *
    conj (unitarySlots (k := k) U.val (x.2.1,x.2.2.1) (y.2.1,y.2.2.1))) ∂H.law

/-- The set of actually attained fidelities, not an unconstrained real supremum. -/
def scores {k d e : ℕ} (H : HaarLaw d) (f : SU d → Mat e) (c : StrategyClass) : Set ℝ :=
  {v | ∃ S : TransformationProcess k d e, TransformationAdmissible c S ∧ transformationAverage H f S = v}

/-- Canonical targets in the computational basis, PDF pp.15,17,21. -/
def transposeTarget {d : ℕ} (U : SU d) : Mat d := U.val.transpose

def inverseTarget {d : ℕ} (U : SU d) : Mat d := U.valᴴ

def conjugateTarget {d : ℕ} (U : SU d) : Mat d := U.val.map conj

/-- PDF p.10: normalized parallel testers (positive effects summing to σ⊗I).
They characterize arbitrary finite-memory probes and normalized POVMs. -/
def ParallelTester {k d n : ℕ}
    (T : Fin n → Matrix (QueryRegister k d × QueryRegister k d) (QueryRegister k d × QueryRegister k d) ℂ) : Prop :=
  (∀ a, (T a).PosSemidef) ∧ ∃ σ : Matrix (QueryRegister k d) (QueryRegister k d) ℂ,
    σ.PosSemidef ∧ σ.trace = 1 ∧ ∀ x y,
      (∑ a, T a x y) = σ x.1 y.1 * (1 : Matrix (QueryRegister k d) (QueryRegister k d) ℂ) x.2 y.2

/-- Definition 5, PDF p.10: prepare the channel R_a after the tester outcome a.
Transposition is absorbed into the tester convention, as explained in the text. -/
def ParallelMeasurePrepare {k d e : ℕ} (S : TransformationProcess k d e) : Prop :=
  ∃ n : ℕ, ∃ T : Fin n → Matrix (QueryRegister k d × QueryRegister k d) (QueryRegister k d × QueryRegister k d) ℂ,
    ∃ R : Fin n → Matrix (Fin e × Fin e) (Fin e × Fin e) ℂ,
      ParallelTester T ∧ (∀ a, ChannelChoi (R a)) ∧
      ∀ x y, S x y = ∑ a, T a (x.2.1,x.2.2.1) (y.2.1,y.2.2.1) *
        R a (x.1,x.2.2.2) (y.1,y.2.2.2)

/-- PDF p.17, Eqs.(46),(47): a finite normalized parallel tester with fixed
unitary guesses, equivalent to a unit probe and POVM by p.10. -/
structure Estimator (k d n : ℕ) where
  tester : Fin n → Matrix (QueryRegister k d × QueryRegister k d) (QueryRegister k d × QueryRegister k d) ℂ
  normalized : ParallelTester tester
  guess : Fin n → SU d

def estimateScore {k d n : ℕ} (H : HaarLaw d) (E : Estimator k d n) : ℝ :=
  ∫ U, ∑ a, (Matrix.trace (E.tester a * unitarySlots U.val)).re *
    targetChoiFidelity (transformationChoi (E.guess a).val) U.val ∂H.law

def estimationScores {k d : ℕ} (H : HaarLaw d) : Set ℝ :=
  {v | ∃ n : ℕ, ∃ E : Estimator k d n, estimateScore H E = v}

/-- A basis may be orthogonal without unit Hilbert–Schmidt norm; PDF p.15. -/
def OrthogonalCommutantBasis {d n : ℕ} {ι : Type*} [Fintype ι]
    (ρ : SU d → Matrix ι ι ℂ) (P : Fin n → Matrix ι ι ℂ) : Prop :=
  (∀ i, P i ≠ 0) ∧ (∀ i j, i ≠ j → Matrix.trace ((P i)ᴴ * P j) = 0) ∧
  ∀ A : Matrix ι ι ℂ, (∀ U, A * ρ U = ρ U * A) ↔ A ∈ Submodule.span ℂ (Set.range P)

/-- Tensor representation on k query wires followed by one target wire. -/
def targetTensorRepresentation {k d e : ℕ} (f : SU d → Mat e) (anti : Bool) (U : SU d) :
    Matrix (QueryRegister k d × Fin e) (QueryRegister k d × Fin e) ℂ :=
  fun x y => (∏ t, conj (U.val (x.1 t) (y.1 t))) *
    (if anti then (f U).transpose x.2 y.2 else f U x.2 y.2)

/-- Named IP/OF or crossed OP/IF placement, PDF Eqs.(31),(41). -/
def place {k d e : ℕ} (crossed : Bool)
    (A B : Matrix (QueryRegister k d × Fin e) (QueryRegister k d × Fin e) ℂ) : TransformationProcess k d e :=
  fun x y => if crossed then A (x.2.2.1,x.1) (y.2.2.1,y.1) * B (x.2.1,x.2.2.2) (y.2.1,y.2.2.2)
    else A (x.2.1,x.1) (y.2.1,y.1) * B (x.2.2.1,x.2.2.2) (y.2.2.1,y.2.2.2)

/-- Hilbert–Schmidt expansion; every denominator is nonzero for a basis member. -/
def commutantExpansion {k d e n : ℕ} (crossed : Bool)
    (P : Fin n → Matrix (QueryRegister k d × Fin e) (QueryRegister k d × Fin e) ℂ) : TransformationProcess k d e :=
  ((e : ℂ)^2)⁻¹ • ∑ i, (Matrix.trace ((P i)ᴴ * P i))⁻¹ • place crossed ((P i).map conj) (P i)

example : transformationChoi (1 : Mat 1) (0,0) (0,0) = 1 := by simp [transformationChoi, QAlgorithms.pureDensity]

example (k d : ℕ) (U : Mat d) : unitarySlots (k := 0) U = 1 := by
  ext x y
  have hxy : x = y := Subsingleton.elim _ _
  subst y
  simp [unitarySlots, slotProductChoi, Matrix.one_apply]

/-- PDF p.32, Eq.(113): symmetric/antisymmetric projectors, index 0/1. -/
def queryTargetPairProjector (d : ℕ) (antisymmetric : Bool) :
    Matrix (QueryRegister 1 d × Fin d) (QueryRegister 1 d × Fin d) ℂ :=
  fun x y => QAlgorithms.Papers.Independent.Claimed50.P17.pairProjector d
    (if antisymmetric then 1 else 0) (x.1 0,x.2) (y.1 0,y.2)

/-- PDF p.33, Eq.(115): maximally entangled projector / its complement. -/
def queryTargetBellProjector (d : ℕ) (complement : Bool) :
    Matrix (QueryRegister 1 d × Fin d) (QueryRegister 1 d × Fin d) ℂ :=
  let P : Matrix (QueryRegister 1 d × Fin d) (QueryRegister 1 d × Fin d) ℂ :=
    fun x y => QAlgorithms.Papers.Independent.Claimed50.P21.entangledProjector d
      (x.1 0,x.2) (y.1 0,y.2)
  if complement then 1 - P else P

abbrev Triple (d : ℕ) := QueryRegister 2 d × Fin d

/-- PDF p.32, Eq.(112): permutation matrix with its inverse action explicit.
The tuple a records π^{-1}(0),π^{-1}(1),π^{-1}(2). -/
def permTriple (d : ℕ) (a : Fin 3 → Fin 3) : Matrix (Triple d) (Triple d) ℂ :=
  fun x y => let xv : Fin 3 → Fin d := ![x.1 0,x.1 1,x.2]
             let yv : Fin 3 → Fin d := ![y.1 0,y.1 1,y.2]
             if ∀ j, xv j = yv (a j) then 1 else 0

/-- PDF p.32, Eq.(114), in order R+,R-,R0,R1,R2,R3. -/
def rBasis (d : ℕ) : Fin 6 → Matrix (Triple d) (Triple d) ℂ :=
  let a := permTriple d ![1,0,2]
  let b := permTriple d ![0,2,1]
  let c := permTriple d ![2,1,0]
  let v := permTriple d ![2,0,1]
  let w := permTriple d ![1,2,0]
  ![(6 : ℂ)⁻¹ • (1+a+b+c+v+w),
    (6 : ℂ)⁻¹ • (1-a-b-c+v+w),
    (3 : ℂ)⁻¹ • ((2 : ℂ) • 1-v-w),
    (3 : ℂ)⁻¹ • ((2 : ℂ) • b-c-a),
    ((Real.sqrt 3 : ℂ))⁻¹ • (a-c),
    (Complex.I / (Real.sqrt 3 : ℂ)) • (v-w)]

/-- PDF p.33, Eq.(116), in order S+,S-,S0,S1,S2,S3. X=I₁⊗J(I)₂₃,
V=F₁₂⊗I₃; the third physical wire is never silently swapped. -/
def sBasis (d : ℕ) : Fin 6 → Matrix (Triple d) (Triple d) ℂ :=
  let X : Matrix (Triple d) (Triple d) ℂ := fun x y =>
    if x.1 0 = y.1 0 ∧ x.1 1 = x.2 ∧ y.1 1 = y.2 then 1 else 0
  let V := permTriple d ![1,0,2]
  let A := (2 : ℂ)⁻¹ • (1+V)
  let B := (2 : ℂ)⁻¹ • (1-V)
  let q : ℂ := (d : ℂ)^2-1
  ![A * (1 - (2 / ((d : ℂ)+1)) • X) * A,
    B * (1 - (2 / ((d : ℂ)-1)) • X) * B,
    q⁻¹ • ((d : ℂ) • (X+V*X*V) - (X*V+V*X)),
    q⁻¹ • ((d : ℂ) • (X*V+V*X) - (X+V*X*V)),
    (Real.sqrt ((d : ℝ)^2-1) : ℂ)⁻¹ • (X-V*X*V),
    (Complex.I / (Real.sqrt ((d : ℝ)^2-1) : ℂ)) • (X*V-V*X)]

/-- Eqs.(119),(122),(125). Zero members are omitted before division (not
asserted to form a six-element basis at d=2). The imaginary member 3 has minus
sign; Hilbert–Schmidt norms equal the printed projector/Pauli denominators. -/
def sixExpansion (d : ℕ) (crossed : Bool)
    (B : Fin 6 → Matrix (Triple d) (Triple d) ℂ) : TransformationProcess 2 d d :=
  ((d : ℂ)^2)⁻¹ • ∑ i, if B i = 0 then 0 else
    ((if i = 5 then (-1 : ℂ) else 1) / Matrix.trace ((B i)ᴴ * B i)) •
      place crossed (B i) (B i)

/-- PDF p.24: deterministic PBT with k ports, a pure unit resource and a
normalized k-outcome POVM on target × Alice's k registers. -/
structure PBTProtocol (k d : ℕ) where
  resource : QueryRegister k d × QueryRegister k d → ℂ
  unit : ∑ x, Complex.normSq (resource x) = 1
  effect : Fin k → Matrix (Fin d × QueryRegister k d) (Fin d × QueryRegister k d) ℂ
  positive : ∀ a, (effect a).PosSemidef
  complete : ∑ a, effect a = 1

/-- Eq.(70), PDF p.24: U on the measured resource halves equals Uᵀ on the
retained resource halves. -/
def PBTCovariant {k d : ℕ} (P : PBTProtocol k d) : Prop :=
  ∀ U : SU d, ∀ a b : QueryRegister k d,
    (∑ c, (∏ t, U.val (a t) (c t)) * P.resource (c,b)) =
    ∑ c, (∏ t, U.val (c t) (b t)) * P.resource (a,c)

/-- Select one retained port, discard the others, and condition on the POVM.
The redundant z_a summation is canceled by division by d. -/
def pbtChoi {k d : ℕ} (P : PBTProtocol k d)
    (ψ : QueryRegister k d × QueryRegister k d → ℂ) : Matrix (Fin d × Fin d) (Fin d × Fin d) ℂ :=
  fun x y => (∑ a, ∑ i, ∑ j, ∑ z : QueryRegister k d,
    P.effect a (y.1,j) (x.1,i) * ψ (i,Function.update z a x.2) *
      conj (ψ (j,Function.update z a y.2))) / (d : ℂ)

/-- The corrected p.24 transposition circuit: query Alice's measured halves,
measure P together with queried O, and retain the unqueried auxiliary port.
Printed p.24 instead says to measure auxiliaries; that gives the direct-U
orientation, contrary to Eq.(70). This wire-label correction needs moderation. -/
def pbtProcess {k d : ℕ} (P : PBTProtocol k d) : TransformationProcess k d d :=
  fun x y => (∑ a, ∑ z : QueryRegister k d,
    P.effect a (y.1,y.2.2.1) (x.1,x.2.2.1) *
      P.resource (x.2.1,Function.update z a x.2.2.2) *
      conj (P.resource (y.2.1,Function.update z a y.2.2.2))) / (d : ℂ)

def queriedResource {k d : ℕ} (P : PBTProtocol k d) (U : Mat d) :
    QueryRegister k d × QueryRegister k d → ℂ :=
  fun x => ∑ i, (∏ t, U (x.1 t) (i t)) * P.resource (i,x.2)

/-- Entanglement (channel) fidelity, not average pure-state fidelity. -/
def pbtScore {k d : ℕ} (P : PBTProtocol k d) : ℝ :=
  targetChoiFidelity (pbtChoi P P.resource) 1

def pbtScores (k d : ℕ) : Set ℝ := {v | ∃ P : PBTProtocol k d, pbtScore P = v}

/-- A four-decimal certification is a conservative absolute error bound. -/
def Certified {k d : ℕ} (H : HaarLaw d) (f : SU d → Mat d)
    (c : StrategyClass) (r : ℝ) : Prop :=
  ∃ v, IsGreatest (scores (k := k) H f c) v ∧ |v-r| ≤ 1/10000

/-- A comparison of attained optima in Definition 4's mathematical domain. -/
def StrictAdvantage {k d : ℕ} (H : HaarLaw d) (f : SU d → Mat d) : Prop :=
  ∃ a b, IsGreatest (scores (k := k) H f .sequential) a ∧
    IsGreatest (scores (k := k) H f .general) b ∧ a < b

example : queryTargetPairProjector 1 false (fun _ => 0,0) (fun _ => 0,0) = 1 := by
  norm_num [queryTargetPairProjector,
    QAlgorithms.Papers.Independent.Claimed50.P17.pairProjector]

example (d : ℕ) : queryTargetBellProjector d true = 1 - queryTargetBellProjector d false := rfl

end

end QAlgorithms.Papers.Independent.Extend50.P06
Source
Deterministic transformations between unitary operations: Exponential advantage with adaptive quantum circuits and the power of indefinite causality, arXiv:2109.08202v3, https://arxiv.org/abs/2109.08202v3
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Extend50.P06.Antihomomorphic

For any natural numbers d,ed,ed,e and any target fff, meaning a continuous function from SU(d)\mathrm{SU}(d)SU(d) to e×ee\times ee×e complex matrices whose values are special unitary, fff is called antihomomorphic precisely when, for every U,V,W∈SU(d)U,V,W\in\mathrm{SU}(d)U,V,W∈SU(d), equality of their underlying matrices W=UVW=UVW=UV implies f(W)=f(V)f(U)f(W)=f(V)f(U)f(W)=f(V)f(U). The dimensions may be zero.

QAlgorithms.Papers.Independent.Extend50.P06.Certified

Let k,dk,dk,d be arbitrary natural numbers, let HHH be a probability measure on SU(d)\mathrm{SU}(d)SU(d) invariant under both left and right multiplication, let f:SU(d)→Md(C)f:\mathrm{SU}(d)\to M_d(\mathbb C)f:SU(d)→Md​(C) be any function, let ccc be one of parallel, sequential, or general, and let r∈Rr\in\mathbb Rr∈R. The predicate Certified⁡(H,f,c,r)\operatorname{Certified}(H,f,c,r)Certified(H,f,c,r) means that there exists an attained greatest average score vvv among the processes described below, and ∣v−r∣≤1/10000|v-r|\le 1/10000∣v−r∣≤1/10000. Put Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, and index a process matrix SSS by x=(a,i,o,b)∈W={0,…,d−1}×Q×Q×{0,…,d−1}x=(a,i,o,b)\in W=\{0,\ldots,d-1\}\times Q\times Q\times\{0,\ldots,d-1\}x=(a,i,o,b)∈W={0,…,d−1}×Q×Q×{0,…,d−1}. Write

C(V)(a,b),(a′,b′)=Vb,aVb′,a′‾,BU(i,o),(j,v)=∏t<kUot,itUvt,jt‾,LS(B)(a,b),(a′,b′)=∑i,j,o,vS(a,i,o,b),(a′,j,v,b′)B(i,o),(j,v).C(V)_{(a,b),(a',b')}=V_{b,a}\overline{V_{b',a'}}, \quad B_U{}_{(i,o),(j,v)}=\prod_{t<k}U_{o_t,i_t}\overline{U_{v_t,j_t}}, \quad L_S(B)_{(a,b),(a',b')}=\sum_{i,j,o,v}S_{(a,i,o,b),(a',j,v,b')}B_{(i,o),(j,v)}.C(V)(a,b),(a′,b′)​=Vb,a​Vb′,a′​​,BU​(i,o),(j,v)​=t<k∏​Uot​,it​​Uvt​,jt​​​,LS​(B)(a,b),(a′,b′)​=i,j,o,v∑​S(a,i,o,b),(a′,j,v,b′)​B(i,o),(j,v)​.

Its average score is ∫Re⁡Tr⁡(LS(BU)C(f(U)))/d2 dH(U)\int \operatorname{Re}\operatorname{Tr}(L_S(B_U)C(f(U)))/d^2\,dH(U)∫ReTr(LS​(BU​)C(f(U)))/d2dH(U). For a set MMM of coordinate wires, define

(RMS)x,y=1x∣M=y∣M ∑z∈WSx[M←z], y[M←z]∣W∣,(\mathcal R_M S)_{x,y} =\mathbf1_{x|_M=y|_M}\, \frac{\sum_{z\in W}S_{x[M\leftarrow z],\,y[M\leftarrow z]}}{|W|},(RM​S)x,y​=1x∣M​=y∣M​​∣W∣∑z∈W​Sx[M←z],y[M←z]​​,

where only the selected coordinates are overwritten. Let III and OOO denote all iii- and ooo-wires, and A,BA,BA,B the first and last wires. Every admissible SSS must be positive semidefinite. In the parallel class it additionally satisfies RBS=RO∪BS\mathcal R_BS=\mathcal R_{O\cup B}SRB​S=RO∪B​S, RI∪O∪BS=RA∪I∪O∪BS\mathcal R_{I\cup O\cup B}S=\mathcal R_{A\cup I\cup O\cup B}SRI∪O∪B​S=RA∪I∪O∪B​S, and Tr⁡S=dk+1\operatorname{Tr}S=d^{k+1}TrS=dk+1. In the sequential class the first equality is replaced by RMtS=RMt∪{ot}S\mathcal R_{M_t}S=\mathcal R_{M_t\cup\{o_t\}}SRMt​​S=RMt​∪{ot​}​S for every t<kt<kt<k, where Mt={ij,oj:j>t}∪BM_t=\{i_j,o_j:j>t\}\cup BMt​={ij​,oj​:j>t}∪B, with the same second equality and trace condition. In the general class, for every family of positive semidefinite matrices CtC_tCt​ satisfying ∑o(Ct)(i,o),(j,o)=1i=j\sum_o(C_t)_{(i,o),(j,o)}=\mathbf1_{i=j}∑o​(Ct​)(i,o),(j,o)​=1i=j​, the matrix LS(⨂tCt)L_S(\bigotimes_t C_t)LS​(⨂t​Ct​) must be positive semidefinite and satisfy that same output-partial-trace identity. “Attained greatest” means some admissible process has score vvv and every admissible process has score at most vvv. There are no positivity restrictions on k,dk,dk,d, no continuity or special-unitary requirement on fff, and no explicit integrability assumption; divisions and the integral use their total definitions, including division by zero being zero and a nonintegrable Bochner integral being zero.

QAlgorithms.Papers.Independent.Extend50.P06.Estimator

For arbitrary natural numbers k,d,nk,d,nk,d,n, let Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}. An estimator consists of a family T0,…,Tn−1T_0,\ldots,T_{n-1}T0​,…,Tn−1​ of complex matrices indexed by Q×QQ\times QQ×Q, evidence that each TaT_aTa​ is positive semidefinite and that there exists a positive semidefinite matrix σ\sigmaσ indexed by QQQ with tr⁡σ=1\operatorname{tr}\sigma=1trσ=1 and ∑aTa=σ⊗IQ\sum_aT_a=\sigma\otimes I_Q∑a​Ta​=σ⊗IQ​, and a choice of special unitary matrix Ga∈SU(d)G_a\in\mathrm{SU}(d)Ga​∈SU(d) for each a<na<na<n. No distinctness condition is imposed on the guesses GaG_aGa​. When k=0k=0k=0, QQQ is a singleton; when d=0<kd=0<kd=0<k, the required σ\sigmaσ cannot exist, and no estimator exists. No estimator exists with n=0n=0n=0.

QAlgorithms.Papers.Independent.Extend50.P06.Homomorphic

For any natural numbers d,ed,ed,e and any target fff, meaning a continuous function from SU(d)\mathrm{SU}(d)SU(d) to e×ee\times ee×e complex matrices whose values are special unitary, fff is called homomorphic precisely when, for every U,V,W∈SU(d)U,V,W\in\mathrm{SU}(d)U,V,W∈SU(d), equality of their underlying matrices W=UVW=UVW=UV implies f(W)=f(U)f(V)f(W)=f(U)f(V)f(W)=f(U)f(V). The dimensions may be zero.

QAlgorithms.Papers.Independent.Extend50.P06.Mask

For every natural number kkk, a mask is a tuple (ma,mi,mo,mb)(m_a,m_i,m_o,m_b)(ma​,mi​,mo​,mb​) consisting of two Boolean values ma,mbm_a,m_bma​,mb​ and two Boolean-valued functions mi,mom_i,m_omi​,mo​ on {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1}. When k=0k=0k=0, both functions are uniquely determined, while the two endpoint Boolean values remain arbitrary.

QAlgorithms.Papers.Independent.Extend50.P06.OrthogonalCommutantBasis

For arbitrary natural numbers d,nd,nd,n, any finite type ι\iotaι equipped with a finite enumeration, any function ρ:SU(d)→Mι(C)\rho:\mathrm{SU}(d)\to M_\iota(\mathbb C)ρ:SU(d)→Mι​(C), and any family P0,…,Pn−1∈Mι(C)P_0,\ldots,P_{n-1}\in M_\iota(\mathbb C)P0​,…,Pn−1​∈Mι​(C), this predicate says that every PiP_iPi​ is nonzero, that tr⁡(Pi†Pj)=0\operatorname{tr}(P_i^\dagger P_j)=0tr(Pi†​Pj​)=0 for every distinct pair i,j<ni,j<ni,j<n, and that for every complex matrix AAA indexed by ι\iotaι,

(∀U∈SU(d), Aρ(U)=ρ(U)A)⟺A∈span⁡C{P0,…,Pn−1}.\bigl(\forall U\in\mathrm{SU}(d),\ A\rho(U)=\rho(U)A\bigr) \quad\Longleftrightarrow\quad A\in\operatorname{span}_{\mathbb C}\{P_0,\ldots,P_{n-1}\}.(∀U∈SU(d), Aρ(U)=ρ(U)A)⟺A∈spanC​{P0​,…,Pn−1​}.

No representation, continuity, or unitarity property is required of ρ\rhoρ. The finite type ι\iotaι may be empty, and d,nd,nd,n may be zero; when n=0n=0n=0, the span is {0}\{0\}{0}, so the last condition says that the common commutant is exactly {0}\{0\}{0}.

QAlgorithms.Papers.Independent.Extend50.P06.PBTCovariant

For arbitrary natural numbers k,dk,dk,d, let D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1}, R=D{0,…,k−1}R=D^{\{0,\ldots,k-1\}}R=D{0,…,k−1}, and let PPP consist of a resource function r:R×R→Cr:R\times R\to\mathbb Cr:R×R→C with ∑a,b∣r(a,b)∣2=1\sum_{a,b}|r(a,b)|^2=1∑a,b​∣r(a,b)∣2=1, and positive semidefinite effects EtE_tEt​ on D×RD\times RD×R satisfying ∑t=0k−1Et=I\sum_{t=0}^{k-1}E_t=I∑t=0k−1​Et​=I. This predicate requires that, for every complex d×dd\times dd×d unitary matrix UUU with determinant 111, and every a,b∈Ra,b\in Ra,b∈R,

∑c∈R(∏t=0k−1Ua(t),c(t))r(c,b)=∑c∈R(∏t=0k−1Uc(t),b(t))r(a,c).\sum_{c\in R}\left(\prod_{t=0}^{k-1}U_{a(t),c(t)}\right)r(c,b) = \sum_{c\in R}\left(\prod_{t=0}^{k-1}U_{c(t),b(t)}\right)r(a,c).c∈R∑​(t=0∏k−1​Ua(t),c(t)​)r(c,b)=c∈R∑​(t=0∏k−1​Uc(t),b(t)​)r(a,c).

There are no complex conjugates in these products, and this condition places no additional requirement on the effects. Empty products equal 111, empty sums equal 000, and the natural parameters are not assumed positive.

QAlgorithms.Papers.Independent.Extend50.P06.PBTProtocol

For natural numbers k,dk,dk,d, let D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1} and R=D{0,…,k−1}R=D^{\{0,\ldots,k-1\}}R=D{0,…,k−1}. This structure consists of a function resource:R×R→C\mathrm{resource}:R\times R\to\mathbb Cresource:R×R→C satisfying

∑x∈R×R∣resource(x)∣2=1,\sum_{x\in R\times R}|\mathrm{resource}(x)|^2=1,x∈R×R∑​∣resource(x)∣2=1,

together with complex matrices EaE_aEa​ on D×RD\times RD×R, one for each a∈{0,…,k−1}a\in\{0,\ldots,k-1\}a∈{0,…,k−1}, such that every EaE_aEa​ is positive semidefinite and ∑aEa=I\sum_aE_a=I∑a​Ea​=I. No covariance condition is part of the structure. Zero parameters are included: if k=0k=0k=0, then RRR is a singleton and completeness requires the empty sum to equal the identity on DDD; hence no such structure exists when k=0<dk=0<dk=0<d. If d=0<kd=0<kd=0<k, then RRR is empty and resource normalization is impossible. When k=d=0k=d=0k=d=0, the resource has one entry of modulus one and the effect family is empty on an empty matrix index set.

QAlgorithms.Papers.Independent.Extend50.P06.ParallelMeasurePrepare

For arbitrary natural numbers k,d,ek,d,ek,d,e, let Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, and let SSS be a complex matrix indexed by tuples (a,i,o,b)∈{0,…,e−1}×Q×Q×{0,…,e−1}(a,i,o,b)\in\{0,\ldots,e-1\}\times Q\times Q\times\{0,\ldots,e-1\}(a,i,o,b)∈{0,…,e−1}×Q×Q×{0,…,e−1}. This predicate means that there exist a natural number nnn, positive semidefinite matrices TrT_rTr​ indexed by Q×QQ\times QQ×Q, a positive semidefinite matrix σ\sigmaσ indexed by QQQ with tr⁡σ=1\operatorname{tr}\sigma=1trσ=1, and matrices RrR_rRr​ indexed by {0,…,e−1}2\{0,\ldots,e-1\}^2{0,…,e−1}2, such that

∑r=0n−1Tr=σ⊗IQ,Rr⪰0,∑b=0e−1(Rr)(a,b),(a′,b)=δa,a′,\sum_{r=0}^{n-1}T_r=\sigma\otimes I_Q,\qquad R_r\succeq0,\qquad \sum_{b=0}^{e-1}(R_r)_{(a,b),(a',b)}=\delta_{a,a'},r=0∑n−1​Tr​=σ⊗IQ​,Rr​⪰0,b=0∑e−1​(Rr​)(a,b),(a′,b)​=δa,a′​,

and, for every pair of indexing tuples,

S(a,i,o,b),(a′,j,v,b′)=∑r=0n−1(Tr)(i,o),(j,v)(Rr)(a,b),(a′,b′).S_{(a,i,o,b),(a',j,v,b')} =\sum_{r=0}^{n-1}(T_r)_{(i,o),(j,v)} (R_r)_{(a,b),(a',b')}.S(a,i,o,b),(a′,j,v,b′)​=r=0∑n−1​(Tr​)(i,o),(j,v)​(Rr​)(a,b),(a′,b′)​.

The definition imposes exactly this factorization and these normalization conditions. Zero parameter values are allowed syntactically, with empty sums and products interpreted conventionally; the tester normalization makes an empty outcome family, or an empty QQQ, impossible.

QAlgorithms.Papers.Independent.Extend50.P06.ParallelTester

For arbitrary natural numbers k,d,nk,d,nk,d,n, put Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}. A family T0,…,Tn−1T_0,\ldots,T_{n-1}T0​,…,Tn−1​ of complex matrices indexed by Q×QQ\times QQ×Q satisfies this predicate precisely when every TaT_aTa​ is positive semidefinite and there exists a positive semidefinite matrix σ\sigmaσ indexed by QQQ, with complex trace exactly 111, such that

∑a=0n−1(Ta)(i,o),(j,v)=σi,jδo,v(i,o,j,v∈Q).\sum_{a=0}^{n-1}(T_a)_{(i,o),(j,v)} =\sigma_{i,j}\delta_{o,v} \qquad(i,o,j,v\in Q).a=0∑n−1​(Ta​)(i,o),(j,v)​=σi,j​δo,v​(i,o,j,v∈Q).

Thus its normalization is ∑aTa=σ⊗IQ\sum_aT_a=\sigma\otimes I_Q∑a​Ta​=σ⊗IQ​. All zero parameter values are included: when k=0k=0k=0, QQQ contains the unique empty function; when d=0<kd=0<kd=0<k, QQQ is empty and the trace-one requirement is impossible. The predicate also cannot hold when n=0n=0n=0.

QAlgorithms.Papers.Independent.Extend50.P06.QueryRegister

For natural numbers k,dk,dk,d, a query register is a function from {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1} to {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, equivalently an ordered kkk-tuple of indices in the latter set. When k=0k=0k=0, there is exactly one such function, including when d=0d=0d=0; when d=0d=0d=0 and k>0k>0k>0, there are none.

QAlgorithms.Papers.Independent.Extend50.P06.StrategyClass

This declaration defines a type with exactly three distinct values, named parallel\mathrm{parallel}parallel, sequential\mathrm{sequential}sequential, and general\mathrm{general}general, and supplies a procedure for deciding equality between its values. It has no parameters, and these names alone impose no additional mathematical conditions.

QAlgorithms.Papers.Independent.Extend50.P06.StrictAdvantage

For arbitrary natural numbers k,dk,dk,d, a probability measure HHH on SU(d)\mathrm{SU}(d)SU(d) invariant under left and right multiplication, and any function f:SU(d)→Md(C)f:\mathrm{SU}(d)\to M_d(\mathbb C)f:SU(d)→Md​(C), the predicate StrictAdvantage⁡(H,f)\operatorname{StrictAdvantage}(H,f)StrictAdvantage(H,f) asserts the existence of attained greatest sequential and general average scores a,ba,ba,b, respectively, with a<ba<ba<b. Explicitly, put Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1} and W={0,…,d−1}×Q×Q×{0,…,d−1}W=\{0,\ldots,d-1\}\times Q\times Q\times\{0,\ldots,d-1\}W={0,…,d−1}×Q×Q×{0,…,d−1}; a process is a matrix SSS indexed by x=(u,i,o,v)∈Wx=(u,i,o,v)\in Wx=(u,i,o,v)∈W. Define

C(V)(u,v),(u′,v′)=Vv,uVv′,u′‾,BU(i,o),(j,w)=∏t<kUot,itUwt,jt‾,LS(B)(u,v),(u′,v′)=∑i,j,o,wS(u,i,o,v),(u′,j,w,v′)B(i,o),(j,w).C(V)_{(u,v),(u',v')}=V_{v,u}\overline{V_{v',u'}}, \quad B_U{}_{(i,o),(j,w)}=\prod_{t<k}U_{o_t,i_t}\overline{U_{w_t,j_t}}, \quad L_S(B)_{(u,v),(u',v')}=\sum_{i,j,o,w}S_{(u,i,o,v),(u',j,w,v')}B_{(i,o),(j,w)}.C(V)(u,v),(u′,v′)​=Vv,u​Vv′,u′​​,BU​(i,o),(j,w)​=t<k∏​Uot​,it​​Uwt​,jt​​​,LS​(B)(u,v),(u′,v′)​=i,j,o,w∑​S(u,i,o,v),(u′,j,w,v′)​B(i,o),(j,w)​.

The score of SSS is F(S)=∫Re⁡Tr⁡(LS(BU)C(f(U)))/d2 dH(U)F(S)=\int \operatorname{Re}\operatorname{Tr}(L_S(B_U)C(f(U)))/d^2\,dH(U)F(S)=∫ReTr(LS​(BU​)C(f(U)))/d2dH(U). For selected coordinate wires MMM, let (RMS)x,y(\mathcal R_MS)_{x,y}(RM​S)x,y​ be zero unless x,yx,yx,y agree on MMM, and otherwise equal ∣W∣−1∑z∈WSx[M←z],y[M←z]|W|^{-1}\sum_{z\in W}S_{x[M\leftarrow z],y[M\leftarrow z]}∣W∣−1∑z∈W​Sx[M←z],y[M←z]​. A sequential process is positive semidefinite, has trace dk+1d^{k+1}dk+1, satisfies RI∪O∪BS=RA∪I∪O∪BS\mathcal R_{I\cup O\cup B}S=\mathcal R_{A\cup I\cup O\cup B}SRI∪O∪B​S=RA∪I∪O∪B​S, and, for every t<kt<kt<k, satisfies RMtS=RMt∪{ot}S\mathcal R_{M_t}S=\mathcal R_{M_t\cup\{o_t\}}SRMt​​S=RMt​∪{ot​}​S, where A,BA,BA,B are the first and last wires, I,OI,OI,O are all query input and output wires, and Mt={ij,oj:j>t}∪BM_t=\{i_j,o_j:j>t\}\cup BMt​={ij​,oj​:j>t}∪B. A general process is positive semidefinite and, whenever each slot matrix CtC_tCt​ is positive semidefinite with ∑o(Ct)(i,o),(j,o)=1i=j\sum_o(C_t)_{(i,o),(j,o)}=\mathbf1_{i=j}∑o​(Ct​)(i,o),(j,o)​=1i=j​, its insertion LS(⨂tCt)L_S(\bigotimes_tC_t)LS​(⨂t​Ct​) is positive semidefinite with output partial trace equal to the identity. The assertion requires a sequential process of score aaa, all sequential scores at most aaa, a general process of score bbb, and all general scores at most bbb. Zero parameters and empty index sets are included; no regularity assumption is made on fff, division by zero is zero, and a nonintegrable Bochner integral is assigned zero.

QAlgorithms.Papers.Independent.Extend50.P06.Target

For any natural numbers d,ed,ed,e, including zero, a target consists of a measurable function f:SU(d)→Ce×ef:\mathrm{SU}(d)\to\mathbb C^{e\times e}f:SU(d)→Ce×e, together with the requirement that f(U)∈SU(e)f(U)\in\mathrm{SU}(e)f(U)∈SU(e) for every U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d). Here SU(r)\mathrm{SU}(r)SU(r) denotes the group of complex r×rr\times rr×r unitary matrices with determinant 111, and measurability uses the Borel measurable structures on the matrix spaces and the special unitary group.

QAlgorithms.Papers.Independent.Extend50.P06.TransformationAdmissible

For arbitrary natural numbers k,d,ek,d,ek,d,e, a choice ccc among parallel\mathrm{parallel}parallel, sequential\mathrm{sequential}sequential, and general\mathrm{general}general, and a complex matrix SSS on W=E×Q×Q×EW=E\times Q\times Q\times EW=E×Q×Q×E, where E={0,…,e−1}E=\{0,\ldots,e-1\}E={0,…,e−1} and Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, this predicate first requires SSS to be positive semidefinite. To state its remaining requirements, label the coordinates of WWW by A,It,Ot,BA,I_t,O_t,BA,It​,Ot​,B. For a selection MMM of these coordinates, define RM(S)x,y=0R_M(S)_{x,y}=0RM​(S)x,y​=0 unless xxx and yyy agree on every selected coordinate; otherwise define

RM(S)x,y=1∣W∣∑z∈WSx[M←z], y[M←z],∣W∣=e2d2k,R_M(S)_{x,y} =\frac{1}{|W|}\sum_{z\in W}S_{x[M\leftarrow z],\,y[M\leftarrow z]}, \qquad |W|=e^2d^{2k},RM​(S)x,y​=∣W∣1​z∈W∑​Sx[M←z],y[M←z]​,∣W∣=e2d2k,

where the overwrite replaces exactly the selected coordinates by those of zzz. The denominator is the cardinality of the entire set WWW. For c=parallelc=\mathrm{parallel}c=parallel, the requirements are

R{B}(S)=R{Ot: 0≤t<k}∪{B}(S),R{It,Ot: 0≤t<k}∪{B}(S)=R{A,It,Ot,B: 0≤t<k}(S),tr⁡S=edk.R_{\{B\}}(S)=R_{\{O_t:\,0\le t<k\}\cup\{B\}}(S),\qquad R_{\{I_t,O_t:\,0\le t<k\}\cup\{B\}}(S)=R_{\{A,I_t,O_t,B:\,0\le t<k\}}(S), \qquad \operatorname{tr}S=ed^k.R{B}​(S)=R{Ot​:0≤t<k}∪{B}​(S),R{It​,Ot​:0≤t<k}∪{B}​(S)=R{A,It​,Ot​,B:0≤t<k}​(S),trS=edk.

For c=sequentialc=\mathrm{sequential}c=sequential, the second equality and trace requirement above remain, and the first is replaced by, for every 0≤t<k0\le t<k0≤t<k,

R{Ij,Oj: t<j<k}∪{B}(S)=R{Ij,Oj: t<j<k}∪{Ot,B}(S).R_{\{I_j,O_j:\,t<j<k\}\cup\{B\}}(S) = R_{\{I_j,O_j:\,t<j<k\}\cup\{O_t,B\}}(S).R{Ij​,Oj​:t<j<k}∪{B}​(S)=R{Ij​,Oj​:t<j<k}∪{Ot​,B}​(S).

For c=generalc=\mathrm{general}c=general, the requirement is instead that every family Ct⪰0C_t\succeq0Ct​⪰0 satisfying ∑b(Ct)(a,b),(a′,b)=δa,a′\sum_b(C_t)_{(a,b),(a',b)}=\delta_{a,a'}∑b​(Ct​)(a,b),(a′,b)​=δa,a′​ produces a matrix

D(a,b),(a′,b′)=∑i,j,o,v∈QS(a,i,o,b),(a′,j,v,b′)∏t=0k−1(Ct)(it,ot),(jt,vt)D_{(a,b),(a',b')} =\sum_{i,j,o,v\in Q}S_{(a,i,o,b),(a',j,v,b')} \prod_{t=0}^{k-1}(C_t)_{(i_t,o_t),(j_t,v_t)}D(a,b),(a′,b′)​=i,j,o,v∈Q∑​S(a,i,o,b),(a′,j,v,b′)​t=0∏k−1​(Ct​)(it​,ot​),(jt​,vt​)​

that is positive semidefinite and satisfies ∑bD(a,b),(a′,b)=δa,a′\sum_bD_{(a,b),(a',b)}=\delta_{a,a'}∑b​D(a,b),(a′,b)​=δa,a′​. There is no separate trace requirement in this branch. All zero dimensions are included, empty products equal 111, and division by zero is interpreted as zero. In particular, when k=0k=0k=0, the sequential conditions indexed by ttt are vacuous, while the general branch requires SSS, with its singleton register coordinates suppressed, to satisfy precisely the displayed positivity and partial-trace conditions for DDD.

QAlgorithms.Papers.Independent.Extend50.P06.TransformationProcess

For natural numbers k,d,ek,d,ek,d,e, a transformation process is an arbitrary complex square matrix indexed by tuples (a,i,o,b)(a,i,o,b)(a,i,o,b), where a,b∈{0,…,e−1}a,b\in\{0,\ldots,e-1\}a,b∈{0,…,e−1} and i,o:{0,…,k−1}→{0,…,d−1}i,o:\{0,\ldots,k-1\}\to\{0,\ldots,d-1\}i,o:{0,…,k−1}→{0,…,d−1}. No positivity, trace, or normalization condition is imposed. If e=0e=0e=0, or if d=0d=0d=0 and k>0k>0k>0, the index set is empty and there is a unique such matrix.

QAlgorithms.Papers.Independent.Extend50.P06.TransformationWires

For natural numbers k,d,ek,d,ek,d,e, the transformation-wire index set consists of tuples (a,i,o,b)(a,i,o,b)(a,i,o,b), where a,b∈{0,…,e−1}a,b\in\{0,\ldots,e-1\}a,b∈{0,…,e−1} and i,oi,oi,o are functions {0,…,k−1}→{0,…,d−1}\{0,\ldots,k-1\}\to\{0,\ldots,d-1\}{0,…,k−1}→{0,…,d−1}. Its cardinality is e2d2ke^2d^{2k}e2d2k, with d0=1d^0=1d0=1 even for d=0d=0d=0. Thus it is empty if e=0e=0e=0 or if d=0d=0d=0 and k>0k>0k>0; for k=0k=0k=0, the two function coordinates are unique.

QAlgorithms.Papers.Independent.Extend50.P06.Triple

For every natural number ddd, this abbreviates the type of pairs (r,a)(r,a)(r,a), where r:{0,1}→{0,…,d−1}r:\{0,1\}\to\{0,\ldots,d-1\}r:{0,1}→{0,…,d−1} and a∈{0,…,d−1}a\in\{0,\ldots,d-1\}a∈{0,…,d−1}. Equivalently, an element records an ordered triple (r(0),r(1),a)(r(0),r(1),a)(r(0),r(1),a) of indices between 000 and d−1d-1d−1. For d=0d=0d=0, this type is empty.

QAlgorithms.Papers.Independent.Extend50.P06.allMask

For every natural number kkk, a mask is a quadruple consisting of a Boolean, two Boolean functions on {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1}, and another Boolean. This definition gives

allMask⁡(k)=(true,(j↦true),(j↦true),true).\operatorname{allMask}(k)=\bigl(\mathrm{true},(j\mapsto\mathrm{true}),(j\mapsto\mathrm{true}),\mathrm{true}\bigr).allMask(k)=(true,(j↦true),(j↦true),true).

Every component is therefore true wherever it has an argument. The definition also includes k=0k=0k=0, when the two indexed functions have empty domains.

QAlgorithms.Papers.Independent.Extend50.P06.commutantExpansion

For arbitrary natural numbers k,d,e,nk,d,e,nk,d,e,n, a Boolean crossed\mathrm{crossed}crossed, and any family P0,…,Pn−1P_0,\ldots,P_{n-1}P0​,…,Pn−1​ of complex matrices indexed by R×ER\times ER×E, where R={0,…,d−1}{0,…,k−1}R=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}R={0,…,d−1}{0,…,k−1} and E={0,…,e−1}E=\{0,\ldots,e-1\}E={0,…,e−1}, this defines a complex matrix CCC indexed by E×R×R×EE\times R\times R\times EE×R×R×E. For x=(a,r,s,b)x=(a,r,s,b)x=(a,r,s,b) and y=(a′,r′,s′,b′)y=(a',r',s',b')y=(a′,r′,s′,b′), its entries are

Cx,y=1e2∑i=0n−11tr⁡(Pi†Pi){Pi((s,a),(s′,a′))‾ Pi((r,b),(r′,b′)),crossed=true,Pi((r,a),(r′,a′))‾ Pi((s,b),(s′,b′)),crossed=false.C_{x,y}=\frac{1}{e^2}\sum_{i=0}^{n-1} \frac{1}{\operatorname{tr}(P_i^\dagger P_i)} \begin{cases} \overline{P_i((s,a),(s',a'))}\,P_i((r,b),(r',b')), & \mathrm{crossed}=\mathrm{true},\\ \overline{P_i((r,a),(r',a'))}\,P_i((s,b),(s',b')), & \mathrm{crossed}=\mathrm{false}. \end{cases}Cx,y​=e21​i=0∑n−1​tr(Pi†​Pi​)1​{Pi​((s,a),(s′,a′))​Pi​((r,b),(r′,b′)),Pi​((r,a),(r′,a′))​Pi​((s,b),(s′,b′)),​crossed=true,crossed=false.​

Here †\dagger† is conjugate transpose, and all reciprocals are taken in C\mathbb CC, with 0−1=00^{-1}=00−1=0; consequently a zero PiP_iPi​ contributes zero. No orthogonality, independence, commutation, or normalization condition is imposed on the family. All four natural parameters may be zero; an empty sum is zero, and RRR contains the unique empty function when k=0k=0k=0.

QAlgorithms.Papers.Independent.Extend50.P06.conjugateTarget

For every natural number ddd and every special unitary matrix U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d), this definition returns its entrywise complex conjugate, whose (i,j)(i,j)(i,j)-entry is Ui,j‾\overline{U_{i,j}}Ui,j​​. The case d=0d=0d=0 is included and returns the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P06.estimateScore

For arbitrary natural numbers k,d,nk,d,nk,d,n, let HHH be a probability measure on SU(d)\mathrm{SU}(d)SU(d) invariant under left and right multiplication, and let EEE be an estimator consisting of guesses Ga∈SU(d)G_a\in\mathrm{SU}(d)Ga​∈SU(d) and positive semidefinite matrices TaT_aTa​ indexed by Q×QQ\times QQ×Q, where Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, with ∑aTa=σ⊗IQ\sum_aT_a=\sigma\otimes I_Q∑a​Ta​=σ⊗IQ​ for some positive semidefinite σ\sigmaσ of trace 111. This definition assigns EEE the real number

∫SU(d)∑a=0n−1Re⁡tr⁡ ⁣(TaCk(U))Re⁡tr⁡ ⁣(J(Ga)J(U))d2 dH(U),\int_{\mathrm{SU}(d)} \sum_{a=0}^{n-1} \operatorname{Re}\operatorname{tr}\!\left(T_a C_k(U)\right) \frac{\operatorname{Re}\operatorname{tr}\!\left(J(G_a)J(U)\right)}{d^2}\,dH(U),∫SU(d)​a=0∑n−1​Retr(Ta​Ck​(U))d2Retr(J(Ga​)J(U))​dH(U),

where J(V)(i,o),(j,v)=Vo,iVv,j‾J(V)_{(i,o),(j,v)}=V_{o,i}\overline{V_{v,j}}J(V)(i,o),(j,v)​=Vo,i​Vv,j​​ and

Ck(U)(i,o),(j,v)=∏t=0k−1Uot,itUvt,jt‾.C_k(U)_{(i,o),(j,v)} =\prod_{t=0}^{k-1}U_{o_t,i_t}\overline{U_{v_t,j_t}}.Ck​(U)(i,o),(j,v)​=t=0∏k−1​Uot​,it​​Uvt​,jt​​​.

The finite sum runs over all estimator outcomes. The case k=0k=0k=0 uses the singleton empty query register and an empty product equal to 111; division by d2d^2d2 uses the convention 0−1=00^{-1}=00−1=0, so the expression is also defined at d=0d=0d=0 whenever an estimator of the specified parameters exists.

QAlgorithms.Papers.Independent.Extend50.P06.estimationScores

For arbitrary natural numbers k,dk,dk,d and a probability measure HHH on SU(d)\mathrm{SU}(d)SU(d) invariant under left and right multiplication, this definition gives the set of all real numbers

∫SU(d)∑a=0n−1Re⁡tr⁡ ⁣(TaCk(U))Re⁡tr⁡ ⁣(J(Ga)J(U))d2 dH(U)\int_{\mathrm{SU}(d)} \sum_{a=0}^{n-1} \operatorname{Re}\operatorname{tr}\!\left(T_a C_k(U)\right) \frac{\operatorname{Re}\operatorname{tr}\!\left(J(G_a)J(U)\right)}{d^2}\,dH(U)∫SU(d)​a=0∑n−1​Retr(Ta​Ck​(U))d2Retr(J(Ga​)J(U))​dH(U)

obtained by choosing a natural number nnn, guesses Ga∈SU(d)G_a\in\mathrm{SU}(d)Ga​∈SU(d), and positive semidefinite matrices TaT_aTa​ indexed by Q×QQ\times QQ×Q, where Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, such that ∑aTa=σ⊗IQ\sum_aT_a=\sigma\otimes I_Q∑a​Ta​=σ⊗IQ​ for some positive semidefinite matrix σ\sigmaσ indexed by QQQ with trace 111. Here J(V)(i,o),(j,v)=Vo,iVv,j‾J(V)_{(i,o),(j,v)}=V_{o,i}\overline{V_{v,j}}J(V)(i,o),(j,v)​=Vo,i​Vv,j​​, and (Ck(U))(i,o),(j,v)=∏t<kUot,itUvt,jt‾(C_k(U))_{(i,o),(j,v)}=\prod_{t<k}U_{o_t,i_t}\overline{U_{v_t,j_t}}(Ck​(U))(i,o),(j,v)​=∏t<k​Uot​,it​​Uvt​,jt​​​. Membership requires an actual such finite estimator attaining the number; no supremum or closure is taken. Zero values of k,dk,dk,d are included, empty products equal 111, and division by zero equals 000; if d=0<kd=0<kd=0<k, the required trace-one σ\sigmaσ cannot exist and the set is empty.

QAlgorithms.Papers.Independent.Extend50.P06.futureMask

For every natural number kkk, the future mask is the Boolean tuple (false,j↦false,j↦false,true)(\mathrm{false},j\mapsto\mathrm{false},j\mapsto\mathrm{false},\mathrm{true})(false,j↦false,j↦false,true). It marks only the final endpoint coordinate of a tuple (a,i,o,b)(a,i,o,b)(a,i,o,b), leaving the first endpoint and all positions of both kkk-component function coordinates unmarked. This also applies when k=0k=0k=0.

QAlgorithms.Papers.Independent.Extend50.P06.insertSlots

For arbitrary natural numbers k,d,ek,d,ek,d,e, let Qk,dQ_{k,d}Qk,d​ be the set of functions from {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1} to {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. Given any complex matrix SSS on

W={0,…,e−1}×Qk,d×Qk,d×{0,…,e−1}W=\{0,\ldots,e-1\}\times Q_{k,d}\times Q_{k,d}\times\{0,\ldots,e-1\}W={0,…,e−1}×Qk,d​×Qk,d​×{0,…,e−1}

and any complex matrix CCC on Qk,d×Qk,dQ_{k,d}\times Q_{k,d}Qk,d​×Qk,d​, this definition produces the matrix DDD on pairs of eee indices given by

D(a,b),(a′,b′)=∑i,j,o,v∈Qk,dS(a,i,o,b),(a′,j,v,b′) C(i,o),(j,v).D_{(a,b),(a',b')} =\sum_{i,j,o,v\in Q_{k,d}} S_{(a,i,o,b),(a',j,v,b')}\,C_{(i,o),(j,v)}.D(a,b),(a′,b′)​=i,j,o,v∈Qk,d​∑​S(a,i,o,b),(a′,j,v,b′)​C(i,o),(j,v)​.

The contraction uses the displayed entries of CCC without conjugating them. Neither matrix has any positivity or normalization hypothesis. When k=0k=0k=0, all four summation indices have a single possible value. When d=0d=0d=0 and k>0k>0k>0, these sums are empty and D=0D=0D=0; when e=0e=0e=0, DDD is an empty matrix.

QAlgorithms.Papers.Independent.Extend50.P06.inverseTarget

For every natural number ddd and every special unitary matrix U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d), this definition returns its conjugate transpose U†U^\daggerU†, whose (i,j)(i,j)(i,j)-entry is Uj,i‾\overline{U_{j,i}}Uj,i​​. The case d=0d=0d=0 is included and returns the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P06.outputsMask

For every natural number kkk, the outputs mask is the Boolean tuple (false,j↦false,j↦true,true)(\mathrm{false},j\mapsto\mathrm{false},j\mapsto\mathrm{true},\mathrm{true})(false,j↦false,j↦true,true). It marks every position of the second kkk-component function coordinate and the final endpoint of a tuple (a,i,o,b)(a,i,o,b)(a,i,o,b), leaving the first endpoint and the first function coordinate unmarked. When k=0k=0k=0, only the final endpoint is marked.

QAlgorithms.Papers.Independent.Extend50.P06.overwrite

For any natural numbers k,d,ek,d,ek,d,e, a mask m=(ma,mi,mo,mb)m=(m_a,m_i,m_o,m_b)m=(ma​,mi​,mo​,mb​), and tuples x=(a,i,o,b)x=(a,i,o,b)x=(a,i,o,b) and z=(a′,i′,o′,b′)z=(a',i',o',b')z=(a′,i′,o′,b′) with endpoint coordinates in {0,…,e−1}\{0,\ldots,e-1\}{0,…,e−1} and function coordinates from {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1} to {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, overwriting produces (a~,i~,o~,b~)(\widetilde a,\widetilde i,\widetilde o,\widetilde b)(a,i,o,b) by taking each coordinate from zzz exactly where the corresponding mask value is true and otherwise taking it from xxx. Thus a~=a′\widetilde a=a'a=a′ if mam_ama​ is true and aaa otherwise, i~j=ij′\widetilde i_j=i'_jij​=ij′​ if mi(j)m_i(j)mi​(j) is true and iji_jij​ otherwise, o~j=oj′\widetilde o_j=o'_joj​=oj′​ if mo(j)m_o(j)mo​(j) is true and ojo_joj​ otherwise, and b~=b′\widetilde b=b'b=b′ if mbm_bmb​ is true and bbb otherwise. For k=0k=0k=0, only the endpoint choices remain; if the tuple index set is empty, there are no arguments x,zx,zx,z.

QAlgorithms.Papers.Independent.Extend50.P06.pastMask

For every natural number kkk, a mask is a quadruple consisting of a Boolean, two Boolean functions on {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1}, and another Boolean. This definition gives

pastMask⁡(k)=(false,(j↦true),(j↦true),true).\operatorname{pastMask}(k)=\bigl(\mathrm{false},(j\mapsto\mathrm{true}),(j\mapsto\mathrm{true}),\mathrm{true}\bigr).pastMask(k)=(false,(j↦true),(j↦true),true).

Thus its first component is false, both indexed components are true at every index, and its last component is true. When k=0k=0k=0, both indexed functions have empty domains.

QAlgorithms.Papers.Independent.Extend50.P06.pbtChoi

For arbitrary natural numbers k,dk,dk,d, put D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1} and R=D{0,…,k−1}R=D^{\{0,\ldots,k-1\}}R=D{0,…,k−1}. Let PPP consist of a normalized resource function r:R×R→Cr:R\times R\to\mathbb Cr:R×R→C, with ∑i,j∣r(i,j)∣2=1\sum_{i,j}|r(i,j)|^2=1∑i,j​∣r(i,j)∣2=1, and positive semidefinite matrices EaE_aEa​ on D×RD\times RD×R, indexed by a<ka<ka<k, with ∑aEa=I\sum_aE_a=I∑a​Ea​=I. For any function ψ:R×R→C\psi:R\times R\to\mathbb Cψ:R×R→C, this defines a complex matrix CCC on D×DD\times DD×D by

C(u,v),(u′,v′)=1d∑a=0k−1∑i∈R∑j∈R∑z∈REa((u′,j),(u,i)) ψ(i,z[a←v]) ψ(j,z[a←v′])‾,C_{(u,v),(u',v')}= \frac1d\sum_{a=0}^{k-1}\sum_{i\in R}\sum_{j\in R}\sum_{z\in R} E_a((u',j),(u,i))\, \psi(i,z[a\leftarrow v])\, \overline{\psi(j,z[a\leftarrow v'])},C(u,v),(u′,v′)​=d1​a=0∑k−1​i∈R∑​j∈R∑​z∈R∑​Ea​((u′,j),(u,i))ψ(i,z[a←v])ψ(j,z[a←v′])​,

where z[a←v]z[a\leftarrow v]z[a←v] denotes zzz with coordinate aaa replaced by vvv. The supplied function ψ\psiψ need not be normalized or equal to rrr; the resource rrr is not otherwise used in this formula. Division is complex division with 1/0=01/0=01/0=0, and the definition imposes no positivity restriction on kkk or ddd beyond the requirements implicit in the existence of PPP.

QAlgorithms.Papers.Independent.Extend50.P06.pbtProcess

For arbitrary natural numbers k,dk,dk,d, let D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1}, R=D{0,…,k−1}R=D^{\{0,\ldots,k-1\}}R=D{0,…,k−1}, and let PPP consist of a resource function r:R×R→Cr:R\times R\to\mathbb Cr:R×R→C satisfying ∑i,j∣r(i,j)∣2=1\sum_{i,j}|r(i,j)|^2=1∑i,j​∣r(i,j)∣2=1, and positive semidefinite matrices EaE_aEa​ on D×RD\times RD×R, indexed by a<ka<ka<k, satisfying ∑aEa=I\sum_aE_a=I∑a​Ea​=I. This defines a complex matrix SSS on D×R×R×DD\times R\times R\times DD×R×R×D. For x=(u,i,o,v)x=(u,i,o,v)x=(u,i,o,v) and y=(u′,j,o′,v′)y=(u',j,o',v')y=(u′,j,o′,v′), its entries are

Sx,y=1d∑a=0k−1∑z∈REa((u′,o′),(u,o)) r(i,z[a←v]) r(j,z[a←v′])‾,S_{x,y}= \frac1d\sum_{a=0}^{k-1}\sum_{z\in R} E_a((u',o'),(u,o))\, r(i,z[a\leftarrow v])\, \overline{r(j,z[a\leftarrow v'])},Sx,y​=d1​a=0∑k−1​z∈R∑​Ea​((u′,o′),(u,o))r(i,z[a←v])r(j,z[a←v′])​,

where the replacement notation changes only coordinate aaa. The factor 1/d1/d1/d is a complex reciprocal with 1/0=01/0=01/0=0; empty sums are zero. The definition does not assert that this matrix satisfies any additional process admissibility condition, and k,dk,dk,d range over all natural numbers for which the stipulated protocol exists.

QAlgorithms.Papers.Independent.Extend50.P06.pbtScore

For natural numbers k,dk,dk,d, let Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, and let PPP consist of a resource r:Q×Q→Cr:Q\times Q\to\mathbb Cr:Q×Q→C with ∑i,j∣r(i,j)∣2=1\sum_{i,j}|r(i,j)|^2=1∑i,j​∣r(i,j)∣2=1 and positive semidefinite matrices EaE_aEa​ on {0,…,d−1}×Q\{0,\ldots,d-1\}\times Q{0,…,d−1}×Q, for a<ka<ka<k, with ∑aEa=I\sum_aE_a=I∑a​Ea​=I. Define a matrix CCC, indexed by pairs from {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}, by

C(u,v),(u′,v′)=1d∑a<k∑i,j,z∈Q(Ea)(u′,j),(u,i) r(i,z[a←v]) r(j,z[a←v′])‾,C_{(u,v),(u',v')} =\frac1d\sum_{a<k}\sum_{i,j,z\in Q} (E_a)_{(u',j),(u,i)} \,r(i,z[a\leftarrow v])\, \overline{r(j,z[a\leftarrow v'])},C(u,v),(u′,v′)​=d1​a<k∑​i,j,z∈Q∑​(Ea​)(u′,j),(u,i)​r(i,z[a←v])r(j,z[a←v′])​,

where z[a←v]z[a\leftarrow v]z[a←v] replaces coordinate aaa of zzz by vvv. The score is

pbtScore⁡(P)=Re⁡Tr⁡(C ∣Ω⟩⟨Ω∣)d2,Ω(u,v)={1u=v,0u≠v.\operatorname{pbtScore}(P) =\frac{\operatorname{Re}\operatorname{Tr}(C\,|\Omega\rangle\langle\Omega|)}{d^2}, \qquad \Omega_{(u,v)}= \begin{cases}1&u=v,\\0&u\ne v.\end{cases}pbtScore(P)=d2ReTr(C∣Ω⟩⟨Ω∣)​,Ω(u,v)​={10​u=v,u=v.​

Thus the vector used here is the unnormalized diagonal vector. Zero parameters are allowed, and division by zero is interpreted as zero; protocol existence excludes k=0<dk=0<dk=0<d and d=0<kd=0<kd=0<k.

QAlgorithms.Papers.Independent.Extend50.P06.pbtScores

For every pair of natural numbers k,dk,dk,d, including zero, let Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}. The set pbtScores⁡(k,d)\operatorname{pbtScores}(k,d)pbtScores(k,d) consists exactly of the real numbers

Re⁡Tr⁡(C ∣Ω⟩⟨Ω∣)d2\frac{\operatorname{Re}\operatorname{Tr}(C\,|\Omega\rangle\langle\Omega|)}{d^2}d2ReTr(C∣Ω⟩⟨Ω∣)​

obtained by choosing a function r:Q×Q→Cr:Q\times Q\to\mathbb Cr:Q×Q→C with ∑i,j∣r(i,j)∣2=1\sum_{i,j}|r(i,j)|^2=1∑i,j​∣r(i,j)∣2=1 and matrices EaE_aEa​, for a<ka<ka<k, that are positive semidefinite on {0,…,d−1}×Q\{0,\ldots,d-1\}\times Q{0,…,d−1}×Q and sum to the identity, and then setting

C(u,v),(u′,v′)=1d∑a<k∑i,j,z∈Q(Ea)(u′,j),(u,i)r(i,z[a←v])r(j,z[a←v′])‾,Ω(u,v)=1u=v.C_{(u,v),(u',v')} =\frac1d\sum_{a<k}\sum_{i,j,z\in Q} (E_a)_{(u',j),(u,i)} r(i,z[a\leftarrow v])\overline{r(j,z[a\leftarrow v'])}, \qquad \Omega_{(u,v)}=\mathbf1_{u=v}.C(u,v),(u′,v′)​=d1​a<k∑​i,j,z∈Q∑​(Ea​)(u′,j),(u,i)​r(i,z[a←v])r(j,z[a←v′])​,Ω(u,v)​=1u=v​.

Here coordinate replacement has its literal meaning, empty sums are zero, empty products are one, and division by zero is zero. Membership asserts existence of such a protocol with exactly that score, without asserting attainment of a maximum. The set is empty when k=0<dk=0<dk=0<d or d=0<kd=0<kd=0<k, since the protocol conditions are then impossible.

QAlgorithms.Papers.Independent.Extend50.P06.performance

For arbitrary natural numbers k,d,ek,d,ek,d,e, let HHH consist of a Borel probability measure μ\muμ on SU(d)\mathrm{SU}(d)SU(d) invariant under both left and right multiplication by every member of SU(d)\mathrm{SU}(d)SU(d), and let f:SU(d)→Ce×ef:\mathrm{SU}(d)\to\mathbb C^{e\times e}f:SU(d)→Ce×e be any function. With E={0,…,e−1}E=\{0,\ldots,e-1\}E={0,…,e−1} and Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, this definition produces the complex matrix PPP on E×Q×Q×EE\times Q\times Q\times EE×Q×Q×E whose entries are

P(a,i,o,b),(a′,j,v,b′)=1e2∫SU(d)(f(U))b,a (f(U))b′,a′‾  ∏t=0k−1Uot,it Uvt,jt‾‾ dμ(U).P_{(a,i,o,b),(a',j,v,b')} =\frac{1}{e^2} \int_{\mathrm{SU}(d)} (f(U))_{b,a}\,\overline{(f(U))_{b',a'}} \;\overline{\prod_{t=0}^{k-1}U_{o_t,i_t}\,\overline{U_{v_t,j_t}}} \,d\mu(U).P(a,i,o,b),(a′,j,v,b′)​=e21​∫SU(d)​(f(U))b,a​(f(U))b′,a′​​t=0∏k−1​Uot​,it​​Uvt​,jt​​​​dμ(U).

The integral in the definition is a matrix-valued Bochner integral, and the scalar factor e−2e^{-2}e−2 multiplies that integral. No continuity, measurability, or unitarity is assumed of fff; if the matrix-valued integrand is not integrable, its integral is defined to be the zero matrix. When k=0k=0k=0, the product is 111; when e=0e=0e=0, or when d=0d=0d=0 and k>0k>0k>0, the resulting matrix has an empty indexing set.

QAlgorithms.Papers.Independent.Extend50.P06.permTriple

For every natural number ddd and every function a:{0,1,2}→{0,1,2}a:\{0,1,2\}\to\{0,1,2\}a:{0,1,2}→{0,1,2}, this defines a complex matrix indexed by ordered triples of elements of {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. For triples x=(x0,x1,x2)x=(x_0,x_1,x_2)x=(x0​,x1​,x2​) and y=(y0,y1,y2)y=(y_0,y_1,y_2)y=(y0​,y1​,y2​), its entry is

Mx,y={1,xj=ya(j) for every j∈{0,1,2},0,otherwise.M_{x,y}= \begin{cases} 1,&x_j=y_{a(j)}\text{ for every }j\in\{0,1,2\},\\ 0,&\text{otherwise}. \end{cases}Mx,y​={1,0,​xj​=ya(j)​ for every j∈{0,1,2},otherwise.​

The function aaa is arbitrary: it need not be injective or a permutation, so repeated coordinate selections are included. For d=0d=0d=0, the matrix has an empty index set.

QAlgorithms.Papers.Independent.Extend50.P06.place

For arbitrary natural numbers k,d,ek,d,ek,d,e, put Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}. Given a Boolean flag crossed\mathrm{crossed}crossed and arbitrary complex matrices A,BA,BA,B indexed by Q×{0,…,e−1}Q\times\{0,\ldots,e-1\}Q×{0,…,e−1}, this definition returns the complex matrix SSS indexed by tuples (a,i,o,b)∈{0,…,e−1}×Q×Q×{0,…,e−1}(a,i,o,b)\in\{0,\ldots,e-1\}\times Q\times Q\times\{0,\ldots,e-1\}(a,i,o,b)∈{0,…,e−1}×Q×Q×{0,…,e−1}, whose entries are

S(a,i,o,b),(a′,j,v,b′)={A(o,a),(v,a′) B(i,b),(j,b′),crossed=true,A(i,a),(j,a′) B(o,b),(v,b′),crossed=false.S_{(a,i,o,b),(a',j,v,b')} = \begin{cases} A_{(o,a),(v,a')}\,B_{(i,b),(j,b')}, &\mathrm{crossed}=\mathrm{true},\\ A_{(i,a),(j,a')}\,B_{(o,b),(v,b')}, &\mathrm{crossed}=\mathrm{false}. \end{cases}S(a,i,o,b),(a′,j,v,b′)​={A(o,a),(v,a′)​B(i,b),(j,b′)​,A(i,a),(j,a′)​B(o,b),(v,b′)​,​crossed=true,crossed=false.​

No positivity, normalization, or admissibility conditions are imposed on A,BA,BA,B or on the resulting matrix. Zero values of k,d,ek,d,ek,d,e are included, with QQQ a singleton when k=0k=0k=0 and the result an empty matrix whenever its indexing type is empty.

QAlgorithms.Papers.Independent.Extend50.P06.pointFidelity

For arbitrary natural numbers k,d,ek,d,ek,d,e, let QQQ be the set of functions from the kkk indices to the ddd indices. Given any complex matrix SSS on {0,…,e−1}×Q×Q×{0,…,e−1}\{0,\ldots,e-1\}\times Q\times Q\times\{0,\ldots,e-1\}{0,…,e−1}×Q×Q×{0,…,e−1}, any function fff from the special unitary group SU(d)\mathrm{SU}(d)SU(d) to complex e×ee\times ee×e matrices, and any U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d), define

DU(a,b),(a′,b′)=∑i,j,o,v∈QS(a,i,o,b),(a′,j,v,b′)∏t=0k−1Uot,it Uvt,jt‾.D_U{}_{(a,b),(a',b')} =\sum_{i,j,o,v\in Q} S_{(a,i,o,b),(a',j,v,b')} \prod_{t=0}^{k-1}U_{o_t,i_t}\,\overline{U_{v_t,j_t}}.DU​(a,b),(a′,b′)​=i,j,o,v∈Q∑​S(a,i,o,b),(a′,j,v,b′)​t=0∏k−1​Uot​,it​​Uvt​,jt​​​.

The definition returns

pointFidelity⁡(S,f,U)=1e2Re⁡∑a,b,a′,b′DU(a,b),(a′,b′) (f(U))b′,a′ (f(U))b,a‾.\operatorname{pointFidelity}(S,f,U) =\frac{1}{e^2}\operatorname{Re} \sum_{a,b,a',b'}D_U{}_{(a,b),(a',b')}\, (f(U))_{b',a'}\,\overline{(f(U))_{b,a}}.pointFidelity(S,f,U)=e21​Rea,b,a′,b′∑​DU​(a,b),(a′,b′)​(f(U))b′,a′​(f(U))b,a​​.

No admissibility condition is imposed on SSS, and no continuity, measurability, or unitarity condition is imposed on fff. Empty products equal 111, including when k=0k=0k=0; the value is 000 if e=0e=0e=0, and also if d=0d=0d=0 and k>0k>0k>0.

QAlgorithms.Papers.Independent.Extend50.P06.queriedResource

For natural numbers k,dk,dk,d, write Q=({0,…,d−1}){0,…,k−1}Q=(\{0,\ldots,d-1\})^{\{0,\ldots,k-1\}}Q=({0,…,d−1}){0,…,k−1}. A protocol PPP supplies a complex function r:Q×Q→Cr:Q\times Q\to\mathbb Cr:Q×Q→C satisfying ∑i,j∣r(i,j)∣2=1\sum_{i,j}|r(i,j)|^2=1∑i,j​∣r(i,j)∣2=1, and positive semidefinite matrices EaE_aEa​, indexed by a<ka<ka<k, on {0,…,d−1}×Q\{0,\ldots,d-1\}\times Q{0,…,d−1}×Q, satisfying ∑aEa=I\sum_aE_a=I∑a​Ea​=I. For every complex d×dd\times dd×d matrix UUU, the definition gives the function

queriedResource⁡(P,U)(x,y)=∑i∈Q(∏t=0k−1Uxt,it)r(i,y).\operatorname{queriedResource}(P,U)(x,y) =\sum_{i\in Q}\left(\prod_{t=0}^{k-1}U_{x_t,i_t}\right)r(i,y).queriedResource(P,U)(x,y)=i∈Q∑​(t=0∏k−1​Uxt​,it​​)r(i,y).

No unitarity assumption is imposed on UUU. Empty products equal 111, and empty sums equal 000. The natural-number parameters include zero, although no such protocol exists when k=0<dk=0<dk=0<d, because its empty family of effects would have to sum to a nonzero identity, or when d=0<kd=0<kd=0<k, because its resource could not have squared norm 111.

QAlgorithms.Papers.Independent.Extend50.P06.queryTargetBellProjector

For every natural number ddd and Boolean complement\mathrm{complement}complement, let RRR be the set of functions {0}→{0,…,d−1}\{0\}\to\{0,\ldots,d-1\}{0}→{0,…,d−1}, and define a complex matrix PPP indexed by R×{0,…,d−1}R\times\{0,\ldots,d-1\}R×{0,…,d−1} by

P(r,a),(s,b)=1d 1{r(0)=a}1{s(0)=b}.P_{(r,a),(s,b)} =\frac1d\,\mathbf 1_{\{r(0)=a\}}\mathbf 1_{\{s(0)=b\}}.P(r,a),(s,b)​=d1​1{r(0)=a}​1{s(0)=b}​.

The defined matrix is I−PI-PI−P if complement\mathrm{complement}complement is true and PPP otherwise, where III is the identity matrix on that index set. The factor 1/d1/d1/d is the complex reciprocal, with 1/0=01/0=01/0=0. In particular, d=0d=0d=0 is included and gives a matrix on an empty index set.

QAlgorithms.Papers.Independent.Extend50.P06.queryTargetPairProjector

For every natural number ddd and Boolean antisymmetric\mathrm{antisymmetric}antisymmetric, this defines a complex matrix on pairs (r,a)(r,a)(r,a), where r:{0}→{0,…,d−1}r:\{0\}\to\{0,\ldots,d-1\}r:{0}→{0,…,d−1} and a∈{0,…,d−1}a\in\{0,\ldots,d-1\}a∈{0,…,d−1}. Writing x=(r,a)x=(r,a)x=(r,a), y=(s,b)y=(s,b)y=(s,b), and ε=−1\varepsilon=-1ε=−1 when antisymmetric\mathrm{antisymmetric}antisymmetric is true and ε=1\varepsilon=1ε=1 otherwise, its entry is

Px,y=12(1{r(0)=s(0), a=b}+ε 1{r(0)=b, a=s(0)}).P_{x,y}=\frac12\left( \mathbf 1_{\{r(0)=s(0),\,a=b\}} +\varepsilon\,\mathbf 1_{\{r(0)=b,\,a=s(0)\}} \right).Px,y​=21​(1{r(0)=s(0),a=b}​+ε1{r(0)=b,a=s(0)}​).

Thus the Boolean selects the minus or plus sign in this formula. The definition includes d=0d=0d=0, when the matrix has an empty index set.

QAlgorithms.Papers.Independent.Extend50.P06.rBasis

For every natural number ddd, this defines a family of six complex matrices indexed by triples in {0,…,d−1}3\{0,\ldots,d-1\}^3{0,…,d−1}3. For a coordinate list π=(π0,π1,π2)\pi=(\pi_0,\pi_1,\pi_2)π=(π0​,π1​,π2​), let Mπ(x,y)=1M_\pi(x,y)=1Mπ​(x,y)=1 if xj=yπjx_j=y_{\pi_j}xj​=yπj​​ for all three coordinates, and 000 otherwise; set a=M(1,0,2)a=M_{(1,0,2)}a=M(1,0,2)​, b=M(0,2,1)b=M_{(0,2,1)}b=M(0,2,1)​, c=M(2,1,0)c=M_{(2,1,0)}c=M(2,1,0)​, v=M(2,0,1)v=M_{(2,0,1)}v=M(2,0,1)​, and w=M(1,2,0)w=M_{(1,2,0)}w=M(1,2,0)​. With III the identity matrix, the six matrices, in index order 0,…,50,\ldots,50,…,5, are

(I+a+b+c+v+w6,I−a−b−c+v+w6,2I−v−w3,2b−c−a3,a−c3,i(v−w)3).\left( \frac{I+a+b+c+v+w}{6},\quad \frac{I-a-b-c+v+w}{6},\quad \frac{2I-v-w}{3},\quad \frac{2b-c-a}{3},\quad \frac{a-c}{\sqrt3},\quad \frac{\mathrm i(v-w)}{\sqrt3} \right).(6I+a+b+c+v+w​,6I−a−b−c+v+w​,32I−v−w​,32b−c−a​,3​a−c​,3​i(v−w)​).

This specifies the family without asserting that it is a basis or that its members are nonzero or independent. The definition includes d=0d=0d=0, when all these matrices have an empty index set.

QAlgorithms.Papers.Independent.Extend50.P06.replace

For any natural numbers k,d,ek,d,ek,d,e, let W\mathcal WW be the set of tuples (a,i,o,b)(a,i,o,b)(a,i,o,b) with a,b∈{0,…,e−1}a,b\in\{0,\ldots,e-1\}a,b∈{0,…,e−1} and i,o:{0,…,k−1}→{0,…,d−1}i,o:\{0,\ldots,k-1\}\to\{0,\ldots,d-1\}i,o:{0,…,k−1}→{0,…,d−1}, let SSS be any complex matrix indexed by W\mathcal WW, and let m=(ma,mi,mo,mb)m=(m_a,m_i,m_o,m_b)m=(ma​,mi​,mo​,mb​) be a Boolean mask. Write x[m←z]x[m\leftarrow z]x[m←z] for the tuple obtained by taking each coordinate from zzz where its mask value is true and from xxx otherwise. The replacement matrix is defined by

replace⁡m(S)x,y={∑z∈WSx[m←z], y[m←z]∣W∣,if x,y agree at every coordinate marked true,0,otherwise.\operatorname{replace}_m(S)_{x,y} = \begin{cases} \displaystyle\frac{\sum_{z\in\mathcal W}S_{x[m\leftarrow z],\,y[m\leftarrow z]}}{|\mathcal W|}, &\text{if }x,y\text{ agree at every coordinate marked true},\\[6pt] 0,&\text{otherwise}. \end{cases}replacem​(S)x,y​=⎩⎨⎧​∣W∣∑z∈W​Sx[m←z],y[m←z]​​,0,​if x,y agree at every coordinate marked true,otherwise.​

Agreement is required separately at each marked endpoint and each marked position of either function coordinate; no agreement is required at unmarked coordinates. The denominator is the cardinality of the entire tuple set, ∣W∣=e2d2k|\mathcal W|=e^2d^{2k}∣W∣=e2d2k. When k=0k=0k=0, the function coordinates are unique; when W\mathcal WW is empty, the resulting matrix has no entries.

QAlgorithms.Papers.Independent.Extend50.P06.sBasis

For every natural number ddd, this defines six complex matrices on triples in {0,…,d−1}3\{0,\ldots,d-1\}^3{0,…,d−1}3. Define Xx,y=1X_{x,y}=1Xx,y​=1 when x0=y0x_0=y_0x0​=y0​, x1=x2x_1=x_2x1​=x2​, and y1=y2y_1=y_2y1​=y2​, and Xx,y=0X_{x,y}=0Xx,y​=0 otherwise; define Vx,y=1V_{x,y}=1Vx,y​=1 when x0=y1x_0=y_1x0​=y1​, x1=y0x_1=y_0x1​=y0​, and x2=y2x_2=y_2x2​=y2​, and Vx,y=0V_{x,y}=0Vx,y​=0 otherwise. Put A=(I+V)/2A=(I+V)/2A=(I+V)/2, B=(I−V)/2B=(I-V)/2B=(I−V)/2, and q=d2−1q=d^2-1q=d2−1, interpreted as a complex scalar. The six matrices, in index order 0,…,50,\ldots,50,…,5, are

(A(I−2Xd+1)A,B(I−2Xd−1)B,d(X+VXV)−(XV+VX)q,d(XV+VX)−(X+VXV)q,X−VXVd2−1,i(XV−VX)d2−1).\left( A\left(I-\frac{2X}{d+1}\right)A,\quad B\left(I-\frac{2X}{d-1}\right)B,\quad \frac{d(X+VXV)-(XV+VX)}q,\quad \frac{d(XV+VX)-(X+VXV)}q,\quad \frac{X-VXV}{\sqrt{d^2-1}},\quad \frac{\mathrm i(XV-VX)}{\sqrt{d^2-1}} \right).(A(I−d+12X​)A,B(I−d−12X​)B,qd(X+VXV)−(XV+VX)​,qd(XV+VX)−(X+VXV)​,d2−1​X−VXV​,d2−1​i(XV−VX)​).

All matrix products have the displayed order. The square root is the real square root, which is zero on negative inputs, subsequently regarded as complex; every zero denominator has reciprocal zero. Thus d=1d=1d=1 is included despite the vanishing denominators, and d=0d=0d=0 gives matrices on an empty index set. No basis or independence property is asserted.

QAlgorithms.Papers.Independent.Extend50.P06.scores

For arbitrary natural numbers k,d,ek,d,ek,d,e, let Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1} and W={0,…,e−1}×Q×Q×{0,…,e−1}W=\{0,\ldots,e-1\}\times Q\times Q\times\{0,\ldots,e-1\}W={0,…,e−1}×Q×Q×{0,…,e−1}, with coordinates written x=(a,i,o,b)x=(a,i,o,b)x=(a,i,o,b). Given a probability measure HHH on SU(d)\mathrm{SU}(d)SU(d) invariant under both left and right multiplication, an arbitrary function f:SU(d)→Me(C)f:\mathrm{SU}(d)\to M_e(\mathbb C)f:SU(d)→Me​(C), and a choice ccc of parallel, sequential, or general strategy, this definition gives the set of real numbers

{∫SU(d)Re⁡tr⁡ ⁣(CS(U)J(f(U)))e2 dH(U)  |  S satisfies the conditions for c}.\left\{\int_{\mathrm{SU}(d)} \frac{\operatorname{Re}\operatorname{tr}\!\left(C_S(U)J(f(U))\right)}{e^2}\,dH(U) \;\middle|\; S\text{ satisfies the conditions for }c\right\}.{∫SU(d)​e2Retr(CS​(U)J(f(U)))​dH(U)​S satisfies the conditions for c}.

Here J(V)(a,b),(a′,b′)=Vb,aVb′,a′‾J(V)_{(a,b),(a',b')}=V_{b,a}\overline{V_{b',a'}}J(V)(a,b),(a′,b′)​=Vb,a​Vb′,a′​​, and

CS(U)(a,b),(a′,b′)=∑i,j,o,v∈QS(a,i,o,b),(a′,j,v,b′)∏t=0k−1Uot,itUvt,jt‾.C_S(U)_{(a,b),(a',b')}= \sum_{i,j,o,v\in Q} S_{(a,i,o,b),(a',j,v,b')} \prod_{t=0}^{k-1}U_{o_t,i_t}\overline{U_{v_t,j_t}}.CS​(U)(a,b),(a′,b′)​=i,j,o,v∈Q∑​S(a,i,o,b),(a′,j,v,b′)​t=0∏k−1​Uot​,it​​Uvt​,jt​​​.

In all three cases SSS is a positive semidefinite complex matrix indexed by WWW. To specify the remaining conditions, for a set MMM of coordinate positions define

(RMS)x,y={∣W∣−1∑z∈WSx[M←z], y[M←z],x and y agree at every position in M,0,otherwise,(\mathcal R_M S)_{x,y}= \begin{cases} |W|^{-1}\displaystyle\sum_{z\in W}S_{x[M\leftarrow z],\,y[M\leftarrow z]}, &x\text{ and }y\text{ agree at every position in }M,\\ 0,&\text{otherwise}, \end{cases}(RM​S)x,y​=⎩⎨⎧​∣W∣−1z∈W∑​Sx[M←z],y[M←z]​,0,​x and y agree at every position in M,otherwise,​

where the selected coordinates of each argument are replaced by those of the same zzz. The parallel conditions are R{b}S=R{o0,…,ok−1,b}S\mathcal R_{\{b\}}S=\mathcal R_{\{o_0,\ldots,o_{k-1},b\}}SR{b}​S=R{o0​,…,ok−1​,b}​S, R{i0,…,ik−1,o0,…,ok−1,b}S=RallS\mathcal R_{\{i_0,\ldots,i_{k-1},o_0,\ldots,o_{k-1},b\}}S=\mathcal R_{\mathrm{all}}SR{i0​,…,ik−1​,o0​,…,ok−1​,b}​S=Rall​S, and tr⁡S=e dk\operatorname{tr}S=e\,d^ktrS=edk. The sequential conditions replace the first equality by, for every t<kt<kt<k, RMtS=RMt∪{ot}S\mathcal R_{M_t}S=\mathcal R_{M_t\cup\{o_t\}}SRMt​​S=RMt​∪{ot​}​S, where Mt={b}∪{ij,oj:t<j<k}M_t=\{b\}\cup\{i_j,o_j:t<j<k\}Mt​={b}∪{ij​,oj​:t<j<k}, and retain the other equality and trace condition. The general condition is that for every family of positive semidefinite matrices DtD_tDt​ indexed by {0,…,d−1}2\{0,\ldots,d-1\}^2{0,…,d−1}2 satisfying ∑o(Dt)(i,o),(j,o)=δi,j\sum_o(D_t)_{(i,o),(j,o)}=\delta_{i,j}∑o​(Dt​)(i,o),(j,o)​=δi,j​, the matrix

CS(D)(a,b),(a′,b′)=∑i,j,o,v∈QS(a,i,o,b),(a′,j,v,b′)∏t=0k−1(Dt)(it,ot),(jt,vt)C_S(D)_{(a,b),(a',b')}= \sum_{i,j,o,v\in Q}S_{(a,i,o,b),(a',j,v,b')} \prod_{t=0}^{k-1}(D_t)_{(i_t,o_t),(j_t,v_t)}CS​(D)(a,b),(a′,b′)​=i,j,o,v∈Q∑​S(a,i,o,b),(a′,j,v,b′)​t=0∏k−1​(Dt​)(it​,ot​),(jt​,vt​)​

is positive semidefinite and satisfies ∑bCS(D)(a,b),(a′,b)=δa,a′\sum_b C_S(D)_{(a,b),(a',b)}=\delta_{a,a'}∑b​CS​(D)(a,b),(a′,b)​=δa,a′​. Zero values of k,d,ek,d,ek,d,e are included: empty products equal 111, empty sums equal 000, and division by zero equals 000. No continuity, homomorphism, or unitarity assumption is imposed on fff; the integral uses the total Bochner integral, which equals 000 when its integrand is not integrable.

QAlgorithms.Papers.Independent.Extend50.P06.sixExpansion

For every natural number ddd, Boolean crossed\mathrm{crossed}crossed, and arbitrary family B0,…,B5B_0,\ldots,B_5B0​,…,B5​ of complex matrices indexed by R×DR\times DR×D, where R={0,…,d−1}{0,1}R=\{0,\ldots,d-1\}^{\{0,1\}}R={0,…,d−1}{0,1} and D={0,…,d−1}D=\{0,\ldots,d-1\}D={0,…,d−1}, this defines a complex matrix SSS on D×R×R×DD\times R\times R\times DD×R×R×D. For x=(a,r,s,b)x=(a,r,s,b)x=(a,r,s,b) and y=(a′,r′,s′,b′)y=(a',r',s',b')y=(a′,r′,s′,b′), its entry is

Sx,y=1d2∑0≤i<6Bi≠0εitr⁡(Bi†Bi){Bi((s,a),(s′,a′)) Bi((r,b),(r′,b′)),crossed=true,Bi((r,a),(r′,a′)) Bi((s,b),(s′,b′)),crossed=false,εi={−1,i=5,1,i≠5.S_{x,y}=\frac1{d^2} \sum_{\substack{0\le i<6\\B_i\ne0}} \frac{\varepsilon_i}{\operatorname{tr}(B_i^\dagger B_i)} \begin{cases} B_i((s,a),(s',a'))\,B_i((r,b),(r',b')), & \mathrm{crossed}=\mathrm{true},\\ B_i((r,a),(r',a'))\,B_i((s,b),(s',b')), & \mathrm{crossed}=\mathrm{false}, \end{cases} \qquad \varepsilon_i=\begin{cases}-1,&i=5,\\1,&i\ne5.\end{cases}Sx,y​=d21​0≤i<6Bi​=0​∑​tr(Bi†​Bi​)εi​​{Bi​((s,a),(s′,a′))Bi​((r,b),(r′,b′)),Bi​((r,a),(r′,a′))Bi​((s,b),(s′,b′)),​crossed=true,crossed=false,​εi​={−1,1,​i=5,i=5.​

A zero BiB_iBi​ contributes zero by an explicit case distinction. All divisions are complex divisions with zero reciprocal equal to zero; d=0d=0d=0 is allowed and yields an empty index set. There are no assumptions that the six matrices form a basis or satisfy any symmetry or normalization.

QAlgorithms.Papers.Independent.Extend50.P06.slotProductChoi

For arbitrary natural numbers k,dk,dk,d, write Qk,d={0,…,d−1}{0,…,k−1}Q_{k,d}=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Qk,d​={0,…,d−1}{0,…,k−1}, the set of functions from the kkk indices to the ddd indices. Given any family CtC_tCt​ of complex matrices indexed by pairs of ddd indices, this definition produces a complex matrix on Qk,d×Qk,dQ_{k,d}\times Q_{k,d}Qk,d​×Qk,d​ with entries

[slotProductChoi⁡(C)](i,o),(j,v)=∏t=0k−1(Ct)(it,ot),(jt,vt).\bigl[\operatorname{slotProductChoi}(C)\bigr]_{(i,o),(j,v)} =\prod_{t=0}^{k-1}(C_t)_{(i_t,o_t),(j_t,v_t)}.[slotProductChoi(C)](i,o),(j,v)​=t=0∏k−1​(Ct​)(it​,ot​),(jt​,vt​)​.

No positivity or normalization is required of the matrices CtC_tCt​. For k=0k=0k=0, Q0,dQ_{0,d}Q0,d​ is a singleton and the empty product is 111, so the resulting matrix has its sole entry equal to 111, including when d=0d=0d=0. For d=0d=0d=0 and k>0k>0k>0, its indexing set is empty.

QAlgorithms.Papers.Independent.Extend50.P06.tailMask

For every natural number kkk, every index t∈{0,…,k−1}t\in\{0,\ldots,k-1\}t∈{0,…,k−1}, and every Boolean bbb supplied as includeOutput⁡\operatorname{includeOutput}includeOutput, this definition returns the mask

(false,(j↦[t<j]),(j↦[t<j]∨(b∧[j=t])),true),\bigl(\mathrm{false},(j\mapsto[t<j]),(j\mapsto[t<j]\lor(b\land[j=t])),\mathrm{true}\bigr),(false,(j↦[t<j]),(j↦[t<j]∨(b∧[j=t])),true),

where brackets denote the Boolean truth value of a proposition. The second component is true precisely at indices strictly greater than ttt; the third is true at those indices and also at ttt if bbb is true. The first component is false and the last is true. Supplying ttt requires k>0k>0k>0, so there is no instance with k=0k=0k=0.

QAlgorithms.Papers.Independent.Extend50.P06.targetChoiFidelity

For every natural number eee, every complex matrix CCC indexed by pairs (a,b)(a,b)(a,b) of eee indices, and every complex e×ee\times ee×e matrix VVV, this definition returns the real number

Re⁡tr⁡(C J(V))e2,J(V)(a,b),(a′,b′)=Vb,a Vb′,a′‾.\frac{\operatorname{Re}\operatorname{tr}(C\,J(V))}{e^2}, \qquad J(V)_{(a,b),(a',b')}=V_{b,a}\,\overline{V_{b',a'}}.e2Retr(CJ(V))​,J(V)(a,b),(a′,b′)​=Vb,a​Vb′,a′​​.

Equivalently, its numerator is

Re⁡∑a,b,a′,b′C(a,b),(a′,b′) Vb′,a′ Vb,a‾.\operatorname{Re}\sum_{a,b,a',b'}C_{(a,b),(a',b')}\, V_{b',a'}\,\overline{V_{b,a}}.Rea,b,a′,b′∑​C(a,b),(a′,b′)​Vb′,a′​Vb,a​​.

No positivity, trace normalization, or unitarity is assumed of CCC or VVV. For e=0e=0e=0, the sum is empty and real division by zero gives value 000.

QAlgorithms.Papers.Independent.Extend50.P06.targetTensorRepresentation

For arbitrary natural numbers k,d,ek,d,ek,d,e, an arbitrary function f:SU(d)→Me(C)f:\mathrm{SU}(d)\to M_e(\mathbb C)f:SU(d)→Me​(C), a Boolean flag anti\mathrm{anti}anti, and U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d), this definition returns a complex matrix indexed by Q×{0,…,e−1}Q\times\{0,\ldots,e-1\}Q×{0,…,e−1}, where Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, with entries

M(i,a),(j,b)=(∏t=0k−1Uit,jt‾){f(U)b,a,anti=true,f(U)a,b,anti=false.M_{(i,a),(j,b)} =\left(\prod_{t=0}^{k-1}\overline{U_{i_t,j_t}}\right) \begin{cases} f(U)_{b,a},&\mathrm{anti}=\mathrm{true},\\ f(U)_{a,b},&\mathrm{anti}=\mathrm{false}. \end{cases}M(i,a),(j,b)​=(t=0∏k−1​Uit​,jt​​​){f(U)b,a​,f(U)a,b​,​anti=true,anti=false.​

There are no continuity, multiplicativity, or unitarity assumptions on fff. All zero parameter values are included; for k=0k=0k=0, the product is 111, and if the indexing type is empty, the result is the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P06.transformationAverage

For arbitrary natural numbers k,d,ek,d,ek,d,e, let HHH consist of a Borel probability measure μ\muμ on SU(d)\mathrm{SU}(d)SU(d) whose pushforward under either U↦VUU\mapsto VUU↦VU or U↦UVU\mapsto UVU↦UV equals μ\muμ for every V∈SU(d)V\in\mathrm{SU}(d)V∈SU(d). Given any function f:SU(d)→Ce×ef:\mathrm{SU}(d)\to\mathbb C^{e\times e}f:SU(d)→Ce×e and any complex matrix SSS on E×Q×Q×EE\times Q\times Q\times EE×Q×Q×E, where E={0,…,e−1}E=\{0,\ldots,e-1\}E={0,…,e−1} and Q={0,…,d−1}{0,…,k−1}Q=\{0,\ldots,d-1\}^{\{0,\ldots,k-1\}}Q={0,…,d−1}{0,…,k−1}, this definition returns

∫SU(d)1e2Re⁡∑a,b,a′,b′∈E∑i,j,o,v∈QS(a,i,o,b),(a′,j,v,b′)(∏t=0k−1Uot,itUvt,jt‾)(f(U))b′,a′(f(U))b,a‾ dμ(U).\int_{\mathrm{SU}(d)} \frac{1}{e^2}\operatorname{Re} \sum_{a,b,a',b'\in E} \sum_{i,j,o,v\in Q} S_{(a,i,o,b),(a',j,v,b')} \left(\prod_{t=0}^{k-1}U_{o_t,i_t}\overline{U_{v_t,j_t}}\right) (f(U))_{b',a'}\overline{(f(U))_{b,a}} \,d\mu(U).∫SU(d)​e21​Rea,b,a′,b′∈E∑​i,j,o,v∈Q∑​S(a,i,o,b),(a′,j,v,b′)​(t=0∏k−1​Uot​,it​​Uvt​,jt​​​)(f(U))b′,a′​(f(U))b,a​​dμ(U).

There are no admissibility assumptions on SSS or regularity assumptions on fff; the integral uses the total Bochner-integral convention, which gives zero when the integrand is not integrable. Empty products equal 111. The result is zero when e=0e=0e=0, with division by zero interpreted as zero, and when d=0d=0d=0 and k>0k>0k>0.

QAlgorithms.Papers.Independent.Extend50.P06.transformationChoi

For every natural number ddd and every complex d×dd\times dd×d matrix UUU, define the vector vvv indexed by {0,…,d−1}2\{0,\ldots,d-1\}^2{0,…,d−1}2 by v(a,b)=Ub,av_{(a,b)}=U_{b,a}v(a,b)​=Ub,a​. The transformation Choi matrix is vv†vv^\daggervv†; explicitly,

C(U)(a,b),(c,h)=Ub,a Uh,c‾.C(U)_{(a,b),(c,h)}=U_{b,a}\,\overline{U_{h,c}}.C(U)(a,b),(c,h)​=Ub,a​Uh,c​​.

There is no assumption that UUU is unitary and no normalization factor. When d=0d=0d=0, this is the matrix on the empty index set.

QAlgorithms.Papers.Independent.Extend50.P06.transposeTarget

For every natural number ddd and every special unitary matrix U∈SU(d)U\in\mathrm{SU}(d)U∈SU(d), this definition returns its transpose, the complex d×dd\times dd×d matrix whose (i,j)(i,j)(i,j)-entry is Uj,iU_{j,i}Uj,i​. The case d=0d=0d=0 is included and returns the empty matrix.

QAlgorithms.Papers.Independent.Extend50.P06.unitarySlots

For arbitrary natural numbers k,dk,dk,d and an arbitrary complex d×dd\times dd×d matrix UUU, this definition produces a matrix on Qk,d×Qk,dQ_{k,d}\times Q_{k,d}Qk,d​×Qk,d​, where Qk,dQ_{k,d}Qk,d​ is the set of functions from the kkk indices to the ddd indices, with entries

[unitarySlots⁡(U)](i,o),(j,v)=∏t=0k−1Uot,it Uvt,jt‾.\bigl[\operatorname{unitarySlots}(U)\bigr]_{(i,o),(j,v)} =\prod_{t=0}^{k-1}U_{o_t,i_t}\,\overline{U_{v_t,j_t}}.[unitarySlots(U)](i,o),(j,v)​=t=0∏k−1​Uot​,it​​Uvt​,jt​​​.

Here each factor comes from the matrix with entries Ub,aUb′,a′‾U_{b,a}\overline{U_{b',a'}}Ub,a​Ub′,a′​​, namely the outer product of the vector (a,b)↦Ub,a(a,b)\mapsto U_{b,a}(a,b)↦Ub,a​ with its conjugate. There is no assumption that UUU is unitary. When k=0k=0k=0, the resulting matrix has one entry, equal to the empty product 111; when d=0d=0d=0 and k>0k>0k>0, it is empty.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me