Definitions for On the power of PPT-preserving and non-signalling codes
DefinitionQAlgorithms_Papers_Independent_Support50_P11The objects the formalized statements of On the power of PPT-preserving and non-signalling codes (arXiv:1406.7142) are stated in. Each was checked against the paper by a blind read-back and a moderator.
choiState: PDF pp.3,9, (1),(52): normalized Choi state in reference,output order.Loewner: PDF pp.3,7: Loewner comparison; this is not entrywise matrix order.NSBA: PDF p.3, (7): non-signalling Bob to Alice on all operators.NSAB: PDF p.3, (8): non-signalling Alice to Bob on all operators.PPTMap: PDF p.3, (6): complete PPT preservation, equivalently CPTP after the two Bob transposes.Horodecki: PDF p.3: a Horodecki channel has a PPT Choi matrix.IsClassicalSideChannel: PDF p.5: a classical side channel is dephased at both ports.forwardOp: PDF pp.4--5, (9): actual encoder, one forward side-channel call, decoder. The middle coordinates explicitly move Bob's input next to the side-channel output.eaOp: PDF p.5: shared-state realization by two local CPTP operations.CodeAssistance: PDF pp.4--5: the operational and mathematical assistance classes.InCodeClass: PDF p.5: membership in an operational code class. Ancilla dimensions are arbitrary positive finite integers, chosen before any channel input.IsForwardCode: PDF p.4: a forward-assisted code is a CPTP bipartite operation non-signalling Bob to Alice.link: PDF p.4, (11)--(12): insert the noisy channel into the bipartite operation. This matrix-unit contraction is the source's full-transpose Choi link, not an ordinary serial composition or an adaptive use.codeAverageInput: PDF p.4, (13): average channel input on the maximally mixed sender input.channelFidelity: PDF p.4: normalized entanglement/channel fidelity, the accepted finite-register definition.uniformClassicalSuccess: PDF p.8: uniform computational-basis classical success probability.optimalCodeFidelity: PDF p.5, Definition 1: operational supremum of channel fidelities. For positive finite systems and a CPTP channel the feasible set is nonempty and bounded by one; the constrained optima are attained by Corollary 4.optimalClassicalCodeFidelity: PDF p.8, Definition 7: operational classical optimum over the same code class.quantumCodeCapacity: PDF p.5, (14): memoryless, parallel-block, vanishing-error capacity in qubits/use. Extended nonnegative suprema avoid junk values at unbounded sets.zeroErrorCodeCapacity: PDF p.5, (15): zero-error capacity, supremum over finite positive blocks and sizes.flagsClass: PDF pp.6--7: which of the two independently selectable constraints is imposed.primalObjective: PDF p.7, (31): full ordinary transpose of the unnormalized Choi matrix.Primal: PDF p.7, (32)--(35): exact primal constraints; all inequalities are Loewner.ExpandedDualFeasible: PDF p.7, (42)--(44): expanded dual, keeping both positive multipliers.lagrangian: PDF p.7, proof of Proposition 5: the unreduced Lagrangian on the PSD cone. The equality multipliers are free Hermitian W and real mu; rho is not normalized here.relaxedBound: PDF p.8, (48): Matthews--Wehner relaxation with a Loewner marginal inequality.distillFidelity: PDF p.9, (50): PPT distillation fidelity of a normalized bipartite state.distillCapacity: PDF p.9, (51): operational PPT distillable entanglement, in ebits/copy.resourceSim: PDF p.10, (53)--(56): Alice's local classical-output operation on input and her resource share, followed by Bob's local operation on the message and his share.HasChoiSimulation: PDF pp.9--10, Proposition 8(ii): exact single-copy Choi simulation by local operations and forward classical communication. It is an operational factorization.classicalControlledUnitary: PDF p.10: a classical control is measured, then the indicated unitary applied.wernerHolevoChannel: PDF p.10, (57)--(59): generalized Werner--Holevo channel, d>=2, alpha in [0,1].epsilon3: PDF p.10, (60): the real Levi-Civita symbol in the ordered basis 0,1,2.HasAntidegradingDilation: PDF p.10: an actual isometric dilation with a channel degrading environment to output.wernerSector: PDF pp.10,13: symmetric and antisymmetric projectors, selected by a Boolean.sectorSum: PDF p.13, (A1): E_j, with exactly j antisymmetric factors. Rows are (all inputs,all outputs).bellSectorSum: PDF p.14: Upsilon_i has exactly i normalized Bell projectors.ansatz: PDF pp.13--14, (A1): real sector coefficients, embedded into complex matrices.coeffM: PDF p.14, (A3): partial-transpose coefficients with zero-extended binomials. The explicit guard prevents truncated natural subtraction introducing extra terms.coeffG: PDF p.14: partial-trace coefficients g_j; the remaining identity acts on input.lpObjective: PDF p.14, (A4): essential factor d^n, including the endpoint convention 0^0=1.WernerLPFeasible: PDF p.14, (A5)--(A8): n+1 real variables with independently selectable NS/PPTp constraints.exampleLambda: PDF p.12, Example 9: corrected common 1/9 normalization of the printed Lambda.measurementKet: PDF p.12, Fig.7: Z- or X-basis ket a, selected by Bob's bit b.bonusOperation: PDF pp.12--13, Fig.7: the independently specified randomized measurement operation. Both outputs are diagonal, and Bob's independent uniform bit is the second output.PerfectQubit: PDF pp.12--13: an unassisted one-use perfect qubit transmission code for a side channel.teleportWeyl: PDF pp.14--15: generalized Pauli correction, with positive phase and shift X^a Z^b. The message c is identified with (a,b) by finProdFinEquiv.bellKet: PDF pp.14--15: the Bell measurement vectors (U_c tensor I)|phi>. This convention pairs with the correction U_c, not its inverse.bellMeasure: PDF pp.14--15: complete Bell measurement with a classical outcome.teleportCode: PDF pp.14--15: actual bipartite teleportation code, with one shared Bell state.denseCode: PDF pp.14--15: actual bipartite dense-coding code, with one shared Bell state.dephasedPermutationTwirl: PDF p.14, corrected (B1): input/output dephasing around permutation averaging. The printed permutation average alone does not remove quantum coherences.fidelityDepolarizing: PDF p.14: isotropic depolarizing channel parameterized by entanglement fidelity. Dimension one is handled separately; f is not the depolarizing mixing weight.symmetricClassical: PDF p.14: d-ary symmetric classical channel parameterized by success probability.teleportConversion: PDF p.15, (B6): fully specified CPTP teleportation conversion with corrected twirls.denseConversion: PDF p.15, (B8): fully specified CPTP dense-coding conversion with corrected twirls.reconstructedCode: PDF pp.6--7, (29),(36): the actual twirled bipartite operation reconstructed from rho,Lambda. Used only at K>=2; the scalar case of Theorem 3 is separate.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_Measurement
import Definitions.Def_QAlgorithms_Defs_QuditChannelFidelities
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P09
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P21
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P34
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P76
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P69
import Definitions.Def_QAlgorithms_Papers_Independent_Gap20_P19
/-!
Leung and Matthews, arXiv:1406.7142v2. All citations below are PDF pages.
Local coordinates always put Alice before Bob, and Choi reference before output.
The paper's suppressed permutations are written out in coordinates. Capacities
are operational suprema in the extended nonnegative reals, never entropy definitions.
Compilation is pending the separate mechanical handoff.
-/
noncomputable section
open scoped Matrix ComplexConjugate ComplexOrder ENNReal
namespace QAlgorithms.Papers.Independent.Support50.P11
-- These are pinned accepted definitions, with no local copies or aliases.
open QAlgorithms.Papers.Independent.Information100.P34 (choi dephasing permutationMatrix)
open QAlgorithms.Papers.Independent.Information100.P21 (pt)
open QAlgorithms.Papers.Independent.Dependency50.P09 (tensorAction)
open QAlgorithms.Papers.Independent.Information100.P76 (swapMatrix)
open QAlgorithms.Papers.Independent.Information100.P69 (replacer)
open QAlgorithms.Papers.Independent.Gap20.P19 (wernerIsometry)
attribute [local instance] Classical.propDecidable
attribute [local instance] Classical.decEq
/-- PDF pp.3,9, (1),(52): normalized Choi state in reference,output order. -/
def choiState {I O : Type*} [Fintype I] [DecidableEq I] (N : Superop I O) :
Matrix (I × O) (I × O) ℂ := (Fintype.card I : ℂ)⁻¹ • choi N
/-- PDF pp.3,7: Loewner comparison; this is not entrywise matrix order. -/
def Loewner {I : Type*} [Fintype I] (X Y : Matrix I I ℂ) : Prop :=
(Y - X).PosSemidef
/-- PDF p.3, (7): non-signalling Bob to Alice on all operators. -/
def NSBA {A B C D : Type*} [Fintype A] [Fintype B] [Fintype C] [Fintype D]
(Z : Superop (A × B) (C × D)) : Prop :=
∃ E : Superop A C, IsChannel E ∧ ∀ X, traceRight (Z X) = E (traceRight X)
/-- PDF p.3, (8): non-signalling Alice to Bob on all operators. -/
def NSAB {A B C D : Type*} [Fintype A] [Fintype B] [Fintype C] [Fintype D]
(Z : Superop (A × B) (C × D)) : Prop :=
∃ Dmap : Superop B D, IsChannel Dmap ∧ ∀ X, traceLeft (Z X) = Dmap (traceLeft X)
/-- PDF p.3, (6): complete PPT preservation, equivalently CPTP after the two Bob transposes. -/
def PPTMap {A B C D : Type*} [Fintype A] [Fintype B] [Fintype C] [Fintype D]
(Z : Superop (A × B) (C × D)) : Prop :=
IsChannel Z ∧ IsChannel (fun X => pt (Z (pt X)))
/-- PDF p.3: a Horodecki channel has a PPT Choi matrix. -/
def Horodecki {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O) : Prop :=
IsChannel N ∧ (pt (choi N)).PosSemidef
/-- PDF p.5: a classical side channel is dephased at both ports. -/
def IsClassicalSideChannel {I O : Type*} [Fintype I] [Fintype O] (F : Superop I O) : Prop :=
IsChannel F ∧ (∀ X, F (dephasing X) = F X) ∧ (∀ X, dephasing (F X) = F X)
/-- PDF pp.4--5, (9): actual encoder, one forward side-channel call, decoder.
The middle coordinates explicitly move Bob's input next to the side-channel output. -/
def forwardOp {A B I K Q R : Type} [Fintype A] [Fintype B]
[Fintype Q] [Fintype R] [DecidableEq A] [DecidableEq B]
[DecidableEq Q] [DecidableEq R]
(E : Superop A (I × Q)) (F : Superop Q R) (D : Superop (R × B) K) :
Superop (A × B) (I × K) :=
fun X => idTensorSuperop D (idTensorSuperop (tensorAction F (fun Y : Matrix B B ℂ => Y))
(fun (p q : I × (Q × B)) =>
tensorAction E (fun Y : Matrix B B ℂ => Y) X ((p.1,p.2.1),p.2.2)
((q.1,q.2.1),q.2.2)))
/-- PDF p.5: shared-state realization by two local CPTP operations. -/
def eaOp {A B I K L R : Type} [Fintype A] [Fintype B] [Fintype L] [Fintype R]
[DecidableEq A] [DecidableEq B] [DecidableEq L] [DecidableEq R]
(sigma : Matrix (L × R) (L × R) ℂ)
(E : Superop (A × L) I) (D : Superop (B × R) K) :
Superop (A × B) (I × K) :=
fun X => tensorAction E D (fun (p q : (A × L) × (B × R)) =>
X (p.1.1,p.2.1) (q.1.1,q.2.1) * sigma (p.1.2,p.2.2) (q.1.2,q.2.2))
/-- PDF pp.4--5: the operational and mathematical assistance classes. -/
inductive CodeAssistance where
| FA | UA | EA | FCA | FHA | NS | PPTp | both
deriving DecidableEq
/-- PDF p.5: membership in an operational code class. Ancilla dimensions are arbitrary
positive finite integers, chosen before any channel input. -/
def InCodeClass {I O : Type} [Fintype I] [Fintype O] (K : ℕ) (c : CodeAssistance)
(Z : Superop (Fin K × O) (I × Fin K)) : Prop :=
match c with
| .FA => True
| .UA => ∃ E : Superop (Fin K) I, ∃ D : Superop O (Fin K),
IsChannel E ∧ IsChannel D ∧ Z = tensorAction E D
| .EA => ∃ l r : ℕ, 0 < l ∧ 0 < r ∧
∃ sigma : Matrix (Fin l × Fin r) (Fin l × Fin r) ℂ,
∃ E : Superop (Fin K × Fin l) I, ∃ D : Superop (O × Fin r) (Fin K),
IsDensityMatrix sigma ∧ IsChannel E ∧ IsChannel D ∧ Z = eaOp sigma E D
| .FCA => ∃ q r : ℕ, 0 < q ∧ 0 < r ∧
∃ E : Superop (Fin K) (I × Fin q), ∃ F : Superop (Fin q) (Fin r),
∃ D : Superop (Fin r × O) (Fin K),
IsChannel E ∧ IsClassicalSideChannel F ∧ IsChannel D ∧ Z = forwardOp E F D
| .FHA => ∃ q r : ℕ, 0 < q ∧ 0 < r ∧
∃ E : Superop (Fin K) (I × Fin q), ∃ F : Superop (Fin q) (Fin r),
∃ D : Superop (Fin r × O) (Fin K),
IsChannel E ∧ Horodecki F ∧ IsChannel D ∧ Z = forwardOp E F D
| .NS => NSAB Z
| .PPTp => PPTMap Z
| .both => NSAB Z ∧ PPTMap Z
/-- PDF p.4: a forward-assisted code is a CPTP bipartite operation non-signalling Bob to Alice. -/
def IsForwardCode {I O : Type} [Fintype I] [Fintype O] (K : ℕ) (c : CodeAssistance)
(Z : Superop (Fin K × O) (I × Fin K)) : Prop :=
IsChannel Z ∧ NSBA Z ∧ InCodeClass K c Z
/-- PDF p.4, (11)--(12): insert the noisy channel into the bipartite operation.
This matrix-unit contraction is the source's full-transpose Choi link, not an
ordinary serial composition or an adaptive use. -/
def link {I O : Type*} [Fintype I] [Fintype O] (K : ℕ)
(N : Superop I O) (Z : Superop (Fin K × O) (I × Fin K)) :
Superop (Fin K) (Fin K) :=
fun X b c => ∑ a, ∑ a2, ∑ i, ∑ j, ∑ beta, ∑ gamma,
X a a2 * N (Matrix.single i j 1) beta gamma *
Z (Matrix.single (a,beta) (a2,gamma) 1) (i,b) (j,c)
/-- PDF p.4, (13): average channel input on the maximally mixed sender input. -/
def codeAverageInput {I O : Type*} [Fintype O] (K : ℕ)
(Z : Superop (Fin K × O) (I × Fin K)) : Matrix I I ℂ :=
traceRight (Z (((K * Fintype.card O : ℕ) : ℂ)⁻¹ • 1))
/-- PDF p.4: normalized entanglement/channel fidelity, the accepted finite-register definition. -/
def channelFidelity (K : ℕ) (N : Superop (Fin K) (Fin K)) : ℝ :=
if h : 0 < K then QuditFidelity.entanglementFidelity K h N else 0
/-- PDF p.8: uniform computational-basis classical success probability. -/
def uniformClassicalSuccess {I : Type*} [Fintype I] [DecidableEq I] (N : Superop I I) : ℝ :=
(∑ i, (N (Matrix.single i i 1) i i).re) / Fintype.card I
/-- PDF p.5, Definition 1: operational supremum of channel fidelities. For positive
finite systems and a CPTP channel the feasible set is nonempty and bounded by one;
the constrained optima are attained by Corollary 4. -/
def optimalCodeFidelity {I O : Type} [Fintype I] [Fintype O] (c : CodeAssistance)
(N : Superop I O) (K : ℕ) : ℝ :=
sSup {f | ∃ Z, IsForwardCode K c Z ∧ f = channelFidelity K (link K N Z)}
/-- PDF p.8, Definition 7: operational classical optimum over the same code class. -/
def optimalClassicalCodeFidelity {I O : Type} [Fintype I] [Fintype O] (c : CodeAssistance)
(N : Superop I O) (K : ℕ) : ℝ :=
sSup {f | ∃ Z, IsForwardCode K c Z ∧ f = uniformClassicalSuccess (link K N Z)}
/-- PDF p.5, (14): memoryless, parallel-block, vanishing-error capacity in qubits/use.
Extended nonnegative suprema avoid junk values at unbounded sets. -/
def quantumCodeCapacity {I O : Type} [Fintype I] [Fintype O] (c : CodeAssistance)
(N : Superop I O) : ℝ≥0∞ :=
⨆ r : NNReal, if Filter.Tendsto
(fun n : ℕ => optimalCodeFidelity c (piSuperop (fun _ : Fin n => N))
⌊(2 : ℝ) ^ ((n : ℝ) * (r : ℝ))⌋₊)
Filter.atTop (nhds 1) then (r : ℝ≥0∞) else 0
/-- PDF p.5, (15): zero-error capacity, supremum over finite positive blocks and sizes. -/
def zeroErrorCodeCapacity {I O : Type} [Fintype I] [Fintype O] (c : CodeAssistance)
(N : Superop I O) : ℝ≥0∞ :=
⨆ n : ℕ+, ⨆ K : ℕ+, if optimalCodeFidelity c (piSuperop (fun _ : Fin (n : ℕ) => N)) K = 1
then ENNReal.ofReal ((Real.log (K : ℝ) / Real.log 2) / (n : ℝ)) else 0
/-- PDF pp.6--7: which of the two independently selectable constraints is imposed. -/
def flagsClass (s p : Bool) : CodeAssistance :=
if s then (if p then .both else .NS) else (if p then .PPTp else .FA)
/-- PDF p.7, (31): full ordinary transpose of the unnormalized Choi matrix. -/
def primalObjective {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O)
(L : Matrix (I × O) (I × O) ℂ) : ℝ := ((choi N).transpose * L).trace.re
/-- PDF p.7, (32)--(35): exact primal constraints; all inequalities are Loewner. -/
def Primal {I O : Type*} [Fintype I] [Fintype O] (K : ℕ) (s p : Bool)
(rho : Matrix I I ℂ) (L : Matrix (I × O) (I × O) ℂ) : Prop :=
IsDensityMatrix rho ∧ L.PosSemidef ∧ Loewner L (Matrix.kronecker rho 1) ∧
(s = true → traceLeft L = ((K : ℂ)^2)⁻¹ • 1) ∧
(p = true → Loewner (-((K : ℂ)⁻¹ • Matrix.kronecker rho 1)) (pt L) ∧
Loewner (pt L) ((K : ℂ)⁻¹ • Matrix.kronecker rho 1))
/-- PDF p.7, (42)--(44): expanded dual, keeping both positive multipliers. -/
def ExpandedDualFeasible {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O)
(K : ℕ) (s p : Bool) (mu : ℝ) (W : Matrix O O ℂ)
(X Y V : Matrix (I × O) (I × O) ℂ) : Prop :=
W.IsHermitian ∧ X.PosSemidef ∧ Y.PosSemidef ∧ V.PosSemidef ∧
(s = false → W = 0) ∧ (p = false → Y = 0 ∧ V = 0) ∧
Loewner ((choi N).transpose + pt (Y - V)) (X + Matrix.kronecker 1 W) ∧
Loewner (traceRight (X + (K : ℂ)⁻¹ • (Y + V))) ((mu : ℂ) • 1)
/-- PDF p.7, proof of Proposition 5: the unreduced Lagrangian on the PSD cone.
The equality multipliers are free Hermitian W and real mu; rho is not normalized here. -/
def lagrangian {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O)
(K : ℕ) (mu : ℝ) (W : Matrix O O ℂ)
(X Y V L : Matrix (I × O) (I × O) ℂ) (rho : Matrix I I ℂ) : ℝ :=
primalObjective N L + (X * (Matrix.kronecker rho 1 - L)).trace.re +
(Y * ((K : ℂ)⁻¹ • Matrix.kronecker rho 1 + pt L)).trace.re +
(V * ((K : ℂ)⁻¹ • Matrix.kronecker rho 1 - pt L)).trace.re +
(W * (((K : ℂ)^2)⁻¹ • 1 - traceLeft L)).trace.re + mu * (1 - rho.trace.re)
/-- PDF p.8, (48): Matthews--Wehner relaxation with a Loewner marginal inequality. -/
def relaxedBound {I O : Type*} [Fintype I] [Fintype O]
(N : Superop I O) (M : ℕ) : ℝ :=
sSup {v | ∃ rho : Matrix I I ℂ, ∃ L : Matrix (I × O) (I × O) ℂ,
IsDensityMatrix rho ∧ L.PosSemidef ∧ Loewner L (Matrix.kronecker rho 1) ∧
Loewner (traceLeft L) ((M : ℂ)⁻¹ • 1) ∧ v = primalObjective N L}
/-- Sanity: partial transpose is involutive on every operator, PDF p.3. -/
example {A B : Type*} (X : Matrix (A × B) (A × B) ℂ) : pt (pt X) = X := rfl
/-- Sanity: the identity qubit Choi coherence is unnormalized, PDF p.3, (5). -/
example : choi (fun X : Matrix (Fin 2) (Fin 2) ℂ => X) (0,0) (1,1) = 1 := by
norm_num [choi, Matrix.single]
/-- Sanity: normalization divides the identity-qubit Choi coherence by two, PDF p.9. -/
example : choiState (fun X : Matrix (Fin 2) (Fin 2) ℂ => X) (0,0) (1,1) = 1 / 2 := by
norm_num [choiState, choi, Matrix.single]
/-- Sanity: a scalar code has the selected class FA if neither constraint is imposed. -/
example : flagsClass false false = .FA := rfl
/-- PDF p.9, (50): PPT distillation fidelity of a normalized bipartite state. -/
def distillFidelity {A B : Type*} [Fintype A] [Fintype B]
(rho : Matrix (A × B) (A × B) ℂ) (K : ℕ) : ℝ :=
if h : 0 < K then
letI : Nonempty (Fin K) := ⟨⟨0,h⟩⟩
sSup {f | ∃ Y : Superop (A × B) (Fin K × Fin K), PPTMap Y ∧
f = effectProb (pureDensity (finiteMaxEntangled (Fin K))) (Y rho)}
else 0
/-- PDF p.9, (51): operational PPT distillable entanglement, in ebits/copy. -/
def distillCapacity {A B : Type*} [Fintype A] [Fintype B]
(rho : Matrix (A × B) (A × B) ℂ) : ℝ≥0∞ :=
⨆ r : NNReal, if Filter.Tendsto
(fun n : ℕ => distillFidelity
(fun p q : (Fin n → A) × (Fin n → B) =>
∏ k, rho (p.1 k,p.2 k) (q.1 k,q.2 k))
⌊(2 : ℝ) ^ ((n : ℝ) * (r : ℝ))⌋₊)
Filter.atTop (nhds 1) then (r : ℝ≥0∞) else 0
/-- PDF p.10, (53)--(56): Alice's local classical-output operation on input and
her resource share, followed by Bob's local operation on the message and his share. -/
def resourceSim {A B I O C : Type*} [Fintype A] [Fintype I]
(rho : Matrix (A × B) (A × B) ℂ) (M : Superop (I × A) C)
(D : Superop (C × B) O) : Superop I O :=
fun X => D (fun p q => M
(fun u v => X u.1 v.1 * rho (u.2,p.2) (v.2,q.2)) p.1 q.1)
/-- PDF pp.9--10, Proposition 8(ii): exact single-copy Choi simulation by local
operations and forward classical communication. It is an operational factorization. -/
def HasChoiSimulation {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O) : Prop :=
∃ m : ℕ, 0 < m ∧ ∃ M : Superop (I × I) (Fin m),
∃ D : Superop (Fin m × O) O, IsChannel M ∧ IsChannel D ∧
(∀ X, dephasing (M X) = M X) ∧ ∀ X, resourceSim (choiState N) M D X = N X
/-- PDF p.10: a classical control is measured, then the indicated unitary applied. -/
def classicalControlledUnitary {C I : Type*} [Fintype C] [Fintype I]
(U : C → Matrix I I ℂ) : Superop (C × I) I :=
fun X => ∑ c, conjSuperop (U c) (fun i j => X (c,i) (c,j))
/-- PDF p.10, (57)--(59): generalized Werner--Holevo channel, d>=2, alpha in [0,1]. -/
def wernerHolevoChannel (d : ℕ) (alpha : ℝ) : Superop (Fin d) (Fin d) :=
fun X => (((1 - alpha) / ((d : ℝ) + 1) : ℝ) : ℂ) • (X.trace • 1 + X.transpose) +
((alpha / ((d : ℝ) - 1) : ℝ) : ℂ) • (X.trace • 1 - X.transpose)
/-- PDF p.10, (60): the real Levi-Civita symbol in the ordered basis 0,1,2. -/
def epsilon3 (i j k : Fin 3) : ℝ :=
if (i = 0 ∧ j = 1 ∧ k = 2) ∨ (i = 1 ∧ j = 2 ∧ k = 0) ∨
(i = 2 ∧ j = 0 ∧ k = 1) then 1
else if (i = 0 ∧ j = 2 ∧ k = 1) ∨ (i = 2 ∧ j = 1 ∧ k = 0) ∨
(i = 1 ∧ j = 0 ∧ k = 2) then -1 else 0
/-- PDF p.10: an actual isometric dilation with a channel degrading environment to output. -/
def HasAntidegradingDilation {I O : Type*} [Fintype I] [Fintype O] (N : Superop I O) : Prop :=
∃ e : ℕ, 0 < e ∧ ∃ V : Matrix (O × Fin e) I ℂ,
Vᴴ * V = 1 ∧ (∀ X, N X = traceRight (V * X * Vᴴ)) ∧
∃ D : Superop (Fin e) O, IsChannel D ∧ ∀ X, N X = D (traceLeft (V * X * Vᴴ))
/-- PDF pp.10,13: symmetric and antisymmetric projectors, selected by a Boolean. -/
def wernerSector (d : ℕ) (anti : Bool) : Matrix (Fin d × Fin d) (Fin d × Fin d) ℂ :=
(2 : ℂ)⁻¹ • (if anti then 1 - swapMatrix (I := Fin d) else 1 + swapMatrix (I := Fin d))
/-- PDF p.13, (A1): E_j, with exactly j antisymmetric factors. Rows are (all inputs,all outputs). -/
def sectorSum (d n j : ℕ) :
Matrix ((Fin n → Fin d) × (Fin n → Fin d))
((Fin n → Fin d) × (Fin n → Fin d)) ℂ :=
fun p q => ∑ t : Fin n → Bool,
if (Finset.univ.filter (fun k => t k = true)).card = j then
∏ k, wernerSector d (t k) (p.1 k,p.2 k) (q.1 k,q.2 k) else 0
/-- PDF p.14: Upsilon_i has exactly i normalized Bell projectors. -/
def bellSectorSum (d n j : ℕ) (hd : 0 < d) :
Matrix ((Fin n → Fin d) × (Fin n → Fin d))
((Fin n → Fin d) × (Fin n → Fin d)) ℂ :=
letI : Nonempty (Fin d) := ⟨⟨0,hd⟩⟩
let phi := pureDensity (finiteMaxEntangled (Fin d))
fun p q => ∑ t : Fin n → Bool,
if (Finset.univ.filter (fun k => t k = true)).card = j then
∏ k, (if t k then phi else 1 - phi) (p.1 k,p.2 k) (q.1 k,q.2 k) else 0
/-- PDF pp.13--14, (A1): real sector coefficients, embedded into complex matrices. -/
def ansatz (d n : ℕ) (x : Fin (n + 1) → ℝ) :=
∑ j : Fin (n + 1), (x j : ℂ) • sectorSum d n j
/-- PDF p.14, (A3): partial-transpose coefficients with zero-extended binomials.
The explicit guard prevents truncated natural subtraction introducing extra terms. -/
def coeffM (d n : ℕ) (i j : Fin (n + 1)) : ℝ :=
(2 ^ n : ℝ)⁻¹ * ∑ k ∈ Finset.range (min i.val j.val + 1),
if j.val - k ≤ n - i.val then
(Nat.choose (n - i.val) (j.val - k) : ℝ) * (Nat.choose i.val k : ℝ) *
(1 + (d : ℝ)) ^ (i.val - k) * (1 - (d : ℝ)) ^ k else 0
/-- PDF p.14: partial-trace coefficients g_j; the remaining identity acts on input. -/
def coeffG (d n : ℕ) (j : Fin (n + 1)) : ℝ :=
(2 ^ n : ℝ)⁻¹ * Nat.choose n j.val * ((d : ℝ) + 1) ^ (n - j.val) *
((d : ℝ) - 1) ^ j.val
/-- PDF p.14, (A4): essential factor d^n, including the endpoint convention 0^0=1. -/
def lpObjective (d n : ℕ) (alpha : ℝ) (x : Fin (n + 1) → ℝ) : ℝ :=
(d : ℝ)^n * ∑ j : Fin (n + 1), (Nat.choose n j.val : ℝ) *
(1 - alpha) ^ (n - j.val) * alpha ^ j.val * x j
/-- PDF p.14, (A5)--(A8): n+1 real variables with independently selectable NS/PPTp constraints. -/
def WernerLPFeasible (d n K : ℕ) (s p : Bool) (x : Fin (n + 1) → ℝ) : Prop :=
(∀ i, 0 ≤ x i ∧ x i ≤ ((d : ℝ)^n)⁻¹) ∧
(s = true → (∑ j, coeffG d n j * x j) = ((K : ℝ)^2)⁻¹) ∧
(p = true → ∀ i, -(((d : ℝ)^n)⁻¹ / K) ≤ (∑ j, coeffM d n i j * x j) ∧
(∑ j, coeffM d n i j * x j) ≤ ((d : ℝ)^n)⁻¹ / K)
/-- PDF p.12, Example 9: corrected common 1/9 normalization of the printed Lambda. -/
def exampleLambda := ansatz 3 2 (fun j =>
if j.val = 0 then (3 / 32 : ℝ) / 9 else if j.val = 1 then (7 / 32 : ℝ) / 9 else 1 / 9)
/-- PDF p.12, Fig.7: Z- or X-basis ket a, selected by Bob's bit b. -/
def measurementKet (b a i : Fin 2) : ℂ :=
if b = 0 then (if i = a then 1 else 0)
else ((if a = 1 ∧ i = 1 then -1 else 1 : ℝ) / Real.sqrt 2 : ℝ)
/-- PDF pp.12--13, Fig.7: the independently specified randomized measurement operation.
Both outputs are diagonal, and Bob's independent uniform bit is the second output. -/
def bonusOperation : Superop (Fin 2 × Fin 2) (Fin 2 × Fin 2) :=
fun X u v => if u = v then (2 : ℂ)⁻¹ * ∑ b : Fin 2, ∑ a : Fin 2,
if u.1.val = (a.val + u.2.val) % 2 then
∑ i : Fin 2, ∑ j : Fin 2,
conj (measurementKet b a i) * X (i,b) (j,b) * measurementKet b a j
else 0 else 0
/-- PDF pp.12--13: an unassisted one-use perfect qubit transmission code for a side channel. -/
def PerfectQubit {Q R : Type*} [Fintype Q] [Fintype R] (F : Superop Q R) : Prop :=
∃ E : Superop (Fin 2) Q, ∃ D : Superop R (Fin 2),
IsChannel E ∧ IsChannel D ∧ ∀ X, D (F (E X)) = X
/-- Sanity: the orientation in (60) gives epsilon_012=+1 and epsilon_021=-1. -/
example : epsilon3 0 1 2 = 1 ∧ epsilon3 0 2 1 = -1 := by
norm_num [epsilon3] <;> omega
/-- Sanity: Example 9's antisymmetric coefficient is 1/9, not one. -/
example : (fun j : Fin 3 => if j.val = 0 then (3 / 32 : ℝ) / 9
else if j.val = 1 then (7 / 32 : ℝ) / 9 else 1 / 9) 2 = 1 / 9 := by norm_num
/-- PDF pp.14--15: generalized Pauli correction, with positive phase and shift X^a Z^b.
The message c is identified with (a,b) by finProdFinEquiv. -/
def teleportWeyl (d : ℕ) (c : Fin (d * d)) : Matrix (Fin d) (Fin d) ℂ :=
let ab := (finProdFinEquiv : Fin d × Fin d ≃ Fin (d * d)).symm c
fun i j => if i.val = (j.val + ab.1.val) % d then
Complex.exp (((2 * Real.pi * (ab.2.val : ℝ) * j.val / d : ℝ) : ℂ) * Complex.I)
else 0
/-- PDF pp.14--15: the Bell measurement vectors (U_c tensor I)|phi>.
This convention pairs with the correction U_c, not its inverse. -/
def bellKet (d : ℕ) (c : Fin (d * d)) : EuclideanSpace ℂ (Fin d × Fin d) :=
WithLp.toLp 2 (fun p => teleportWeyl d c p.1 p.2 / (Real.sqrt d : ℂ))
/-- PDF pp.14--15: complete Bell measurement with a classical outcome. -/
def bellMeasure (d : ℕ) : Superop (Fin d × Fin d) (Fin (d * d)) :=
fun X c e => if c = e then
(pureDensity (bellKet d c) * X).trace else 0
/-- PDF pp.14--15: actual bipartite teleportation code, with one shared Bell state. -/
def teleportCode (d : ℕ) (hd : 0 < d) :
Superop (Fin d × Fin (d * d)) (Fin (d * d) × Fin d) :=
letI : Nonempty (Fin d) := ⟨⟨0,hd⟩⟩
eaOp (pureDensity (finiteMaxEntangled (Fin d))) (bellMeasure d) (classicalControlledUnitary (teleportWeyl d))
/-- PDF pp.14--15: actual bipartite dense-coding code, with one shared Bell state. -/
def denseCode (d : ℕ) (hd : 0 < d) :
Superop (Fin (d * d) × Fin d) (Fin d × Fin (d * d)) :=
letI : Nonempty (Fin d) := ⟨⟨0,hd⟩⟩
eaOp (pureDensity (finiteMaxEntangled (Fin d))) (classicalControlledUnitary (teleportWeyl d)) (bellMeasure d)
/-- PDF p.14, corrected (B1): input/output dephasing around permutation averaging.
The printed permutation average alone does not remove quantum coherences. -/
def dephasedPermutationTwirl (d : ℕ) (M : Superop (Fin d) (Fin d)) : Superop (Fin d) (Fin d) :=
fun X => dephasing ((Nat.factorial d : ℂ)⁻¹ •
∑ pi : Equiv.Perm (Fin d), conjSuperop ((permutationMatrix pi)ᴴ)
(M (conjSuperop (permutationMatrix pi) (dephasing X))))
/-- PDF p.14: isotropic depolarizing channel parameterized by entanglement fidelity.
Dimension one is handled separately; f is not the depolarizing mixing weight. -/
def fidelityDepolarizing (d : ℕ) (f : ℝ) : Superop (Fin d) (Fin d) :=
if d = 1 then (fun X => X) else
let a : ℝ := ((d : ℝ)^2 * f - 1) / ((d : ℝ)^2 - 1)
fun X => (a : ℂ) • X + (((1 - a) / d : ℝ) : ℂ) • (X.trace • 1)
/-- PDF p.14: d-ary symmetric classical channel parameterized by success probability. -/
def symmetricClassical (d : ℕ) (p : ℝ) : Superop (Fin d) (Fin d) :=
if d = 1 then dephasing else
fun X i j => if i = j then (p : ℂ) * X i i +
(((1 - p) / ((d : ℝ) - 1) : ℝ) : ℂ) * (∑ k, if k = i then 0 else X k k)
else 0
/-- PDF p.15, (B6): fully specified CPTP teleportation conversion with corrected twirls. -/
def teleportConversion (d : ℕ) (hd : 0 < d)
(M : Superop (Fin (d * d)) (Fin (d * d))) : Superop (Fin d) (Fin d) :=
QuditFidelity.haarTwirl d hd (link d (dephasedPermutationTwirl (d * d) M) (teleportCode d hd))
/-- PDF p.15, (B8): fully specified CPTP dense-coding conversion with corrected twirls. -/
def denseConversion (d : ℕ) (hd : 0 < d)
(N : Superop (Fin d) (Fin d)) : Superop (Fin (d * d)) (Fin (d * d)) :=
dephasedPermutationTwirl (d * d) (link (d * d) (QuditFidelity.haarTwirl d hd N) (denseCode d hd))
/-- Sanity: the scalar isotropic channel is the identity, without division by d^2-1. -/
example (X : Matrix (Fin 1) (Fin 1) ℂ) : fidelityDepolarizing 1 1 X = X := by
simp [fidelityDepolarizing]
/-- Sanity: the zero-outcome projection for Bob's b=0 is the computational ket. -/
example : measurementKet 0 0 0 = 1 ∧ measurementKet 0 0 1 = 0 := by
norm_num [measurementKet]
section Statements
variable {I O : Type} [Fintype I] [Nonempty I] [Fintype O] [Nonempty O]
end Statements
/-- PDF pp.6--7, (29),(36): the actual twirled bipartite operation reconstructed
from rho,Lambda. Used only at K>=2; the scalar case of Theorem 3 is separate. -/
def reconstructedCode {I O : Type*} [Fintype I] [Fintype O] (K : ℕ) (hK : 0 < K)
(rho : Matrix I I ℂ) (L : Matrix (I × O) (I × O) ℂ) :
Superop (Fin K × O) (I × Fin K) :=
letI : Nonempty (Fin K) := ⟨⟨0,hK⟩⟩
let phi := pureDensity (finiteMaxEntangled (Fin K))
let G := (((K : ℂ)^2 - 1)⁻¹) • (Matrix.kronecker rho 1 - L)
fun X u v => ∑ a, ∑ a2, ∑ b, ∑ b2, X (a,b) (a2,b2) * (K : ℂ) *
(phi (u.2,a) (v.2,a2) * L (u.1,b) (v.1,b2) +
(1 - phi) (u.2,a) (v.2,a2) * G (u.1,b) (v.1,b2))
end QAlgorithms.Papers.Independent.Support50.P11
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Support50.P11.CodeAssistance
This introduces a type consisting of exactly eight distinct labels, , with decidable equality. This declaration itself assigns no mathematical conditions or interpretations to the labels.
QAlgorithms.Papers.Independent.Support50.P11.ExpandedDualFeasible
For finite types , possibly empty, any arbitrary map , any natural number , Boolean flags , real number , complex -indexed matrix , and complex matrices indexed by , this predicate requires , , if , and if . It further requires
Here , is a matrix unit, the transpose is ordinary transpose without conjugation, , and means . True flags add no zero-matrix requirement. There is no channel assumption on and no explicit sign assumption on . When , ; empty index types are allowed, with the corresponding sums empty and matrix conditions interpreted on those spaces.
QAlgorithms.Papers.Independent.Support50.P11.HasAntidegradingDilation
For arbitrary finite types and an arbitrary function , this property means that there exist a positive natural number , a complex matrix with rows indexed by and columns indexed by , and a channel from matrices to matrices on , such that
For a matrix on , the two partial traces have entries and . The channel condition on means that for a finite family satisfying . No nonemptiness of is assumed, although must be positive.
QAlgorithms.Papers.Independent.Support50.P11.HasChoiSimulation
For arbitrary finite types and an arbitrary function , this property means that there exist a positive natural number and channels from matrices on to matrices on , and from matrices on to matrices on , such that is diagonal for every input matrix , and
where
Here is a matrix unit, and each channel must admit a finite Kraus representation with . There is no separate channel assumption on . Empty are allowed; if is empty, the reciprocal is interpreted as zero.
QAlgorithms.Papers.Independent.Support50.P11.Horodecki
For finite types and a function from complex matrices on to complex matrices on , this predicate means that has a finite Kraus representation for every matrix , with , and that the matrix on defined by
is positive semidefinite, where is the input matrix unit. Thus the positivity condition uses the unnormalized matrix of values of on matrix units, with the two output indices transposed. Empty or and an empty Kraus family are permitted by the quantifiers.
QAlgorithms.Papers.Independent.Support50.P11.InCodeClass
For finite types , any natural number , one of the eight labels , and any function from matrices on to matrices on , where , this predicate imposes the following label-dependent condition: imposes no condition; requires channels and with ; requires positive integers , a positive semidefinite matrix of trace on , and channels , , with , where , grouped as ; requires positive integers and channels , , , with for every matrix , and ; requires the same dimensions and channel types and equality , but replaces the diagonal conditions on by positive semidefiniteness of the matrix ; requires a channel satisfying for every ; requires both and to be channels; and requires both the and conditions. In this paragraph, a map denoted acts on complex matrices on those index spaces, and is a channel precisely when for every , for a finite family satisfying ; deletes off-diagonal entries; ; and the tensor operation is explicitly
The forward operation is explicitly , where
Partial traces mean summing matching indices of the indicated factor, and are matrix units. The quantifiers allow , empty , and Kraus families of length zero; only the auxiliary dimensions explicitly required positive exclude zero. There is no general channel requirement on outside the conditions selected by its label.
QAlgorithms.Papers.Independent.Support50.P11.IsClassicalSideChannel
For finite types and a function from complex matrices on to complex matrices on , this predicate requires a finite Kraus representation , valid for every matrix , with , together with
for every complex input matrix . Here retains the diagonal entries of and sets every off-diagonal entry to zero. Both identities apply to all matrices, not only density matrices. Empty input or output types and a Kraus family of length zero are allowed.
QAlgorithms.Papers.Independent.Support50.P11.IsForwardCode
For finite types , a natural number , a label , and a function from complex matrices on to matrices on , this predicate requires that be a channel, that there exist a channel satisfying for every matrix , and that the following additional condition hold for the chosen label: adds nothing; requires for channels , ; requires positive integers , a positive semidefinite trace- matrix on , channels , , and , where , grouped as ; requires positive integers , channels , , , the identities for every matrix , and ; requires the same dimensions, channel types, and forward equality, but instead requires that be positive semidefinite; requires a channel with for every ; requires to be a channel; and requires both the and conditions. Here ; maps written act on matrices, and being a channel means having a finite representation for all with ; retains only diagonal entries; ; and partial traces sum matching indices of the named factor. The operations used in the conditions are explicitly
where
and denotes a matrix unit. Every equality quantified over applies to arbitrary complex matrices. Zero , empty , and empty Kraus families are included; auxiliary dimensions required positive cannot be zero.
QAlgorithms.Papers.Independent.Support50.P11.Loewner
For any finite type and any complex matrices indexed by , this predicate means that is positive semidefinite. It does not separately require or to be Hermitian or positive semidefinite. Empty is allowed, in which case the condition holds for the unique pair of matrices.
QAlgorithms.Papers.Independent.Support50.P11.NSAB
For finite types and any function from complex matrices on to complex matrices on , this predicate means that there exists a function from matrices on to matrices on that is a channel and satisfies
for every complex matrix on and every . Here being a channel means that there are a natural number and matrices with rows indexed by and columns by , such that and for every matrix on . The identity concerns all matrices ; itself need not be a channel. Empty types and the empty Kraus family are included.
QAlgorithms.Papers.Independent.Support50.P11.NSBA
For finite types and any function from complex matrices on to complex matrices on , this predicate means that there exists a function from matrices on to matrices on that is a channel and satisfies
for every complex matrix on and every . Here saying that is a channel means that there are a natural number and matrices with rows indexed by and columns by , such that and for every matrix on . The identity is required for all matrices , not just density matrices; itself is not required to be a channel. All four types may be empty, and is permitted.
QAlgorithms.Papers.Independent.Support50.P11.PPTMap
For finite types and a function from complex matrices on to complex matrices on , this predicate requires both and to be channels, where
For either map , being a channel means that it admits a finite family of rectangular complex matrices from its input index space to its output index space satisfying on the input space and for every input matrix . The two channel representations may use different families. Empty types and families of length zero are allowed; no nonemptiness assumptions occur.
QAlgorithms.Papers.Independent.Support50.P11.PerfectQubit
For arbitrary finite types , each supplied with a finite enumeration, and an arbitrary function from complex matrices to complex matrices, this predicate means that there exist functions from complex matrices to matrices and from matrices to complex matrices such that both have finite normalized Kraus representations and
Explicitly, there must be natural numbers and matrices , with , , , and . No channel assumption is imposed on . Empty or are allowed as parameters, although in either case the stated recovery property cannot hold.
QAlgorithms.Papers.Independent.Support50.P11.Primal
For finite types , possibly empty, any natural number , Boolean flags , a complex -indexed matrix , and a complex matrix indexed by , this predicate means that is positive semidefinite with , and
together with
and
Here means is positive semidefinite, and . A false flag makes its corresponding implication impose no restriction. The case is included, with both displayed inverse scalars equal to . If is empty, the trace-one requirement on is impossible.
QAlgorithms.Papers.Independent.Support50.P11.WernerLPFeasible
For natural numbers , Boolean flags , and a real vector , this predicate means that every coordinate satisfies , that implies , and that implies
where
A false flag imposes no corresponding additional condition. No positivity assumption is made on . Real inversion and division are total, with : thus makes the conditional equality’s right side and both conditional inequality bounds zero, and forces . For , and , including when .
QAlgorithms.Papers.Independent.Support50.P11.ansatz
For natural numbers and arbitrary real coefficients , this defines a complex matrix on pairs of words in by
where if , and otherwise, and the tensor product is indexed by grouping all first coordinates and all second coordinates separately. The real coefficients act as complex scalars; no positivity or normalization is required. Both and are permitted; when , the resulting one-dimensional matrix has sole entry .
QAlgorithms.Papers.Independent.Support50.P11.bellKet
For a natural number and a label , let be the inverse image of under the standard finite-product indexing equivalence. This defines the vector in whose coordinates are
There is no explicit positivity hypothesis on , but the required label has no possible value when .
QAlgorithms.Papers.Independent.Support50.P11.bellMeasure
For every natural number , this defines a map from complex matrices indexed by to complex matrices indexed by . For an outcome , let be its image under the canonical identification of these labels with pairs of -element labels, and define
The value of the defined map on any matrix is the diagonal matrix
Here denotes conjugate transpose, and . The input need not be positive or normalized, and the definition imposes no restriction on ; when , both matrix index sets are empty.
QAlgorithms.Papers.Independent.Support50.P11.bellSectorSum
For natural numbers , with the hypothesis , this defines a complex matrix indexed by pairs of words in . Let be the matrix on pairs of -valued indices given by when and , and otherwise; thus is the outer product of the vector whose -coordinate is if , and otherwise. The defined matrix has entries
where is the identity on pairs of -valued indices. There is no restriction ; for the matrix is zero. For , its sole entry is when , and otherwise.
QAlgorithms.Papers.Independent.Support50.P11.bonusOperation
This defines a function from complex matrices on to matrices on the same index set. For every input matrix and output indices , , its entries are
where if and otherwise, and . The input is unrestricted; no density-matrix hypothesis is part of this definition.
QAlgorithms.Papers.Independent.Support50.P11.channelFidelity
For every natural number and arbitrary map , this defines the value to be when . When , let have components , put , and define the amplified map entrywise by
The value is , equivalently
There is no assumption that is linear or a channel, so the factor inside its argument cannot in general be moved outside .
QAlgorithms.Papers.Independent.Support50.P11.choiState
For any finite type with decidable equality, any type , and any function from complex matrices indexed by to complex matrices indexed by , this defines the matrix indexed by through
where is the matrix with entry at and elsewhere, and the inverse is taken in . No linearity, positivity, or normalization condition is imposed on , and need not be finite. The type may be empty; then the inverse of its cardinality is , and the resulting matrix has an empty index set.
QAlgorithms.Papers.Independent.Support50.P11.classicalControlledUnitary
For arbitrary finite types and any family of complex matrices on , this defines the function from matrices on to matrices on given by
The matrices are arbitrary: no unitarity or normalization condition is assumed. If is empty, the sum is zero; may also be empty.
QAlgorithms.Papers.Independent.Support50.P11.codeAverageInput
For any type , any finite type , any natural number , and any map , this defines an -indexed matrix by
Thus it applies to the indicated scalar multiple of the identity and sums over the second output index. The type need not be finite, and no channel or linearity condition is imposed on . Scalar inversion is total: when , its inverse is . If , the output sum is empty, so ; if is empty but , the definition still applies to the unique empty-indexed input matrix.
QAlgorithms.Papers.Independent.Support50.P11.coeffG
For natural numbers and an index , this defines
as a real number. Here is subtraction in the real numbers, whereas is natural-number subtraction and is nonnegative because . The definition permits , , and , with ; when , its only value is .
QAlgorithms.Papers.Independent.Support50.P11.coeffM
For natural numbers and indices , this defines the real number
All subtractions appearing in the code are natural-number subtractions, truncated at zero; on this summation range, , , and are already nonnegative. No positivity assumption on or is imposed, and zero bases raised to exponent zero have value . In particular, for , the only indices are , and the value is .
QAlgorithms.Papers.Independent.Support50.P11.denseCode
For every natural number , with the supplied hypothesis , this defines a map from matrices on registers of sizes to matrices on registers of sizes . Adjoin auxiliary registers , both of size , in , where when and is zero otherwise. For a label identified with , define
For any input matrix on registers of sizes , group the enlarged registers as ; apply to , and apply to the map whose -entry is if , and zero otherwise. The two resulting registers, in this order, give the defined output. The input matrix is unrestricted, and is included.
QAlgorithms.Papers.Independent.Support50.P11.denseConversion
For every natural number , its supplied positivity hypothesis , and every function on complex matrices, first define
where is normalized Haar measure. Let be the map on input registers of sizes obtained by adjoining , with , and applying to the first input together with the first auxiliary register the map , and to the second input together with the second auxiliary register the map . Here , , and . Define a map on -dimensional matrices by
The defined conversion is
where deletes off-diagonal entries, , and denotes a matrix unit. No channel, linearity, or integrability assumption is imposed on ; the Haar integral uses the total Bochner-integral convention, giving zero for a nonintegrable integrand. The definition includes .
QAlgorithms.Papers.Independent.Support50.P11.dephasedPermutationTwirl
For every natural number and every function from complex matrices to complex matrices, this defines the function
where when and is zero otherwise, and when and is zero otherwise. Thus both the input to the conjugation-and- expression and the final output are dephased. No linearity, positivity, trace preservation, or channel assumption is imposed on . The definition includes , for which , the empty set has one permutation, and all matrices involved are empty.
QAlgorithms.Papers.Independent.Support50.P11.distillCapacity
For arbitrary finite types and any complex matrix on , this defines an extended nonnegative real number as the supremum, over all nonnegative real rates , of when
and of zero otherwise. Here
and, for , is the real supremum of , where , and both and admit finite Kraus representations with ; the partial transpose is . Set , and use zero for an empty or unbounded-above real supremum. No normalization or positivity of is required. The sequence includes , where the product is empty and equals one and the target dimension is one; every target dimension is positive. The outer supremum is zero if no rate satisfies the convergence condition and may equal .
QAlgorithms.Papers.Independent.Support50.P11.distillFidelity
For arbitrary finite types , any complex matrix on , and any natural number , this defines zero when ; when , it defines
where maps matrices on to matrices on , and both and are channels. On either bipartite space, . A channel here means a function admitting a finite representation with . The matrix has entries . No density-matrix assumption is made on ; the real supremum gives zero if its defining set is empty or unbounded above.
QAlgorithms.Papers.Independent.Support50.P11.eaOp
Let be finite types with decidable equality, let be arbitrary types, let be any complex matrix on , and let be arbitrary functions from matrices on to matrices on , and from matrices on to matrices on , respectively. This defines a function from matrices on to matrices on by
Here denotes a matrix unit on the relevant input space. There is no requirement that be a density matrix or that be linear or channels; the definition uses their values on matrix units. Empty index types are allowed, and the corresponding empty sums are zero.
QAlgorithms.Papers.Independent.Support50.P11.epsilon3
For indices , this defines the real number when is one of , the real number when it is one of , and zero otherwise. In particular, it is zero whenever any two indices coincide.
QAlgorithms.Papers.Independent.Support50.P11.exampleLambda
This defines a complex matrix on pairs of length-two words over . Let exchange the two coordinates of , and put and . With tensor factors regrouped so that the two first coordinates form one word and the two second coordinates form the other, the matrix is
QAlgorithms.Papers.Independent.Support50.P11.fidelityDepolarizing
For every natural number and every real number , this defines a function on complex matrices. When , its value at every is , independently of . Otherwise, put
All real coefficients are regarded as complex scalars in this formula. There is no restriction on and no positivity or normalization requirement on . The case is included in the second branch: division by zero has value zero, and the result is the unique empty matrix.
QAlgorithms.Papers.Independent.Support50.P11.flagsClass
For any Boolean values , this defines an assistance label by the complete table
The result is just the indicated constructor of the eight-element assistance-label type ; this definition asserts no property of any map or code.
QAlgorithms.Papers.Independent.Support50.P11.forwardOp
Let be finite types with decidable equality, let be arbitrary types, and let be arbitrary functions taking matrices on to matrices on , matrices on to matrices on , and matrices on to matrices on , respectively. This defines a function from matrices on to matrices on as follows: for an input and , form the matrix on with entries
The output entry at is , where each is the matrix unit on the indicated input type. No channel, linearity, positivity, or normalization assumption is imposed on ; in particular, this formula uses and through their values on matrix units, while applying directly to each matrix . Any of the index types may be empty, with finite sums over empty sets equal to zero.
QAlgorithms.Papers.Independent.Support50.P11.lagrangian
For arbitrary finite types , an arbitrary function , a natural number , a real number , and complex matrices on , on , and on , this defines the real number
Here , where is the matrix unit; is ordinary transpose; ; and . The reciprocals are taken in , so both reciprocal coefficients are zero when . No channel, Hermiticity, positivity, or normalization assumptions are imposed.
QAlgorithms.Papers.Independent.Support50.P11.link
For any finite types , possibly empty, any natural number , and arbitrary maps and , where , this defines a map by
Here is the matrix with entry at and elsewhere. No linearity, positivity, normalization, or channel condition is assumed for or . Empty sums are zero; is included and gives a map between matrices indexed by the empty set.
QAlgorithms.Papers.Independent.Support50.P11.lpObjective
For natural numbers , an arbitrary real number , and arbitrary real coefficients , this defines the real-valued objective
Neither nor any condition on is required. The definition includes , when the value is , and , when the value is zero for ; powers use .
QAlgorithms.Papers.Independent.Support50.P11.measurementKet
For indices , this defines a complex scalar , with real values, by
Thus each choice of specifies two coordinates indexed by ; the declaration itself returns one coordinate.
QAlgorithms.Papers.Independent.Support50.P11.optimalClassicalCodeFidelity
For finite types , possibly empty, an assistance label , an arbitrary map , and a natural number , this defines the real supremum, over the maps specified below, of
Here is a matrix unit. An admissible , viewed as a map on matrices, must be a channel and satisfy for all , for some channel . A channel has a finite Kraus representation with . The assistance condition is: , no further restriction; , for channels , ; , adjoining a density matrix on for some positive integers , then applying channels and locally after regrouping the registers; or , applying channels , , and in that order, retaining , for positive integers . For , , where deletes off-diagonal entries; for , the output partial transpose of , with , is positive semidefinite. For , there must be a channel with for every . For , must be a channel, where ; requires both the and conditions. Density matrices are positive semidefinite with trace ; partial traces sum the discarded index, and channel tensor products use their matrix-unit extensions. No condition is imposed on . The supremum need not be attained and is totalized to for an empty or unbounded-above score set. For , the displayed score is , so the defined value is .
QAlgorithms.Papers.Independent.Support50.P11.optimalCodeFidelity
For finite types , possibly empty, an assistance label , an arbitrary map , and a natural number , this defines the real supremum of the following scores over maps . Throughout, a channel means a map for some natural number , with ; a density matrix means a positive semidefinite matrix of trace . The map must be a channel, and there must be a channel satisfying for every . In addition, the label imposes these conditions: imposes none further; requires for channels and ; requires positive integers , a density matrix on , and channels , , with obtained by adjoining , regrouping the registers, and applying ; and require positive integers , channels , , , with obtained by applying , then to its output, then jointly to and , retaining . For , must satisfy , where deletes off-diagonal entries; for , the matrix , defined by , must remain positive semidefinite after transposing its output index. The label requires a channel such that for every ; requires to be a channel, where ; requires both conditions. Partial traces sum the discarded register, and tensor products of channels are their usual matrix-unit tensor extensions. For each admissible , define
Its score is for , and otherwise is . No channel hypothesis is imposed on , and the supremum does not assert attainment. The real supremum is totalized, taking value for an empty or unbounded-above score set; in particular the definition gives when .
QAlgorithms.Papers.Independent.Support50.P11.primalObjective
For finite types , possibly empty, any arbitrary map , and any complex matrix indexed by , define by . The objective is
The transpose is the ordinary transpose, without complex conjugation, and has no dimension-normalizing factor. Neither nor is assumed positive, normalized, or channel-valued. If either index type is empty, the value is .
QAlgorithms.Papers.Independent.Support50.P11.quantumCodeCapacity
For finite types , possibly empty, any assistance label , and any map , this defines an extended nonnegative real number as follows. For each natural number , define a map on matrices indexed by , with output indexed by , by
This is the specified matrix-unit extension even when is not linear; for , it is the identity on the one-dimensional matrix space. For any such map on matrices and natural number , let be the real supremum of the scores if , and otherwise
The maps admitted in this supremum are channels satisfying for some channel and every , together with the restriction selected by : adds none; requires a tensor product of channels and ; requires local channels , , using an adjoined shared density matrix on , for positive integers ; and require channels , , and , composed in that order while retaining , for positive integers . The middle channel must satisfy for , or have positive semidefinite output partial transpose of its matrix , defined by , for . The label requires for a channel ; requires to be a channel; requires both. Here deletes off-diagonal entries, , partial traces sum discarded indices, a density matrix is positive semidefinite with trace , and a channel has a finite Kraus representation with . The real supremum defining is totalized to for empty or unbounded-above score sets and asserts no attainment. The capacity is
The supremum is in , so it may be infinite. It ranges over all finite nonnegative real rates, including ; the sequence includes , when the message size is . No channel assumption on or attainment of the code-fidelity suprema is part of this definition.
QAlgorithms.Papers.Independent.Support50.P11.reconstructedCode
For any finite types , any positive integer , any complex matrix on , and any complex matrix on , this defines a map , with no positivity, normalization, or feasibility assumptions on . Let be the projector onto , so that when and , and is zero otherwise, and put
For every input matrix , , and , its entries are
All inverses in this formula are complex-field inverses. In particular, when , , hence , and the formula becomes . The declaration defines this map without asserting that it is a channel.
QAlgorithms.Papers.Independent.Support50.P11.relaxedBound
For arbitrary finite types , an arbitrary function , and any natural number , this defines the real supremum
where ranges over positive semidefinite matrices on with , and ranges over matrices on satisfying
Here , denotes ordinary transpose, and . No channel assumption is made on . The value is included, with ; the types may be empty, and if is empty there is no admissible . The supremum is taken in , whose formal supremum convention gives zero for an empty or unbounded-above set.
QAlgorithms.Papers.Independent.Support50.P11.resourceSim
For arbitrary types , with and finite, any complex matrix on , and arbitrary functions and , this defines the function sending each matrix on to , where
No positivity or normalization condition is imposed on , and neither linearity nor any channel property is required of or . Empty finite types are included.
QAlgorithms.Papers.Independent.Support50.P11.sectorSum
For arbitrary natural numbers , this defines a complex matrix whose indices are pairs , where , by
Equivalently, each factor is the corresponding entry of for a true label and for a false label, with exchanging the two coordinates. If , the matrix is zero. When , its index set has one element even if , and its sole entry is one for and zero otherwise; when , the index set is empty.
QAlgorithms.Papers.Independent.Support50.P11.symmetricClassical
For every natural number and every real number , this defines a function on complex matrices. If , the function sends to its diagonal matrix, which in this dimension equals . Otherwise its entries are
The parameter is unrestricted, and need not be positive or normalized. The case belongs to the second branch and defines the unique function on empty matrices; there are then no entries to evaluate.
QAlgorithms.Papers.Independent.Support50.P11.teleportCode
For every natural number , with the supplied hypothesis witnessing this positivity, this defines a map from matrices on a pair of registers of sizes to matrices on registers of sizes . Introduce two auxiliary registers , each of size , in the matrix , where
For each label corresponding to , set
On an arbitrary input matrix on registers of sizes , the defined map adjoins , groups the registers as , and applies the following two local maps: on , it produces the diagonal matrix with -th diagonal entry ; on , it applies
Their respective outputs form the two output registers in the stated order. No positivity or normalization hypothesis is imposed on ; the definition includes .
QAlgorithms.Papers.Independent.Support50.P11.teleportConversion
For every natural number , its supplied positivity hypothesis , and every function on complex matrices, this defines the following function on complex matrices. Write for deletion of off-diagonal entries, for the permutation matrix , and set
Define by adjoining the shared vector to input registers of sizes , applying the diagonal-output map to the first input and first auxiliary register, and applying to the second input and second auxiliary register, where , , and . For a map on -dimensional matrices and such a , define the linked map by
where is the matrix with a single at . The defined conversion is
with normalized Haar measure on the unitary group. No channel, linearity, or regularity assumption is imposed on ; the integral is the total Bochner integral, whose value is zero when its integrand is not integrable. The definition includes .
QAlgorithms.Papers.Independent.Support50.P11.teleportWeyl
For a natural number and a label , let be the pair corresponding to under the inverse of the standard finite-product indexing equivalence. This defines the complex matrix
No explicit hypothesis is required, but supplying the label is impossible when .
QAlgorithms.Papers.Independent.Support50.P11.uniformClassicalSuccess
For any finite type equipped with decidable equality and any arbitrary map , this defines
where has its only nonzero entry, equal to , at . No channel, positivity, or linearity hypothesis is required. The empty type is included: then the sum and denominator are both zero, and total real division gives the value .
QAlgorithms.Papers.Independent.Support50.P11.wernerHolevoChannel
For every natural number and every real number , this defines the function on complex matrices
where the real coefficients act as complex scalars and is ordinary transpose. There are no restrictions on and no assumption that . At , division by gives zero, and the function is ; at , its domain and codomain each contain only the empty matrix.
QAlgorithms.Papers.Independent.Support50.P11.wernerSector
For every natural number and Boolean value , this defines the matrix on
Thus exchanges the two coordinates. The definition includes , giving the empty matrix, and , where the true case is zero and the false case is the identity.
QAlgorithms.Papers.Independent.Support50.P11.zeroErrorCodeCapacity
For finite types , possibly empty, an assistance label , and any map , this defines
as an extended nonnegative real number. Here range over positive integers, and
For a map on matrices, is the real supremum over admissible of
Admissibility means that is a channel and for every , for some channel , with the following additional restriction: adds none; requires a tensor product of channels and ; requires an adjoined density matrix on and local channels , , for positive integers ; or requires channels , , and , composed in that order while retaining , for positive integers . For , the middle channel obeys ; for , the output partial transpose of , whose entries are , is positive semidefinite. The label requires a channel satisfying ; requires to be a channel; requires both. Here deletes off-diagonal entries, , partial traces sum discarded indices, density matrices are positive semidefinite of trace , and channels have finite Kraus representations with . The real supremum defining is totalized to for empty or unbounded-above score sets. The condition concerns that supremum and does not itself assert a code attaining score . The case contributes rate ; no zero block length is included, and no channel condition is imposed on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.