Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Quantifying the performance of approximate teleportation and quantum error correction via symmetric two-PPT-extendibility

Definition
QAlgorithms_Papers_Independent_Extend50_P02

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

prove2quantum

The objects the formalized statements of Quantifying the performance of approximate teleportation and quantum error correction via symmetric two-PPT-extendibility (arXiv:2207.06931) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • HasFiniteKraus: PDF p.4: completely positive maps, in finite Kraus form.
  • tensorSuperopAction: PDF p.4: tensor product on arbitrary, possibly entangled, operators.
  • IsAliceToBobLOCC: PDF p.4, (7): Alice's instrument and Bob's conditional channels.
  • IsLOCR: PDF p.4, (8), and p.11, (128): local CPTP maps with common randomness.
  • stabilizedHalfTraceDistance: PDF pp.6–7, (43)–(48): half the stabilized trace distance. For channels the input-sized reference and density matrices suffice.
  • worstCaseSquaredFidelity: PDF p.7, (50)–(52): worst-case squared Uhlmann fidelity on normalized reference-assisted inputs.
  • Criterion: PDF pp.7,13: the two error criteria.
  • simulationErrorFor: PDF pp.7,13, (60),(62),(168),(170).
  • infimumSimulationError: PDF pp.7,13: optimize over a specified physical simulation class. In all theorem uses this set is nonempty and its errors belong to [0,1].
  • BiOp: PDF pp.4–5: index order (Alice input,Bob input;Alice output,Bob output).
  • ExtOp: PDF p.5, (14)–(17): two Bob inputs and two Bob outputs.
  • swapExtension: PDF p.5, (14): simultaneous Bob input/output swap.
  • averagedBobExtensionMarginal: PDF p.9, (87), and p.14, (185): maximally-mixed-input marginal. This is a computed partial trace, never an independent matrix variable.
  • transposeBob2: PDF p.5, (33): transpose second Bob input and output.
  • transposeAlice: PDF p.5, (34): transpose Alice's input and output.
  • IsSymmetricBobChannelExtension: PDF p.5, (14)–(17): PSD, TP, covariance, and exact marginal extension.
  • ExtensionNS: PDF p.12, (146): extra non-signaling from Alice to both Bobs, on the extension.
  • HasExtension: PDF pp.5,12: two-extendibility, with optional PPT and extra NS constraints.
  • BobToAliceNS: PDF p.5, (18): Choi form of the Bob-to-Alice non-signaling equation (12).
  • appendResourceAndApply: PDF p.6, (42): append the fixed resource state.
  • teleportBipartite: PDF p.6: trivial Alice output displayed for bipartite notation.
  • teleportSet: PDF pp.7–9: none = one-way LOCC; some false = two-extendible; some true = two-PPT-extendible. Protocols are fixed before the input.
  • teleportError: PDF pp.7–9, (61),(63),(72),(88).
  • wireChoi: PDF p.11, (122): component form of the fully-transposed Choi link.
  • wire: PDF p.11, (122): physical superchannel output reconstructed from its Choi.
  • CorrectionClass: PDF pp.12–14: distinct assisted and unassisted classes.
  • AllowedCorrection: PDF pp.11–14: product = one encoder and one decoder; LOCR allows shared randomness; the extra NS condition is required only when ns=true.
  • correctionError: PDF pp.12–14, (148),(150),(155),(157),(169),(171),(172),(218).
  • nonidentityWeylAverage: PDF p.8, (69): the nonidentity Weyl average, using the full Weyl sum identity d Tr(X) I. Used only when card A >= 2.
  • entFidelity: PDF p.13, (165): normalized Phi, with reference identity explicit.
  • isotropicTeleport: PDF p.8, (68): the identity/nonidentityWeylAverage map controlled by K and L.
  • HasDecoderEffect: PDF p.8, (70): POVM/conditional-decoder representation of K.
  • teleportOneWaySuccess: PDF p.8, (67)–(68): full variational objective including one-way implementability.
  • contractResource: PDF p.9, (81): contract the transposed resource against the marginal. The component formula includes the transpose through the contracted index order.
  • TeleportSDP: PDF p.9, (79)–(86): unreduced teleportation SDP.
  • CorrectionSDP: PDF p.14, (175)–(183): unreduced correction SDP; TP traces H,B1,B2.
  • TwoBobCoefficients: PDF pp.9–10,14–15: the six reduced operator variables on H,J1,J2.
  • realOperatorScale: Real scalar multiplication of an operator; all denominators below are real.
  • twoByTwoPauliOperator: PDF p.9, (91): the two-by-two block test, with the printed i signs.
  • swapReduced: PDF p.9, (93)–(94): swap J1 and J2.
  • transposeH: PDF pp.9–10, (97)–(103): partial transpose H.
  • transposeHJ1: PDF pp.9–10, (104)–(110): partial transpose H,J1.
  • HasMixedSecondBobFactor: PDF p.9, (95), or p.14, (192)–(193): decouple J2 by partial trace.
  • reducedP: PDF p.9, (96), and p.14, (194): P, not a free variable.
  • reducedQ: PDF p.15, (195): Q, which cannot be eliminated for correction.
  • ReducedCommon: PDF pp.9,14: CP and permutation covariance constraints, common to both SDPs.
  • reducedL: PDF p.10, (111)–(113), or p.15, (210)–(212): the constructed L operators.
  • reducedG: PDF p.9, (100)–(103), or p.15, (199)–(202): the constructed G operators.
  • reducedE: PDF p.10, (107)–(110), or p.15, (206)–(209): the constructed E operators.
  • ReducedPPT: PDF pp.9–10, (97)–(106), or pp.14–15, (196)–(205). The plus sign in (104)/(203) follows p.9,p.15 and (C268)-(C269) p.37; the frozen PLAN summary mistakenly places a minus there. The minus in (105)/(204) is retained. At d=2 the minus sector is zero and BOTH d-2 denominator constraints are absent. SOURCE CORRECTION: Appendix C8 p.38 says remove (97); pp.10 and the preceding sector calculation require removing (98). The present definition follows p.10.
  • ReducedNS: PDF p.15, (213)–(217): NS on the extension transported to the reduced variables. At d=2 (214) is removed. The factors 1/2 in (215),(216) are retained.
  • ReducedTeleportFeasible: PDF p.9, (90)–(106), and Remark 5 p.10: teleportation reduced feasible set.
  • ReducedCorrectionFeasible: PDF pp.14–15, (187)–(217), Remarks 11–12: correction reduced feasible set. Dropping extra NS leaves both P and Q marginal constraints in place.
  • reducedObjective: PDF p.9, (90), and p.14, (187): Re Tr[(T^T tensor I) P]/dim J.
  • reducedTeleportBound: PDF p.9, (90), including every constraint of the selected relaxation.
  • reducedCorrectionBound: PDF p.14, (187), including every constraint of the selected relaxation.
  • transposeJ: PDF p.16, (220),(223): transpose only the Bob register.
  • pptTeleportBound: PDF p.16, (220): the PPT-only teleportation program.
  • pptCorrectionBound: PDF pp.16–17, (223): PPT correction program, with exactly one optional NS equality.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_FiniteRegisters
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P32
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P34

/-! Holdsworth–Singh–Wilde, arXiv:2207.06931v4. Computational bases are fixed.
Choi operators are unnormalized and input first. Loewner inequalities are expressed
by `PosSemidef` of differences. Paper-local definitions implement only this paper. The accepted matrix and
Choi primitives are imported from the pinned library; no accepted theorem is assumed. -/

noncomputable section

open scoped Matrix ComplexConjugate ComplexOrder

attribute [local instance] Classical.decEq Classical.propDecidable

namespace QAlgorithms.Papers.Independent.Extend50.P02

open QAlgorithms.Papers.Independent.Information100.P32 (Op)
open QAlgorithms.Papers.Independent.Information100.P34 (choi fromChoi)

variable {A B C D H J : Type*}
variable [Fintype A] [Fintype B] [Fintype C] [Fintype D] [Fintype H] [Fintype J]

/-- PDF p.4: completely positive maps, in finite Kraus form. -/
def HasFiniteKraus (E : Superop A B) : Prop :=
  ∃ m : ℕ, ∃ K : Fin m → Matrix B A ℂ, ∀ X, E X = krausApply K X

