Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Lower and upper bounds on the secret key rate for QKD protocols using one--way classical communication

Definition
QAlgorithms_Papers_Independent_Intake100_P90

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

prove2quantum

The objects the formalized statements of Lower and upper bounds on the secret key rate for QKD protocols using one--way classical communication (arXiv:quant-ph/0410215) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • PairOp
  • sourceBell: PDF p.2: the normalized Bell vectors, in the printed order Phi+, Phi-, Psi+, Psi-. The last vector is (|10>-|01>)/sqrt(2).
  • sourceBellDiagonal: PDF pp.2--3: Bell-diagonal matrix with the specified four real weights. Physical uses carry nonnegativity and normalization.
  • sourceZDisagreement: PDF p.3: actual computational-basis disagreement probability.
  • sourcePauliChoice: PDF p.2: one of the four local operations Z^a X^b. The fourth differs from Y only by a phase, which cancels in conjugation.
  • bilateralPauli: PDF p.2: independent two-qubit bilateral Pauli, on a single AB pair.
  • pairTwirl: PDF p.2: the physical, trace-preserving D2. The printed bare sum is corrected to the uniform average, with factor 1/4.
  • bb84BasisAverage: PDF p.4: BB84's equal-basis D1, with A=B=I or H.
  • signalWord: PDF pp.1--2: the product signal chosen by Alice's bit word.
  • localEncoding: PDF p.1: single-position encoding filter, before physical success scaling.
  • encodingFilter: PDF p.1: the actual encoding filter. Its row is <(phi^a)*|, so its matrix entry is phi^a(b), with no remaining conjugation.
  • sourceDecoder: PDF p.1: B_j=|0><hat(phi^1)|+|1><hat(phi^0)|, with an explicit positive physical scaling. For nonorthogonal signals the printed unscaled operator need not be a contraction, whereas every implemented success Kraus operator must be. Scaling is the same in both realizations.
  • sourceTensorProduct: PDF pp.1--2: product decoding filter, allowing nonunitary contractions.
  • pmBranch: PDF p.1: Eve's prepare-and-measure branch, after the same decoder and arbitrary coherent unitary on all signals and her pure ancillary register.
  • eprResource: PDF p.2: normalized Phi+ tensor resource, ordered by Alice/Bob registers.
  • ebVector: PDF p.2: explicitly evaluated (A tensor B) (I tensor U) (|Phi+>^tensor n tensor |eta>), with A and B measured as in the source.
  • ebBranch: PDF p.2: Alice and Bob's computational-basis projection, retaining Eve.
  • physicalEbVector: PDF pp.1--2: the actual successful EB filter branch, including the positive scaling of Alice's nonunitary encoding operation.
  • encodingSuccessMass: PDF pp.1--2: Alice's encoding-success probability, before Bob's filter/measurement, evaluated from the physical EB branch.
  • physicalEbBranch: PDF pp.1--2: physical EB Eve vector after both local filters and Alice/Bob's two measurement outcomes.
  • sourceConditionalEve: PDF pp.1--2: conditional Eve density, only used at strictly positive mass. At the zero vector the total expression is zero, not a normalized state.
  • mixOnFirst: PDF p.2: random local diagonal conjugations on Alice.
  • mixOnSecond: PDF p.2: the analogous random diagonal conjugations on Bob.
  • pairSymmetrize: PDF p.2: the uniform common pair permutation map P_S, not a sum.
  • independentPairTwirl: PDF p.2: the independent bilateral Pauli average on n pairs.
  • BellType: PDF p.2: all four nonnegative occupation numbers, summing to n. Using bounded naturals supplies the finite type without truncated subtraction.
  • sortedBellWord: PDF p.2: sorted word Phi1^n1 Phi2^n2 Phi3^n3 Phi4^n4.
  • bellWord: PDF p.2: normalized Bell product vector for a label word.
  • bellCounts: PDF p.2: Bell occupations of a word; values are natural counts.
  • bellTypeWeight: PDF p.2, Eq.(1): construct lambda by grouping actual Bell probabilities of the input according to occupation numbers; it is not supplied as a premise.
  • IsPairBlockSeparable: PDF p.2: separability across AB pair blocks; an individual AB factor may be entangled. This definition makes no restriction on subsequent CPP.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Basic
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_Gates

/-!
Statements from Kraus--Gisin--Renner, quant-ph/0410215v2.
The operational rate statements are explicitly deferred in the accompanying HARD.md.
New objects below are local to this paper. All measurement blocks are unnormalized;
only conditional states divide by their positive branch mass.
Computational-basis projectors reuse pureDensity (ket x). The paper-specific
source* objects have different domains and meanings from the accepted library
declarations with the short names flagged by the previous mechanical check;
see MODERATION_NOTES.md for the exact comparison.
-/

noncomputable section

open scoped ComplexConjugate ComplexOrder

attribute [local instance] Classical.propDecidable Classical.decEq

namespace QAlgorithms.Papers.Independent.Intake100.P90

abbrev PairOp := Matrix (Bool × Bool) (Bool × Bool) ℂ

/-- PDF p.2: the normalized Bell vectors, in the printed order
Phi+, Phi-, Psi+, Psi-. The last vector is (|10>-|01>)/sqrt(2). -/
def sourceBell (l : Fin 4) : EuclideanSpace ℂ (Bool × Bool) :=
  WithLp.toLp 2 fun p =>
    let c : ℂ := (Real.sqrt 2)⁻¹
    if l = 0 then (if p.1 = p.2 then c else 0)
    else if l = 1 then (if p.1 = p.2 then (if p.1 then -c else c) else 0)
    else if l = 2 then (if p.1 ≠ p.2 then c else 0)
    else (if p.1 ≠ p.2 then (if p.1 then c else -c) else 0)

/-- PDF pp.2--3: Bell-diagonal matrix with the specified four real weights.
Physical uses carry nonnegativity and normalization. -/
def sourceBellDiagonal (w : Fin 4 → ℝ) : PairOp :=
  ∑ l, (w l : ℂ) • pureDensity (sourceBell l)

/-- PDF p.3: actual computational-basis disagreement probability. -/
def sourceZDisagreement (rho : PairOp) : ℝ :=
  (rho (false, true) (false, true)).re + (rho (true, false) (true, false)).re

/-- PDF p.2: one of the four local operations Z^a X^b. The fourth differs
from Y only by a phase, which cancels in conjugation. -/
def sourcePauliChoice (l : Fin 4) : Matrix Bool Bool ℂ :=
  if l = 0 then 1 else if l = 1 then pauliZ
  else if l = 2 then pauliX else pauliZ * pauliX

/-- PDF p.2: independent two-qubit bilateral Pauli, on a single AB pair. -/
def bilateralPauli (l : Fin 4) : PairOp :=
  Matrix.kronecker (sourcePauliChoice l) (sourcePauliChoice l)

/-- PDF p.2: the physical, trace-preserving D2. The printed bare sum is
corrected to the uniform average, with factor 1/4. -/
def pairTwirl (rho : PairOp) : PairOp :=
  (4⁻¹ : ℂ) • ∑ l : Fin 4, bilateralPauli l * rho * (bilateralPauli l).conjTranspose