/-- PDF p.4: tensor product on arbitrary, possibly entangled, operators. -/
def tensorSuperopAction (E : Superop A C) (F : Superop B D) : Superop (A × B) (C × D) :=
  fun X p q => ∑ a, ∑ a', ∑ b, ∑ b',
    X (a,b) (a',b') * E (Matrix.single a a' 1) p.1 q.1 *
      F (Matrix.single b b' 1) p.2 q.2

/-- PDF p.4, (7): Alice's instrument and Bob's conditional channels. -/
def IsAliceToBobLOCC (P : Superop (A × B) (C × D)) : Prop :=
  ∃ m : ℕ, ∃ E : Fin m → Superop A C, ∃ F : Fin m → Superop B D,
    (∀ y, HasFiniteKraus (E y)) ∧ IsChannel (fun X => ∑ y, E y X) ∧
    (∀ y, IsChannel (F y)) ∧ ∀ X, P X = ∑ y, tensorSuperopAction (E y) (F y) X

/-- PDF p.4, (8), and p.11, (128): local CPTP maps with common randomness. -/
def IsLOCR (P : Superop (A × B) (C × D)) : Prop :=
  ∃ m : ℕ, ∃ p : Fin m → ℝ, ∃ E : Fin m → Superop A C,
    ∃ F : Fin m → Superop B D,
    (∀ y, 0 ≤ p y) ∧ (∑ y, p y) = 1 ∧
    (∀ y, IsChannel (E y) ∧ IsChannel (F y)) ∧
    ∀ X, P X = ∑ y, (p y : ℂ) • tensorSuperopAction (E y) (F y) X

/-- PDF pp.6–7, (43)–(48): half the stabilized trace distance.
For channels the input-sized reference and density matrices suffice. -/
def stabilizedHalfTraceDistance [Nonempty A] (N M : Superop A B) : ℝ :=
  sSup {v | ∃ rho : Op (A × A), IsDensityMatrix rho ∧
    v = traceNorm (idTensorSuperop N rho - idTensorSuperop M rho) / 2}

/-- PDF p.7, (50)–(52): worst-case squared Uhlmann fidelity on normalized
reference-assisted inputs. -/
def worstCaseSquaredFidelity [Nonempty A] (N M : Superop A B) : ℝ :=
  sInf {v | ∃ rho : Op (A × A), IsDensityMatrix rho ∧
    v = rootFidelity (idTensorSuperop N rho) (idTensorSuperop M rho) ^ 2}

/-- PDF pp.7,13: the two error criteria. -/
inductive Criterion where
  | diamond
  | infidelity
  deriving DecidableEq

/-- PDF pp.7,13, (60),(62),(168),(170). -/
def simulationErrorFor [Nonempty A] (c : Criterion) (N M : Superop A B) : ℝ :=
  match c with
  | .diamond => stabilizedHalfTraceDistance N M
  | .infidelity => 1 - worstCaseSquaredFidelity N M

/-- PDF pp.7,13: optimize over a specified physical simulation class.
In all theorem uses this set is nonempty and its errors belong to [0,1]. -/
def infimumSimulationError [Nonempty A] (c : Criterion) (N : Superop A B)
    (S : Set (Superop A B)) : ℝ := sInf {v | ∃ M ∈ S, v = simulationErrorFor c N M}

/-- PDF pp.4–5: index order (Alice input,Bob input;Alice output,Bob output). -/
abbrev BiOp (A B C D : Type*) := Op ((A × B) × (C × D))

/-- PDF p.5, (14)–(17): two Bob inputs and two Bob outputs. -/
abbrev ExtOp (A B C D : Type*) := BiOp A (B × B) C (D × D)

/-- PDF p.5, (14): simultaneous Bob input/output swap. -/
def swapExtension (M : ExtOp A B C D) : ExtOp A B C D :=
  fun p q => M ((p.1.1,(p.1.2.2,p.1.2.1)),(p.2.1,(p.2.2.2,p.2.2.1)))
    ((q.1.1,(q.1.2.2,q.1.2.1)),(q.2.1,(q.2.2.2,q.2.2.1)))

/-- PDF p.9, (87), and p.14, (185): maximally-mixed-input marginal.
This is a computed partial trace, never an independent matrix variable. -/
def averagedBobExtensionMarginal (M : ExtOp A B C D) : BiOp A B C D :=
  fun p q => (Fintype.card B : ℂ)⁻¹ * ∑ b, ∑ d,
    M ((p.1.1,(p.1.2,b)),(p.2.1,(p.2.2,d)))
      ((q.1.1,(q.1.2,b)),(q.2.1,(q.2.2,d)))

/-- PDF p.5, (33): transpose second Bob input and output. -/
def transposeBob2 (M : ExtOp A B C D) : ExtOp A B C D :=
  fun p q => M ((p.1.1,(p.1.2.1,q.1.2.2)),(p.2.1,(p.2.2.1,q.2.2.2)))
    ((q.1.1,(q.1.2.1,p.1.2.2)),(q.2.1,(q.2.2.1,p.2.2.2)))

/-- PDF p.5, (34): transpose Alice's input and output. -/
def transposeAlice (M : ExtOp A B C D) : ExtOp A B C D :=
  fun p q => M ((q.1.1,p.1.2),(q.2.1,p.2.2)) ((p.1.1,q.1.2),(p.2.1,q.2.2))

/-- PDF p.5, (14)–(17): PSD, TP, covariance, and exact marginal extension. -/
def IsSymmetricBobChannelExtension (W : BiOp A B C D) (M : ExtOp A B C D) : Prop :=
  M.PosSemidef ∧ traceRight M = 1 ∧ swapExtension M = M ∧
  ∀ a a' b b' e e' c c' d d',
    (∑ f, M ((a,(b,e)),(c,(d,f))) ((a',(b',e')),(c',(d',f)))) =
      W ((a,b),(c,d)) ((a',b'),(c',d')) * (if e = e' then 1 else 0)

/-- PDF p.12, (146): extra non-signaling from Alice to both Bobs, on the extension. -/
def ExtensionNS (M : ExtOp A B C D) : Prop :=
  ∀ a a' b b' e e' d d' f f',
    (∑ c, M ((a,(b,e)),(c,(d,f))) ((a',(b',e')),(c,(d',f')))) =
      (if a = a' then 1 else 0) * (Fintype.card A : ℂ)⁻¹ *
        ∑ a0, ∑ c, M ((a0,(b,e)),(c,(d,f))) ((a0,(b',e')),(c,(d',f')))

/-- PDF pp.5,12: two-extendibility, with optional PPT and extra NS constraints. -/
def HasExtension (ppt ns : Bool) (W : BiOp A B C D) : Prop :=
  ∃ M : ExtOp A B C D, IsSymmetricBobChannelExtension W M ∧
    (ppt = true → (transposeAlice M).PosSemidef ∧ (transposeBob2 M).PosSemidef) ∧
    (ns = true → ExtensionNS M)

/-- PDF p.5, (18): Choi form of the Bob-to-Alice non-signaling equation (12). -/
def BobToAliceNS (W : BiOp A B C D) : Prop :=
  ∀ a a' b b' c c',
    (∑ d, W ((a,b),(c,d)) ((a',b'),(c',d))) =
      (if b = b' then 1 else 0) * (Fintype.card B : ℂ)⁻¹ *
        ∑ b0, ∑ d, W ((a,b0),(c,d)) ((a',b0),(c',d))

/-- PDF p.6, (42): append the fixed resource state. -/
def appendResourceAndApply (rho : Op (H × J)) (L : Superop ((A × H) × J) B) : Superop A B :=
  fun X => L (fun p q => X p.1.1 q.1.1 * rho (p.1.2,p.2) (q.1.2,q.2))

/-- PDF p.6: trivial Alice output displayed for bipartite notation. -/
def teleportBipartite (L : Superop ((A × H) × J) B) :
    Superop ((A × H) × J) (Unit × B) := fun X p q => L X p.2 q.2

/-- PDF pp.7–9: none = one-way LOCC; some false = two-extendible;
some true = two-PPT-extendible. Protocols are fixed before the input. -/
def teleportSet (kind : Option Bool) (rho : Op (H × J)) : Set (Superop A B) :=
  {S | ∃ L : Superop ((A × H) × J) B, IsChannel L ∧
    (match kind with
    | none => IsAliceToBobLOCC (teleportBipartite L)
    | some ppt => HasExtension ppt false (choi (teleportBipartite L))) ∧
    S = appendResourceAndApply rho L}

/-- PDF pp.7–9, (61),(63),(72),(88). -/
def teleportError [Nonempty A] (c : Criterion) (kind : Option Bool)
    (N : Superop A B) (rho : Op (H × J)) : ℝ := infimumSimulationError c N (teleportSet kind rho)

/-- PDF p.11, (122): component form of the fully-transposed Choi link. -/
def wireChoi (N : Superop H J) (W : BiOp A J H B) : Op (A × B) :=
  fun p q => ∑ h, ∑ h', ∑ j, ∑ j',
    choi N (h,j) (h',j') * W ((p.1,j),(h,p.2)) ((q.1,j'),(h',q.2))

/-- PDF p.11, (122): physical superchannel output reconstructed from its Choi. -/
def wire (N : Superop H J) (P : Superop (A × J) (H × B)) : Superop A B :=
  fromChoi (wireChoi N (choi P))

/-- PDF pp.12–14: distinct assisted and unassisted classes. -/
inductive CorrectionClass where
  | product
  | locr
  | oneWay
  | extendible (ppt ns : Bool)

/-- PDF pp.11–14: product = one encoder and one decoder; LOCR allows
shared randomness; the extra NS condition is required only when ns=true. -/
def AllowedCorrection (kind : CorrectionClass) (P : Superop (A × J) (H × B)) : Prop :=
  IsChannel P ∧ match kind with
  | .product => ∃ E : Superop A H, ∃ F : Superop J B,
      IsChannel E ∧ IsChannel F ∧ P = tensorSuperopAction E F
  | .locr => IsLOCR P
  | .oneWay => IsAliceToBobLOCC P
  | .extendible ppt ns => HasExtension ppt ns (choi P)

/-- PDF pp.12–14, (148),(150),(155),(157),(169),(171),(172),(218). -/
def correctionError [Nonempty A] (c : Criterion) (kind : CorrectionClass)
    (O : Superop A B) (N : Superop H J) : ℝ :=
  infimumSimulationError c O {S | ∃ P, AllowedCorrection kind P ∧ S = wire N P}

/-- PDF p.8, (69): the nonidentity Weyl average, using the full Weyl
sum identity d Tr(X) I. Used only when card A >= 2. -/
def nonidentityWeylAverage (X : Op A) : Op A :=
  ((Fintype.card A : ℂ)^2 - 1)⁻¹ • ((Fintype.card A : ℂ) • (X.trace • 1) - X)

/-- PDF p.13, (165): normalized Phi, with reference identity explicit. -/
def entFidelity [Nonempty A] (S : Superop A A) : ℝ :=
  effectProb (pureDensity (finiteMaxEntangled A))
    (idTensorSuperop S (pureDensity (finiteMaxEntangled A)))

/-- PDF p.8, (68): the identity/nonidentityWeylAverage map controlled by K and L. -/
def isotropicTeleport (K L : Op (H × J)) : Superop ((A × H) × J) A :=
  fun X =>
    (show Op A from fun a a' => ∑ h, ∑ j, ∑ h', ∑ j',
      K (h,j) (h',j') * X ((a,h'),j') ((a',h),j)) +
    nonidentityWeylAverage (fun a a' => ∑ h, ∑ j, ∑ h', ∑ j',
      L (h,j) (h',j') * X ((a,h'),j') ((a',h),j))

/-- PDF p.8, (70): POVM/conditional-decoder representation of K. -/
def HasDecoderEffect (K : Op (H × J)) (A : Type*) [Fintype A] : Prop :=
  ∃ m : ℕ, ∃ V : Fin m → Op (A × H), ∃ F : Fin m → Superop J A,
    (∀ y, (V y).PosSemidef) ∧ (∑ y, V y) = 1 ∧ (∀ y, IsChannel (F y)) ∧
    K = fun p q => (Fintype.card A : ℂ)⁻¹ ^ 2 * ∑ y, ∑ b, ∑ b',
      V y (b,p.1) (b',q.1) * choi (F y) (p.2,b) (q.2,b')

/-- PDF p.8, (67)–(68): full variational objective including one-way implementability. -/
def teleportOneWaySuccess (rho : Op (H × J)) (A : Type*) [Fintype A] : ℝ :=
  sSup {v | ∃ K L : Op (H × J), K.PosSemidef ∧ L.PosSemidef ∧ K + L = 1 ∧
    IsAliceToBobLOCC (teleportBipartite (isotropicTeleport (A := A) K L)) ∧ v = effectProb K rho}

/-- PDF p.9, (81): contract the transposed resource against the marginal.
The component formula includes the transpose through the contracted index order. -/
def contractResource (T : Op (H × J)) (W : BiOp (A × H) J Unit B) : Op (A × B) :=
  fun p q => ∑ h, ∑ h', ∑ j, ∑ j', T (h,j) (h',j') *
    W (((p.1,h),j),((),p.2)) (((q.1,h'),j'),((),q.2))

/-- PDF p.9, (79)–(86): unreduced teleportation SDP. -/
def TeleportSDP (N : Superop A B) (rho : Op (H × J)) (mu : ℝ)
    (Z : Op (A × B)) (M : ExtOp (A × H) J Unit B) : Prop :=
  0 ≤ mu ∧ Z.PosSemidef ∧ (((mu : ℂ) • (1 : Op A)) - traceRight Z).PosSemidef ∧
  (Z - choi N + contractResource rho (averagedBobExtensionMarginal M)).PosSemidef ∧
  IsSymmetricBobChannelExtension (averagedBobExtensionMarginal M) M ∧
  (transposeAlice M).PosSemidef ∧ (transposeBob2 M).PosSemidef

/-- PDF p.14, (175)–(183): unreduced correction SDP; TP traces H,B1,B2. -/
def CorrectionSDP (O : Superop A B) (N : Superop H J) (mu : ℝ)
    (Z : Op (A × B)) (M : ExtOp A J H B) : Prop :=
  0 ≤ mu ∧ Z.PosSemidef ∧ (((mu : ℂ) • (1 : Op A)) - traceRight Z).PosSemidef ∧
  (Z - choi O + wireChoi N (averagedBobExtensionMarginal M)).PosSemidef ∧
  IsSymmetricBobChannelExtension (averagedBobExtensionMarginal M) M ∧
  (transposeAlice M).PosSemidef ∧ (transposeBob2 M).PosSemidef ∧ ExtensionNS M

/-- PDF pp.9–10,14–15: the six reduced operator variables on H,J1,J2. -/
structure TwoBobCoefficients (H J : Type*) where
  plus : Op (H × (J × J))
  minus : Op (H × (J × J))
  zero : Op (H × (J × J))
  one : Op (H × (J × J))
  two : Op (H × (J × J))
  three : Op (H × (J × J))

/-- Real scalar multiplication of an operator; all denominators below are real. -/
def realOperatorScale {I : Type*} (r : ℝ) (X : Op I) : Op I := (r : ℂ) • X

/-- PDF p.9, (91): the two-by-two block test, with the printed i signs. -/
def twoByTwoPauliOperator {I : Type*} (z x y w : Op I) : Op (I ⊕ I) :=
  Matrix.fromBlocks (z + w) (x - Complex.I • y) (x + Complex.I • y) (z - w)

/-- PDF p.9, (93)–(94): swap J1 and J2. -/
def swapReduced (X : Op (H × (J × J))) : Op (H × (J × J)) :=
  fun p q => X (p.1,(p.2.2,p.2.1)) (q.1,(q.2.2,q.2.1))

/-- PDF pp.9–10, (97)–(103): partial transpose H. -/
def transposeH (X : Op (H × (J × J))) : Op (H × (J × J)) :=
  fun p q => X (q.1,p.2) (p.1,q.2)

/-- PDF pp.9–10, (104)–(110): partial transpose H,J1. -/
def transposeHJ1 (X : Op (H × (J × J))) : Op (H × (J × J)) :=
  fun p q => X (q.1,(q.2.1,p.2.2)) (p.1,(p.2.1,q.2.2))

/-- PDF p.9, (95), or p.14, (192)–(193): decouple J2 by partial trace. -/
def HasMixedSecondBobFactor (X : Op (H × (J × J))) : Prop :=
  ∀ h h' j j' k k', X (h,(j,k)) (h',(j',k')) =
    (Fintype.card J : ℂ)⁻¹ * (∑ t, X (h,(j,t)) (h',(j',t))) *
      (if k = k' then 1 else 0)

/-- PDF p.9, (96), and p.14, (194): P, not a free variable. -/
def reducedP (d : ℕ) (M : TwoBobCoefficients H J) : Op (H × (J × J)) :=
  realOperatorScale (1 / (2 * (d : ℝ)))
    (realOperatorScale d M.zero + M.one + realOperatorScale (Real.sqrt ((d : ℝ)^2 - 1)) M.two)

/-- PDF p.15, (195): Q, which cannot be eliminated for correction. -/
def reducedQ (d : ℕ) (M : TwoBobCoefficients H J) : Op (H × (J × J)) :=
  realOperatorScale (1 / (2 * (d : ℝ)))
    (realOperatorScale (2*d) (M.plus + M.minus) + realOperatorScale d M.zero - M.one -
      realOperatorScale (Real.sqrt ((d : ℝ)^2 - 1)) M.two)

/-- PDF pp.9,14: CP and permutation covariance constraints, common to both SDPs. -/
def ReducedCommon (M : TwoBobCoefficients H J) : Prop :=
  M.plus.PosSemidef ∧ M.minus.PosSemidef ∧ M.zero.PosSemidef ∧
  (twoByTwoPauliOperator M.zero M.one M.two M.three).PosSemidef ∧
  swapReduced M.plus = M.plus ∧ swapReduced M.minus = M.minus ∧
  swapReduced M.zero = M.zero ∧ swapReduced M.one = M.one ∧
  swapReduced M.two = -M.two ∧ swapReduced M.three = -M.three

/-- PDF p.10, (111)–(113), or p.15, (210)–(212): the constructed L operators. -/
def reducedL (d : ℕ) (M : TwoBobCoefficients H J) : Fin 3 → Op (H × (J × J)) :=
  ![realOperatorScale ((d : ℝ)^2 - 2) M.zero + realOperatorScale d M.one +
      realOperatorScale ((d : ℝ) * Real.sqrt ((d : ℝ)^2 - 1)) M.two,
    realOperatorScale d M.zero + realOperatorScale (2*(d : ℝ)^2 - 3) M.one -
      realOperatorScale (Real.sqrt ((d : ℝ)^2 - 1)) M.two,
    M.one - realOperatorScale d M.zero - realOperatorScale (Real.sqrt ((d : ℝ)^2 - 1)) M.two]

/-- PDF p.9, (100)–(103), or p.15, (199)–(202): the constructed G operators. -/
def reducedG (d : ℕ) (M : TwoBobCoefficients H J) : Fin 4 → Op (H × (J × J)) :=
  ![transposeH (M.plus + M.minus + realOperatorScale (1/2) (M.zero - realOperatorScale d M.one)),
    transposeH (M.plus - M.minus + realOperatorScale (1/2) (M.one - realOperatorScale d M.zero)),
    realOperatorScale (Real.sqrt (3*((d : ℝ)^2 - 1))/2) (transposeH M.two),
    realOperatorScale (Real.sqrt (3*((d : ℝ)^2 - 1))/2) (transposeH M.three)]

/-- PDF p.10, (107)–(110), or p.15, (206)–(209): the constructed E operators. -/
def reducedE (d : ℕ) (M : TwoBobCoefficients H J) : Fin 4 → Op (H × (J × J)) :=
  let L := reducedL d M
  ![realOperatorScale (1/((d : ℝ)^2 - 1))
      (transposeHJ1 (realOperatorScale d (M.plus - M.minus) + realOperatorScale (1/2) (L 0))),
    realOperatorScale (1/((d : ℝ)^2 - 1))
      (transposeHJ1 (-M.plus + M.minus + realOperatorScale (1/2) (L 1))),
    realOperatorScale (1/Real.sqrt ((d : ℝ)^2 - 1))
      (transposeHJ1 (M.plus - M.minus + realOperatorScale (1/2) (L 2))),
    transposeHJ1 M.three]

/-- PDF pp.9–10, (97)–(106), or pp.14–15, (196)–(205).
The plus sign in (104)/(203) follows p.9,p.15 and (C268)-(C269) p.37;
the frozen PLAN summary mistakenly places a minus there. The minus in (105)/(204) is retained.
At d=2 the minus sector is zero and BOTH d-2 denominator constraints are absent.
SOURCE CORRECTION: Appendix C8 p.38 says remove (97); pp.10 and the preceding
sector calculation require removing (98). The present definition follows p.10. -/
def ReducedPPT (d : ℕ) (M : TwoBobCoefficients H J) : Prop :=
  (transposeH (realOperatorScale (2/((d : ℝ)+2)) M.plus + M.zero + M.one)).PosSemidef ∧
  (if d = 2 then M.minus = 0 else
    (transposeH (realOperatorScale (2/((d : ℝ)-2)) M.minus + M.one - M.zero)).PosSemidef ∧
    (transposeHJ1 (M.plus + realOperatorScale ((d : ℝ)/((d : ℝ)-2)) M.minus -
      realOperatorScale (1/2) (realOperatorScale d M.zero - M.one -
        realOperatorScale (Real.sqrt ((d : ℝ)^2-1)) M.two))).PosSemidef) ∧
  (twoByTwoPauliOperator (reducedG d M 0) (reducedG d M 1)
    (reducedG d M 2) (reducedG d M 3)).PosSemidef ∧
  (transposeHJ1 (realOperatorScale ((d : ℝ)/((d : ℝ)+2)) M.plus + M.minus +
    realOperatorScale (1/2) (realOperatorScale d M.zero - M.one -
      realOperatorScale (Real.sqrt ((d : ℝ)^2-1)) M.two))).PosSemidef ∧
  (twoByTwoPauliOperator (reducedE d M 0) (reducedE d M 1)
    (reducedE d M 2) (reducedE d M 3)).PosSemidef

/-- PDF p.15, (213)–(217): NS on the extension transported to the reduced variables.
At d=2 (214) is removed. The factors 1/2 in (215),(216) are retained. -/
def ReducedNS (d : ℕ) (M : TwoBobCoefficients H J) : Prop :=
  realOperatorScale (1/(((d : ℝ)+2)*((d : ℝ)-1))) (traceLeft (realOperatorScale 2 M.plus)) =
    realOperatorScale (1/((d : ℝ)*((d : ℝ)+1))) (traceLeft (realOperatorScale 2 M.plus + M.zero + M.one)) ∧
  (d ≠ 2 →
    realOperatorScale (1/(((d : ℝ)-2)*((d : ℝ)+1))) (traceLeft (realOperatorScale 2 M.minus)) =
    realOperatorScale (1/((d : ℝ)*((d : ℝ)-1))) (traceLeft (realOperatorScale 2 M.minus + M.zero - M.one))) ∧
  realOperatorScale (1/2) (traceLeft M.zero) =
    realOperatorScale (1/((d : ℝ)*((d : ℝ)^2-1)))
      (realOperatorScale d (1 : Op (J × J)) + traceLeft (M.minus - M.plus - M.one)) ∧
  realOperatorScale (1/2) (traceLeft M.one) =
    realOperatorScale (1/((d : ℝ)*((d : ℝ)^2-1)))
      (-(1 : Op (J × J)) + realOperatorScale d (traceLeft (M.plus - M.minus + M.one))) ∧
  traceLeft M.two = 0 ∧ traceLeft M.three = 0

/-- PDF p.9, (90)–(106), and Remark 5 p.10: teleportation reduced feasible set. -/
def ReducedTeleportFeasible (ppt : Bool) (d : ℕ) (M : TwoBobCoefficients H J) : Prop :=
  ReducedCommon M ∧ M.plus + M.minus + M.zero = 1 ∧
  HasMixedSecondBobFactor (reducedP d M) ∧ (d = 2 → M.minus = 0) ∧
  (ppt = true → ReducedPPT d M)

/-- PDF pp.14–15, (187)–(217), Remarks 11–12: correction reduced feasible set.
Dropping extra NS leaves both P and Q marginal constraints in place. -/
def ReducedCorrectionFeasible (ppt ns : Bool) (d : ℕ) (M : TwoBobCoefficients H J) : Prop :=
  ReducedCommon M ∧ traceLeft (M.plus + M.minus + M.zero) = 1 ∧
  HasMixedSecondBobFactor (reducedP d M) ∧ HasMixedSecondBobFactor (reducedQ d M) ∧
  (d = 2 → M.minus = 0) ∧ (ppt = true → ReducedPPT d M) ∧
  (ns = true → ReducedNS d M)

/-- PDF p.9, (90), and p.14, (187): Re Tr[(T^T tensor I) P]/dim J. -/
def reducedObjective (T : Op (H × J)) (P : Op (H × (J × J))) : ℝ :=
  (∑ h, ∑ h', ∑ j, ∑ j', ∑ k,
    T (h,j) (h',j') * P (h,(j,k)) (h',(j',k))).re / Fintype.card J

/-- PDF p.9, (90), including every constraint of the selected relaxation. -/
def reducedTeleportBound (ppt : Bool) (d : ℕ) (rho : Op (H × J)) : ℝ :=
  1 - sSup {v | ∃ M : TwoBobCoefficients H J, ReducedTeleportFeasible ppt d M ∧
    v = reducedObjective rho (reducedP d M)}

/-- PDF p.14, (187), including every constraint of the selected relaxation. -/
def reducedCorrectionBound (ppt ns : Bool) (d : ℕ) (N : Superop H J) : ℝ :=
  1 - sSup {v | ∃ M : TwoBobCoefficients H J, ReducedCorrectionFeasible ppt ns d M ∧
    v = reducedObjective (choi N) (reducedP d M)}

/-- PDF p.16, (220),(223): transpose only the Bob register. -/
def transposeJ (X : Op (H × J)) : Op (H × J) :=
  fun p q => X (p.1,q.2) (q.1,p.2)

/-- PDF p.16, (220): the PPT-only teleportation program. -/
def pptTeleportBound (d : ℕ) (rho : Op (H × J)) : ℝ :=
  1 - sSup {v | ∃ K : Op (H × J), K.PosSemidef ∧ (1-K).PosSemidef ∧
    (1 + realOperatorScale d (transposeJ K)).PosSemidef ∧
    (1 - realOperatorScale d (transposeJ K)).PosSemidef ∧ v = effectProb K rho}

/-- PDF pp.16–17, (223): PPT correction program, with exactly one optional NS equality. -/
def pptCorrectionBound (ns : Bool) (d : ℕ) (N : Superop H J) : ℝ :=
  1 - sSup {v | ∃ K : Op (H × J), ∃ sigma : Op H,
    K.PosSemidef ∧ IsDensityMatrix sigma ∧
    (Matrix.kronecker sigma (1 : Op J) - K).PosSemidef ∧
    (ns = true → realOperatorScale ((d : ℝ)^2) (traceLeft K) = 1) ∧
    (Matrix.kronecker sigma (1 : Op J) + realOperatorScale d (transposeJ K)).PosSemidef ∧
    (Matrix.kronecker sigma (1 : Op J) - realOperatorScale d (transposeJ K)).PosSemidef ∧
    v = effectProb K (choi N)}

/-! Sanity examples for the local definitions. These are normalization and register
checks, not proofs of the paper's results. -/

example : choi (id : Superop Unit Unit) ((),()) ((),()) = 1 := by
  simp [choi, Matrix.single]

example : averagedBobExtensionMarginal (1 : ExtOp Unit Unit Unit Unit) = 1 := by
  ext p q
  simp [averagedBobExtensionMarginal, Matrix.one_apply]
  exact Subsingleton.elim _ _

example (M : ExtOp A B C D) : transposeAlice (transposeAlice M) = M := by
  ext p q
  rfl

example (M : ExtOp A B C D) : transposeBob2 (transposeBob2 M) = M := by
  ext p q
  rfl

example (M : ExtOp A B C D) : swapExtension (swapExtension M) = M := by
  ext p q
  rfl

example (X : Op (H × (J × J))) : transposeHJ1 (transposeHJ1 X) = X := by
  ext p q
  rfl

example (X : Op (H × J)) : transposeJ (transposeJ X) = X := by
  ext p q
  rfl

example : nonidentityWeylAverage (1 : Op (Fin 2)) = (1 : Op (Fin 2)) := by
  ext i j
  simp [nonidentityWeylAverage, Matrix.one_apply, Matrix.trace] <;> split_ifs <;> norm_num

example : entFidelity (id : Superop Unit Unit) = 1 := by
  simp [entFidelity, finiteMaxEntangled, effectProb, pureDensity, idTensorSuperop,
    Matrix.mul_apply, Matrix.trace]

end QAlgorithms.Papers.Independent.Extend50.P02
Source
Quantifying the performance of approximate teleportation and quantum error correction via symmetric two-PPT-extendibility, arXiv:2207.06931v4, https://arxiv.org/abs/2207.06931v4
Read-back

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

QAlgorithms.Papers.Independent.Extend50.P02.AllowedCorrection

For finite register types A,B,H,JA,B,H,JA,B,H,J, with decidable equality, a correction class kind\mathrm{kind}kind, and a map PPP from matrices on A×JA\times JA×J to matrices on H×BH\times BH×B, this predicate first requires PPP to be a channel: there must be finitely many matrices KtK_tKt​ such that P(X)=∑tKtXKt†P(X)=\sum_tK_tXK_t^\daggerP(X)=∑t​Kt​XKt†​ for every matrix XXX, with ∑tKt†Kt=I\sum_tK_t^\dagger K_t=I∑t​Kt†​Kt​=I. It additionally requires the following condition selected by kind\mathrm{kind}kind. For product\mathrm{product}product, there exist channels E:A→HE:A\to HE:A→H and F:J→BF:J\to BF:J→B such that P=T(E,F)P=\mathcal T(E,F)P=T(E,F), where

T(E,F)(X)(h,b),(h′,b′)=∑a,a′,j,j′X(a,j),(a′,j′) E(Ea,a′)h,h′F(Ej,j′)b,b′.\mathcal T(E,F)(X)_{(h,b),(h',b')} = \sum_{a,a',j,j'}X_{(a,j),(a',j')}\, E(E_{a,a'})_{h,h'}F(E_{j,j'})_{b,b'}.T(E,F)(X)(h,b),(h′,b′)​=a,a′,j,j′∑​X(a,j),(a′,j′)​E(Ea,a′​)h,h′​F(Ej,j′​)b,b′​.

For locr\mathrm{locr}locr, there exist m∈Nm\in\mathbb Nm∈N, nonnegative real numbers pyp_ypy​ summing to 111, and channels Ey:A→HE_y:A\to HEy​:A→H, Fy:J→BF_y:J\to BFy​:J→B, indexed by 0≤y<m0\le y<m0≤y<m, such that P(X)=∑ypyT(Ey,Fy)(X)P(X)=\sum_y p_y\mathcal T(E_y,F_y)(X)P(X)=∑y​py​T(Ey​,Fy​)(X) for every XXX. For oneWay\mathrm{oneWay}oneWay, there exist m∈Nm\in\mathbb Nm∈N, maps Ey:A→HE_y:A\to HEy​:A→H each admitting a finite Kraus representation without an individual normalization requirement, and channels Fy:J→BF_y:J\to BFy​:J→B, such that ∑yEy\sum_yE_y∑y​Ey​ is a channel and P(X)=∑yT(Ey,Fy)(X)P(X)=\sum_y\mathcal T(E_y,F_y)(X)P(X)=∑y​T(Ey​,Fy​)(X) for every XXX. For extendible(ppt,ns)\mathrm{extendible}(\mathrm{ppt},\mathrm{ns})extendible(ppt,ns), put

W(a,j),(h,b); (a′,j′),(h′,b′)=P(E(a,j),(a′,j′))(h,b),(h′,b′).W_{(a,j),(h,b);\,(a',j'),(h',b')} =P(E_{(a,j),(a',j')})_{(h,b),(h',b')}.W(a,j),(h,b);(a′,j′),(h′,b′)​=P(E(a,j),(a′,j′)​)(h,b),(h′,b′)​.

There must exist a matrix MMM on (A×(J×J))×(H×(B×B))(A\times(J\times J))\times(H\times(B\times B))(A×(J×J))×(H×(B×B)) that is positive semidefinite, whose partial trace over H,B1,B2H,B_1,B_2H,B1​,B2​ is IAJ1J2I_{A J_1J_2}IAJ1​J2​​, that is unchanged by simultaneously exchanging J1,J2J_1,J_2J1​,J2​ and B1,B2B_1,B_2B1​,B2​, and that satisfies Tr⁡B2M=W⊗IJ2\operatorname{Tr}_{B_2}M=W\otimes I_{J_2}TrB2​​M=W⊗IJ2​​, with factors placed in their corresponding register positions. If ppt\mathrm{ppt}ppt is true, the partial transposes of MMM on A,HA,HA,H together and on J2,B2J_2,B_2J2​,B2​ together must both be positive semidefinite. If ns\mathrm{ns}ns is true, it must also satisfy

Tr⁡HM=IA∣A∣⊗Tr⁡A,HM,\operatorname{Tr}_{H}M =\frac{I_A}{|A|}\otimes\operatorname{Tr}_{A,H}M,TrH​M=∣A∣IA​​⊗TrA,H​M,

again with factors in their corresponding positions. Partial traces here sum over matching row and column indices of the traced registers. Finite Kraus families may have size zero; register types may be empty, and scalar inverses of zero are defined to be zero.

QAlgorithms.Papers.Independent.Extend50.P02.BiOp

For any four types A,B,C,DA,B,C,DA,B,C,D, this is an abbreviation for the type of complex matrices whose rows and columns are both indexed by (A×B)×(C×D)(A\times B)\times(C\times D)(A×B)×(C×D); equivalently, its elements assign a complex entry to each ordered pair of indices ((a,b),(c,d))((a,b),(c,d))((a,b),(c,d)). No finiteness or nonemptiness assumption is imposed.

QAlgorithms.Papers.Independent.Extend50.P02.BobToAliceNS

For index types A,B,C,DA,B,C,DA,B,C,D, with BBB and DDD finite and equality on BBB decidable, let WWW be any complex matrix indexed by (A×B)×(C×D)(A\times B)\times(C\times D)(A×B)×(C×D). The predicate holds exactly when, for every a,a′∈Aa,a'\in Aa,a′∈A, b,b′∈Bb,b'\in Bb,b′∈B, and c,c′∈Cc,c'\in Cc,c′∈C,

∑d∈DW((a,b),(c,d)), ((a′,b′),(c′,d))=δb,b′∣B∣−1∑b0∈B∑d∈DW((a,b0),(c,d)), ((a′,b0),(c′,d)).\sum_{d\in D} W_{((a,b),(c,d)),\,((a',b'),(c',d))} = \delta_{b,b'}|B|^{-1} \sum_{b_0\in B}\sum_{d\in D} W_{((a,b_0),(c,d)),\,((a',b_0),(c',d))}.d∈D∑​W((a,b),(c,d)),((a′,b′),(c′,d))​=δb,b′​∣B∣−1b0​∈B∑​d∈D∑​W((a,b0​),(c,d)),((a′,b0​),(c′,d))​.

Here the inverse is in C\mathbb CC, and δb,b′\delta_{b,b'}δb,b′​ is 111 for equal indices and 000 otherwise. The predicate itself imposes no positivity or normalization. Empty types are allowed, with empty sums zero, 0−1=00^{-1}=00−1=0, and universal conditions over empty index ranges vacuous.

QAlgorithms.Papers.Independent.Extend50.P02.CorrectionClass

This defines a type with three distinct parameter-free choices, called product\mathrm{product}product, locr\mathrm{locr}locr, and oneWay\mathrm{oneWay}oneWay, together with choices extendible(ppt,ns)\mathrm{extendible}(\mathrm{ppt},\mathrm{ns})extendible(ppt,ns) indexed by two independent Boolean values ppt\mathrm{ppt}ppt and ns\mathrm{ns}ns. Thus the type has seven distinct values. The declaration itself imposes no mathematical conditions on any choice.

QAlgorithms.Papers.Independent.Extend50.P02.CorrectionSDP

For finite register types A,B,H,JA,B,H,JA,B,H,J, with decidable equality, arbitrary maps O:A→BO:A\to BO:A→B and N:H→JN:H\to JN:H→J between their complex matrix spaces, a real number μ\muμ, a complex matrix ZZZ on A×BA\times BA×B, and a complex matrix MMM on (A×(J×J))×(H×(B×B))(A\times(J\times J))\times(H\times(B\times B))(A×(J×J))×(H×(B×B)), this predicate requires the following conjunction. Label repeated registers by J1,J2,B1,B2J_1,J_2,B_1,B_2J1​,J2​,B1​,B2​, and define

W(a,j),(h,b); (a′,j′),(h′,b′)=1∣J∣∑e∈J∑f∈BM(a,(j,e)),(h,(b,f)); (a′,(j′,e)),(h′,(b′,f))W_{(a,j),(h,b);\,(a',j'),(h',b')} = \frac1{|J|}\sum_{e\in J}\sum_{f\in B} M_{(a,(j,e)),(h,(b,f));\,(a',(j',e)),(h',(b',f))}W(a,j),(h,b);(a′,j′),(h′,b′)​=∣J∣1​e∈J∑​f∈B∑​M(a,(j,e)),(h,(b,f));(a′,(j′,e)),(h′,(b′,f))​

and

Q(a,b),(a′,b′)=∑h,h′,j,j′N(Eh,h′)j,j′ W(a,j),(h,b); (a′,j′),(h′,b′).Q_{(a,b),(a',b')} = \sum_{h,h',j,j'} N(E_{h,h'})_{j,j'}\, W_{(a,j),(h,b);\,(a',j'),(h',b')}.Q(a,b),(a′,b′)​=h,h′,j,j′∑​N(Eh,h′​)j,j′​W(a,j),(h,b);(a′,j′),(h′,b′)​.

Writing Ch⁡(O)(a,b),(a′,b′)=O(Ea,a′)b,b′\operatorname{Ch}(O)_{(a,b),(a',b')}=O(E_{a,a'})_{b,b'}Ch(O)(a,b),(a′,b′)​=O(Ea,a′​)b,b′​, the scalar and matrix inequalities are

μ≥0,Z⪰0,μIA−Tr⁡BZ⪰0,Z−Ch⁡(O)+Q⪰0.\mu\ge0,\qquad Z\succeq0,\qquad \mu I_A-\operatorname{Tr}_BZ\succeq0,\qquad Z-\operatorname{Ch}(O)+Q\succeq0.μ≥0,Z⪰0,μIA​−TrB​Z⪰0,Z−Ch(O)+Q⪰0.

Furthermore, M⪰0M\succeq0M⪰0, Tr⁡H,B1,B2M=IAJ1J2\operatorname{Tr}_{H,B_1,B_2}M=I_{A J_1J_2}TrH,B1​,B2​​M=IAJ1​J2​​, MMM is invariant under simultaneously exchanging J1,J2J_1,J_2J1​,J2​ and B1,B2B_1,B_2B1​,B2​, and Tr⁡B2M=W⊗IJ2\operatorname{Tr}_{B_2}M=W\otimes I_{J_2}TrB2​​M=W⊗IJ2​​, with factors in their corresponding register positions. Both the partial transpose on A,HA,HA,H together and that on J2,B2J_2,B_2J2​,B2​ together must be positive semidefinite. Finally, the exact identity

Tr⁡HM=IA∣A∣⊗Tr⁡A,HM\operatorname{Tr}_HM = \frac{I_A}{|A|}\otimes\operatorname{Tr}_{A,H}MTrH​M=∣A∣IA​​⊗TrA,H​M

must hold, with the right-hand side reordered to the same register positions as the left-hand side. Partial traces mean sums over matching row and column indices. No channel assumptions on O,NO,NO,N are included. Register types may be empty, and the displayed scalar inverses equal zero when their denominators are zero.

QAlgorithms.Papers.Independent.Extend50.P02.Criterion

This defines a type with exactly two distinct values, named diamond\mathrm{diamond}diamond and infidelity\mathrm{infidelity}infidelity, and equips it with decidable equality.

QAlgorithms.Papers.Independent.Extend50.P02.ExtOp

For any four types A,B,C,DA,B,C,DA,B,C,D, this is an abbreviation for the type of complex matrices whose rows and columns are both indexed by

(A×(B×B))×(C×(D×D)).\bigl(A\times(B\times B)\bigr)\times\bigl(C\times(D\times D)\bigr).(A×(B×B))×(C×(D×D)).

Thus each row or column specifies one AAA-index, two BBB-indices, one CCC-index, and two DDD-indices. No finiteness or nonemptiness assumption is imposed.

QAlgorithms.Papers.Independent.Extend50.P02.ExtensionNS

For index types A,B,C,DA,B,C,DA,B,C,D, with AAA and CCC finite and equality on AAA decidable, let MMM be any complex matrix indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)). The predicate holds exactly when, for every a,a′∈Aa,a'\in Aa,a′∈A, b,b′,e,e′∈Bb,b',e,e'\in Bb,b′,e,e′∈B, and d,d′,f,f′∈Dd,d',f,f'\in Dd,d′,f,f′∈D,

∑c∈CM((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c,(d′,f′)))=δa,a′∣A∣−1∑a0∈A∑c∈CM((a0,(b,e)),(c,(d,f))), ((a0,(b′,e′)),(c,(d′,f′))).\sum_{c\in C} M_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c,(d',f')))} = \delta_{a,a'}|A|^{-1} \sum_{a_0\in A}\sum_{c\in C} M_{((a_0,(b,e)),(c,(d,f))),\,((a_0,(b',e')),(c,(d',f')))}.c∈C∑​M((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c,(d′,f′)))​=δa,a′​∣A∣−1a0​∈A∑​c∈C∑​M((a0​,(b,e)),(c,(d,f))),((a0​,(b′,e′)),(c,(d′,f′)))​.

The inverse of ∣A∣|A|∣A∣ is taken in C\mathbb CC, and δa,a′\delta_{a,a'}δa,a′​ is 111 if a=a′a=a'a=a′ and 000 otherwise. No positivity, trace normalization, or symmetry is required. Empty types are allowed; empty sums are zero, 0−1=00^{-1}=00−1=0, and universally quantified conditions with no possible indices are vacuous.

QAlgorithms.Papers.Independent.Extend50.P02.HasDecoderEffect

For finite register types H,JH,JH,J, with decidable equality as required, a complex matrix KKK on H×JH\times JH×J, and any finite type AAA, this predicate asserts the existence of a natural number mmm, matrices VyV_yVy​ on A×HA\times HA×H, and maps FyF_yFy​ from matrices on JJJ to matrices on AAA, indexed by 0≤y<m0\le y<m0≤y<m, such that every VyV_yVy​ is positive semidefinite, ∑yVy=IA×H\sum_yV_y=I_{A\times H}∑y​Vy​=IA×H​, and every FyF_yFy​ is a channel, meaning that it has a finite representation Fy(X)=∑tKy,tXKy,t†F_y(X)=\sum_tK_{y,t}XK_{y,t}^\daggerFy​(X)=∑t​Ky,t​XKy,t†​ with ∑tKy,t†Ky,t=IJ\sum_tK_{y,t}^\dagger K_{y,t}=I_J∑t​Ky,t†​Ky,t​=IJ​. These data must satisfy, for all h,h′∈Hh,h'\in Hh,h′∈H and j,j′∈Jj,j'\in Jj,j′∈J,

K(h,j),(h′,j′)=∣A∣−2∑y=0m−1∑b,b′∈A(Vy)(b,h),(b′,h′) Fy(Ej,j′)b,b′.K_{(h,j),(h',j')} = |A|^{-2}\sum_{y=0}^{m-1}\sum_{b,b'\in A} (V_y)_{(b,h),(b',h')}\, F_y(E_{j,j'})_{b,b'}.K(h,j),(h′,j′)​=∣A∣−2y=0∑m−1​b,b′∈A∑​(Vy​)(b,h),(b′,h′)​Fy​(Ej,j′​)b,b′​.

The scalar ∣A∣−2|A|^{-2}∣A∣−2 is computed in C\mathbb CC, with 0−1=00^{-1}=00−1=0. Neither mmm nor ∣A∣|A|∣A∣ is required to be positive; in particular, if AAA is empty, the displayed expression is zero and the predicate requires K=0K=0K=0.

QAlgorithms.Papers.Independent.Extend50.P02.HasExtension

For finite index types A,B,C,DA,B,C,DA,B,C,D, with decidable equality as needed, Boolean flags ppt,ns\mathrm{ppt},\mathrm{ns}ppt,ns, and any complex matrix WWW indexed by (A×B)×(C×D)(A\times B)\times(C\times D)(A×B)×(C×D), the predicate asserts the existence of a complex matrix MMM indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)) satisfying the following conditions. Write its entries as Mabecdf; a′b′e′c′d′f′M_{a b e c d f;\,a'b'e'c'd'f'}Mabecdf;a′b′e′c′d′f′​. The matrix MMM is positive semidefinite and obeys

∑c,d,fMabecdf; a′b′e′cdf=δa,a′δb,b′δe,e′,Maebcfd; a′e′b′c′f′d′=Mabecdf; a′b′e′c′d′f′,\sum_{c,d,f}M_{a b e c d f;\,a'b'e'c d f} =\delta_{a,a'}\delta_{b,b'}\delta_{e,e'},\qquad M_{a e b c f d;\,a'e'b'c'f'd'} =M_{a b e c d f;\,a'b'e'c'd'f'},c,d,f∑​Mabecdf;a′b′e′cdf​=δa,a′​δb,b′​δe,e′​,Maebcfd;a′e′b′c′f′d′​=Mabecdf;a′b′e′c′d′f′​,

and

∑fMabecdf; a′b′e′c′d′f=W((a,b),(c,d)), ((a′,b′),(c′,d′))δe,e′\sum_f M_{a b e c d f;\,a'b'e'c'd'f} = W_{((a,b),(c,d)),\,((a',b'),(c',d'))}\delta_{e,e'}f∑​Mabecdf;a′b′e′c′d′f​=W((a,b),(c,d)),((a′,b′),(c′,d′))​δe,e′​

for every choice of the displayed free indices. If ppt\mathrm{ppt}ppt is true, both matrices with entries

Ma′bec′df; ab′e′cd′f′andMabe′cdf′; a′b′ec′d′fM_{a' b e c' d f;\,a b'e' c d'f'} \quad\text{and}\quad M_{a b e' c d f';\,a'b'e c'd'f}Ma′bec′df;ab′e′cd′f′​andMabe′cdf′;a′b′ec′d′f​

must also be positive semidefinite. If ns\mathrm{ns}ns is true, then additionally

∑cMabecdf; a′b′e′cd′f′=δa,a′∣A∣−1∑a0,cMa0becdf; a0b′e′cd′f′\sum_c M_{a b e c d f;\,a'b'e'c d'f'} = \delta_{a,a'}|A|^{-1}\sum_{a_0,c} M_{a_0 b e c d f;\,a_0 b'e'c d'f'}c∑​Mabecdf;a′b′e′cd′f′​=δa,a′​∣A∣−1a0​,c∑​Ma0​becdf;a0​b′e′cd′f′​

for all remaining indices. A false flag imposes no corresponding additional condition. All sums range over their named index types; empty sums are zero and 0−1=00^{-1}=00−1=0. No nonemptiness is assumed, although the normalization equation is impossible when its input index type is nonempty and its output index type is empty.

QAlgorithms.Papers.Independent.Extend50.P02.HasFiniteKraus

For a finite index type AAA, an index type BBB, and a function E:CA×A→CB×BE:\mathbb C^{A\times A}\to\mathbb C^{B\times B}E:CA×A→CB×B, this predicate means that there exist a natural number mmm and matrices K0,…,Km−1∈CB×AK_0,\ldots,K_{m-1}\in\mathbb C^{B\times A}K0​,…,Km−1​∈CB×A such that, for every complex matrix XXX indexed by AAA,

E(X)=∑y=0m−1KyXKy†.E(X)=\sum_{y=0}^{m-1}K_yXK_y^\dagger.E(X)=y=0∑m−1​Ky​XKy†​.

Here †\dagger† denotes conjugate transpose. No normalization condition on the KyK_yKy​ is imposed. The case m=0m=0m=0 is allowed and represents the zero function.

QAlgorithms.Papers.Independent.Extend50.P02.HasMixedSecondBobFactor

For an index type HHH, a finite index type JJJ with decidable equality, and a complex square matrix XXX indexed by H×(J×J)H\times(J\times J)H×(J×J), this predicate requires that, for every h,h′∈Hh,h'\in Hh,h′∈H and j,j′,k,k′∈Jj,j',k,k'\in Jj,j′,k,k′∈J,

X(h,(j,k)),(h′,(j′,k′))=1∣J∣(∑t∈JX(h,(j,t)),(h′,(j′,t))){1,k=k′,0,k≠k′.X_{(h,(j,k)),(h',(j',k'))} = \frac{1}{|J|} \left(\sum_{t\in J}X_{(h,(j,t)),(h',(j',t))}\right) \begin{cases} 1,&k=k',\\ 0,&k\ne k'. \end{cases}X(h,(j,k)),(h′,(j′,k′))​=∣J∣1​(t∈J∑​X(h,(j,t)),(h′,(j′,t))​){1,0,​k=k′,k=k′.​

The scalar 1/∣J∣1/|J|1/∣J∣ is interpreted in C\mathbb CC. No positivity, Hermitian, or trace condition is required. If either HHH or JJJ is empty, the universally quantified condition is vacuous; in particular, the inverse of ∣J∣=0|J|=0∣J∣=0 is defined to be zero.

QAlgorithms.Papers.Independent.Extend50.P02.IsAliceToBobLOCC

For finite index types A,B,C,DA,B,C,DA,B,C,D, with decidable equality on A,BA,BA,B, and a function P:C(A×B)×(A×B)→C(C×D)×(C×D)P:\mathbb C^{(A\times B)\times(A\times B)}\to\mathbb C^{(C\times D)\times(C\times D)}P:C(A×B)×(A×B)→C(C×D)×(C×D), this predicate means that there exist m∈Nm\in\mathbb Nm∈N and functions Ey:CA×A→CC×CE_y:\mathbb C^{A\times A}\to\mathbb C^{C\times C}Ey​:CA×A→CC×C, Fy:CB×B→CD×DF_y:\mathbb C^{B\times B}\to\mathbb C^{D\times D}Fy​:CB×B→CD×D, for 0≤y<m0\le y<m0≤y<m, with the following properties: each EyE_yEy​ has a finite representation Ey(X)=∑jKyjXKyj†E_y(X)=\sum_jK_{yj}XK_{yj}^\daggerEy​(X)=∑j​Kyj​XKyj†​, without a normalization requirement on that individual representation; the function X↦∑yEy(X)X\mapsto\sum_yE_y(X)X↦∑y​Ey​(X) is a channel; each FyF_yFy​ is a channel; and, for every XXX,

P(X)=∑y=0m−1TEy,Fy(X),(TE,F(X))(c,d),(c′,d′)=∑a,a′∈A∑b,b′∈BX(a,b),(a′,b′)(E(eaa′))c,c′(F(ebb′))d,d′.P(X)=\sum_{y=0}^{m-1}\mathcal T_{E_y,F_y}(X), \qquad \bigl(\mathcal T_{E,F}(X)\bigr)_{(c,d),(c',d')} = \sum_{a,a'\in A}\sum_{b,b'\in B} X_{(a,b),(a',b')}\bigl(E(e_{aa'})\bigr)_{c,c'}\bigl(F(e_{bb'})\bigr)_{d,d'}.P(X)=y=0∑m−1​TEy​,Fy​​(X),(TE,F​(X))(c,d),(c′,d′)​=a,a′∈A∑​b,b′∈B∑​X(a,b),(a′,b′)​(E(eaa′​))c,c′​(F(ebb′​))d,d′​.

Here eije_{ij}eij​ is a matrix unit, and a channel from an input type UUU to an output type VVV means a function admitting finitely many matrices Lj∈CV×UL_j\in\mathbb C^{V\times U}Lj​∈CV×U such that ∑jLj†Lj=IU\sum_jL_j^\dagger L_j=I_U∑j​Lj†​Lj​=IU​ and T(X)=∑jLjXLj†T(X)=\sum_jL_jXL_j^\daggerT(X)=∑j​Lj​XLj†​ for every matrix XXX. All equalities concern arbitrary matrices. The case m=0m=0m=0 is included; it makes PPP zero and requires the zero function from AAA to CCC to be a channel, which forces AAA to be empty.

QAlgorithms.Papers.Independent.Extend50.P02.IsLOCR

For finite index types A,B,C,DA,B,C,DA,B,C,D, with decidable equality on A,BA,BA,B, and a function PPP from matrices indexed by A×BA\times BA×B to matrices indexed by C×DC\times DC×D, this predicate means that there exist m∈Nm\in\mathbb Nm∈N, real numbers py≥0p_y\ge0py​≥0 with ∑y=0m−1py=1\sum_{y=0}^{m-1}p_y=1∑y=0m−1​py​=1, and channels Ey:A→CE_y:A\to CEy​:A→C and Fy:B→DF_y:B\to DFy​:B→D, such that, for every complex matrix XXX,

P(X)=∑y=0m−1py TEy,Fy(X),(TE,F(X))(c,d),(c′,d′)=∑a,a′∈A∑b,b′∈BX(a,b),(a′,b′)(E(eaa′))c,c′(F(ebb′))d,d′.P(X)=\sum_{y=0}^{m-1}p_y\,\mathcal T_{E_y,F_y}(X), \qquad \bigl(\mathcal T_{E,F}(X)\bigr)_{(c,d),(c',d')} = \sum_{a,a'\in A}\sum_{b,b'\in B} X_{(a,b),(a',b')}\bigl(E(e_{aa'})\bigr)_{c,c'}\bigl(F(e_{bb'})\bigr)_{d,d'}.P(X)=y=0∑m−1​py​TEy​,Fy​​(X),(TE,F​(X))(c,d),(c′,d′)​=a,a′∈A∑​b,b′∈B∑​X(a,b),(a′,b′)​(E(eaa′​))c,c′​(F(ebb′​))d,d′​.

Here eije_{ij}eij​ is a matrix unit, and saying that T:U→VT:U\to VT:U→V is a channel means that there are finitely many matrices Lj∈CV×UL_j\in\mathbb C^{V\times U}Lj​∈CV×U satisfying ∑jLj†Lj=IU\sum_jL_j^\dagger L_j=I_U∑j​Lj†​Lj​=IU​ and T(X)=∑jLjXLj†T(X)=\sum_jL_jXL_j^\daggerT(X)=∑j​Lj​XLj†​ for every XXX. Zero probabilities are allowed. The case m=0m=0m=0 cannot satisfy the probability normalization.

QAlgorithms.Papers.Independent.Extend50.P02.IsSymmetricBobChannelExtension

For finite index types A,B,C,DA,B,C,DA,B,C,D, with decidable equality for the identities involved, let WWW be a complex matrix indexed by (A×B)×(C×D)(A\times B)\times(C\times D)(A×B)×(C×D), and let MMM be a complex matrix indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)). The predicate holds exactly when MMM is positive semidefinite; its partial trace over C×(D×D)C\times(D\times D)C×(D×D) is the identity on A×(B×B)A\times(B\times B)A×(B×B), meaning

∑c∈C∑d,f∈DM((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c,(d,f)))=δa,a′δb,b′δe,e′;\sum_{c\in C}\sum_{d,f\in D} M_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c,(d,f)))} =\delta_{a,a'}\delta_{b,b'}\delta_{e,e'};c∈C∑​d,f∈D∑​M((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c,(d,f)))​=δa,a′​δb,b′​δe,e′​;

it is invariant under simultaneously exchanging the two BBB coordinates and the two DDD coordinates, meaning

M((a,(e,b)),(c,(f,d))), ((a′,(e′,b′)),(c′,(f′,d′)))=M((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c′,(d′,f′)));M_{((a,(e,b)),(c,(f,d))),\,((a',(e',b')),(c',(f',d')))} = M_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c',(d',f')))};M((a,(e,b)),(c,(f,d))),((a′,(e′,b′)),(c′,(f′,d′)))​=M((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c′,(d′,f′)))​;

and, for every a,a′∈Aa,a'\in Aa,a′∈A, b,b′,e,e′∈Bb,b',e,e'\in Bb,b′,e,e′∈B, c,c′∈Cc,c'\in Cc,c′∈C, and d,d′∈Dd,d'\in Dd,d′∈D,

∑f∈DM((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c′,(d′,f)))=W((a,b),(c,d)), ((a′,b′),(c′,d′))δe,e′.\sum_{f\in D} M_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c',(d',f)))} = W_{((a,b),(c,d)),\,((a',b'),(c',d'))}\delta_{e,e'}.f∈D∑​M((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c′,(d′,f)))​=W((a,b),(c,d)),((a′,b′),(c′,d′))​δe,e′​.

Here each δ\deltaδ is 111 when its indices agree and 000 otherwise. No separate condition on WWW is included. Empty types are permitted, with empty sums zero and quantifiers over empty ranges vacuous; the identity equation remains required, so an empty output index type with a nonempty input index type makes the predicate impossible.

QAlgorithms.Papers.Independent.Extend50.P02.ReducedCommon

For finite index types H,JH,JH,J and a record MMM of six complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), denote its fields by M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​, respectively. This predicate requires M+,M−,M0M_+,M_-,M_0M+​,M−​,M0​ to be positive semidefinite, requires the block matrix

(M0+M3M1−iM2M1+iM2M0−M3)\begin{pmatrix} M_0+M_3&M_1-\mathrm{i}M_2\\ M_1+\mathrm{i}M_2&M_0-M_3 \end{pmatrix}(M0​+M3​M1​+iM2​​M1​−iM2​M0​−M3​​)

to be positive semidefinite, and requires

S(M+)=M+,S(M−)=M−,S(M0)=M0,S(M1)=M1,S(M2)=−M2,S(M3)=−M3,S(M_+)=M_+,\quad S(M_-)=M_-,\quad S(M_0)=M_0,\quad S(M_1)=M_1, \qquad S(M_2)=-M_2,\quad S(M_3)=-M_3,S(M+​)=M+​,S(M−​)=M−​,S(M0​)=M0​,S(M1​)=M1​,S(M2​)=−M2​,S(M3​)=−M3​,

where S(X)(h,(j,k)),(h′,(j′,k′))=X(h,(k,j)),(h′,(k′,j′))S(X)_{(h,(j,k)),(h',(j',k'))}=X_{(h,(k,j)),(h',(k',j'))}S(X)(h,(j,k)),(h′,(j′,k′))​=X(h,(k,j)),(h′,(k′,j′))​ simultaneously exchanges the two JJJ-coordinates of both indices. There are no trace or normalization requirements. Empty index types are included.

QAlgorithms.Papers.Independent.Extend50.P02.ReducedCorrectionFeasible

For finite index types H,JH,JH,J with decidable equality, Boolean flags ppt,ns\mathrm{ppt},\mathrm{ns}ppt,ns, a natural number ddd, and six complex square matrices M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​ on V=H×(J×J)V=H\times(J\times J)V=H×(J×J), this defines a conjunction as follows. Write s=d2−1s=\sqrt{d^2-1}s=d2−1​, let SXSXSX swap the two JJJ indices in both row and column, and set

(αX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′)),(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)),(Tr⁡HX)(j,k),(j′,k′)=∑hX(h,(j,k)),(h,(j′,k′)),B(Z,X,Y,W)=(Z+WX−iYX+iYZ−W),P=dM0+M1+sM22d,Q=2d(M++M−)+dM0−M1−sM22d.\begin{aligned} (\alpha X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j,k)),(h,(j',k'))},\\ (\tau X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j',k)),(h,(j,k'))},\\ (\operatorname{Tr}_H X)_{(j,k),(j',k')}&=\sum_hX_{(h,(j,k)),(h,(j',k'))},\\ \mathcal B(Z,X,Y,W)&=\begin{pmatrix}Z+W&X-\mathrm iY\\X+\mathrm iY&Z-W\end{pmatrix},\\ P&=\frac{dM_0+M_1+sM_2}{2d},& Q&=\frac{2d(M_++M_-)+dM_0-M_1-sM_2}{2d}. \end{aligned}(αX)(h,(j,k)),(h′,(j′,k′))​(τX)(h,(j,k)),(h′,(j′,k′))​(TrH​X)(j,k),(j′,k′)​B(Z,X,Y,W)P​=X(h′,(j,k)),(h,(j′,k′))​,=X(h′,(j′,k)),(h,(j,k′))​,=h∑​X(h,(j,k)),(h,(j′,k′))​,=(Z+WX+iY​X−iYZ−W​),=2ddM0​+M1​+sM2​​,​Q​=2d2d(M+​+M−​)+dM0​−M1​−sM2​​.​

It requires

M+⪰0,M−⪰0,M0⪰0,B(M0,M1,M2,M3)⪰0,SM+=M+,SM−=M−,SM0=M0,SM1=M1,SM2=−M2,SM3=−M3,Tr⁡H(M++M−+M0)=IJ×J,R(h,(j,k)),(h′,(j′,k′))=1∣J∣(∑tR(h,(j,t)),(h′,(j′,t)))δk,k′for R=P,Q and all indices,d=2 ⟹ M−=0.\begin{gathered} M_+\succeq0,\quad M_-\succeq0,\quad M_0\succeq0,\quad \mathcal B(M_0,M_1,M_2,M_3)\succeq0,\\ SM_+=M_+,\quad SM_-=M_-,\quad SM_0=M_0,\quad SM_1=M_1,\quad SM_2=-M_2,\quad SM_3=-M_3,\\ \operatorname{Tr}_H(M_++M_-+M_0)=I_{J\times J},\\ R_{(h,(j,k)),(h',(j',k'))} =\frac1{|J|}\left(\sum_tR_{(h,(j,t)),(h',(j',t))}\right)\delta_{k,k'} \quad\text{for }R=P,Q\text{ and all indices},\\ d=2\ \Longrightarrow\ M_-=0. \end{gathered}M+​⪰0,M−​⪰0,M0​⪰0,B(M0​,M1​,M2​,M3​)⪰0,SM+​=M+​,SM−​=M−​,SM0​=M0​,SM1​=M1​,SM2​=−M2​,SM3​=−M3​,TrH​(M+​+M−​+M0​)=IJ×J​,R(h,(j,k)),(h′,(j′,k′))​=∣J∣1​(t∑​R(h,(j,t)),(h′,(j′,t))​)δk,k′​for R=P,Q and all indices,d=2 ⟹ M−​=0.​

If ppt\mathrm{ppt}ppt is true, it also requires

α(2d+2M++M0+M1)⪰0,{M−=0,d=2,α(2d−2M−+M1−M0)⪰0 and τ(M++dd−2M−−12(dM0−M1−sM2))⪰0,d≠2,B(G0,G1,G2,G3)⪰0,τ(dd+2M++M−+12(dM0−M1−sM2))⪰0,B(E0,E1,E2,E3)⪰0,\begin{gathered} \alpha(\tfrac2{d+2}M_++M_0+M_1)\succeq0,\\ \begin{cases} M_-=0,&d=2,\\ \alpha(\tfrac2{d-2}M_-+M_1-M_0)\succeq0 \ \text{and}\ \tau(M_++\tfrac d{d-2}M_--\tfrac12(dM_0-M_1-sM_2))\succeq0,&d\ne2, \end{cases}\\ \mathcal B(G_0,G_1,G_2,G_3)\succeq0,\quad \tau(\tfrac d{d+2}M_++M_-+\tfrac12(dM_0-M_1-sM_2))\succeq0,\quad \mathcal B(E_0,E_1,E_2,E_3)\succeq0, \end{gathered}α(d+22​M+​+M0​+M1​)⪰0,{M−​=0,α(d−22​M−​+M1​−M0​)⪰0 and τ(M+​+d−2d​M−​−21​(dM0​−M1​−sM2​))⪰0,​d=2,d=2,​B(G0​,G1​,G2​,G3​)⪰0,τ(d+2d​M+​+M−​+21​(dM0​−M1​−sM2​))⪰0,B(E0​,E1​,E2​,E3​)⪰0,​

where

G0=α(M++M−+12(M0−dM1)),G1=α(M+−M−+12(M1−dM0)),G2=3(d2−1)2αM2,G3=3(d2−1)2αM3,E0=1d2−1τ(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1τ(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1sτ(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} G_0&=\alpha(M_++M_-+\tfrac12(M_0-dM_1)),& G_1&=\alpha(M_+-M_-+\tfrac12(M_1-dM_0)),\\ G_2&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_2,& G_3&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_3,\\ E_0&=\tfrac1{d^2-1}\tau(d(M_+-M_-)+\tfrac12((d^2-2)M_0+dM_1+dsM_2)),\\ E_1&=\tfrac1{d^2-1}\tau(-M_++M_-+\tfrac12(dM_0+(2d^2-3)M_1-sM_2)),\\ E_2&=\tfrac1s\tau(M_+-M_-+\tfrac12(M_1-dM_0-sM_2)),& E_3&=\tau M_3. \end{aligned}G0​G2​E0​E1​E2​​=α(M+​+M−​+21​(M0​−dM1​)),=23(d2−1)​​αM2​,=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),​G1​G3​E3​​=α(M+​−M−​+21​(M1​−dM0​)),=23(d2−1)​​αM3​,=τM3​.​

If ns\mathrm{ns}ns is true, it further requires, with I=IJ×JI=I_{J\times J}I=IJ×J​,

Tr⁡H(2M+)(d+2)(d−1)=Tr⁡H(2M++M0+M1)d(d+1),d≠2 ⟹ Tr⁡H(2M−)(d−2)(d+1)=Tr⁡H(2M−+M0−M1)d(d−1),12Tr⁡HM0=dI+Tr⁡H(M−−M+−M1)d(d2−1),12Tr⁡HM1=−I+dTr⁡H(M+−M−+M1)d(d2−1),Tr⁡HM2=0,Tr⁡HM3=0.\begin{aligned} \frac{\operatorname{Tr}_H(2M_+)}{(d+2)(d-1)} &=\frac{\operatorname{Tr}_H(2M_++M_0+M_1)}{d(d+1)},\\ d\ne2\ &\Longrightarrow\ \frac{\operatorname{Tr}_H(2M_-)}{(d-2)(d+1)} =\frac{\operatorname{Tr}_H(2M_-+M_0-M_1)}{d(d-1)},\\ \tfrac12\operatorname{Tr}_H M_0 &=\frac{dI+\operatorname{Tr}_H(M_--M_+-M_1)}{d(d^2-1)},\\ \tfrac12\operatorname{Tr}_H M_1 &=\frac{-I+d\operatorname{Tr}_H(M_+-M_-+M_1)}{d(d^2-1)},\\ \operatorname{Tr}_H M_2&=0,\qquad \operatorname{Tr}_H M_3=0. \end{aligned}(d+2)(d−1)TrH​(2M+​)​d=2 21​TrH​M0​21​TrH​M1​TrH​M2​​=d(d+1)TrH​(2M+​+M0​+M1​)​,⟹ (d−2)(d+1)TrH​(2M−​)​=d(d−1)TrH​(2M−​+M0​−M1​)​,=d(d2−1)dI+TrH​(M−​−M+​−M1​)​,=d(d2−1)−I+dTrH​(M+​−M−​+M1​)​,=0,TrH​M3​=0.​

A false flag imposes none of its conditional requirements. Scalars use the complex embeddings of the indicated real numbers; zero denominators have inverse zero and negative real radicands have square root zero. No nonemptiness or restriction d≥2d\ge2d≥2 is assumed, and feasibility need not hold for any choice of matrices.

QAlgorithms.Papers.Independent.Extend50.P02.ReducedNS

For finite index types H,JH,JH,J with decidable equality, a natural number ddd, and six arbitrary complex square matrices M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​ on H×(J×J)H\times(J\times J)H×(J×J), let III be the identity on J×JJ\times JJ×J and let

(Tr⁡HX)(j,k),(j′,k′)=∑h∈HX(h,(j,k)),(h,(j′,k′)).(\operatorname{Tr}_H X)_{(j,k),(j',k')} =\sum_{h\in H}X_{(h,(j,k)),(h,(j',k'))}.(TrH​X)(j,k),(j′,k′)​=h∈H∑​X(h,(j,k)),(h,(j′,k′))​.

This defines the conjunction

Tr⁡H(2M+)(d+2)(d−1)=Tr⁡H(2M++M0+M1)d(d+1),d≠2⟹Tr⁡H(2M−)(d−2)(d+1)=Tr⁡H(2M−+M0−M1)d(d−1),12Tr⁡HM0=dI+Tr⁡H(M−−M+−M1)d(d2−1),12Tr⁡HM1=−I+d Tr⁡H(M+−M−+M1)d(d2−1),Tr⁡HM2=0,Tr⁡HM3=0.\begin{aligned} \frac{\operatorname{Tr}_H(2M_+)}{(d+2)(d-1)} &=\frac{\operatorname{Tr}_H(2M_++M_0+M_1)}{d(d+1)},\\ d\ne2\quad&\Longrightarrow\quad \frac{\operatorname{Tr}_H(2M_-)}{(d-2)(d+1)} =\frac{\operatorname{Tr}_H(2M_-+M_0-M_1)}{d(d-1)},\\ \frac12\operatorname{Tr}_H M_0 &=\frac{dI+\operatorname{Tr}_H(M_--M_+-M_1)}{d(d^2-1)},\\ \frac12\operatorname{Tr}_H M_1 &=\frac{-I+d\,\operatorname{Tr}_H(M_+-M_-+M_1)}{d(d^2-1)},\\ \operatorname{Tr}_H M_2&=0,\qquad \operatorname{Tr}_H M_3=0. \end{aligned}(d+2)(d−1)TrH​(2M+​)​d=221​TrH​M0​21​TrH​M1​TrH​M2​​=d(d+1)TrH​(2M+​+M0​+M1​)​,⟹(d−2)(d+1)TrH​(2M−​)​=d(d−1)TrH​(2M−​+M0​−M1​)​,=d(d2−1)dI+TrH​(M−​−M+​−M1​)​,=d(d2−1)−I+dTrH​(M+​−M−​+M1​)​,=0,TrH​M3​=0.​

Here ddd denotes its real value in the fractions, and real scalars are embedded into C\mathbb CC. There are no positivity assumptions. The second equality is required only when d≠2d\ne2d=2; all other equalities are required for every ddd, including 000 and 111, with division by zero interpreted as multiplication by zero. The index types may be empty, in which case the corresponding sums are empty sums.

QAlgorithms.Papers.Independent.Extend50.P02.ReducedPPT

For finite index types H,JH,JH,J with decidable equality, a natural number ddd, and six arbitrary complex square matrices M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​ on V=H×(J×J)V=H\times(J\times J)V=H×(J×J), this defines the following conjunction of matrix conditions. Interpret ddd as real in scalar expressions, put s=d2−1s=\sqrt{d^2-1}s=d2−1​, and define

(αX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′)),(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)),B(Z,X,Y,W)=(Z+WX−iYX+iYZ−W).\begin{aligned} (\alpha X)_{(h,(j,k)),(h',(j',k'))} &=X_{(h',(j,k)),(h,(j',k'))},\\ (\tau X)_{(h,(j,k)),(h',(j',k'))} &=X_{(h',(j',k)),(h,(j,k'))},\\ \mathcal B(Z,X,Y,W)&= \begin{pmatrix}Z+W&X-\mathrm iY\\X+\mathrm iY&Z-W\end{pmatrix}. \end{aligned}(αX)(h,(j,k)),(h′,(j′,k′))​(τX)(h,(j,k)),(h′,(j′,k′))​B(Z,X,Y,W)​=X(h′,(j,k)),(h,(j′,k′))​,=X(h′,(j′,k)),(h,(j,k′))​,=(Z+WX+iY​X−iYZ−W​).​

Define four matrices GiG_iGi​ and four matrices EiE_iEi​ by

G0=α ⁣(M++M−+12(M0−dM1)),G1=α ⁣(M+−M−+12(M1−dM0)),G2=3(d2−1)2 αM2,G3=3(d2−1)2 αM3,E0=1d2−1τ ⁣(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1τ ⁣(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1sτ ⁣(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} G_0&=\alpha\!\left(M_++M_-+\tfrac12(M_0-dM_1)\right),& G_1&=\alpha\!\left(M_+-M_-+\tfrac12(M_1-dM_0)\right),\\ G_2&=\tfrac{\sqrt{3(d^2-1)}}2\,\alpha M_2,& G_3&=\tfrac{\sqrt{3(d^2-1)}}2\,\alpha M_3,\\ E_0&=\tfrac1{d^2-1}\tau\!\left(d(M_+-M_-)+\tfrac12((d^2-2)M_0+dM_1+dsM_2)\right),\\ E_1&=\tfrac1{d^2-1}\tau\!\left(-M_++M_-+\tfrac12(dM_0+(2d^2-3)M_1-sM_2)\right),\\ E_2&=\tfrac1s\tau\!\left(M_+-M_-+\tfrac12(M_1-dM_0-sM_2)\right),& E_3&=\tau M_3. \end{aligned}G0​G2​E0​E1​E2​​=α(M+​+M−​+21​(M0​−dM1​)),=23(d2−1)​​αM2​,=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),​G1​G3​E3​​=α(M+​−M−​+21​(M1​−dM0​)),=23(d2−1)​​αM3​,=τM3​.​

The required conditions, writing X⪰0X\succeq0X⪰0 for positive semidefiniteness, are

α ⁣(2d+2M++M0+M1)⪰0,{M−=0,d=2,α ⁣(2d−2M−+M1−M0)⪰0 and τ ⁣(M++dd−2M−−12(dM0−M1−sM2))⪰0,d≠2,B(G0,G1,G2,G3)⪰0,τ ⁣(dd+2M++M−+12(dM0−M1−sM2))⪰0,B(E0,E1,E2,E3)⪰0.\begin{gathered} \alpha\!\left(\frac2{d+2}M_++M_0+M_1\right)\succeq0,\\ \begin{cases} M_-=0,&d=2,\\ \alpha\!\left(\frac2{d-2}M_-+M_1-M_0\right)\succeq0 \ \text{and}\ \tau\!\left(M_++\frac d{d-2}M_--\frac12(dM_0-M_1-sM_2)\right)\succeq0, &d\ne2, \end{cases}\\ \mathcal B(G_0,G_1,G_2,G_3)\succeq0,\\ \tau\!\left(\frac d{d+2}M_++M_-+\frac12(dM_0-M_1-sM_2)\right)\succeq0,\\ \mathcal B(E_0,E_1,E_2,E_3)\succeq0. \end{gathered}α(d+22​M+​+M0​+M1​)⪰0,{M−​=0,α(d−22​M−​+M1​−M0​)⪰0 and τ(M+​+d−2d​M−​−21​(dM0​−M1​−sM2​))⪰0,​d=2,d=2,​B(G0​,G1​,G2​,G3​)⪰0,τ(d+2d​M+​+M−​+21​(dM0​−M1​−sM2​))⪰0,B(E0​,E1​,E2​,E3​)⪰0.​

At d=2d=2d=2, the two inequalities in the d≠2d\ne2d=2 branch are not required. No nonemptiness or lower bound on ddd is assumed; all formulas use zero for an inverse of zero and for a real square root of a negative number.

QAlgorithms.Papers.Independent.Extend50.P02.ReducedTeleportFeasible

For finite index types H,JH,JH,J with decidable equality, a Boolean flag ppt\mathrm{ppt}ppt, a natural number ddd, and six complex square matrices M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​ on V=H×(J×J)V=H\times(J\times J)V=H×(J×J), this defines the following feasibility conditions. Set s=d2−1s=\sqrt{d^2-1}s=d2−1​, define SXSXSX by swapping the two JJJ indices in both its row and column, and define

(αX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′)),(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)),B(Z,X,Y,W)=(Z+WX−iYX+iYZ−W),P=dM0+M1+sM22d.\begin{aligned} (\alpha X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j,k)),(h,(j',k'))},\\ (\tau X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j',k)),(h,(j,k'))},\\ \mathcal B(Z,X,Y,W)&=\begin{pmatrix}Z+W&X-\mathrm iY\\X+\mathrm iY&Z-W\end{pmatrix},\\ P&=\frac{dM_0+M_1+sM_2}{2d}. \end{aligned}(αX)(h,(j,k)),(h′,(j′,k′))​(τX)(h,(j,k)),(h′,(j′,k′))​B(Z,X,Y,W)P​=X(h′,(j,k)),(h,(j′,k′))​,=X(h′,(j′,k)),(h,(j,k′))​,=(Z+WX+iY​X−iYZ−W​),=2ddM0​+M1​+sM2​​.​

First, it requires

M+⪰0,M−⪰0,M0⪰0,B(M0,M1,M2,M3)⪰0,SM+=M+,SM−=M−,SM0=M0,SM1=M1,SM2=−M2,SM3=−M3,M++M−+M0=IV,P(h,(j,k)),(h′,(j′,k′))=1∣J∣(∑t∈JP(h,(j,t)),(h′,(j′,t)))δk,k′for all h,h′,j,j′,k,k′,d=2 ⟹ M−=0.\begin{gathered} M_+\succeq0,\quad M_-\succeq0,\quad M_0\succeq0,\quad \mathcal B(M_0,M_1,M_2,M_3)\succeq0,\\ SM_+=M_+,\quad SM_-=M_-,\quad SM_0=M_0,\quad SM_1=M_1,\quad SM_2=-M_2,\quad SM_3=-M_3,\\ M_++M_-+M_0=I_V,\\ P_{(h,(j,k)),(h',(j',k'))} =\frac1{|J|}\left(\sum_{t\in J}P_{(h,(j,t)),(h',(j',t))}\right)\delta_{k,k'} \quad\text{for all }h,h',j,j',k,k',\\ d=2\ \Longrightarrow\ M_-=0. \end{gathered}M+​⪰0,M−​⪰0,M0​⪰0,B(M0​,M1​,M2​,M3​)⪰0,SM+​=M+​,SM−​=M−​,SM0​=M0​,SM1​=M1​,SM2​=−M2​,SM3​=−M3​,M+​+M−​+M0​=IV​,P(h,(j,k)),(h′,(j′,k′))​=∣J∣1​(t∈J∑​P(h,(j,t)),(h′,(j′,t))​)δk,k′​for all h,h′,j,j′,k,k′,d=2 ⟹ M−​=0.​

If ppt\mathrm{ppt}ppt is true, it additionally requires

α ⁣(2d+2M++M0+M1)⪰0,{M−=0,d=2,α ⁣(2d−2M−+M1−M0)⪰0 and τ ⁣(M++dd−2M−−12(dM0−M1−sM2))⪰0,d≠2,B(G0,G1,G2,G3)⪰0,τ ⁣(dd+2M++M−+12(dM0−M1−sM2))⪰0,B(E0,E1,E2,E3)⪰0,\begin{gathered} \alpha\!\left(\frac2{d+2}M_++M_0+M_1\right)\succeq0,\\ \begin{cases} M_-=0,&d=2,\\ \alpha\!\left(\frac2{d-2}M_-+M_1-M_0\right)\succeq0 \ \text{and}\ \tau\!\left(M_++\frac d{d-2}M_--\frac12(dM_0-M_1-sM_2)\right)\succeq0, &d\ne2, \end{cases}\\ \mathcal B(G_0,G_1,G_2,G_3)\succeq0,\qquad \tau\!\left(\frac d{d+2}M_++M_-+\frac12(dM_0-M_1-sM_2)\right)\succeq0,\qquad \mathcal B(E_0,E_1,E_2,E_3)\succeq0, \end{gathered}α(d+22​M+​+M0​+M1​)⪰0,{M−​=0,α(d−22​M−​+M1​−M0​)⪰0 and τ(M+​+d−2d​M−​−21​(dM0​−M1​−sM2​))⪰0,​d=2,d=2,​B(G0​,G1​,G2​,G3​)⪰0,τ(d+2d​M+​+M−​+21​(dM0​−M1​−sM2​))⪰0,B(E0​,E1​,E2​,E3​)⪰0,​

where

G0=α(M++M−+12(M0−dM1)),G1=α(M+−M−+12(M1−dM0)),G2=3(d2−1)2αM2,G3=3(d2−1)2αM3,E0=1d2−1τ(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1τ(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1sτ(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} G_0&=\alpha(M_++M_-+\tfrac12(M_0-dM_1)),& G_1&=\alpha(M_+-M_-+\tfrac12(M_1-dM_0)),\\ G_2&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_2,& G_3&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_3,\\ E_0&=\tfrac1{d^2-1}\tau(d(M_+-M_-)+\tfrac12((d^2-2)M_0+dM_1+dsM_2)),\\ E_1&=\tfrac1{d^2-1}\tau(-M_++M_-+\tfrac12(dM_0+(2d^2-3)M_1-sM_2)),\\ E_2&=\tfrac1s\tau(M_+-M_-+\tfrac12(M_1-dM_0-sM_2)),& E_3&=\tau M_3. \end{aligned}G0​G2​E0​E1​E2​​=α(M+​+M−​+21​(M0​−dM1​)),=23(d2−1)​​αM2​,=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),​G1​G3​E3​​=α(M+​−M−​+21​(M1​−dM0​)),=23(d2−1)​​αM3​,=τM3​.​

When ppt\mathrm{ppt}ppt is false, this additional conjunction imposes no condition. All real scalars are embedded into C\mathbb CC; d=0,1d=0,1d=0,1 and empty index types are included, inverses of zero are zero, and real square roots of negative numbers are zero. The definition does not assert that such matrices exist.

QAlgorithms.Papers.Independent.Extend50.P02.TeleportSDP

For finite register types A,B,H,JA,B,H,JA,B,H,J, with decidable equality, an arbitrary map NNN from matrices on AAA to matrices on BBB, a complex matrix ρ\rhoρ on H×JH\times JH×J, a real number μ\muμ, a complex matrix ZZZ on A×BA\times BA×B, and a complex matrix MMM on (((A×H)×(J×J))×(Unit×(B×B)))(((A\times H)\times(J\times J))\times(\mathrm{Unit}\times(B\times B)))(((A×H)×(J×J))×(Unit×(B×B))), this predicate is the conjunction of the following conditions. Label the two copies of J,BJ,BJ,B by J1,J2,B1,B2J_1,J_2,B_1,B_2J1​,J2​,B1​,B2​, and define the matrix WWW on ((A×H)×J)×(Unit×B)((A\times H)\times J)\times(\mathrm{Unit}\times B)((A×H)×J)×(Unit×B) by

W(((a,h),j),((),b)), (((a′,h′),j′),((),b′))=1∣J∣∑e∈J∑f∈BM(((a,h),(j,e)),((),(b,f))), (((a′,h′),(j′,e)),((),(b′,f))).W_{(((a,h),j),((),b)),\,(((a',h'),j'),((),b'))} = \frac1{|J|}\sum_{e\in J}\sum_{f\in B} M_{(((a,h),(j,e)),((),(b,f))),\, (((a',h'),(j',e)),((),(b',f)))}.W(((a,h),j),((),b)),(((a′,h′),j′),((),b′))​=∣J∣1​e∈J∑​f∈B∑​M(((a,h),(j,e)),((),(b,f))),(((a′,h′),(j′,e)),((),(b′,f)))​.

Define QQQ on A×BA\times BA×B by

Q(a,b),(a′,b′)=∑h,h′,j,j′ρ(h,j),(h′,j′)W(((a,h),j),((),b)), (((a′,h′),j′),((),b′)),Q_{(a,b),(a',b')}= \sum_{h,h',j,j'}\rho_{(h,j),(h',j')} W_{(((a,h),j),((),b)),\,(((a',h'),j'),((),b'))},Q(a,b),(a′,b′)​=h,h′,j,j′∑​ρ(h,j),(h′,j′)​W(((a,h),j),((),b)),(((a′,h′),j′),((),b′))​,

and define Ch⁡(N)(a,b),(a′,b′)=N(Ea,a′)b,b′\operatorname{Ch}(N)_{(a,b),(a',b')}=N(E_{a,a'})_{b,b'}Ch(N)(a,b),(a′,b′)​=N(Ea,a′​)b,b′​. The required conditions are

μ≥0,Z⪰0,μIA−Tr⁡BZ⪰0,Z−Ch⁡(N)+Q⪰0.\mu\ge0,\qquad Z\succeq0,\qquad \mu I_A-\operatorname{Tr}_B Z\succeq0,\qquad Z-\operatorname{Ch}(N)+Q\succeq0.μ≥0,Z⪰0,μIA​−TrB​Z⪰0,Z−Ch(N)+Q⪰0.

In addition, M⪰0M\succeq0M⪰0, its partial trace over Unit,B1,B2\mathrm{Unit},B_1,B_2Unit,B1​,B2​ must equal I(A×H)J1J2I_{(A\times H)J_1J_2}I(A×H)J1​J2​​, it must be invariant under simultaneously exchanging J1,J2J_1,J_2J1​,J2​ and B1,B2B_1,B_2B1​,B2​, and Tr⁡B2M=W⊗IJ2\operatorname{Tr}_{B_2}M=W\otimes I_{J_2}TrB2​​M=W⊗IJ2​​, with register factors placed in their corresponding positions. Its partial transpose on A,H,UnitA,H,\mathrm{Unit}A,H,Unit together and its partial transpose on J2,B2J_2,B_2J2​,B2​ together must both be positive semidefinite. Partial traces sum matching row and column indices. Neither NNN nor ρ\rhoρ is assumed to be a channel or density matrix, respectively; empty register types are included, with ∣J∣−1=0|J|^{-1}=0∣J∣−1=0 when JJJ is empty.

QAlgorithms.Papers.Independent.Extend50.P02.TwoBobCoefficients

For any types HHH and JJJ, this structure consists of six complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), named plus\mathrm{plus}plus, minus\mathrm{minus}minus, zero\mathrm{zero}zero, one\mathrm{one}one, two\mathrm{two}two, and three\mathrm{three}three. It imposes no equations, positivity conditions, Hermitian conditions, or normalization requirements on these matrices. Empty index types are permitted.

QAlgorithms.Papers.Independent.Extend50.P02.appendResourceAndApply

For arbitrary index types A,B,H,JA,B,H,JA,B,H,J, any complex matrix ρ\rhoρ indexed by H×JH\times JH×J, and any function LLL from complex matrices indexed by (A×H)×J(A\times H)\times J(A×H)×J to complex matrices indexed by BBB, the definition returns the function SSS on complex matrices indexed by AAA given by S(X)=L(Y)S(X)=L(Y)S(X)=L(Y), where

Y((a,h),j), ((a′,h′),j′)=Xa,a′ ρ(h,j),(h′,j′).Y_{((a,h),j),\,((a',h'),j')} = X_{a,a'}\,\rho_{(h,j),(h',j')}.Y((a,h),j),((a′,h′),j′)​=Xa,a′​ρ(h,j),(h′,j′)​.

Thus the matrix supplied to LLL has the entries of X⊗ρX\otimes\rhoX⊗ρ, arranged with index grouping (A×H)×J(A\times H)\times J(A×H)×J. Neither ρ\rhoρ nor XXX is required to be positive or normalized, and LLL is not required to be linear or a channel. No finiteness or nonemptiness condition is needed by this formula.

QAlgorithms.Papers.Independent.Extend50.P02.averagedBobExtensionMarginal

For index types A,B,C,DA,B,C,DA,B,C,D, with BBB and DDD finite, let MMM be any complex matrix indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)). The definition returns the complex matrix WWW indexed by (A×B)×(C×D)(A\times B)\times(C\times D)(A×B)×(C×D) whose entries are

W((a,b),(c,d)), ((a′,b′),(c′,d′))=∣B∣−1∑e∈B∑f∈DM((a,(b,e)),(c,(d,f))), ((a′,(b′,e)),(c′,(d′,f))).W_{((a,b),(c,d)),\,((a',b'),(c',d'))} = |B|^{-1}\sum_{e\in B}\sum_{f\in D} M_{((a,(b,e)),(c,(d,f))),\,((a',(b',e)),(c',(d',f)))}.W((a,b),(c,d)),((a′,b′),(c′,d′))​=∣B∣−1e∈B∑​f∈D∑​M((a,(b,e)),(c,(d,f))),((a′,(b′,e)),(c′,(d′,f)))​.

Here ∣B∣−1|B|^{-1}∣B∣−1 is taken in C\mathbb CC. Thus the second BBB and second DDD coordinates are summed with equal row and column indices, and the result is divided by ∣B∣|B|∣B∣. No positivity, normalization, or symmetry of MMM is assumed. Empty types are allowed: empty sums are zero, and the inverse of zero is defined to be zero.

QAlgorithms.Papers.Independent.Extend50.P02.contractResource

For finite register types A,B,H,JA,B,H,JA,B,H,J, with the decidable equality required by the matrix operations, a complex matrix TTT on H×JH\times JH×J, and a complex matrix WWW on ((A×H)×J)×(Unit×B)((A\times H)\times J)\times(\mathrm{Unit}\times B)((A×H)×J)×(Unit×B), this defines a matrix on A×BA\times BA×B whose entries are

contractResource⁡(T,W)(a,b),(a′,b′)=∑h,h′∈H∑j,j′∈JT(h,j),(h′,j′) W(((a,h),j),((),b)), (((a′,h′),j′),((),b′)).\operatorname{contractResource}(T,W)_{(a,b),(a',b')} = \sum_{h,h'\in H}\sum_{j,j'\in J} T_{(h,j),(h',j')}\, W_{(((a,h),j),((),b)),\,(((a',h'),j'),((),b'))}.contractResource(T,W)(a,b),(a′,b′)​=h,h′∈H∑​j,j′∈J∑​T(h,j),(h′,j′)​W(((a,h),j),((),b)),(((a′,h′),j′),((),b′))​.

Here ()()() is the sole element of Unit\mathrm{Unit}Unit. No positivity, normalization, or channel assumptions are imposed, and no conjugation or transposition of TTT is performed in this formula. Empty summation registers give the zero matrix.

QAlgorithms.Papers.Independent.Extend50.P02.correctionError

For finite register types A,B,H,JA,B,H,JA,B,H,J, with decidable equality and AAA nonempty, a criterion ccc, a correction class kind\mathrm{kind}kind, and arbitrary maps O:A→BO:A\to BO:A→B and N:H→JN:H\to JN:H→J between the respective matrix spaces, this defines the real infimum of the errors of the maps S=wire⁡(N,P)S=\operatorname{wire}(N,P)S=wire(N,P) over the permitted corrections PPP. Here a channel is a map X↦∑tKtXKt†X\mapsto\sum_tK_tXK_t^\daggerX↦∑t​Kt​XKt†​ with a finite Kraus family satisfying ∑tKt†Kt=I\sum_tK_t^\dagger K_t=I∑t​Kt†​Kt​=I; the permitted P:A×J→H×BP:A\times J\to H\times BP:A×J→H×B must be channels and satisfy the selected condition: a product of two channels for product\mathrm{product}product; a finite convex combination of such products for locr\mathrm{locr}locr; a finite sum of products Ey⊗FyE_y\otimes F_yEy​⊗Fy​, where each EyE_yEy​ has a finite Kraus representation, ∑yEy\sum_yE_y∑y​Ey​ is a channel, and every FyF_yFy​ is a channel, for oneWay\mathrm{oneWay}oneWay; or the following extension condition for extendible(ppt,ns)\mathrm{extendible}(\mathrm{ppt},\mathrm{ns})extendible(ppt,ns). Writing Ch⁡(P)(a,j),(h,b); (a′,j′),(h′,b′)=P(E(a,j),(a′,j′))(h,b),(h′,b′)\operatorname{Ch}(P)_{(a,j),(h,b);\,(a',j'),(h',b')}=P(E_{(a,j),(a',j')})_{(h,b),(h',b')}Ch(P)(a,j),(h,b);(a′,j′),(h′,b′)​=P(E(a,j),(a′,j′)​)(h,b),(h′,b′)​, that condition requires a positive semidefinite matrix MMM on A,J1,J2,H,B1,B2A,J_1,J_2,H,B_1,B_2A,J1​,J2​,H,B1​,B2​ with Tr⁡H,B1,B2M=I\operatorname{Tr}_{H,B_1,B_2}M=ITrH,B1​,B2​​M=I, invariant under simultaneous exchanges J1↔J2J_1\leftrightarrow J_2J1​↔J2​, B1↔B2B_1\leftrightarrow B_2B1​↔B2​, and satisfying Tr⁡B2M=Ch⁡(P)⊗IJ2\operatorname{Tr}_{B_2}M=\operatorname{Ch}(P)\otimes I_{J_2}TrB2​​M=Ch(P)⊗IJ2​​; when ppt\mathrm{ppt}ppt is true, its partial transposes on A,HA,HA,H and on J2,B2J_2,B_2J2​,B2​ must be positive semidefinite, and when ns\mathrm{ns}ns is true, Tr⁡HM=(IA/∣A∣)⊗Tr⁡A,HM\operatorname{Tr}_HM=(I_A/|A|)\otimes\operatorname{Tr}_{A,H}MTrH​M=(IA​/∣A∣)⊗TrA,H​M. Tensor products of maps use the matrix-unit expansion, and the resulting simulated map is explicitly

S(X)b,b′=∑a,a′,h,h′,j,j′Xa,a′N(Eh,h′)j,j′P(E(a,j),(a′,j′))(h,b),(h′,b′).S(X)_{b,b'}=\sum_{a,a',h,h',j,j'} X_{a,a'}N(E_{h,h'})_{j,j'} P(E_{(a,j),(a',j')})_{(h,b),(h',b')}.S(X)b,b′​=a,a′,h,h′,j,j′∑​Xa,a′​N(Eh,h′​)j,j′​P(E(a,j),(a′,j′)​)(h,b),(h′,b′)​.

For c=diamondc=\mathrm{diamond}c=diamond, the error of SSS is

sup⁡ρ⪰0, Tr⁡ρ=112Tr⁡Yρ†Yρ,Yρ=O^(ρ)−S^(ρ),\sup_{\rho\succeq0,\ \operatorname{Tr}\rho=1} \frac12\operatorname{Tr}\sqrt{Y_\rho^\dagger Y_\rho}, \qquad Y_\rho=\widehat O(\rho)-\widehat S(\rho),ρ⪰0, Trρ=1sup​21​TrYρ†​Yρ​​,Yρ​=O(ρ)−S(ρ),

where the square-root trace is understood as its real part and F^(X)(r,b),(r′,b′)=F((X(r,a),(r′,a′))a,a′)b,b′\widehat F(X)_{(r,b),(r',b')}=F((X_{(r,a),(r',a')})_{a,a'})_{b,b'}F(X)(r,b),(r′,b′)​=F((X(r,a),(r′,a′)​)a,a′​)b,b′​. For c=infidelityc=\mathrm{infidelity}c=infidelity, the error is

1−inf⁡ρ⪰0, Tr⁡ρ=1(Re⁡Tr⁡O^(ρ) S^(ρ) O^(ρ))2.1-\inf_{\rho\succeq0,\ \operatorname{Tr}\rho=1} \left( \operatorname{Re}\operatorname{Tr} \sqrt{\sqrt{\widehat O(\rho)}\,\widehat S(\rho)\,\sqrt{\widehat O(\rho)}} \right)^2.1−ρ⪰0, Trρ=1inf​(ReTrO(ρ)​S(ρ)O(ρ)​​)2.

Both optimizations over ρ\rhoρ use matrices on A×AA\times AA×A, and square roots mean the real square-root function applied through continuous functional calculus. No channel assumption is imposed on OOO or NNN. These are the real infima and suprema used by the definitions; an empty optimization set has value zero, and a real supremum of an unbounded-above set or infimum of an unbounded-below set also has value zero.

QAlgorithms.Papers.Independent.Extend50.P02.entFidelity

For a nonempty finite register type AAA, with decidable equality, and any map SSS from complex matrices on AAA to complex matrices on AAA, let d=∣A∣d=|A|d=∣A∣, let Ω∈CA×A\Omega\in\mathbb C^{A\times A}Ω∈CA×A have coordinates Ω(a,b)=d−1/2\Omega_{(a,b)}=d^{-1/2}Ω(a,b)​=d−1/2 when a=ba=ba=b and 000 otherwise, and put R=ΩΩ†R=\Omega\Omega^\daggerR=ΩΩ†. This defines the real number

Re⁡Tr⁡ ⁣(R S^(R)),S^(X)(a,b),(a′,b′)=S((X(a,u),(a′,v))u,v∈A)b,b′.\operatorname{Re}\operatorname{Tr}\!\bigl(R\,\widehat S(R)\bigr), \qquad \widehat S(X)_{(a,b),(a',b')} = S\bigl((X_{(a,u),(a',v)})_{u,v\in A}\bigr)_{b,b'}.ReTr(RS(R)),S(X)(a,b),(a′,b′)​=S((X(a,u),(a′,v)​)u,v∈A​)b,b′​.

Thus the extension applies SSS separately to each block indexed by the first register. The map SSS is not assumed to be linear or a channel, and no range restriction on the resulting real number is included.

QAlgorithms.Papers.Independent.Extend50.P02.infimumSimulationError

For finite index types A,BA,BA,B with decidable equality, with AAA nonempty, a criterion c∈{diamond,infidelity}c\in\{\mathrm{diamond},\mathrm{infidelity}\}c∈{diamond,infidelity}, an arbitrary function N:CA×A→CB×BN:\mathbb C^{A\times A}\to\mathbb C^{B\times B}N:CA×A→CB×B, and any set SSS of such functions, this definition is inf⁡M∈Sec(N,M)\inf_{M\in S}e_c(N,M)infM∈S​ec​(N,M), where

ediamond(N,M)=sup⁡ρ⪰0, tr⁡ρ=112Re⁡tr⁡(N^(ρ)−M^(ρ))†(N^(ρ)−M^(ρ)),einfidelity(N,M)=1−inf⁡ρ⪰0, tr⁡ρ=1(Re⁡tr⁡N^(ρ) M^(ρ) N^(ρ))2.e_{\mathrm{diamond}}(N,M) = \sup_{\rho\succeq0,\ \operatorname{tr}\rho=1} \frac12\operatorname{Re}\operatorname{tr} \sqrt{(\widehat N(\rho)-\widehat M(\rho))^\dagger (\widehat N(\rho)-\widehat M(\rho))}, \qquad e_{\mathrm{infidelity}}(N,M) = 1-\inf_{\rho\succeq0,\ \operatorname{tr}\rho=1} \left(\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\widehat N(\rho)}\,\widehat M(\rho)\,\sqrt{\widehat N(\rho)}}\right)^2.ediamond​(N,M)=ρ⪰0, trρ=1sup​21​Retr(N(ρ)−M(ρ))†(N(ρ)−M(ρ))​,einfidelity​(N,M)=1−ρ⪰0, trρ=1inf​(RetrN(ρ)​M(ρ)N(ρ)​​)2.

The matrices ρ\rhoρ are indexed by A×AA\times AA×A, and T^(ρ)(a,b),(a′,b′)=[T((ρ(a,i),(a′,i′))i,i′)]b,b′\widehat T(\rho)_{(a,b),(a',b')}=[T((\rho_{(a,i),(a',i')})_{i,i'})]_{b,b'}T(ρ)(a,b),(a′,b′)​=[T((ρ(a,i),(a′,i′)​)i,i′​)]b,b′​. Square roots use total continuous functional calculus. No channel assumptions are imposed on NNN or members of SSS. The outer infimum is the real infimum operation: it equals 000 when SSS is empty or its error values are unbounded below, and it does not assert that a minimizing member exists.

QAlgorithms.Papers.Independent.Extend50.P02.isotropicTeleport

For finite register types A,H,JA,H,JA,H,J, with the decidable equality required for their matrix operations, and arbitrary complex matrices K,LK,LK,L on H×JH\times JH×J, this defines a map from matrices on (A×H)×J(A\times H)\times J(A×H)×J to matrices on AAA. For an input XXX, define matrices CK(X)C_K(X)CK​(X) and CL(X)C_L(X)CL​(X) on AAA by

CT(X)a,a′=∑h,h′∈H∑j,j′∈JT(h,j),(h′,j′) X((a,h′),j′),((a′,h),j)(T=K,L).C_T(X)_{a,a'} = \sum_{h,h'\in H}\sum_{j,j'\in J} T_{(h,j),(h',j')}\, X_{((a,h'),j'),((a',h),j)} \quad(T=K,L).CT​(X)a,a′​=h,h′∈H∑​j,j′∈J∑​T(h,j),(h′,j′)​X((a,h′),j′),((a′,h),j)​(T=K,L).

The output is

CK(X)+∣A∣ Tr⁡(CL(X)) IA−CL(X)∣A∣2−1.C_K(X)+ \frac{|A|\,\operatorname{Tr}(C_L(X))\,I_A-C_L(X)} {|A|^2-1}.CK​(X)+∣A∣2−1∣A∣Tr(CL​(X))IA​−CL​(X)​.

There are no positivity or normalization assumptions on K,LK,LK,L, and the definition does not itself require the resulting map to be a channel. Empty registers are included; sums over empty types vanish, and when ∣A∣=1|A|=1∣A∣=1 the second summand is zero because division by zero is defined using 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Extend50.P02.nonidentityWeylAverage

For a finite register type AAA and any complex matrix XXX on AAA, let d=∣A∣d=|A|d=∣A∣. This defines the matrix

d Tr⁡(X) IA−Xd2−1,\frac{d\,\operatorname{Tr}(X)\,I_A-X}{d^2-1},d2−1dTr(X)IA​−X​,

where the scalar arithmetic is in C\mathbb CC. No positivity, Hermiticity, trace, or channel condition is assumed. The definition includes d=0d=0d=0 and d=1d=1d=1; because the inverse of zero is zero, its value is the zero matrix when d=1d=1d=1.

QAlgorithms.Papers.Independent.Extend50.P02.pptCorrectionBound

For finite index types H,JH,JH,J with decidable equality, a Boolean ns\mathrm{ns}ns, a natural number ddd, and an arbitrary function NNN from complex square matrices on HHH to complex square matrices on JJJ, put

C(h,j),(h′,j′)=(N(Eh,h′))j,j′,C_{(h,j),(h',j')}=\bigl(N(E_{h,h'})\bigr)_{j,j'},C(h,j),(h′,j′)​=(N(Eh,h′​))j,j′​,

where Eh,h′E_{h,h'}Eh,h′​ has its sole nonzero entry 111 at (h,h′)(h,h')(h,h′). This defines

1−sup⁡{Re⁡tr⁡(KC):K is a complex square matrix on H×J,σ is a complex square matrix on H,K⪰0,σ⪰0,tr⁡σ=1,σ⊗IJ−K⪰0,ns=true ⟹ d2Tr⁡HK=IJ,σ⊗IJ+dKΓJ⪰0,σ⊗IJ−dKΓJ⪰0},1-\sup\left\{ \operatorname{Re}\operatorname{tr}(KC): \begin{array}{l} K\text{ is a complex square matrix on }H\times J,\quad \sigma\text{ is a complex square matrix on }H,\\ K\succeq0,\quad \sigma\succeq0,\quad\operatorname{tr}\sigma=1,\quad \sigma\otimes I_J-K\succeq0,\\ \mathrm{ns}=\mathrm{true}\ \Longrightarrow\ d^2\operatorname{Tr}_H K=I_J,\\ \sigma\otimes I_J+dK^{\Gamma_J}\succeq0,\quad \sigma\otimes I_J-dK^{\Gamma_J}\succeq0 \end{array} \right\},1−sup⎩⎨⎧​Retr(KC):K is a complex square matrix on H×J,σ is a complex square matrix on H,K⪰0,σ⪰0,trσ=1,σ⊗IJ​−K⪰0,ns=true ⟹ d2TrH​K=IJ​,σ⊗IJ​+dKΓJ​⪰0,σ⊗IJ​−dKΓJ​⪰0​⎭⎬⎫​,

where

(Tr⁡HK)j,j′=∑hK(h,j),(h,j′),(KΓJ)(h,j),(h′,j′)=K(h,j′),(h′,j).(\operatorname{Tr}_H K)_{j,j'}=\sum_hK_{(h,j),(h,j')}, \qquad (K^{\Gamma_J})_{(h,j),(h',j')}=K_{(h,j'),(h',j)}.(TrH​K)j,j′​=h∑​K(h,j),(h,j′)​,(KΓJ​)(h,j),(h′,j′)​=K(h,j′),(h′,j)​.

Real scalars act through their complex embeddings. A false ns\mathrm{ns}ns flag imposes no marginal equality; d=0d=0d=0 and empty registers are allowed. In particular, an empty HHH makes the requirement tr⁡σ=1\operatorname{tr}\sigma=1trσ=1 impossible, and d=0d=0d=0 with a true flag makes the marginal equality impossible when JJJ is nonempty. No channel or linearity assumption is imposed on NNN. The real supremum is zero when its set is empty or unbounded above.

QAlgorithms.Papers.Independent.Extend50.P02.pptTeleportBound

For finite index types H,JH,JH,J with decidable equality, a natural number ddd, and an arbitrary complex square matrix ρ\rhoρ on H×JH\times JH×J, this defines

1−sup⁡{Re⁡tr⁡(Kρ):K is a complex square matrix on H×J,K⪰0,I−K⪰0,I+dKΓJ⪰0,I−dKΓJ⪰0},(KΓJ)(h,j),(h′,j′)=K(h,j′),(h′,j).1-\sup\left\{ \operatorname{Re}\operatorname{tr}(K\rho): \begin{array}{l} K\text{ is a complex square matrix on }H\times J,\\ K\succeq0,\quad I-K\succeq0,\quad I+dK^{\Gamma_J}\succeq0,\quad I-dK^{\Gamma_J}\succeq0 \end{array} \right\}, \qquad (K^{\Gamma_J})_{(h,j),(h',j')}=K_{(h,j'),(h',j)}.1−sup{Retr(Kρ):K is a complex square matrix on H×J,K⪰0,I−K⪰0,I+dKΓJ​⪰0,I−dKΓJ​⪰0​},(KΓJ​)(h,j),(h′,j′)​=K(h,j′),(h′,j)​.

Here III is the identity on H×JH\times JH×J, and the real scalar ddd is embedded into C\mathbb CC. No density-matrix assumption is imposed on ρ\rhoρ, and d=0d=0d=0 is permitted, in which case the two conditions involving dKΓJdK^{\Gamma_J}dKΓJ​ reduce to positivity of III. The registers may be empty. The supremum is the real supremum operation, with value zero on an empty set or a set unbounded above.

QAlgorithms.Papers.Independent.Extend50.P02.realOperatorScale

For any index type III, real number rrr, and complex square matrix XXX indexed by III, this defines the matrix obtained by multiplying every entry of XXX by rrr, viewed as a complex number:

realOperatorScale⁡(r,X)ij=rXij.\operatorname{realOperatorScale}(r,X)_{ij}=rX_{ij}.realOperatorScale(r,X)ij​=rXij​.

There is no sign restriction on rrr and no condition on XXX; the definition also applies when III is empty.

QAlgorithms.Papers.Independent.Extend50.P02.reducedCorrectionBound

For finite index types H,JH,JH,J with decidable equality, Boolean flags ppt,ns\mathrm{ppt},\mathrm{ns}ppt,ns, a natural number ddd, and an arbitrary function NNN from complex square matrices on HHH to complex square matrices on JJJ, define

C(h,j),(h′,j′)=(N(Eh,h′))j,j′,C_{(h,j),(h',j')}=\bigl(N(E_{h,h'})\bigr)_{j,j'},C(h,j),(h′,j′)​=(N(Eh,h′​))j,j′​,

where Eh,h′E_{h,h'}Eh,h′​ is the matrix with its sole nonzero entry equal to 111 at (h,h′)(h,h')(h,h′). This declaration defines

1−sup⁡{1∣J∣Re⁡∑h,h′,j,j′,kC(h,j),(h′,j′)P(h,(j,k)),(h′,(j′,k)): M satisfies the conditions below}.1-\sup\left\{ \frac1{|J|}\operatorname{Re} \sum_{h,h',j,j',k}C_{(h,j),(h',j')} P_{(h,(j,k)),(h',(j',k))}:\ M\text{ satisfies the conditions below} \right\}.1−sup⎩⎨⎧​∣J∣1​Reh,h′,j,j′,k∑​C(h,j),(h′,j′)​P(h,(j,k)),(h′,(j′,k))​: M satisfies the conditions below⎭⎬⎫​.

The variable M=(M+,M−,M0,M1,M2,M3)M=(M_+,M_-,M_0,M_1,M_2,M_3)M=(M+​,M−​,M0​,M1​,M2​,M3​) consists of six complex square matrices on V=H×(J×J)V=H\times(J\times J)V=H×(J×J). Put s=d2−1s=\sqrt{d^2-1}s=d2−1​, P=(dM0+M1+sM2)/(2d)P=(dM_0+M_1+sM_2)/(2d)P=(dM0​+M1​+sM2​)/(2d), and Q=(2d(M++M−)+dM0−M1−sM2)/(2d)Q=(2d(M_++M_-)+dM_0-M_1-sM_2)/(2d)Q=(2d(M+​+M−​)+dM0​−M1​−sM2​)/(2d). Let SXSXSX swap both copies of the two JJJ indices, and define

(αX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′)),(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)),(Tr⁡HX)(j,k),(j′,k′)=∑hX(h,(j,k)),(h,(j′,k′)),B(Z,X,Y,W)=(Z+WX−iYX+iYZ−W).\begin{aligned} (\alpha X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j,k)),(h,(j',k'))},\\ (\tau X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j',k)),(h,(j,k'))},\\ (\operatorname{Tr}_H X)_{(j,k),(j',k')}&=\sum_hX_{(h,(j,k)),(h,(j',k'))},\\ \mathcal B(Z,X,Y,W)&=\begin{pmatrix}Z+W&X-\mathrm iY\\X+\mathrm iY&Z-W\end{pmatrix}. \end{aligned}(αX)(h,(j,k)),(h′,(j′,k′))​(τX)(h,(j,k)),(h′,(j′,k′))​(TrH​X)(j,k),(j′,k′)​B(Z,X,Y,W)​=X(h′,(j,k)),(h,(j′,k′))​,=X(h′,(j′,k)),(h,(j,k′))​,=h∑​X(h,(j,k)),(h,(j′,k′))​,=(Z+WX+iY​X−iYZ−W​).​

The unconditional conditions are

M+,M−,M0⪰0,B(M0,M1,M2,M3)⪰0,SM+=M+,SM−=M−,SM0=M0,SM1=M1,SM2=−M2,SM3=−M3,Tr⁡H(M++M−+M0)=IJ×J,d=2⟹M−=0,R(h,(j,k)),(h′,(j′,k′))=1∣J∣(∑tR(h,(j,t)),(h′,(j′,t)))δk,k′for R=P,Q and all indices.\begin{gathered} M_+,M_-,M_0\succeq0,\quad\mathcal B(M_0,M_1,M_2,M_3)\succeq0,\\ SM_+=M_+,\quad SM_-=M_-,\quad SM_0=M_0,\quad SM_1=M_1,\quad SM_2=-M_2,\quad SM_3=-M_3,\\ \operatorname{Tr}_H(M_++M_-+M_0)=I_{J\times J},\qquad d=2\Longrightarrow M_-=0,\\ R_{(h,(j,k)),(h',(j',k'))} =\frac1{|J|}\left(\sum_tR_{(h,(j,t)),(h',(j',t))}\right)\delta_{k,k'} \quad\text{for }R=P,Q\text{ and all indices}. \end{gathered}M+​,M−​,M0​⪰0,B(M0​,M1​,M2​,M3​)⪰0,SM+​=M+​,SM−​=M−​,SM0​=M0​,SM1​=M1​,SM2​=−M2​,SM3​=−M3​,TrH​(M+​+M−​+M0​)=IJ×J​,d=2⟹M−​=0,R(h,(j,k)),(h′,(j′,k′))​=∣J∣1​(t∑​R(h,(j,t)),(h′,(j′,t))​)δk,k′​for R=P,Q and all indices.​

If ppt\mathrm{ppt}ppt is true, also require

α(2d+2M++M0+M1)⪰0,{M−=0,d=2,α(2d−2M−+M1−M0)⪰0 and τ(M++dd−2M−−12(dM0−M1−sM2))⪰0,d≠2,B(G0,G1,G2,G3)⪰0,τ(dd+2M++M−+12(dM0−M1−sM2))⪰0,B(E0,E1,E2,E3)⪰0,\begin{gathered} \alpha(\tfrac2{d+2}M_++M_0+M_1)\succeq0,\\ \begin{cases} M_-=0,&d=2,\\ \alpha(\tfrac2{d-2}M_-+M_1-M_0)\succeq0 \ \text{and}\ \tau(M_++\tfrac d{d-2}M_--\tfrac12(dM_0-M_1-sM_2))\succeq0,&d\ne2, \end{cases}\\ \mathcal B(G_0,G_1,G_2,G_3)\succeq0,\quad \tau(\tfrac d{d+2}M_++M_-+\tfrac12(dM_0-M_1-sM_2))\succeq0,\quad \mathcal B(E_0,E_1,E_2,E_3)\succeq0, \end{gathered}α(d+22​M+​+M0​+M1​)⪰0,{M−​=0,α(d−22​M−​+M1​−M0​)⪰0 and τ(M+​+d−2d​M−​−21​(dM0​−M1​−sM2​))⪰0,​d=2,d=2,​B(G0​,G1​,G2​,G3​)⪰0,τ(d+2d​M+​+M−​+21​(dM0​−M1​−sM2​))⪰0,B(E0​,E1​,E2​,E3​)⪰0,​

where

G0=α(M++M−+12(M0−dM1)),G1=α(M+−M−+12(M1−dM0)),G2=3(d2−1)2αM2,G3=3(d2−1)2αM3,E0=1d2−1τ(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1τ(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1sτ(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} G_0&=\alpha(M_++M_-+\tfrac12(M_0-dM_1)),& G_1&=\alpha(M_+-M_-+\tfrac12(M_1-dM_0)),\\ G_2&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_2,& G_3&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_3,\\ E_0&=\tfrac1{d^2-1}\tau(d(M_+-M_-)+\tfrac12((d^2-2)M_0+dM_1+dsM_2)),\\ E_1&=\tfrac1{d^2-1}\tau(-M_++M_-+\tfrac12(dM_0+(2d^2-3)M_1-sM_2)),\\ E_2&=\tfrac1s\tau(M_+-M_-+\tfrac12(M_1-dM_0-sM_2)),& E_3&=\tau M_3. \end{aligned}G0​G2​E0​E1​E2​​=α(M+​+M−​+21​(M0​−dM1​)),=23(d2−1)​​αM2​,=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),​G1​G3​E3​​=α(M+​−M−​+21​(M1​−dM0​)),=23(d2−1)​​αM3​,=τM3​.​

If ns\mathrm{ns}ns is true, also require, writing I=IJ×JI=I_{J\times J}I=IJ×J​,

Tr⁡H(2M+)(d+2)(d−1)=Tr⁡H(2M++M0+M1)d(d+1),d≠2 ⟹ Tr⁡H(2M−)(d−2)(d+1)=Tr⁡H(2M−+M0−M1)d(d−1),12Tr⁡HM0=dI+Tr⁡H(M−−M+−M1)d(d2−1),12Tr⁡HM1=−I+dTr⁡H(M+−M−+M1)d(d2−1),Tr⁡HM2=0,Tr⁡HM3=0.\begin{aligned} \frac{\operatorname{Tr}_H(2M_+)}{(d+2)(d-1)} &=\frac{\operatorname{Tr}_H(2M_++M_0+M_1)}{d(d+1)},\\ d\ne2\ &\Longrightarrow\ \frac{\operatorname{Tr}_H(2M_-)}{(d-2)(d+1)} =\frac{\operatorname{Tr}_H(2M_-+M_0-M_1)}{d(d-1)},\\ \tfrac12\operatorname{Tr}_H M_0 &=\frac{dI+\operatorname{Tr}_H(M_--M_+-M_1)}{d(d^2-1)},\\ \tfrac12\operatorname{Tr}_H M_1 &=\frac{-I+d\operatorname{Tr}_H(M_+-M_-+M_1)}{d(d^2-1)},\\ \operatorname{Tr}_H M_2&=0,\qquad\operatorname{Tr}_H M_3=0. \end{aligned}(d+2)(d−1)TrH​(2M+​)​d=2 21​TrH​M0​21​TrH​M1​TrH​M2​​=d(d+1)TrH​(2M+​+M0​+M1​)​,⟹ (d−2)(d+1)TrH​(2M−​)​=d(d−1)TrH​(2M−​+M0​−M1​)​,=d(d2−1)dI+TrH​(M−​−M+​−M1​)​,=d(d2−1)−I+dTrH​(M+​−M−​+M1​)​,=0,TrH​M3​=0.​

False flags impose none of their conditional requirements. No linearity or channel assumption is made on NNN, and feasibility is not asserted. Empty index types and d=0,1d=0,1d=0,1 are included; zero inverses and square roots of negative real numbers are zero. The real supremum is zero for an empty set or a set unbounded above.

QAlgorithms.Papers.Independent.Extend50.P02.reducedE

For a natural number ddd, arbitrary index types H,JH,JH,J, and six complex square matrices M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​ indexed by V=H×(J×J)V=H\times(J\times J)V=H×(J×J), this defines a family of four matrices E0,E1,E2,E3E_0,E_1,E_2,E_3E0​,E1​,E2​,E3​ on VVV. Write s=d2−1s=\sqrt{d^2-1}s=d2−1​, with ddd interpreted as a real number in scalar expressions, and define the index transposition τ\tauτ by

(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)).(\tau X)_{(h,(j,k)),(h',(j',k'))} =X_{(h',(j',k)),(h,(j,k'))}.(τX)(h,(j,k)),(h′,(j′,k′))​=X(h′,(j′,k)),(h,(j,k′))​.

Then the four matrices are

E0=1d2−1 τ ⁣(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1 τ ⁣(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1s τ ⁣(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} E_0&=\frac{1}{d^2-1}\, \tau\!\left(d(M_+-M_-)+\frac12\bigl((d^2-2)M_0+dM_1+dsM_2\bigr)\right),\\ E_1&=\frac{1}{d^2-1}\, \tau\!\left(-M_++M_-+\frac12\bigl(dM_0+(2d^2-3)M_1-sM_2\bigr)\right),\\ E_2&=\frac1s\, \tau\!\left(M_+-M_-+\frac12(M_1-dM_0-sM_2)\right),\\ E_3&=\tau M_3. \end{aligned}E0​E1​E2​E3​​=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),=τM3​.​

All real scalars act through their complex embeddings. There are no positivity assumptions on these matrices and no lower bound on ddd; real square roots of negative numbers and inverses of zero are both defined to be zero, so the formulas also define values at d=0d=0d=0 and d=1d=1d=1.

QAlgorithms.Papers.Independent.Extend50.P02.reducedG

For index types H,JH,JH,J, any natural number ddd, and a record MMM of six arbitrary complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), denote its fields by M+,M−,M0,M1,M2,M3M_+,M_-,M_0,M_1,M_2,M_3M+​,M−​,M0​,M1​,M2​,M3​. This defines four matrices indexed by 0,1,2,30,1,2,30,1,2,3:

G0=(M++M−+12(M0−dM1))TH,G1=(M+−M−+12(M1−dM0))TH,G2=3(d2−1)2 M2TH,G3=3(d2−1)2 M3TH,\begin{aligned} G_0&=\left(M_++M_-+\tfrac12(M_0-dM_1)\right)^{T_H},\\ G_1&=\left(M_+-M_-+\tfrac12(M_1-dM_0)\right)^{T_H},\\ G_2&=\frac{\sqrt{3(d^2-1)}}{2}\,M_2^{T_H},\\ G_3&=\frac{\sqrt{3(d^2-1)}}{2}\,M_3^{T_H}, \end{aligned}G0​G1​G2​G3​​=(M+​+M−​+21​(M0​−dM1​))TH​,=(M+​−M−​+21​(M1​−dM0​))TH​,=23(d2−1)​​M2TH​​,=23(d2−1)​​M3TH​​,​

where X(h,(j,k)),(h′,(j′,k′))TH=X(h′,(j,k)),(h,(j′,k′))X^{T_H}_{(h,(j,k)),(h',(j',k'))}=X_{(h',(j,k)),(h,(j',k'))}X(h,(j,k)),(h′,(j′,k′))TH​​=X(h′,(j,k)),(h,(j′,k′))​, without complex conjugation. All coefficient arithmetic is real and scalars act by complex scalar multiplication. No condition on MMM or lower bound on ddd is assumed; for d=0d=0d=0 or d=1d=1d=1, the square-root coefficient is zero, so G2=G3=0G_2=G_3=0G2​=G3​=0.

QAlgorithms.Papers.Independent.Extend50.P02.reducedL

For index types H,JH,JH,J, any natural number ddd, and a record MMM of six arbitrary complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), write M0,M1,M2M_0,M_1,M_2M0​,M1​,M2​ for its fields zero,one,two\mathrm{zero},\mathrm{one},\mathrm{two}zero,one,two. This defines a family of three matrices, indexed by 0,1,20,1,20,1,2, by

L0=(d2−2)M0+dM1+dd2−1 M2,L1=dM0+(2d2−3)M1−d2−1 M2,L2=M1−dM0−d2−1 M2.\begin{aligned} L_0&=(d^2-2)M_0+dM_1+d\sqrt{d^2-1}\,M_2,\\ L_1&=dM_0+(2d^2-3)M_1-\sqrt{d^2-1}\,M_2,\\ L_2&=M_1-dM_0-\sqrt{d^2-1}\,M_2. \end{aligned}L0​L1​L2​​=(d2−2)M0​+dM1​+dd2−1​M2​,=dM0​+(2d2−3)M1​−d2−1​M2​,=M1​−dM0​−d2−1​M2​.​

Here all coefficient arithmetic, including subtraction, takes place in R\mathbb RR, and the resulting scalars act on complex matrices. No restrictions on MMM or ddd are imposed: d=0d=0d=0 and d=1d=1d=1 are included, and the real square root is zero when its argument is negative.

QAlgorithms.Papers.Independent.Extend50.P02.reducedObjective

For finite index types H,JH,JH,J, an arbitrary complex square matrix TTT indexed by H×JH\times JH×J, and an arbitrary complex square matrix PPP indexed by H×(J×J)H\times(J\times J)H×(J×J), this defines the real number

1∣J∣Re⁡ ⁣(∑h,h′∈H∑j,j′,k∈JT(h,j),(h′,j′) P(h,(j,k)),(h′,(j′,k))).\frac1{|J|}\operatorname{Re}\!\left( \sum_{h,h'\in H}\sum_{j,j',k\in J} T_{(h,j),(h',j')}\, P_{(h,(j,k)),(h',(j',k))} \right).∣J∣1​Re​h,h′∈H∑​j,j′,k∈J∑​T(h,j),(h′,j′)​P(h,(j,k)),(h′,(j′,k))​​.

There is no conjugation of either factor and no positivity, normalization, or Hermitian assumption. Empty index types are allowed; in particular, when JJJ is empty the sum is zero and division by its zero cardinality is defined to give zero.

QAlgorithms.Papers.Independent.Extend50.P02.reducedP

For index types H,JH,JH,J, any natural number ddd, and a record MMM of six arbitrary complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), write M0,M1,M2M_0,M_1,M_2M0​,M1​,M2​ for its fields zero,one,two\mathrm{zero},\mathrm{one},\mathrm{two}zero,one,two. This defines

reducedP⁡(d,M)=12d(dM0+M1+d2−1 M2),\operatorname{reducedP}(d,M) = \frac{1}{2d}\left(dM_0+M_1+\sqrt{d^2-1}\,M_2\right),reducedP(d,M)=2d1​(dM0​+M1​+d2−1​M2​),

where ddd is viewed as a real number and each real scalar acts by entrywise complex scalar multiplication. No lower bound on ddd or condition on MMM is assumed. The real square root of a negative number and division by zero both evaluate to zero, so d=0d=0d=0 gives the zero matrix, while d=1d=1d=1 makes the square-root term zero.

QAlgorithms.Papers.Independent.Extend50.P02.reducedQ

For index types H,JH,JH,J, any natural number ddd, and a record MMM of six arbitrary complex square matrices indexed by H×(J×J)H\times(J\times J)H×(J×J), write M+,M−,M0,M1,M2M_+,M_-,M_0,M_1,M_2M+​,M−​,M0​,M1​,M2​ for its fields plus,minus,zero,one,two\mathrm{plus},\mathrm{minus},\mathrm{zero},\mathrm{one},\mathrm{two}plus,minus,zero,one,two. This defines

reducedQ⁡(d,M)=12d(2d(M++M−)+dM0−M1−d2−1 M2),\operatorname{reducedQ}(d,M) = \frac{1}{2d} \left(2d(M_++M_-)+dM_0-M_1-\sqrt{d^2-1}\,M_2\right),reducedQ(d,M)=2d1​(2d(M+​+M−​)+dM0​−M1​−d2−1​M2​),

with all scalar expressions evaluated over R\mathbb RR and then used as complex matrix scalars. No condition on MMM or lower bound on ddd is imposed. Real square roots of negative arguments and division by zero evaluate to zero; consequently d=0d=0d=0 gives the zero matrix, and d=1d=1d=1 makes the square-root term zero.

QAlgorithms.Papers.Independent.Extend50.P02.reducedTeleportBound

For finite index types H,JH,JH,J with decidable equality, a Boolean ppt\mathrm{ppt}ppt, a natural number ddd, and an arbitrary complex matrix ρ\rhoρ on H×JH\times JH×J, this defines

1−sup⁡{1∣J∣Re⁡∑h,h′,j,j′,kρ(h,j),(h′,j′)P(h,(j,k)),(h′,(j′,k)): M satisfies the conditions below}.1-\sup\left\{ \frac1{|J|}\operatorname{Re} \sum_{h,h',j,j',k}\rho_{(h,j),(h',j')} P_{(h,(j,k)),(h',(j',k))}:\ M\text{ satisfies the conditions below} \right\}.1−sup⎩⎨⎧​∣J∣1​Reh,h′,j,j′,k∑​ρ(h,j),(h′,j′)​P(h,(j,k)),(h′,(j′,k))​: M satisfies the conditions below⎭⎬⎫​.

Here M=(M+,M−,M0,M1,M2,M3)M=(M_+,M_-,M_0,M_1,M_2,M_3)M=(M+​,M−​,M0​,M1​,M2​,M3​) ranges over six complex square matrices on V=H×(J×J)V=H\times(J\times J)V=H×(J×J), s=d2−1s=\sqrt{d^2-1}s=d2−1​, and P=(dM0+M1+sM2)/(2d)P=(dM_0+M_1+sM_2)/(2d)P=(dM0​+M1​+sM2​)/(2d). Let SXSXSX swap the two JJJ indices in both row and column, and define

(αX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′)),(τX)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′)),B(Z,X,Y,W)=(Z+WX−iYX+iYZ−W).\begin{aligned} (\alpha X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j,k)),(h,(j',k'))},\\ (\tau X)_{(h,(j,k)),(h',(j',k'))}&=X_{(h',(j',k)),(h,(j,k'))},\\ \mathcal B(Z,X,Y,W)&=\begin{pmatrix}Z+W&X-\mathrm iY\\X+\mathrm iY&Z-W\end{pmatrix}. \end{aligned}(αX)(h,(j,k)),(h′,(j′,k′))​(τX)(h,(j,k)),(h′,(j′,k′))​B(Z,X,Y,W)​=X(h′,(j,k)),(h,(j′,k′))​,=X(h′,(j′,k)),(h,(j,k′))​,=(Z+WX+iY​X−iYZ−W​).​

The unconditional conditions on MMM are

M+,M−,M0⪰0,B(M0,M1,M2,M3)⪰0,SM+=M+,SM−=M−,SM0=M0,SM1=M1,SM2=−M2,SM3=−M3,M++M−+M0=IV,d=2⟹M−=0,P(h,(j,k)),(h′,(j′,k′))=1∣J∣(∑tP(h,(j,t)),(h′,(j′,t)))δk,k′for all indices.\begin{gathered} M_+,M_-,M_0\succeq0,\qquad \mathcal B(M_0,M_1,M_2,M_3)\succeq0,\\ SM_+=M_+,\quad SM_-=M_-,\quad SM_0=M_0,\quad SM_1=M_1,\quad SM_2=-M_2,\quad SM_3=-M_3,\\ M_++M_-+M_0=I_V,\qquad d=2\Longrightarrow M_-=0,\\ P_{(h,(j,k)),(h',(j',k'))} =\frac1{|J|}\left(\sum_tP_{(h,(j,t)),(h',(j',t))}\right)\delta_{k,k'} \quad\text{for all indices}. \end{gathered}M+​,M−​,M0​⪰0,B(M0​,M1​,M2​,M3​)⪰0,SM+​=M+​,SM−​=M−​,SM0​=M0​,SM1​=M1​,SM2​=−M2​,SM3​=−M3​,M+​+M−​+M0​=IV​,d=2⟹M−​=0,P(h,(j,k)),(h′,(j′,k′))​=∣J∣1​(t∑​P(h,(j,t)),(h′,(j′,t))​)δk,k′​for all indices.​

When ppt\mathrm{ppt}ppt is true, the following are also required:

α(2d+2M++M0+M1)⪰0,{M−=0,d=2,α(2d−2M−+M1−M0)⪰0 and τ(M++dd−2M−−12(dM0−M1−sM2))⪰0,d≠2,B(G0,G1,G2,G3)⪰0,τ(dd+2M++M−+12(dM0−M1−sM2))⪰0,B(E0,E1,E2,E3)⪰0,\begin{gathered} \alpha(\tfrac2{d+2}M_++M_0+M_1)\succeq0,\\ \begin{cases} M_-=0,&d=2,\\ \alpha(\tfrac2{d-2}M_-+M_1-M_0)\succeq0 \ \text{and}\ \tau(M_++\tfrac d{d-2}M_--\tfrac12(dM_0-M_1-sM_2))\succeq0,&d\ne2, \end{cases}\\ \mathcal B(G_0,G_1,G_2,G_3)\succeq0,\quad \tau(\tfrac d{d+2}M_++M_-+\tfrac12(dM_0-M_1-sM_2))\succeq0,\quad \mathcal B(E_0,E_1,E_2,E_3)\succeq0, \end{gathered}α(d+22​M+​+M0​+M1​)⪰0,{M−​=0,α(d−22​M−​+M1​−M0​)⪰0 and τ(M+​+d−2d​M−​−21​(dM0​−M1​−sM2​))⪰0,​d=2,d=2,​B(G0​,G1​,G2​,G3​)⪰0,τ(d+2d​M+​+M−​+21​(dM0​−M1​−sM2​))⪰0,B(E0​,E1​,E2​,E3​)⪰0,​

where

G0=α(M++M−+12(M0−dM1)),G1=α(M+−M−+12(M1−dM0)),G2=3(d2−1)2αM2,G3=3(d2−1)2αM3,E0=1d2−1τ(d(M+−M−)+12((d2−2)M0+dM1+dsM2)),E1=1d2−1τ(−M++M−+12(dM0+(2d2−3)M1−sM2)),E2=1sτ(M+−M−+12(M1−dM0−sM2)),E3=τM3.\begin{aligned} G_0&=\alpha(M_++M_-+\tfrac12(M_0-dM_1)),& G_1&=\alpha(M_+-M_-+\tfrac12(M_1-dM_0)),\\ G_2&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_2,& G_3&=\tfrac{\sqrt{3(d^2-1)}}2\alpha M_3,\\ E_0&=\tfrac1{d^2-1}\tau(d(M_+-M_-)+\tfrac12((d^2-2)M_0+dM_1+dsM_2)),\\ E_1&=\tfrac1{d^2-1}\tau(-M_++M_-+\tfrac12(dM_0+(2d^2-3)M_1-sM_2)),\\ E_2&=\tfrac1s\tau(M_+-M_-+\tfrac12(M_1-dM_0-sM_2)),& E_3&=\tau M_3. \end{aligned}G0​G2​E0​E1​E2​​=α(M+​+M−​+21​(M0​−dM1​)),=23(d2−1)​​αM2​,=d2−11​τ(d(M+​−M−​)+21​((d2−2)M0​+dM1​+dsM2​)),=d2−11​τ(−M+​+M−​+21​(dM0​+(2d2−3)M1​−sM2​)),=s1​τ(M+​−M−​+21​(M1​−dM0​−sM2​)),​G1​G3​E3​​=α(M+​−M−​+21​(M1​−dM0​)),=23(d2−1)​​αM3​,=τM3​.​

There is no density-matrix assumption on ρ\rhoρ, no assertion that feasible matrices exist, and no exclusion of empty registers or d=0,1d=0,1d=0,1. Real scalar inverses and square roots use the conventions 0−1=00^{-1}=00−1=0 and x=0\sqrt{x}=0x​=0 for x<0x<0x<0. The supremum is the real-valued supremum operation, whose value is zero for an empty set or a set unbounded above, so the definition remains a real number in those cases.

QAlgorithms.Papers.Independent.Extend50.P02.simulationErrorFor

For finite index types A,BA,BA,B with decidable equality, with AAA nonempty, a criterion c∈{diamond,infidelity}c\in\{\mathrm{diamond},\mathrm{infidelity}\}c∈{diamond,infidelity}, and arbitrary functions N,MN,MN,M from matrices indexed by AAA to matrices indexed by BBB, this definition selects

error⁡c(N,M)={sup⁡ρ⪰0, tr⁡ρ=112Re⁡tr⁡Δρ†Δρ,c=diamond,1−inf⁡ρ⪰0, tr⁡ρ=1(Re⁡tr⁡N^(ρ) M^(ρ) N^(ρ))2,c=infidelity.\operatorname{error}_c(N,M)= \begin{cases} \displaystyle\sup_{\rho\succeq0,\ \operatorname{tr}\rho=1} \frac12\operatorname{Re}\operatorname{tr}\sqrt{\Delta_\rho^\dagger\Delta_\rho}, &c=\mathrm{diamond},\\[6pt] \displaystyle 1-\inf_{\rho\succeq0,\ \operatorname{tr}\rho=1} \left(\operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\widehat N(\rho)}\,\widehat M(\rho)\,\sqrt{\widehat N(\rho)}}\right)^2, &c=\mathrm{infidelity}. \end{cases}errorc​(N,M)=⎩⎨⎧​ρ⪰0, trρ=1sup​21​RetrΔρ†​Δρ​​,1−ρ⪰0, trρ=1inf​(RetrN(ρ)​M(ρ)N(ρ)​​)2,​c=diamond,c=infidelity.​

Here ρ\rhoρ is indexed by A×AA\times AA×A, Δρ=N^(ρ)−M^(ρ)\Delta_\rho=\widehat N(\rho)-\widehat M(\rho)Δρ​=N(ρ)−M(ρ), and the lift is defined by N^(ρ)(a,b),(a′,b′)=[N((ρ(a,i),(a′,i′))i,i′)]b,b′\widehat N(\rho)_{(a,b),(a',b')}=[N((\rho_{(a,i),(a',i')})_{i,i'})]_{b,b'}N(ρ)(a,b),(a′,b′)​=[N((ρ(a,i),(a′,i′)​)i,i′​)]b,b′​, likewise for MMM. The square roots use total continuous functional calculus. Neither function is assumed to be a channel. The suprema and infima are operations on real numbers; an unbounded supremum has value 000. If BBB is empty, the two branches have values 000 and 111, respectively.

QAlgorithms.Papers.Independent.Extend50.P02.stabilizedHalfTraceDistance

For finite index types A,BA,BA,B with decidable equality, with AAA nonempty, and arbitrary functions N,M:CA×A→CB×BN,M:\mathbb C^{A\times A}\to\mathbb C^{B\times B}N,M:CA×A→CB×B, this definition is the real supremum

sup⁡ρ⪰0tr⁡ρ=112Re⁡tr⁡Δρ†Δρ,Δρ=N^(ρ)−M^(ρ),\sup_{\substack{\rho\succeq0\\ \operatorname{tr}\rho=1}} \frac12\operatorname{Re}\operatorname{tr}\sqrt{\Delta_\rho^\dagger\Delta_\rho}, \qquad \Delta_\rho=\widehat N(\rho)-\widehat M(\rho),ρ⪰0trρ=1​sup​21​RetrΔρ†​Δρ​​,Δρ​=N(ρ)−M(ρ),

where ρ\rhoρ is indexed by A×AA\times AA×A, and the lifted function is defined blockwise by

(N^(ρ))(a,b),(a′,b′)=[N ⁣((ρ(a,i),(a′,i′))i,i′∈A)]b,b′,\bigl(\widehat N(\rho)\bigr)_{(a,b),(a',b')} = \left[N\!\left((\rho_{(a,i),(a',i')})_{i,i'\in A}\right)\right]_{b,b'},(N(ρ))(a,b),(a′,b′)​=[N((ρ(a,i),(a′,i′)​)i,i′∈A​)]b,b′​,

with the same definition for M^\widehat MM. The square root is given by continuous functional calculus. No channel, linearity, or continuity assumption is imposed on N,MN,MN,M; consequently the supremum need not be bounded, and the real supremum operation returns 000 for an unbounded set. The input density matrices exist because AAA is nonempty. The type BBB may be empty, in which case the value is 000.

QAlgorithms.Papers.Independent.Extend50.P02.swapExtension

For arbitrary types A,B,C,DA,B,C,DA,B,C,D and a complex matrix MMM whose rows and columns are indexed by (A×(B×B))×(C×(D×D))\bigl(A\times(B\times B)\bigr)\times\bigl(C\times(D\times D)\bigr)(A×(B×B))×(C×(D×D)), this definition produces the matrix with entries

(swapExtension⁡M)((a,(b1,b2)),(c,(d1,d2))), ((a′,(b1′,b2′)),(c′,(d1′,d2′)))=M((a,(b2,b1)),(c,(d2,d1))), ((a′,(b2′,b1′)),(c′,(d2′,d1′))).(\operatorname{swapExtension}M)_{((a,(b_1,b_2)),(c,(d_1,d_2))),\, ((a',(b'_1,b'_2)),(c',(d'_1,d'_2)))} = M_{((a,(b_2,b_1)),(c,(d_2,d_1))),\, ((a',(b'_2,b'_1)),(c',(d'_2,d'_1)))}.(swapExtensionM)((a,(b1​,b2​)),(c,(d1​,d2​))),((a′,(b1′​,b2′​)),(c′,(d1′​,d2′​)))​=M((a,(b2​,b1​)),(c,(d2​,d1​))),((a′,(b2′​,b1′​)),(c′,(d2′​,d1′​)))​.

It exchanges the two BBB-indices and the two DDD-indices simultaneously in both the row and column, while retaining the AAA- and CCC-indices. No conjugation, positivity, normalization, finiteness, or nonemptiness condition is required.

QAlgorithms.Papers.Independent.Extend50.P02.swapReduced

For index types H,JH,JH,J and an arbitrary complex square matrix XXX indexed by H×(J×J)H\times(J\times J)H×(J×J), this defines a matrix by simultaneously exchanging the two JJJ-coordinates in its row and column indices:

swapReduced⁡(X)(h,(j,k)),(h′,(j′,k′))=X(h,(k,j)),(h′,(k′,j′))\operatorname{swapReduced}(X)_{(h,(j,k)),(h',(j',k'))} = X_{(h,(k,j)),(h',(k',j'))}swapReduced(X)(h,(j,k)),(h′,(j′,k′))​=X(h,(k,j)),(h′,(k′,j′))​

for every h,h′∈Hh,h'\in Hh,h′∈H and j,j′,k,k′∈Jj,j',k,k'\in Jj,j′,k,k′∈J. No condition is imposed on XXX, and empty index types are allowed.

QAlgorithms.Papers.Independent.Extend50.P02.teleportBipartite

For arbitrary index types A,B,H,JA,B,H,JA,B,H,J and any function LLL from complex matrices indexed by (A×H)×J(A\times H)\times J(A×H)×J to complex matrices indexed by BBB, the definition returns the function L~\widetilde LL with output matrices indexed by {∗}×B\{\ast\}\times B{∗}×B, where {∗}\{\ast\}{∗} is a singleton, defined for every input matrix XXX by

L~(X)(∗,b),(∗,b′)=L(X)b,b′.\widetilde L(X)_{(\ast,b),(\ast,b')}=L(X)_{b,b'}.L(X)(∗,b),(∗,b′)​=L(X)b,b′​.

It adds a singleton coordinate to the output indices. No linearity, channel property, positivity, normalization, finiteness, or nonemptiness of the other index types is assumed.

QAlgorithms.Papers.Independent.Extend50.P02.teleportError

For finite index types A,B,H,JA,B,H,JA,B,H,J with decidable equality and with AAA nonempty, a criterion ccc equal to either diamond\mathrm{diamond}diamond or infidelity\mathrm{infidelity}infidelity, an optional Boolean kind\mathrm{kind}kind, any function NNN from AAA-indexed complex matrices to BBB-indexed complex matrices, and any complex matrix ρ\rhoρ indexed by H×JH\times JH×J, the definition returns the real infimum of the errors err⁡c(N,S)\operatorname{err}_c(N,S)errc​(N,S) over the following admissible functions SSS. Such an SSS must have the form

S(X)=L(Y),Y((a,h),j), ((a′,h′),j′)=Xa,a′ρ(h,j),(h′,j′),S(X)=L(Y),\qquad Y_{((a,h),j),\,((a',h'),j')}=X_{a,a'}\rho_{(h,j),(h',j')},S(X)=L(Y),Y((a,h),j),((a′,h′),j′)​=Xa,a′​ρ(h,j),(h′,j′)​,

where LLL is a channel. Throughout this definition, a channel TTT means a function admitting a finite Kraus representation T(X)=∑zKzXKz†T(X)=\sum_zK_zXK_z^\daggerT(X)=∑z​Kz​XKz†​ with ∑zKz†Kz=I\sum_zK_z^\dagger K_z=I∑z​Kz†​Kz​=I; EuvE_{uv}Euv​ denotes a matrix unit. Put U=A×HU=A\times HU=A×H. If kind\mathrm{kind}kind is absent, admissibility additionally requires a finite family of functions EyE_yEy​ from UUU-indexed matrices to singleton-indexed matrices and channels FyF_yFy​ from JJJ-indexed matrices to BBB-indexed matrices, such that every EyE_yEy​ has a finite Kraus representation, ∑yEy\sum_yE_y∑y​Ey​ is a channel, and

L(X)b,b′=∑y∑u,u′∈U∑j,j′∈JX(u,j),(u′,j′) Ey(Euu′)∗,∗ Fy(Ejj′)b,b′L(X)_{b,b'}= \sum_y\sum_{u,u'\in U}\sum_{j,j'\in J} X_{(u,j),(u',j')}\, E_y(E_{uu'})_{\ast,\ast}\, F_y(E_{jj'})_{b,b'}L(X)b,b′​=y∑​u,u′∈U∑​j,j′∈J∑​X(u,j),(u′,j′)​Ey​(Euu′​)∗,∗​Fy​(Ejj′​)b,b′​

for all X,b,b′X,b,b'X,b,b′. If kind=some(ppt)\mathrm{kind}=\mathrm{some}(\mathrm{ppt})kind=some(ppt), admissibility instead requires a positive semidefinite matrix MMM indexed by (U×(J×J))×({∗}×(B×B))(U\times(J\times J))\times(\{\ast\}\times(B\times B))(U×(J×J))×({∗}×(B×B)). Suppressing the singleton coordinate, its entries must obey, for all free indices,

∑b,fMujebf; u′j′e′bf=δu,u′δj,j′δe,e′,Muejfb; u′e′j′f′b′=Mujebf; u′j′e′b′f′,\sum_{b,f}M_{u j e b f;\,u'j'e'b f} =\delta_{u,u'}\delta_{j,j'}\delta_{e,e'},\qquad M_{u e j f b;\,u'e'j'f'b'}=M_{u j e b f;\,u'j'e'b'f'},b,f∑​Mujebf;u′j′e′bf​=δu,u′​δj,j′​δe,e′​,Muejfb;u′e′j′f′b′​=Mujebf;u′j′e′b′f′​, ∑fMujebf; u′j′e′b′f=L(E(u,j),(u′,j′))b,b′δe,e′.\sum_fM_{u j e b f;\,u'j'e'b'f} =L(E_{(u,j),(u',j')})_{b,b'}\delta_{e,e'}.f∑​Mujebf;u′j′e′b′f​=L(E(u,j),(u′,j′)​)b,b′​δe,e′​.

If ppt\mathrm{ppt}ppt is true, the matrices with entries Mu′jebf; uj′e′b′f′M_{u' j e b f;\,u j'e'b'f'}Mu′jebf;uj′e′b′f′​ and Muje′bf′; u′j′eb′fM_{u j e' b f';\,u'j'e b'f}Muje′bf′;u′j′eb′f​ must also be positive semidefinite; no additional nonsignalling condition is imposed. To specify the errors, for any function TTT define its extension to the reference register AAA by

T^(R)(a,b),(a′,b′)=T ⁣((R(a,i),(a′,i′))i,i′∈A)b,b′.\widehat T(R)_{(a,b),(a',b')} = T\!\left((R_{(a,i),(a',i')})_{i,i'\in A}\right)_{b,b'}.T(R)(a,b),(a′,b′)​=T((R(a,i),(a′,i′)​)i,i′∈A​)b,b′​.

Let S(X)\mathcal S(X)S(X) denote application of the real square-root function to XXX by continuous functional calculus, using its total definition even when XXX is not assumed positive. Then

err⁡diamond(N,S)=sup⁡R⪰0tr⁡R=112Re⁡tr⁡S ⁣((N^(R)−S^(R))†(N^(R)−S^(R))),\operatorname{err}_{\mathrm{diamond}}(N,S) = \sup_{\substack{R\succeq0\\ \operatorname{tr}R=1}} \frac12\operatorname{Re}\operatorname{tr} \mathcal S\!\left((\widehat N(R)-\widehat S(R))^\dagger (\widehat N(R)-\widehat S(R))\right),errdiamond​(N,S)=R⪰0trR=1​sup​21​RetrS((N(R)−S(R))†(N(R)−S(R))),

and

err⁡infidelity(N,S)=1−inf⁡R⪰0tr⁡R=1[Re⁡tr⁡S ⁣(S(N^(R)) S^(R) S(N^(R)))]2,\operatorname{err}_{\mathrm{infidelity}}(N,S) = 1- \inf_{\substack{R\succeq0\\ \operatorname{tr}R=1}} \left[ \operatorname{Re}\operatorname{tr} \mathcal S\!\left(\mathcal S(\widehat N(R))\, \widehat S(R)\,\mathcal S(\widehat N(R))\right) \right]^2,errinfidelity​(N,S)=1−R⪰0trR=1​inf​[RetrS(S(N(R))S(R)S(N(R)))]2,

where RRR is indexed by A×AA\times AA×A. Thus the infidelity branch subtracts the infimum of the squared displayed quantity from 111. Neither NNN nor ρ\rhoρ is assumed to be a channel or a density matrix, respectively. The other index types may be empty, and the real infima and suprema use their total order-theoretic definitions; in particular, a real infimum over an empty set is 000.

QAlgorithms.Papers.Independent.Extend50.P02.teleportOneWaySuccess

For finite register types H,JH,JH,J, with decidable equality as required, an arbitrary complex matrix ρ\rhoρ on H×JH\times JH×J, and any finite type AAA, this defines the real supremum of Re⁡Tr⁡(Kρ)\operatorname{Re}\operatorname{Tr}(K\rho)ReTr(Kρ) over matrices K,LK,LK,L on H×JH\times JH×J satisfying K⪰0K\succeq0K⪰0, L⪰0L\succeq0L⪰0, and K+L=IK+L=IK+L=I, subject to the following additional condition. Define, for every matrix XXX on (A×H)×J(A\times H)\times J(A×H)×J,

CT(X)a,a′=∑h,h′,j,j′T(h,j),(h′,j′)X((a,h′),j′),((a′,h),j)(T=K,L),Λ(X)=CK(X)+∣A∣Tr⁡(CL(X))IA−CL(X)∣A∣2−1.C_T(X)_{a,a'}= \sum_{h,h',j,j'}T_{(h,j),(h',j')} X_{((a,h'),j'),((a',h),j)} \quad(T=K,L), \qquad \Lambda(X)=C_K(X)+ \frac{|A|\operatorname{Tr}(C_L(X))I_A-C_L(X)}{|A|^2-1}.CT​(X)a,a′​=h,h′,j,j′∑​T(h,j),(h′,j′)​X((a,h′),j′),((a′,h),j)​(T=K,L),Λ(X)=CK​(X)+∣A∣2−1∣A∣Tr(CL​(X))IA​−CL​(X)​.

After identifying its output with Unit×A\mathrm{Unit}\times AUnit×A, the map Λ\LambdaΛ must admit a finite decomposition

Λ(X)=∑y,t,s(Ry,t⊗By,s)X(Ry,t⊗By,s)†,\Lambda(X)= \sum_{y,t,s}(R_{y,t}\otimes B_{y,s})X (R_{y,t}\otimes B_{y,s})^\dagger,Λ(X)=y,t,s∑​(Ry,t​⊗By,s​)X(Ry,t​⊗By,s​)†,

where yyy ranges over some m∈Nm\in\mathbb Nm∈N, each Ry,tR_{y,t}Ry,t​ maps A×HA\times HA×H to the one-dimensional register Unit\mathrm{Unit}Unit, each By,sB_{y,s}By,s​ maps JJJ to AAA, all Kraus families are finite,

∑y,tRy,t†Ry,t=IA×H,∑sBy,s†By,s=IJfor every y.\sum_{y,t}R_{y,t}^\dagger R_{y,t}=I_{A\times H}, \qquad \sum_sB_{y,s}^\dagger B_{y,s}=I_J\quad\text{for every }y.y,t∑​Ry,t†​Ry,t​=IA×H​,s∑​By,s†​By,s​=IJ​for every y.

No density-matrix assumption is made on ρ\rhoρ, and AAA may be empty. All zero denominators use inverse zero equal to zero, so the second term of Λ\LambdaΛ vanishes when ∣A∣=1|A|=1∣A∣=1. The supremum is taken in R\mathbb RR, with value zero for an empty feasible-value set or an unbounded-above feasible-value set.

QAlgorithms.Papers.Independent.Extend50.P02.teleportSet

For finite index types A,B,H,JA,B,H,JA,B,H,J with decidable equality, an optional Boolean kind\mathrm{kind}kind, and any complex matrix ρ\rhoρ indexed by H×JH\times JH×J, the definition gives the set of functions SSS from AAA-indexed complex matrices to BBB-indexed complex matrices for which there exists a channel LLL from ((A×H)×J)((A\times H)\times J)((A×H)×J)-indexed matrices to BBB-indexed matrices such that

S(X)=L(Y),Y((a,h),j), ((a′,h′),j′)=Xa,a′ρ(h,j),(h′,j′).S(X)=L(Y),\qquad Y_{((a,h),j),\,((a',h'),j')}=X_{a,a'}\rho_{(h,j),(h',j')}.S(X)=L(Y),Y((a,h),j),((a′,h′),j′)​=Xa,a′​ρ(h,j),(h′,j′)​.

Here a channel TTT means that there are a natural number rrr and matrices K0,…,Kr−1K_0,\ldots,K_{r-1}K0​,…,Kr−1​, from its input index space to its output index space, with ∑zKz†Kz=I\sum_zK_z^\dagger K_z=I∑z​Kz†​Kz​=I and T(X)=∑zKzXKz†T(X)=\sum_zK_zXK_z^\daggerT(X)=∑z​Kz​XKz†​ for every matrix XXX. Put U=A×HU=A\times HU=A×H, let EuvE_{uv}Euv​ denote the matrix unit, and define L~(X)(∗,b),(∗,b′)=L(X)b,b′\widetilde L(X)_{(\ast,b),(\ast,b')}=L(X)_{b,b'}L(X)(∗,b),(∗,b′)​=L(X)b,b′​. If kind\mathrm{kind}kind is absent, there must exist a natural number mmm, functions EyE_yEy​ from UUU-indexed matrices to singleton-indexed matrices, and functions FyF_yFy​ from JJJ-indexed matrices to BBB-indexed matrices, for 0≤y<m0\le y<m0≤y<m, such that each EyE_yEy​ has a finite representation Ey(Z)=∑zKyzZKyz†E_y(Z)=\sum_zK_{yz}ZK_{yz}^\daggerEy​(Z)=∑z​Kyz​ZKyz†​, the function Z↦∑yEy(Z)Z\mapsto\sum_yE_y(Z)Z↦∑y​Ey​(Z) is a channel, each FyF_yFy​ is a channel, and, for every X,b,b′X,b,b'X,b,b′,

L(X)b,b′=∑y∑u,u′∈U∑j,j′∈JX(u,j),(u′,j′) Ey(Euu′)∗,∗ Fy(Ejj′)b,b′.L(X)_{b,b'}= \sum_y\sum_{u,u'\in U}\sum_{j,j'\in J} X_{(u,j),(u',j')}\, E_y(E_{uu'})_{\ast,\ast}\, F_y(E_{jj'})_{b,b'}.L(X)b,b′​=y∑​u,u′∈U∑​j,j′∈J∑​X(u,j),(u′,j′)​Ey​(Euu′​)∗,∗​Fy​(Ejj′​)b,b′​.

If kind=some(ppt)\mathrm{kind}=\mathrm{some}(\mathrm{ppt})kind=some(ppt), instead there must exist a matrix MMM indexed by (U×(J×J))×({∗}×(B×B))(U\times(J\times J))\times(\{\ast\}\times(B\times B))(U×(J×J))×({∗}×(B×B)). Suppressing the singleton coordinate, write its entries as Mujebf; u′j′e′b′f′M_{u j e b f;\,u'j'e'b'f'}Mujebf;u′j′e′b′f′​. It must be positive semidefinite and satisfy, for all free indices,

∑b,fMujebf; u′j′e′bf=δu,u′δj,j′δe,e′,Muejfb; u′e′j′f′b′=Mujebf; u′j′e′b′f′,\sum_{b,f}M_{u j e b f;\,u'j'e'b f} =\delta_{u,u'}\delta_{j,j'}\delta_{e,e'},\qquad M_{u e j f b;\,u'e'j'f'b'}=M_{u j e b f;\,u'j'e'b'f'},b,f∑​Mujebf;u′j′e′bf​=δu,u′​δj,j′​δe,e′​,Muejfb;u′e′j′f′b′​=Mujebf;u′j′e′b′f′​, ∑fMujebf; u′j′e′b′f=L(E(u,j),(u′,j′))b,b′ δe,e′.\sum_fM_{u j e b f;\,u'j'e'b'f} = L(E_{(u,j),(u',j')})_{b,b'}\,\delta_{e,e'}.f∑​Mujebf;u′j′e′b′f​=L(E(u,j),(u′,j′)​)b,b′​δe,e′​.

When ppt\mathrm{ppt}ppt is true, the matrices with entries Mu′jebf; uj′e′b′f′M_{u' j e b f;\,u j'e'b'f'}Mu′jebf;uj′e′b′f′​ and Muje′bf′; u′j′eb′fM_{u j e' b f';\,u'j'e b'f}Muje′bf′;u′j′eb′f​ must also be positive semidefinite; when it is false, these two requirements are absent. This branch imposes no additional nonsignalling equation. The matrix ρ\rhoρ is not assumed to be a density matrix, and no index type is assumed nonempty; empty sums and finite families are permitted, subject to the stated normalization equations.

QAlgorithms.Papers.Independent.Extend50.P02.tensorSuperopAction

For finite index types A,BA,BA,B with decidable equality, arbitrary index types C,DC,DC,D, and arbitrary functions E:CA×A→CC×CE:\mathbb C^{A\times A}\to\mathbb C^{C\times C}E:CA×A→CC×C and F:CB×B→CD×DF:\mathbb C^{B\times B}\to\mathbb C^{D\times D}F:CB×B→CD×D, this definition gives a function on matrices by

(TE,F(X))(c,d),(c′,d′)=∑a,a′∈A∑b,b′∈BX(a,b),(a′,b′) (E(eaa′))c,c′ (F(ebb′))d,d′,\bigl(\mathcal T_{E,F}(X)\bigr)_{(c,d),(c',d')} = \sum_{a,a'\in A}\sum_{b,b'\in B} X_{(a,b),(a',b')}\, \bigl(E(e_{aa'})\bigr)_{c,c'}\, \bigl(F(e_{bb'})\bigr)_{d,d'},(TE,F​(X))(c,d),(c′,d′)​=a,a′∈A∑​b,b′∈B∑​X(a,b),(a′,b′)​(E(eaa′​))c,c′​(F(ebb′​))d,d′​,

where eaa′e_{aa'}eaa′​ and ebb′e_{bb'}ebb′​ are matrix units, with a single entry 111 at the indicated position and zero elsewhere. Neither linearity nor any channel property is assumed for EEE or FFF; the definition uses only their values on matrix units. If AAA or BBB is empty, every displayed sum is zero.

QAlgorithms.Papers.Independent.Extend50.P02.transposeAlice

For arbitrary index types A,B,C,DA,B,C,DA,B,C,D and any complex matrix MMM indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)), the definition returns the matrix TTT on the same index type given by

T((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c′,(d′,f′)))=M((a′,(b,e)),(c′,(d,f))), ((a,(b′,e′)),(c,(d′,f′))).T_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c',(d',f')))} = M_{((a',(b,e)),(c',(d,f))),\,((a,(b',e')),(c,(d',f')))}.T((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c′,(d′,f′)))​=M((a′,(b,e)),(c′,(d,f))),((a,(b′,e′)),(c,(d′,f′)))​.

It exchanges the row and column indices of the AAA and CCC coordinates, leaving both BBB coordinates and both DDD coordinates in place. There is no complex conjugation and no assumption of positivity, Hermiticity, normalization, finiteness, or nonemptiness.

QAlgorithms.Papers.Independent.Extend50.P02.transposeBob2

For arbitrary index types A,B,C,DA,B,C,DA,B,C,D and any complex matrix MMM indexed by (A×(B×B))×(C×(D×D))(A\times(B\times B))\times(C\times(D\times D))(A×(B×B))×(C×(D×D)), the definition returns the matrix TTT on the same index type given by

T((a,(b,e)),(c,(d,f))), ((a′,(b′,e′)),(c′,(d′,f′)))=M((a,(b,e′)),(c,(d,f′))), ((a′,(b′,e)),(c′,(d′,f))).T_{((a,(b,e)),(c,(d,f))),\,((a',(b',e')),(c',(d',f')))} = M_{((a,(b,e')),(c,(d,f'))),\,((a',(b',e)),(c',(d',f)))}.T((a,(b,e)),(c,(d,f))),((a′,(b′,e′)),(c′,(d′,f′)))​=M((a,(b,e′)),(c,(d,f′))),((a′,(b′,e)),(c′,(d′,f)))​.

It exchanges the row and column indices of the second BBB coordinate and the second DDD coordinate, leaving all other coordinates in place. There is no complex conjugation and no assumption of positivity, Hermiticity, normalization, finiteness, or nonemptiness.

QAlgorithms.Papers.Independent.Extend50.P02.transposeH

For index types H,JH,JH,J and an arbitrary complex square matrix XXX indexed by H×(J×J)H\times(J\times J)H×(J×J), this defines the partial transpose in the HHH-coordinate:

transposeH⁡(X)(h,(j,k)),(h′,(j′,k′))=X(h′,(j,k)),(h,(j′,k′))\operatorname{transposeH}(X)_{(h,(j,k)),(h',(j',k'))} = X_{(h',(j,k)),(h,(j',k'))}transposeH(X)(h,(j,k)),(h′,(j′,k′))​=X(h′,(j,k)),(h,(j′,k′))​

for all indices. This exchanges the row and column HHH-coordinates without complex conjugation and leaves the JJJ-coordinates in their respective row and column positions. There are no conditions on XXX, and empty index types are allowed.

QAlgorithms.Papers.Independent.Extend50.P02.transposeHJ1

For index types H,JH,JH,J and an arbitrary complex square matrix XXX indexed by H×(J×J)H\times(J\times J)H×(J×J), this defines the partial transpose in the HHH-coordinate and the first JJJ-coordinate together:

transposeHJ1⁡(X)(h,(j,k)),(h′,(j′,k′))=X(h′,(j′,k)),(h,(j,k′))\operatorname{transposeHJ1}(X)_{(h,(j,k)),(h',(j',k'))} = X_{(h',(j',k)),(h,(j,k'))}transposeHJ1(X)(h,(j,k)),(h′,(j′,k′))​=X(h′,(j′,k)),(h,(j,k′))​

for all indices. No complex conjugation is taken, and the second JJJ-coordinate is not transposed. There are no conditions on XXX, and empty index types are allowed.

QAlgorithms.Papers.Independent.Extend50.P02.transposeJ

For arbitrary index types H,JH,JH,J and any complex square matrix XXX indexed by H×JH\times JH×J, this defines the complex square matrix

(transposeJ⁡X)(h,j),(h′,j′)=X(h,j′),(h′,j).\bigl(\operatorname{transposeJ}X\bigr)_{(h,j),(h',j')} =X_{(h,j'),(h',j)}.(transposeJX)(h,j),(h′,j′)​=X(h,j′),(h′,j)​.

It exchanges the row and column indices belonging to JJJ, leaves those belonging to HHH in place, and applies no complex conjugation. No finiteness, nonemptiness, positivity, or normalization assumption is required.

QAlgorithms.Papers.Independent.Extend50.P02.twoByTwoPauliOperator

For any index type III and four arbitrary complex square matrices z,x,y,wz,x,y,wz,x,y,w indexed by III, this defines the complex square matrix indexed by the disjoint union of two copies of III whose block form is

(z+wx−iyx+iyz−w),i2=−1.\begin{pmatrix} z+w & x-\mathrm{i}y\\ x+\mathrm{i}y & z-w \end{pmatrix}, \qquad \mathrm{i}^{2}=-1.(z+wx+iy​x−iyz−w​),i2=−1.

No Hermitian or positivity assumptions are imposed on the four input matrices, and III may be empty.

QAlgorithms.Papers.Independent.Extend50.P02.wire

For finite register types A,B,H,JA,B,H,JA,B,H,J, with decidable equality, and arbitrary maps N:Mat⁡(H,C)→Mat⁡(J,C)N:\operatorname{Mat}(H,\mathbb C)\to\operatorname{Mat}(J,\mathbb C)N:Mat(H,C)→Mat(J,C) and P:Mat⁡(A×J,C)→Mat⁡(H×B,C)P:\operatorname{Mat}(A\times J,\mathbb C)\to\operatorname{Mat}(H\times B,\mathbb C)P:Mat(A×J,C)→Mat(H×B,C), this defines a map from matrices on AAA to matrices on BBB by

wire⁡(N,P)(X)b,b′=∑a,a′∑h,h′∑j,j′Xa,a′ N(Eh,h′)j,j′ P(E(a,j),(a′,j′))(h,b),(h′,b′),\operatorname{wire}(N,P)(X)_{b,b'} = \sum_{a,a'}\sum_{h,h'}\sum_{j,j'} X_{a,a'}\, N(E_{h,h'})_{j,j'}\, P(E_{(a,j),(a',j')})_{(h,b),(h',b')},wire(N,P)(X)b,b′​=a,a′∑​h,h′∑​j,j′∑​Xa,a′​N(Eh,h′​)j,j′​P(E(a,j),(a′,j′)​)(h,b),(h′,b′)​,

where each sum ranges over its indicated register type and Eu,vE_{u,v}Eu,v​ is the matrix with entry 111 at (u,v)(u,v)(u,v) and 000 elsewhere. Neither NNN nor PPP is assumed to be a channel or even linear. Empty register types are included, with empty sums equal to zero.

QAlgorithms.Papers.Independent.Extend50.P02.wireChoi

For index types A,B,H,JA,B,H,JA,B,H,J, with HHH and JJJ finite and equality on HHH decidable, let NNN be any function from HHH-indexed complex matrices to JJJ-indexed complex matrices, and let WWW be any complex matrix indexed by (A×J)×(H×B)(A\times J)\times(H\times B)(A×J)×(H×B). The definition returns the complex matrix ZZZ indexed by A×BA\times BA×B with entries

Z(a,b),(a′,b′)=∑h,h′∈H∑j,j′∈JN(Ehh′)j,j′ W((a,j),(h,b)), ((a′,j′),(h′,b′)),Z_{(a,b),(a',b')} = \sum_{h,h'\in H}\sum_{j,j'\in J} N(E_{hh'})_{j,j'}\, W_{((a,j),(h,b)),\,((a',j'),(h',b'))},Z(a,b),(a′,b′)​=h,h′∈H∑​j,j′∈J∑​N(Ehh′​)j,j′​W((a,j),(h,b)),((a′,j′),(h′,b′))​,

where Ehh′E_{hh'}Ehh′​ is the HHH-indexed matrix whose sole nonzero entry is 111 in row hhh, column h′h'h′. The contraction uses precisely these entries, without conjugating either factor or exchanging hhh with h′h'h′ or jjj with j′j'j′. No linearity or channel property of NNN, or positivity or normalization of WWW, is assumed. Empty HHH or JJJ gives an empty sum and hence the zero output matrix.

QAlgorithms.Papers.Independent.Extend50.P02.worstCaseSquaredFidelity

For finite index types A,BA,BA,B with decidable equality, with AAA nonempty, and arbitrary functions N,M:CA×A→CB×BN,M:\mathbb C^{A\times A}\to\mathbb C^{B\times B}N,M:CA×A→CB×B, this definition is

inf⁡ρ⪰0tr⁡ρ=1(Re⁡tr⁡N^(ρ) M^(ρ) N^(ρ))2.\inf_{\substack{\rho\succeq0\\ \operatorname{tr}\rho=1}} \left( \operatorname{Re}\operatorname{tr} \sqrt{\sqrt{\widehat N(\rho)}\,\widehat M(\rho)\,\sqrt{\widehat N(\rho)}} \right)^2.ρ⪰0trρ=1​inf​(RetrN(ρ)​M(ρ)N(ρ)​​)2.

Here ρ\rhoρ is indexed by A×AA\times AA×A, and

(N^(ρ))(a,b),(a′,b′)=[N ⁣((ρ(a,i),(a′,i′))i,i′∈A)]b,b′,\bigl(\widehat N(\rho)\bigr)_{(a,b),(a',b')} = \left[N\!\left((\rho_{(a,i),(a',i')})_{i,i'\in A}\right)\right]_{b,b'},(N(ρ))(a,b),(a′,b′)​=[N((ρ(a,i),(a′,i′)​)i,i′∈A​)]b,b′​,

with the same blockwise definition for M^\widehat MM. Every square root is interpreted using the total real continuous functional calculus. No channel or positivity assumption on either function is imposed, so their outputs are not required to be density matrices. The set over which the infimum is taken is nonempty because AAA is nonempty, and its values are nonnegative because they are squares. If BBB is empty, the value is 000.

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