/-- PDF p.4: BB84's equal-basis D1, with A=B=I or H. -/
def bb84BasisAverage (rho : PairOp) : PairOp :=
  (2⁻¹ : ℂ) • (rho +
    Matrix.kronecker hadamard hadamard * rho *
      (Matrix.kronecker hadamard hadamard).conjTranspose)

/-- PDF pp.1--2: the product signal chosen by Alice's bit word. -/
def signalWord {n : ℕ} (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (a : Qubits n) : EuclideanSpace ℂ (Qubits n) :=
  WithLp.toLp 2 fun b => ∏ i, phi i (a i) (b i)

/-- PDF p.1: single-position encoding filter, before physical success scaling. -/
def localEncoding (phi : Bool → EuclideanSpace ℂ Bool) : Matrix Bool Bool ℂ :=
  fun a b => phi a b

/-- PDF p.1: the actual encoding filter. Its row is <(phi^a)*|,
so its matrix entry is phi^a(b), with no remaining conjugation. -/
def encodingFilter {n : ℕ} (phi : Fin n → Bool → EuclideanSpace ℂ Bool) :
    Matrix (Qubits n) (Qubits n) ℂ :=
  fun a b => signalWord phi a b

/-- PDF p.1: B_j=|0><hat(phi^1)|+|1><hat(phi^0)|, with an explicit
positive physical scaling. For nonorthogonal signals the printed unscaled
operator need not be a contraction, whereas every implemented success
Kraus operator must be. Scaling is the same in both realizations. -/
def sourceDecoder (hat : Bool → EuclideanSpace ℂ Bool) (s : ℝ) :
    Matrix Bool Bool ℂ :=
  fun a b => (s : ℂ) * conj (hat (!a) b)

/-- PDF pp.1--2: product decoding filter, allowing nonunitary contractions. -/
def sourceTensorProduct {I : Type*} {n : ℕ} (M : Fin n → Matrix I I ℂ) :
    Matrix (Fin n → I) (Fin n → I) ℂ :=
  fun x y => ∏ i, M i (x i) (y i)

/-- PDF p.1: Eve's prepare-and-measure branch, after the same decoder
and arbitrary coherent unitary on all signals and her pure ancillary register. -/
def pmBranch {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (a k : Qubits n) : EuclideanSpace ℂ E :=
  WithLp.toLp 2 fun e =>
    ∑ b : Qubits n, ∑ c : Qubits n, ∑ f : E,
      sourceTensorProduct B k b * (U : Matrix _ _ ℂ) (b, e) (c, f) *
        signalWord phi a c * eta f

/-- PDF p.2: normalized Phi+ tensor resource, ordered by Alice/Bob registers. -/
def eprResource (n : ℕ) : EuclideanSpace ℂ (Qubits n × Qubits n) :=
  WithLp.toLp 2 fun p =>
    if p.1 = p.2 then (((Real.sqrt 2)⁻¹ : ℂ) ^ n) else 0

/-- PDF p.2: explicitly evaluated (A tensor B) (I tensor U)
(|Phi+>^tensor n tensor |eta>), with A and B measured as in the source. -/
def ebVector {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E) :
    EuclideanSpace ℂ (Qubits n × (Qubits n × E)) :=
  WithLp.toLp 2 fun p =>
    ∑ d : Qubits n, ∑ b : Qubits n, ∑ c : Qubits n, ∑ f : E,
      encodingFilter phi p.1 d * sourceTensorProduct B p.2.1 b *
        (U : Matrix _ _ ℂ) (b, p.2.2) (c, f) * eprResource n (d, c) * eta f

/-- PDF p.2: Alice and Bob's computational-basis projection, retaining Eve. -/
def ebBranch {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (a k : Qubits n) : EuclideanSpace ℂ E :=
  WithLp.toLp 2 fun e => ebVector phi B U eta (a, k, e)

/-- PDF pp.1--2: the actual successful EB filter branch, including the
positive scaling of Alice's nonunitary encoding operation. -/
def physicalEbVector {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (aScale : Fin n → ℝ) : EuclideanSpace ℂ (Qubits n × (Qubits n × E)) :=
  ((∏ i, aScale i : ℝ) : ℂ) • ebVector phi B U eta

/-- PDF pp.1--2: Alice's encoding-success probability, before Bob's
filter/measurement, evaluated from the physical EB branch. -/
def encodingSuccessMass {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (aScale : Fin n → ℝ) : ℝ :=
  (pureDensity (physicalEbVector phi (fun _ => 1) U eta aScale)).trace.re

/-- PDF pp.1--2: physical EB Eve vector after both local filters and
Alice/Bob's two measurement outcomes. -/
def physicalEbBranch {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (aScale : Fin n → ℝ) (a k : Qubits n) : EuclideanSpace ℂ E :=
  WithLp.toLp 2 fun e => physicalEbVector phi B U eta aScale (a, k, e)

/-- PDF pp.1--2: conditional Eve density, only used at strictly positive mass.
At the zero vector the total expression is zero, not a normalized state. -/
def sourceConditionalEve {I : Type*} [Fintype I]
    (v : EuclideanSpace ℂ I) : Matrix I I ℂ :=
  ((pureDensity v).trace.re⁻¹ : ℂ) • pureDensity v

/-- PDF p.2: random local diagonal conjugations on Alice. -/
def mixOnFirst {I J K : Type*} [Fintype I] [Fintype J] [Fintype K]
    [DecidableEq J] (p : K → ℝ) (O : K → Matrix I I ℂ)
    (rho : Matrix (I × J) (I × J) ℂ) : Matrix (I × J) (I × J) ℂ :=
  ∑ k, (p k : ℂ) • (Matrix.kronecker (O k) (1 : Matrix J J ℂ) * rho *
    (Matrix.kronecker (O k) (1 : Matrix J J ℂ)).conjTranspose)

/-- PDF p.2: the analogous random diagonal conjugations on Bob. -/
def mixOnSecond {I J K : Type*} [Fintype I] [Fintype J] [Fintype K]
    [DecidableEq I] (p : K → ℝ) (O : K → Matrix J J ℂ)
    (rho : Matrix (I × J) (I × J) ℂ) : Matrix (I × J) (I × J) ℂ :=
  ∑ k, (p k : ℂ) • (Matrix.kronecker (1 : Matrix I I ℂ) (O k) * rho *
    (Matrix.kronecker (1 : Matrix I I ℂ) (O k)).conjTranspose)

/-- PDF p.2: the uniform common pair permutation map P_S, not a sum. -/
def pairSymmetrize {n : ℕ}
    (rho : Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ) :
    Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ :=
  ((Fintype.card (Equiv.Perm (Fin n)) : ℂ)⁻¹) •
    ∑ pi : Equiv.Perm (Fin n), (fun x y => rho (x ∘ pi) (y ∘ pi))

/-- PDF p.2: the independent bilateral Pauli average on n pairs. -/
def independentPairTwirl {n : ℕ}
    (rho : Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ) :
    Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ :=
  ((Fintype.card (Fin n → Fin 4) : ℂ)⁻¹) •
    ∑ w : Fin n → Fin 4,
      sourceTensorProduct (fun i => bilateralPauli (w i)) * rho *
        (sourceTensorProduct (fun i => bilateralPauli (w i))).conjTranspose

/-- PDF p.2: all four nonnegative occupation numbers, summing to n.
Using bounded naturals supplies the finite type without truncated subtraction. -/
abbrev BellType (n : ℕ) := {t : Fin 4 → Fin (n + 1) // ∑ l, (t l).val = n}

/-- PDF p.2: sorted word Phi1^n1 Phi2^n2 Phi3^n3 Phi4^n4. -/
def sortedBellWord {n : ℕ} (t : BellType n) (i : Fin n) : Fin 4 :=
  if i.val < (t.val 0).val then 0
  else if i.val < (t.val 0).val + (t.val 1).val then 1
  else if i.val < (t.val 0).val + (t.val 1).val + (t.val 2).val then 2 else 3

/-- PDF p.2: normalized Bell product vector for a label word. -/
def bellWord {n : ℕ} (w : Fin n → Fin 4) : EuclideanSpace ℂ (Fin n → (Bool × Bool)) :=
  WithLp.toLp 2 fun x => ∏ i, sourceBell (w i) (x i)

/-- PDF p.2: Bell occupations of a word; values are natural counts. -/
def bellCounts {n : ℕ} (w : Fin n → Fin 4) (l : Fin 4) : ℕ :=
  (Finset.univ.filter fun i => w i = l).card

/-- PDF p.2, Eq.(1): construct lambda by grouping actual Bell probabilities
of the input according to occupation numbers; it is not supplied as a premise. -/
def bellTypeWeight {n : ℕ}
    (rho : Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ) (t : BellType n) : ℝ :=
  ∑ w ∈ Finset.univ.filter (fun w : Fin n → Fin 4 =>
    ∀ l, bellCounts w l = (t.val l).val), effectProb (pureDensity (bellWord w)) rho

/-- PDF p.2: separability across AB pair blocks; an individual AB factor
may be entangled. This definition makes no restriction on subsequent CPP. -/
def IsPairBlockSeparable {n : ℕ}
    (rho : Matrix (Fin n → (Bool × Bool)) (Fin n → (Bool × Bool)) ℂ) : Prop :=
  ∃ q : ℕ, ∃ p : Fin q → ℝ, ∃ M : Fin q → Fin n → PairOp,
    (∀ j, 0 ≤ p j) ∧ (∑ j, p j) = 1 ∧
    (∀ j i, IsDensityMatrix (M j i)) ∧
    rho = ∑ j, (p j : ℂ) • sourceTensorProduct (M j)

/-- Sanity: the encoding row is the original signal, not its conjugate. -/
example {n : ℕ} (phi : Fin n → Bool → EuclideanSpace ℂ Bool) (a b : Qubits n) :
    encodingFilter phi a b = ∏ i, phi i (a i) (b i) := rfl

/-- Sanity: the decoder assigns the orthogonal-to-one vector to outcome zero. -/
example (hat : Bool → EuclideanSpace ℂ Bool) (s : ℝ) (b : Bool) :
    sourceDecoder hat s false b = (s : ℂ) * conj (hat true b) := rfl

/-- Sanity: Alice's physical encoding vector includes the product scaling. -/
example {n : ℕ} {E : Type*} [Fintype E]
    (phi : Fin n → Bool → EuclideanSpace ℂ Bool)
    (B : Fin n → Matrix Bool Bool ℂ)
    (U : Matrix.unitaryGroup (Qubits n × E) ℂ) (eta : EuclideanSpace ℂ E)
    (aScale : Fin n → ℝ) :
    physicalEbVector phi B U eta aScale =
      ((∏ i, aScale i : ℝ) : ℂ) • ebVector phi B U eta := rfl

/-- Sanity: zero pairs gives the scalar unit EPR resource. -/
example (a b : Qubits 0) : eprResource 0 (a, b) = 1 := by
  have h : a = b := Subsingleton.elim _ _
  simp [eprResource, h]

/-- Sanity: the last printed Bell vector has opposite |10> and |01> signs. -/
example : sourceBell 3 (true, false) = ((Real.sqrt 2)⁻¹ : ℂ) ∧
    sourceBell 3 (false, true) = -((Real.sqrt 2)⁻¹ : ℂ) := by
  simp [sourceBell]

/-- Sanity: zero pairs gives the unit product matrix. -/
example (M : Fin 0 → PairOp) (x y : Fin 0 → (Bool × Bool)) :
    sourceTensorProduct M x y = 1 := by simp [sourceTensorProduct]

/-- Sanity: the QBER is zero on the zero matrix. Physical uses exclude it. -/
example : sourceZDisagreement (0 : PairOp) = 0 := by simp [sourceZDisagreement]

/-- Sanity: a singleton, identity diagonal mixture is the original state. -/
example {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
    (rho : Matrix (I × J) (I × J) ℂ) :
    mixOnFirst (fun _ : Unit => 1) (fun _ => (1 : Matrix I I ℂ)) rho = rho := by
  simp [mixOnFirst, Matrix.one_kronecker_one]

end QAlgorithms.Papers.Independent.Intake100.P90
Source
Lower and upper bounds on the secret key rate for QKD protocols using one--way classical communication, arXiv:quant-ph/0410215v2, https://arxiv.org/abs/quant-ph/0410215v2
Read-back

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

QAlgorithms.Papers.Independent.Intake100.P90.BellType

For every natural number nnn, including 000, BellType⁡(n)\operatorname{BellType}(n)BellType(n) is the type of quadruples (t0,t1,t2,t3)(t_0,t_1,t_2,t_3)(t0​,t1​,t2​,t3​) of integers satisfying 0≤tℓ≤n0\le t_\ell\le n0≤tℓ​≤n for each ℓ∈{0,1,2,3}\ell\in\{0,1,2,3\}ℓ∈{0,1,2,3} and ∑ℓ=03tℓ=n\sum_{\ell=0}^3t_\ell=n∑ℓ=03​tℓ​=n, together with a proof of this sum condition. For n=0n=0n=0, its only quadruple is (0,0,0,0)(0,0,0,0)(0,0,0,0).

QAlgorithms.Papers.Independent.Intake100.P90.IsPairBlockSeparable

For every natural number nnn, including 000, and every complex matrix ρ\rhoρ indexed by functions from {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} to Boolean pairs, this predicate means that there exist a natural number qqq, real numbers pjp_jpj​ for 0≤j<q0\le j<q0≤j<q, and complex matrices Mj,iM_{j,i}Mj,i​ indexed by Boolean pairs for 0≤j<q0\le j<q0≤j<q and 0≤i<n0\le i<n0≤i<n, such that every pj≥0p_j\ge0pj​≥0, ∑j=0q−1pj=1\sum_{j=0}^{q-1}p_j=1∑j=0q−1​pj​=1, every Mj,iM_{j,i}Mj,i​ is positive semidefinite with trace 111, and

ρ=∑j=0q−1pjTj,(Tj)x,y=∏i=0n−1(Mj,i)x(i),y(i).\rho=\sum_{j=0}^{q-1}p_jT_j, \qquad (T_j)_{x,y}=\prod_{i=0}^{n-1}(M_{j,i})_{x(i),y(i)}.ρ=j=0∑q−1​pj​Tj​,(Tj​)x,y​=i=0∏n−1​(Mj,i​)x(i),y(i)​.

The case q=0q=0q=0 is included in the existential quantifier but cannot satisfy the sum condition. The matrices Mj,iM_{j,i}Mj,i​ have no further factorization requirement within their Boolean pair. When n=0n=0n=0, the local-matrix conditions are vacuous, every empty product is 111, and the predicate holds exactly for the 1×11\times11×1 matrix with entry 111.

QAlgorithms.Papers.Independent.Intake100.P90.PairOp

This abbreviates the space of complex matrices whose rows and columns are indexed by ordered pairs of Boolean values: a matrix in this space has entries ρ(a,b),(c,d)∈C\rho_{(a,b),(c,d)}\in\mathbb Cρ(a,b),(c,d)​∈C for a,b,c,d∈{false,true}a,b,c,d\in\{\mathrm{false},\mathrm{true}\}a,b,c,d∈{false,true}, so it is a 4×44\times44×4 complex matrix.

QAlgorithms.Papers.Independent.Intake100.P90.bb84BasisAverage

For any complex matrix ρ\rhoρ indexed by Boolean pairs, this defines

12(ρ+(H⊗H)ρ(H⊗H)†),H=12(111−1),\frac12\left(\rho+(H\otimes H)\rho(H\otimes H)^\dagger\right), \qquad H=\frac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},21​(ρ+(H⊗H)ρ(H⊗H)†),H=2​1​(11​1−1​),

where the row and column order for HHH is (false,true)(\mathrm{false},\mathrm{true})(false,true), †\dagger† denotes conjugate transpose, and (H⊗H)(a,b),(c,d)=Ha,cHb,d(H\otimes H)_{(a,b),(c,d)}=H_{a,c}H_{b,d}(H⊗H)(a,b),(c,d)​=Ha,c​Hb,d​. No further assumptions on ρ\rhoρ are imposed.

QAlgorithms.Papers.Independent.Intake100.P90.bellCounts

For every natural number nnn, every word w:{0,…,n−1}→{0,1,2,3}w:\{0,\ldots,n-1\}\to\{0,1,2,3\}w:{0,…,n−1}→{0,1,2,3}, and every label ℓ∈{0,1,2,3}\ell\in\{0,1,2,3\}ℓ∈{0,1,2,3}, this definition gives bellCounts⁡(w,ℓ)=∣{i:0≤i<n, w(i)=ℓ}∣\operatorname{bellCounts}(w,\ell)=|\{i:0\le i<n,\ w(i)=\ell\}|bellCounts(w,ℓ)=∣{i:0≤i<n, w(i)=ℓ}∣. Labels need not occur, in which case their count is 000; when n=0n=0n=0, every label has count 000.

QAlgorithms.Papers.Independent.Intake100.P90.bellTypeWeight

For every natural number nnn, every complex matrix ρ\rhoρ indexed by configurations in {false,true}2n\{\mathrm{false},\mathrm{true}\}^{2n}{false,true}2n, viewed as functions from {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} to Boolean pairs, and every quadruple t=(t0,t1,t2,t3)t=(t_0,t_1,t_2,t_3)t=(t0​,t1​,t2​,t3​) with 0≤tℓ≤n0\le t_\ell\le n0≤tℓ​≤n and ∑ℓtℓ=n\sum_\ell t_\ell=n∑ℓ​tℓ​=n, this definition gives the real number

Wρ(t)=∑w:{0,…,n−1}→{0,1,2,3}∣{i:w(i)=ℓ}∣=tℓ for every ℓRe⁡tr⁡(vwvw†ρ).W_\rho(t)= \sum_{\substack{w:\{0,\ldots,n-1\}\to\{0,1,2,3\}\\ |\{i:w(i)=\ell\}|=t_\ell\ \text{for every }\ell}} \operatorname{Re}\operatorname{tr}(v_wv_w^\dagger\rho).Wρ​(t)=w:{0,…,n−1}→{0,1,2,3}∣{i:w(i)=ℓ}∣=tℓ​ for every ℓ​∑​Retr(vw​vw†​ρ).

Here vw(x)=∏iβw(i)(x(i))v_w(x)=\prod_i\beta_{w(i)}(x(i))vw​(x)=∏i​βw(i)​(x(i)), with β0=(∣00⟩+∣11⟩)/2\beta_0=(|00\rangle+|11\rangle)/\sqrt2β0​=(∣00⟩+∣11⟩)/2​, β1=(∣00⟩−∣11⟩)/2\beta_1=(|00\rangle-|11\rangle)/\sqrt2β1​=(∣00⟩−∣11⟩)/2​, β2=(∣01⟩+∣10⟩)/2\beta_2=(|01\rangle+|10\rangle)/\sqrt2β2​=(∣01⟩+∣10⟩)/2​, and β3=(∣10⟩−∣01⟩)/2\beta_3=(|10\rangle-|01\rangle)/\sqrt2β3​=(∣10⟩−∣01⟩)/2​; 0,10,10,1 denote false and true, ∣ab⟩|ab\rangle∣ab⟩ is the corresponding coordinate vector, and (vwvw†)x,y=vw(x)vw(y)‾(v_wv_w^\dagger)_{x,y}=v_w(x)\overline{v_w(y)}(vw​vw†​)x,y​=vw​(x)vw​(y)​. No positivity or trace assumption is imposed on ρ\rhoρ, and this definition alone imposes no nonnegativity condition on Wρ(t)W_\rho(t)Wρ​(t). When n=0n=0n=0, the only type is (0,0,0,0)(0,0,0,0)(0,0,0,0) and its weight is the real part of the sole entry of ρ\rhoρ.

QAlgorithms.Papers.Independent.Intake100.P90.bellWord

For every natural number nnn, including 000, and every word w:{0,…,n−1}→{0,1,2,3}w:\{0,\ldots,n-1\}\to\{0,1,2,3\}w:{0,…,n−1}→{0,1,2,3}, this definition gives a complex Euclidean vector vwv_wvw​ indexed by configurations x:{0,…,n−1}→{false,true}2x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}^2x:{0,…,n−1}→{false,true}2, with amplitude vw(x)=∏i=0n−1βw(i)(x(i))v_w(x)=\prod_{i=0}^{n-1}\beta_{w(i)}(x(i))vw​(x)=∏i=0n−1​βw(i)​(x(i)). Identifying false\mathrm{false}false with 000 and true\mathrm{true}true with 111, the four local vectors are

β0=∣00⟩+∣11⟩2,β1=∣00⟩−∣11⟩2,β2=∣01⟩+∣10⟩2,β3=∣10⟩−∣01⟩2,\beta_0=\frac{|00\rangle+|11\rangle}{\sqrt2},\quad \beta_1=\frac{|00\rangle-|11\rangle}{\sqrt2},\quad \beta_2=\frac{|01\rangle+|10\rangle}{\sqrt2},\quad \beta_3=\frac{|10\rangle-|01\rangle}{\sqrt2},β0​=2​∣00⟩+∣11⟩​,β1​=2​∣00⟩−∣11⟩​,β2​=2​∣01⟩+∣10⟩​,β3​=2​∣10⟩−∣01⟩​,

where ∣ab⟩|ab\rangle∣ab⟩ has amplitude 111 at the pair (a,b)(a,b)(a,b) and 000 elsewhere. When n=0n=0n=0, there is one empty configuration and its amplitude is the empty product 111.

QAlgorithms.Papers.Independent.Intake100.P90.bilateralPauli

For each l∈{0,1,2,3}l\in\{0,1,2,3\}l∈{0,1,2,3}, this defines the complex matrix Pl⊗PlP_l\otimes P_lPl​⊗Pl​ indexed by Boolean pairs, whose entry at row (a,b)(a,b)(a,b) and column (c,d)(c,d)(c,d) is (Pl)a,c(Pl)b,d(P_l)_{a,c}(P_l)_{b,d}(Pl​)a,c​(Pl​)b,d​. In Boolean order (false,true)(\mathrm{false},\mathrm{true})(false,true), the matrices P0,P1,P2,P3P_0,P_1,P_2,P_3P0​,P1​,P2​,P3​ are respectively

(1001),(100−1),(0110),(01−10).\begin{pmatrix}1&0\\0&1\end{pmatrix},\quad \begin{pmatrix}1&0\\0&-1\end{pmatrix},\quad \begin{pmatrix}0&1\\1&0\end{pmatrix},\quad \begin{pmatrix}0&1\\-1&0\end{pmatrix}.(10​01​),(10​0−1​),(01​10​),(0−1​10​).

QAlgorithms.Papers.Independent.Intake100.P90.ebBranch

For any natural number nnn, any finite type EEE, any family ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true}, any family of complex Boolean-indexed matrices BiB_iBi​, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, any η∈CE\eta\in\mathbb C^Eη∈CE, and any Boolean strings a,k∈Qna,k\in Q_na,k∈Qn​ of length nnn, this defines a vector Qa,k∈CEQ_{a,k}\in\mathbb C^EQa,k​∈CE with coordinates

Qa,k(e)=∑d,b,c∈Qn∑f∈E(∏i<nϕi(ai)(di))(∏i<n(Bi)ki,bi)U(b,e),(c,f)((1/2)n1{d=c})ηf.Q_{a,k}(e)= \sum_{d,b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(d_i)\right) \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left((1/\sqrt2)^n\mathbf1_{\{d=c\}}\right)\eta_f.Qa,k​(e)=d,b,c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(di​))(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​((1/2​)n1{d=c}​)ηf​.

No normalization of ϕi(t)\phi_i(t)ϕi​(t) or η\etaη, and no restriction on BiB_iBi​, is assumed. The definition allows n=0n=0n=0, with empty products equal to 111, and empty EEE, yielding the unique vector on the empty index set.

QAlgorithms.Papers.Independent.Intake100.P90.ebVector

For any natural number nnn, any finite type EEE, any vectors ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true} for i<ni<ni<n and Boolean ttt, any complex Boolean-indexed matrices BiB_iBi​, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, and any η∈CE\eta\in\mathbb C^Eη∈CE, where QnQ_nQn​ is the set of Boolean strings of length nnn, this defines a vector V∈CQn×(Qn×E)V\in\mathbb C^{Q_n\times(Q_n\times E)}V∈CQn​×(Qn​×E) by

V(a,k,e)=∑d,b,c∈Qn∑f∈E(∏i<nϕi(ai)(di))(∏i<n(Bi)ki,bi)U(b,e),(c,f)((1/2)n1{d=c})ηf.V(a,k,e)= \sum_{d,b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(d_i)\right) \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left((1/\sqrt2)^n\mathbf1_{\{d=c\}}\right)\eta_f.V(a,k,e)=d,b,c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(di​))(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​((1/2​)n1{d=c}​)ηf​.

There are no normalization assumptions on ϕi(t)\phi_i(t)ϕi​(t) or η\etaη, and no restrictions on BiB_iBi​. This includes n=0n=0n=0, with empty products equal to 111, and empty EEE, for which the resulting vector has an empty coordinate set.

QAlgorithms.Papers.Independent.Intake100.P90.encodingFilter

For every natural number nnn and every family of complex Euclidean vectors ϕi(a)\phi_i(a)ϕi​(a), where i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1} and aaa is Boolean and each vector has Boolean coordinates, this defines the complex matrix whose rows and columns are indexed by length-nnn Boolean strings and whose entries are

Fa,b=∏i=0n−1ϕi(ai)(bi).F_{a,b}=\prod_{i=0}^{n-1}\phi_i(a_i)(b_i).Fa,b​=i=0∏n−1​ϕi​(ai​)(bi​).

The vectors are unrestricted. When n=0n=0n=0, the matrix has one row and one column, indexed by the empty string, and its entry is 111.

QAlgorithms.Papers.Independent.Intake100.P90.encodingSuccessMass

For any natural number nnn, any finite type EEE, any vectors ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true}, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, any η∈CE\eta\in\mathbb C^Eη∈CE, and any real numbers αi\alpha_iαi​ for i<ni<ni<n, where QnQ_nQn​ is the set of Boolean strings of length nnn, define

v(a,k,e)=(∏i<nαi)(1/2)n∑c∈Qn∑f∈E(∏i<nϕi(ai)(ci))U(k,e),(c,f)ηf.v(a,k,e)= \left(\prod_{i<n}\alpha_i\right)(1/\sqrt2)^n \sum_{c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(c_i)\right) U_{(k,e),(c,f)}\eta_f.v(a,k,e)=(i<n∏​αi​)(1/2​)nc∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(ci​))U(k,e),(c,f)​ηf​.

This definition returns the real part of the trace of the matrix with entries v(z)v(z′)‾v(z)\overline{v(z')}v(z)v(z′)​, namely

∑a,k∈Qn∑e∈E∣v(a,k,e)∣2.\sum_{a,k\in Q_n}\sum_{e\in E}|v(a,k,e)|^2.a,k∈Qn​∑​e∈E∑​∣v(a,k,e)∣2.

There are no normalization assumptions on ϕi(t)\phi_i(t)ϕi​(t) or η\etaη, and no positivity assumptions on αi\alpha_iαi​. When EEE is empty this value is 000; when n=0n=0n=0, empty products and the factor (1/2)0(1/\sqrt2)^0(1/2​)0 equal 111.

QAlgorithms.Papers.Independent.Intake100.P90.eprResource

For every natural number nnn, writing QnQ_nQn​ for the set of Boolean strings of length nnn, this defines a vector rn∈CQn×Qnr_n\in\mathbb C^{Q_n\times Q_n}rn​∈CQn​×Qn​ whose coordinates are

rn(d,c)={(1/2)n,d=c,0,d≠c.r_n(d,c)= \begin{cases} (1/\sqrt2)^n,&d=c,\\ 0,&d\ne c. \end{cases}rn​(d,c)={(1/2​)n,0,​d=c,d=c.​

For n=0n=0n=0, QnQ_nQn​ contains only the empty string, so the vector has one coordinate, equal to 111.

QAlgorithms.Papers.Independent.Intake100.P90.independentPairTwirl

For every natural number nnn, including 000, and every complex matrix ρ\rhoρ indexed by configurations x:{0,…,n−1}→{false,true}2x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}^2x:{0,…,n−1}→{false,true}2, use the Boolean basis order (false,true)(\mathrm{false},\mathrm{true})(false,true) and set P0=I2P_0=I_2P0​=I2​, P1=ZP_1=ZP1​=Z, P2=XP_2=XP2​=X, and P3=ZXP_3=ZXP3​=ZX, where

Z=(100−1),X=(0110).Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}, \qquad X=\begin{pmatrix}0&1\\1&0\end{pmatrix}.Z=(10​0−1​),X=(01​10​).

For each word w:{0,…,n−1}→{0,1,2,3}w:\{0,\ldots,n-1\}\to\{0,1,2,3\}w:{0,…,n−1}→{0,1,2,3}, define TwT_wTw​ by (Tw)x,y=∏i=0n−1(Pw(i)⊗Pw(i))x(i),y(i)(T_w)_{x,y}=\prod_{i=0}^{n-1}(P_{w(i)}\otimes P_{w(i)})_{x(i),y(i)}(Tw​)x,y​=∏i=0n−1​(Pw(i)​⊗Pw(i)​)x(i),y(i)​. The definition gives independentPairTwirl⁡(ρ)=4−n∑wTwρTw†\operatorname{independentPairTwirl}(\rho)=4^{-n}\sum_w T_w\rho T_w^\daggerindependentPairTwirl(ρ)=4−n∑w​Tw​ρTw†​, where †\dagger† denotes conjugate transpose. No positivity or trace assumption is imposed on ρ\rhoρ. When n=0n=0n=0, the word and configuration sets are singletons, the empty product is 111, and the result equals ρ\rhoρ.

QAlgorithms.Papers.Independent.Intake100.P90.localEncoding

For any assignment ϕ\phiϕ of a complex Euclidean vector with Boolean coordinates to each Boolean value, this defines the complex matrix with Boolean row index aaa and Boolean column index bbb by

La,b=ϕ(a)(b).L_{a,b}=\phi(a)(b).La,b​=ϕ(a)(b).

There are no normalization or other assumptions on ϕ\phiϕ.

QAlgorithms.Papers.Independent.Intake100.P90.mixOnFirst

For any finite types I,J,KI,J,KI,J,K, with decidable equality on JJJ, any real-valued function p:K→Rp:K\to\mathbb Rp:K→R, any family of complex matrices OkO_kOk​ indexed by III, and any complex matrix ρ\rhoρ indexed by I×JI\times JI×J, this defines the matrix

∑k∈Kpk (Ok⊗IJ) ρ (Ok⊗IJ)∗,\sum_{k\in K}p_k\,(O_k\otimes I_J)\,\rho\,(O_k\otimes I_J)^*,k∈K∑​pk​(Ok​⊗IJ​)ρ(Ok​⊗IJ​)∗,

where IJI_JIJ​ is the identity matrix on JJJ, ⊗\otimes⊗ is the Kronecker product, and ∗^{*}∗ denotes conjugate transpose. There are no positivity or normalization assumptions on ppp, no assumptions on OkO_kOk​, and no density-matrix assumption on ρ\rhoρ. The types may be empty; if KKK is empty, the sum is the zero matrix.

QAlgorithms.Papers.Independent.Intake100.P90.mixOnSecond

For any finite types I,J,KI,J,KI,J,K, with decidable equality on III, any real-valued function p:K→Rp:K\to\mathbb Rp:K→R, any family of complex matrices OkO_kOk​ indexed by JJJ, and any complex matrix ρ\rhoρ indexed by I×JI\times JI×J, this defines the matrix

∑k∈Kpk (II⊗Ok) ρ (II⊗Ok)∗,\sum_{k\in K}p_k\,(I_I\otimes O_k)\,\rho\,(I_I\otimes O_k)^*,k∈K∑​pk​(II​⊗Ok​)ρ(II​⊗Ok​)∗,

where III_III​ is the identity matrix on III, ⊗\otimes⊗ is the Kronecker product, and ∗^{*}∗ denotes conjugate transpose. There are no positivity or normalization assumptions on ppp, no assumptions on OkO_kOk​, and no density-matrix assumption on ρ\rhoρ. The types may be empty; if KKK is empty, the sum is the zero matrix.

QAlgorithms.Papers.Independent.Intake100.P90.pairSymmetrize

For every natural number nnn, including 000, and every complex matrix ρ\rhoρ indexed by configurations x:{0,…,n−1}→{false,true}2x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}^2x:{0,…,n−1}→{false,true}2, this definition gives the matrix whose entries are

pairSymmetrize⁡(ρ)x,y=1n!∑π∈Snρx∘π, y∘π,\operatorname{pairSymmetrize}(\rho)_{x,y} =\frac1{n!}\sum_{\pi\in S_n}\rho_{x\circ\pi,\,y\circ\pi},pairSymmetrize(ρ)x,y​=n!1​π∈Sn​∑​ρx∘π,y∘π​,

where SnS_nSn​ is the set of all permutations of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} and (x∘π)(i)=x(π(i))(x\circ\pi)(i)=x(\pi(i))(x∘π)(i)=x(π(i)). No positivity, trace, or symmetry assumption is imposed on ρ\rhoρ. When n=0n=0n=0, there is one empty configuration and one permutation, so the resulting 1×11\times11×1 matrix equals ρ\rhoρ.

QAlgorithms.Papers.Independent.Intake100.P90.pairTwirl

For any complex matrix ρ\rhoρ indexed by Boolean pairs, this defines

14∑l=03(Pl⊗Pl) ρ (Pl⊗Pl)†,\frac14\sum_{l=0}^{3}(P_l\otimes P_l)\,\rho\,(P_l\otimes P_l)^\dagger,41​l=0∑3​(Pl​⊗Pl​)ρ(Pl​⊗Pl​)†,

where †\dagger† denotes conjugate transpose and, in Boolean order (false,true)(\mathrm{false},\mathrm{true})(false,true), P0,P1,P2,P3P_0,P_1,P_2,P_3P0​,P1​,P2​,P3​ are respectively (1001)\begin{pmatrix}1&0\\0&1\end{pmatrix}(10​01​), (100−1)\begin{pmatrix}1&0\\0&-1\end{pmatrix}(10​0−1​), (0110)\begin{pmatrix}0&1\\1&0\end{pmatrix}(01​10​), and (01−10)\begin{pmatrix}0&1\\-1&0\end{pmatrix}(0−1​10​). The tensor product has entries (Pl⊗Pl)(a,b),(c,d)=(Pl)a,c(Pl)b,d(P_l\otimes P_l)_{(a,b),(c,d)}=(P_l)_{a,c}(P_l)_{b,d}(Pl​⊗Pl​)(a,b),(c,d)​=(Pl​)a,c​(Pl​)b,d​; no further assumptions on ρ\rhoρ are imposed.

QAlgorithms.Papers.Independent.Intake100.P90.physicalEbBranch

For any natural number nnn, any finite type EEE, any vectors ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true}, any complex Boolean-indexed matrices BiB_iBi​, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, any η∈CE\eta\in\mathbb C^Eη∈CE, any real numbers αi\alpha_iαi​ for i<ni<ni<n, and any Boolean strings a,k∈Qna,k\in Q_na,k∈Qn​ of length nnn, this defines a vector Ra,k∈CER_{a,k}\in\mathbb C^ERa,k​∈CE by

Ra,k(e)=(∏i<nαi)∑d,b,c∈Qn∑f∈E(∏i<nϕi(ai)(di))(∏i<n(Bi)ki,bi)U(b,e),(c,f)((1/2)n1{d=c})ηf.R_{a,k}(e)= \left(\prod_{i<n}\alpha_i\right) \sum_{d,b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(d_i)\right) \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left((1/\sqrt2)^n\mathbf1_{\{d=c\}}\right)\eta_f.Ra,k​(e)=(i<n∏​αi​)d,b,c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(di​))(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​((1/2​)n1{d=c}​)ηf​.

There are no normalization assumptions on the vectors, no restrictions on BiB_iBi​, and no positivity assumptions on αi\alpha_iαi​. The definition includes n=0n=0n=0, with empty products equal to 111, and empty EEE.

QAlgorithms.Papers.Independent.Intake100.P90.physicalEbVector

For any natural number nnn, any finite type EEE, any vectors ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true}, any complex Boolean-indexed matrices BiB_iBi​, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, any η∈CE\eta\in\mathbb C^Eη∈CE, and any real numbers αi\alpha_iαi​ for i<ni<ni<n, where QnQ_nQn​ is the set of Boolean strings of length nnn, this defines a vector W∈CQn×(Qn×E)W\in\mathbb C^{Q_n\times(Q_n\times E)}W∈CQn​×(Qn​×E) by

W(a,k,e)=(∏i<nαi)∑d,b,c∈Qn∑f∈E(∏i<nϕi(ai)(di))(∏i<n(Bi)ki,bi)U(b,e),(c,f)((1/2)n1{d=c})ηf.W(a,k,e)= \left(\prod_{i<n}\alpha_i\right) \sum_{d,b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}\phi_i(a_i)(d_i)\right) \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left((1/\sqrt2)^n\mathbf1_{\{d=c\}}\right)\eta_f.W(a,k,e)=(i<n∏​αi​)d,b,c∈Qn​∑​f∈E∑​(i<n∏​ϕi​(ai​)(di​))(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​((1/2​)n1{d=c}​)ηf​.

The real prefactor is viewed as a complex scalar. The αi\alpha_iαi​ need not be positive, the vectors need not be normalized, and BiB_iBi​ are unrestricted. For n=0n=0n=0, all empty products are 111; empty EEE is also allowed.

QAlgorithms.Papers.Independent.Intake100.P90.pmBranch

For any natural number nnn, any finite type EEE, any family of vectors ϕi(t)∈C{false,true}\phi_i(t)\in\mathbb C^{\{\mathrm{false},\mathrm{true}\}}ϕi​(t)∈C{false,true} indexed by i<ni<ni<n and Boolean ttt, any family of complex Boolean-indexed matrices BiB_iBi​, any unitary matrix UUU indexed by Qn×EQ_n\times EQn​×E, where Qn={false,true}{0,…,n−1}Q_n=\{\mathrm{false},\mathrm{true}\}^{\{0,\ldots,n-1\}}Qn​={false,true}{0,…,n−1}, any vector η∈CE\eta\in\mathbb C^Eη∈CE, and any a,k∈Qna,k\in Q_na,k∈Qn​, this defines the vector Pa,k∈CEP_{a,k}\in\mathbb C^EPa,k​∈CE by

Pa,k(e)=∑b,c∈Qn∑f∈E(∏i<n(Bi)ki,bi)U(b,e),(c,f)(∏i<nϕi(ai)(ci))ηf.P_{a,k}(e)= \sum_{b,c\in Q_n}\sum_{f\in E} \left(\prod_{i<n}(B_i)_{k_i,b_i}\right) U_{(b,e),(c,f)} \left(\prod_{i<n}\phi_i(a_i)(c_i)\right)\eta_f.Pa,k​(e)=b,c∈Qn​∑​f∈E∑​(i<n∏​(Bi​)ki​,bi​​)U(b,e),(c,f)​(i<n∏​ϕi​(ai​)(ci​))ηf​.

Neither the vectors ϕi(t)\phi_i(t)ϕi​(t) and η\etaη nor the matrices BiB_iBi​ have normalization assumptions. The definition includes n=0n=0n=0, with empty products equal to 111, and permits EEE to be empty, in which case the result is the unique vector on the empty index set.

QAlgorithms.Papers.Independent.Intake100.P90.signalWord

For every natural number nnn, every family of complex Euclidean vectors ϕi(a)\phi_i(a)ϕi​(a) indexed by i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1} and Boolean aaa, with each vector itself having Boolean coordinates, and every Boolean string a=(ai)i=0n−1a=(a_i)_{i=0}^{n-1}a=(ai​)i=0n−1​, this defines the vector indexed by Boolean strings bbb whose coordinate is

va(b)=∏i=0n−1ϕi(ai)(bi).v_a(b)=\prod_{i=0}^{n-1}\phi_i(a_i)(b_i).va​(b)=i=0∏n−1​ϕi​(ai​)(bi​).

No normalization assumptions are imposed on the vectors ϕi(a)\phi_i(a)ϕi​(a). When n=0n=0n=0, there is one empty Boolean string, and its coordinate is the empty product 111.

QAlgorithms.Papers.Independent.Intake100.P90.sortedBellWord

For every natural number nnn, every quadruple t=(t0,t1,t2,t3)t=(t_0,t_1,t_2,t_3)t=(t0​,t1​,t2​,t3​) with 0≤tℓ≤n0\le t_\ell\le n0≤tℓ​≤n and ∑ℓ=03tℓ=n\sum_{\ell=0}^3t_\ell=n∑ℓ=03​tℓ​=n, and every integer iii with 0≤i<n0\le i<n0≤i<n, this definition returns

sortedBellWord⁡(t)(i)={0,i<t0,1,t0≤i<t0+t1,2,t0+t1≤i<t0+t1+t2,3,t0+t1+t2≤i<n.\operatorname{sortedBellWord}(t)(i)= \begin{cases} 0,&i<t_0,\\ 1,&t_0\le i<t_0+t_1,\\ 2,&t_0+t_1\le i<t_0+t_1+t_2,\\ 3,&t_0+t_1+t_2\le i<n. \end{cases}sortedBellWord(t)(i)=⎩⎨⎧​0,1,2,3,​i<t0​,t0​≤i<t0​+t1​,t0​+t1​≤i<t0​+t1​+t2​,t0​+t1​+t2​≤i<n.​

Thus zero counts produce empty intervals. When n=0n=0n=0, the quadruple is (0,0,0,0)(0,0,0,0)(0,0,0,0) and the resulting word has empty domain.

QAlgorithms.Papers.Independent.Intake100.P90.sourceBell

For each l∈{0,1,2,3}l\in\{0,1,2,3\}l∈{0,1,2,3}, this defines a complex Euclidean vector indexed by Boolean pairs. Writing 000 for false, 111 for true, and ∣ab⟩|ab\rangle∣ab⟩ for the coordinate vector supported at (a,b)(a,b)(a,b), its value is

β0=∣00⟩+∣11⟩2,β1=∣00⟩−∣11⟩2,β2=∣01⟩+∣10⟩2,β3=∣10⟩−∣01⟩2.\beta_0=\frac{|00\rangle+|11\rangle}{\sqrt2},\qquad \beta_1=\frac{|00\rangle-|11\rangle}{\sqrt2},\qquad \beta_2=\frac{|01\rangle+|10\rangle}{\sqrt2},\qquad \beta_3=\frac{|10\rangle-|01\rangle}{\sqrt2}.β0​=2​∣00⟩+∣11⟩​,β1​=2​∣00⟩−∣11⟩​,β2​=2​∣01⟩+∣10⟩​,β3​=2​∣10⟩−∣01⟩​.

QAlgorithms.Papers.Independent.Intake100.P90.sourceBellDiagonal

For any real weights w0,w1,w2,w3w_0,w_1,w_2,w_3w0​,w1​,w2​,w3​, this defines the complex matrix indexed by Boolean pairs with entries

ρx,y=∑l=03wl βl(x) βl(y)‾.\rho_{x,y}=\sum_{l=0}^{3}w_l\,\beta_l(x)\,\overline{\beta_l(y)}.ρx,y​=l=0∑3​wl​βl​(x)βl​(y)​.

Here 000 and 111 denote false and true, ∣ab⟩|ab\rangle∣ab⟩ is the coordinate vector at (a,b)(a,b)(a,b), and (β0,β1,β2,β3)(\beta_0,\beta_1,\beta_2,\beta_3)(β0​,β1​,β2​,β3​) is respectively ((∣00⟩+∣11⟩)/2, (∣00⟩−∣11⟩)/2, (∣01⟩+∣10⟩)/2, (∣10⟩−∣01⟩)/2)\bigl((|00\rangle+|11\rangle)/\sqrt2,\ (|00\rangle-|11\rangle)/\sqrt2,\ (|01\rangle+|10\rangle)/\sqrt2,\ (|10\rangle-|01\rangle)/\sqrt2\bigr)((∣00⟩+∣11⟩)/2​, (∣00⟩−∣11⟩)/2​, (∣01⟩+∣10⟩)/2​, (∣10⟩−∣01⟩)/2​). The weights are arbitrary real numbers; nonnegativity and a sum of one are not required.

QAlgorithms.Papers.Independent.Intake100.P90.sourceConditionalEve

For any finite type III and any vector v∈CIv\in\mathbb C^Iv∈CI, this defines a complex matrix indexed by III with entries

C(v)a,b=(∑j∈I∣vj∣2)−1vavb‾.C(v)_{a,b}= \left(\sum_{j\in I}|v_j|^2\right)^{-1}v_a\overline{v_b}.C(v)a,b​=​j∈I∑​∣vj​∣2​−1va​vb​​.

The real reciprocal is viewed as a complex scalar. No nonzero or unit-norm assumption is imposed on vvv. The reciprocal of 000 is defined to be 000, so C(0)C(0)C(0) is the zero matrix; empty III is allowed.

QAlgorithms.Papers.Independent.Intake100.P90.sourceDecoder

For any assignment ϕ^\widehat\phiϕ​ of a complex Euclidean vector with Boolean coordinates to each Boolean value, and any real number sss, this defines the complex matrix with Boolean row index aaa and Boolean column index bbb by

Da,b=s ϕ^(¬a)(b)‾,D_{a,b}=s\,\overline{\widehat\phi(\neg a)(b)},Da,b​=sϕ​(¬a)(b)​,

where ¬a\neg a¬a is Boolean negation and the bar denotes complex conjugation. No normalization assumptions are imposed on ϕ^\widehat\phiϕ​, and sss may be any real number, including zero or a negative value.

QAlgorithms.Papers.Independent.Intake100.P90.sourcePauliChoice

For l∈{0,1,2,3}l\in\{0,1,2,3\}l∈{0,1,2,3}, this defines a complex matrix indexed by Boolean values. In the row and column order (false,true)(\mathrm{false},\mathrm{true})(false,true), the four choices are

P0=(1001),P1=(100−1),P2=(0110),P3=(01−10).P_0=\begin{pmatrix}1&0\\0&1\end{pmatrix},\qquad P_1=\begin{pmatrix}1&0\\0&-1\end{pmatrix},\qquad P_2=\begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad P_3=\begin{pmatrix}0&1\\-1&0\end{pmatrix}.P0​=(10​01​),P1​=(10​0−1​),P2​=(01​10​),P3​=(0−1​10​).

QAlgorithms.Papers.Independent.Intake100.P90.sourceTensorProduct

For any type III, any natural number nnn, and any family M0,…,Mn−1M_0,\ldots,M_{n-1}M0​,…,Mn−1​ of complex matrices with rows and columns indexed by III, this defines a matrix whose rows and columns are indexed by functions x,y:{0,…,n−1}→Ix,y:\{0,\ldots,n-1\}\to Ix,y:{0,…,n−1}→I, with entries

Tx,y=∏i=0n−1(Mi)xi,yi.T_{x,y}=\prod_{i=0}^{n-1}(M_i)_{x_i,y_i}.Tx,y​=i=0∏n−1​(Mi​)xi​,yi​​.

No finiteness assumption on III is required. When n=0n=0n=0, there is exactly one indexing function, even if III is empty, and the resulting matrix has its sole entry equal to the empty product 111.

QAlgorithms.Papers.Independent.Intake100.P90.sourceZDisagreement

For any complex matrix ρ\rhoρ whose rows and columns are indexed by Boolean pairs, this defines the real number

Re⁡ρ(false,true),(false,true)+Re⁡ρ(true,false),(true,false).\operatorname{Re}\rho_{(\mathrm{false},\mathrm{true}),(\mathrm{false},\mathrm{true})} +\operatorname{Re}\rho_{(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{false})}.Reρ(false,true),(false,true)​+Reρ(true,false),(true,false)​.

There are no positivity, Hermitian, or trace assumptions on ρ\rhoρ.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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