Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Entanglement Measures and Purification Procedures

Definition
QAlgorithms_Papers_Independent_Intakenext100_P42

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

prove2quantum

The objects the formalized statements of Entanglement Measures and Purification Procedures (arXiv:quant-ph/9707035) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • relativeEntanglementNats: PDF p.8, Eq.(7): the infimum is over the actual normalized separable states. In finite dimensions it is attained and finite; the certificates below retain attainment.
  • IsMinimizer: PDF pp.12–15: a closest separable state, including feasibility.
  • DistanceFamily: PDF pp.8–10: coherent distance family on finite registers of every dimension.
  • IsSubstate: PDF p.8: the subnormalized PSD domain required by F4 and F5a, including zero.
  • UnitaryInvariantDistance: PDF p.8, F2: unitary invariance on normalized density matrices.
  • F3: PDF p.8, F3: normalized partial-trace monotonicity. The blocks flag selects the subnormalized PSD extension used in Theorem 2, PDF p.10, Eq.(18).
  • F5b: PDF p.9, proof-used F5b: the ancillary projector is onto a UNIT vector.
  • CompleteProjectors: PDF p.8: a complete orthogonal family of Hermitian projectors.
  • F5a: PDF p.8, F5a: block additivity on the subnormalized domain.
  • ProductComplete: PDF p.4, Eq.(1): the source's complete product-Kraus idealization. This predicate does not identify separable operations with physical LOCC.
  • rectangularKrausBranch: PDF pp.4,6: unnormalized outcome state.
  • rectangularKrausProbability: PDF p.6: branch probability.
  • normalizedBranch: PDF p.6: positive-probability outcome normalization; never used at zero probability.
  • MeasureConditions: PDF pp.6–7, E1–E3, for the source's explicit product-Kraus operations. Zero-probability outcomes are omitted before evaluating a normalized state.
  • FiniteSchmidtExpansion: PDF pp.12–14: finite Schmidt data, permitting zero weights and unequal local dimensions.
  • finiteSchmidtVector: PDF p.14, Eq.(33): the vector constructed from its Schmidt expansion.
  • schmidtDiagonal: PDF p.13: the explicitly proposed Schmidt-diagonal comparison state.
  • finiteSchmidtEntropyNats: PDF pp.12–14: Schmidt entropy in nats, with 0 log 0 = 0.
  • kernelG: PDF p.13, Eqs.(27)–(30): continuous diagonal value and zero-weight boundary. The source's sentence g(p,p)=1 is read only for p>0.
  • formationNats: PDF p.7, Eq.(6): the finite pure-ensemble convex roof (creation/formation), in nats.
  • buresGenerator: PDF p.17: the actual Bures-generated quantity is 2 minus twice ROOT fidelity.
  • buresEntanglement: PDF pp.8,17: Bures distance to the separable set, for the generator actually printed.
  • entanglementIndicator: PDF p.19: the indicator of entanglement.
  • groupedStateProduct: PDF p.11: product of possibly different-dimensional inputs, across the grouped cut.
  • qubitAngle: PDF p.22, Eq.(49): a qubit ray parameterized by its polar angle and phase.
  • mixingAmplitude: PDF p.21, Eq.(48): 16 amplitudes using 15 angles; the last product is empty.
  • angleState: PDF pp.21–22, Eqs.(47)–(49): the complete 79-angle two-qubit parameterization. The first 15 entries are mixing angles; each term then uses 4 local ray angles.
  • HasPureProductDecomposition: PDF p.20: bounded finite pure-product decomposition.
  • qubitMatrixUnit: PDF pp.23–24: matrix units in the ordered two-qubit computational basis.
  • bellBasisVector: PDF p.23, Eqs.(57)–(58): Phi+, Phi-, Psi+, Psi-, in that order.
  • exampleOneInput: PDF p.23, Eq.(54).
  • exampleOneMinimum: PDF p.23, Eq.(55): the actual constructed comparison matrix.
  • correlated: PDF p.24, Eq.(63): complex maximally correlated two-qubit family.
  • correlatedMinimum: PDF pp.23–24, Eqs.(60),(64): the diagonal comparison state.
  • exampleTwoInput: PDF p.23, Eq.(59).
  • correlatedEigenvalue: Corrected eigenvalues for PDF p.24, Eq.(66), determined by Eq.(63). Printed 1-4A(1-A)-|B|^2 is changed to (2A-1)^2+4|B|^2.
  • bellDiagonal: PDF pp.16,33: Bell-diagonal density matrix with the specified four weights.
  • singletWernerState: PDF p.25: Werner state with singlet weight F.
  • localBell: PDF p.25: all maximally entangled two-qubit vectors via local unitaries.
  • twoQubitMaxEntangledFraction: PDF p.25: optimized maximally-entangled overlap. On density inputs this real supremum ranges over a nonempty compact set and is attained.
  • wernerValue: Corrected PDF p.25, Eq.(73): zero on the separable Werner regime.
  • bipartitionProductMatrix: PDF p.34, Eq.(91): product across a specified nontrivial bipartition. The blocks may each have internal entanglement and arbitrary unequal dimensions.
  • IsMultipartiteBiseparable: PDF pp.34–35, Eqs.(91)–(92): mixtures over ALL nontrivial bipartitions; this is biseparability, rather than full product separability (94).
  • partyKraus: PDF p.35, Eq.(93): one product Kraus operator across all parties.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_BipartiteSeparability
import Definitions.Def_QAlgorithms_Defs_QuantumInformation
import Definitions.Def_QAlgorithms_Defs_ExtendedQuantumEntropy
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P21
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P04
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P49

/-!
Vedral–Plenio, quant-ph/9707035v2. Finite, nonempty local registers; natural logs.
Signed support-aware relative entropy, natural entropy, grouped binary products and
copies reuse the pinned accepted library. Remaining paper-local concepts have distinct
names where frozen short-name matches have different domains, units or meanings.
Source corrections and excluded claims are recorded in this unit's audit artifacts.
-/

noncomputable section

open scoped Matrix ComplexConjugate ComplexOrder ENNReal Topology

namespace QAlgorithms.Papers.Independent.Intakenext100.P42

open QAlgorithms QAlgorithms.Entanglement
open QAlgorithms.Papers.Independent.Dependency50.P21 (relativeEntropy)
open QAlgorithms.Papers.Independent.Information100.P56 (entropy)
open QAlgorithms.Papers.Independent.Information100.P04 (copies)
open QAlgorithms.Papers.Independent.Bridge50.P49 (groupedProduct)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF p.8, Eq.(7): the infimum is over the actual normalized separable states.
In finite dimensions it is attained and finite; the certificates below retain attainment. -/
def relativeEntanglementNats {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] [Nonempty I] [Nonempty J]
    (sigma : Matrix (I × J) (I × J) ℂ) : EReal :=
  sInf {v | ∃ rho : Matrix (I × J) (I × J) ℂ,
    IsSeparableDensity rho ∧ v = relativeEntropy sigma rho}

/-- PDF pp.12–15: a closest separable state, including feasibility. -/
def IsMinimizer {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] [Nonempty I] [Nonempty J]
    (sigma rho : Matrix (I × J) (I × J) ℂ) : Prop :=
  IsSeparableDensity rho ∧ ∀ tau, IsSeparableDensity tau →
    relativeEntropy sigma rho ≤ relativeEntropy sigma tau

/-- PDF pp.8–10: coherent distance family on finite registers of every dimension. -/
abbrev DistanceFamily := {I : Type} → [Fintype I] → [DecidableEq I] →
  Matrix I I ℂ → Matrix I I ℂ → EReal

/-- PDF p.8: the subnormalized PSD domain required by F4 and F5a, including zero. -/
def IsSubstate {I : Type} [Fintype I] (rho : Matrix I I ℂ) : Prop :=
  rho.PosSemidef ∧ rho.trace.re ≤ 1

/-- PDF p.8, F2: unitary invariance on normalized density matrices. -/
def UnitaryInvariantDistance (D : DistanceFamily) : Prop :=
  ∀ {I : Type} [Fintype I] [DecidableEq I] [Nonempty I]
    (sigma rho : Matrix I I ℂ), IsDensityMatrix sigma → IsDensityMatrix rho →
    ∀ U : Matrix.unitaryGroup I ℂ,
      D ((U : Matrix I I ℂ) * sigma * (U : Matrix I I ℂ)ᴴ)
        ((U : Matrix I I ℂ) * rho * (U : Matrix I I ℂ)ᴴ) = D sigma rho

/-- PDF p.8, F3: normalized partial-trace monotonicity. The blocks flag selects
the subnormalized PSD extension used in Theorem 2, PDF p.10, Eq.(18). -/
def F3 (D : DistanceFamily) (blocks : Bool := false) : Prop :=
  ∀ {I J : Type} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
    [Nonempty I] [Nonempty J] (sigma rho : Matrix (I × J) (I × J) ℂ),
    (if blocks then IsSubstate sigma else IsDensityMatrix sigma) →
    (if blocks then IsSubstate rho else IsDensityMatrix rho) →
      D (traceLeft sigma) (traceLeft rho) ≤ D sigma rho

/-- PDF p.9, proof-used F5b: the ancillary projector is onto a UNIT vector. -/
def F5b (D : DistanceFamily) : Prop :=
  ∀ {I : Type} [Fintype I] [DecidableEq I] [Nonempty I]
    (sigma rho : Matrix I I ℂ), IsDensityMatrix sigma → IsDensityMatrix rho →
    ∀ {K : Type} [Fintype K] [DecidableEq K] [Nonempty K]
      (alpha : EuclideanSpace ℂ K), ‖alpha‖ = 1 →
      D (Matrix.kronecker sigma (pureDensity alpha))
        (Matrix.kronecker rho (pureDensity alpha)) = D sigma rho

/-- PDF p.8: a complete orthogonal family of Hermitian projectors. -/
def CompleteProjectors {I K : Type} [Fintype I] [Fintype K]
    [DecidableEq I] (P : K → Matrix I I ℂ) : Prop :=
  (∀ k, (P k).IsHermitian ∧ P k * P k = P k) ∧
    (∀ k l, k ≠ l → P k * P l = 0) ∧ ∑ k, P k = 1

/-- PDF p.8, F5a: block additivity on the subnormalized domain. -/
def F5a (D : DistanceFamily) : Prop :=
  ∀ {I K : Type} [Fintype I] [Fintype K] [DecidableEq I] [Nonempty I]
    (P : K → Matrix I I ℂ), CompleteProjectors P →
    ∀ sigma rho, IsDensityMatrix sigma → IsDensityMatrix rho →
      D (∑ k, P k * sigma * P k) (∑ k, P k * rho * P k) =
        ∑ k, D (P k * sigma * P k) (P k * rho * P k)

/-- PDF p.4, Eq.(1): the source's complete product-Kraus idealization.
This predicate does not identify separable operations with physical LOCC. -/
def ProductComplete {I J A B K : Type} [Fintype I] [Fintype J]
    [Fintype A] [Fintype B] [Fintype K] [DecidableEq I] [DecidableEq J]
    (L : K → Matrix A I ℂ) (R : K → Matrix B J ℂ) : Prop :=
  IsKrausFamily (fun k => Matrix.kronecker (L k) (R k))

/-- PDF pp.4,6: unnormalized outcome state. -/
def rectangularKrausBranch {I J K : Type} [Fintype I] [Fintype J]
    (V : K → Matrix J I ℂ) (sigma : Matrix I I ℂ) (k : K) : Matrix J J ℂ :=
  V k * sigma * (V k)ᴴ

/-- PDF p.6: branch probability. -/
def rectangularKrausProbability {I J K : Type} [Fintype I] [Fintype J]
    (V : K → Matrix J I ℂ) (sigma : Matrix I I ℂ) (k : K) : ℝ :=
  (rectangularKrausBranch V sigma k).trace.re

/-- PDF p.6: positive-probability outcome normalization; never used at zero probability. -/
def normalizedBranch {I J K : Type} [Fintype I] [Fintype J]
    (V : K → Matrix J I ℂ) (sigma : Matrix I I ℂ) (k : K) : Matrix J J ℂ :=
  ((rectangularKrausProbability V sigma k)⁻¹ : ℂ) • rectangularKrausBranch V sigma k

/-- PDF pp.6–7, E1–E3, for the source's explicit product-Kraus operations.
Zero-probability outcomes are omitted before evaluating a normalized state. -/
def MeasureConditions {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] [Nonempty I] [Nonempty J]
    (E : Matrix (I × J) (I × J) ℂ → EReal) : Prop :=
  (∀ sigma, IsDensityMatrix sigma → (E sigma = 0 ↔ IsSeparableDensity sigma)) ∧
  (∀ sigma, IsDensityMatrix sigma →
    ∀ U : Matrix.unitaryGroup I ℂ, ∀ V : Matrix.unitaryGroup J ℂ,
      E (conjSuperop (Matrix.kronecker (U : Matrix I I ℂ) (V : Matrix J J ℂ)) sigma) =
        E sigma) ∧
  (∀ {K : Type} [Fintype K] (L : K → Matrix I I ℂ) (R : K → Matrix J J ℂ),
    ProductComplete L R → ∀ sigma, IsDensityMatrix sigma →
      let V := fun k => Matrix.kronecker (L k) (R k)
      (∑ k, if 0 < rectangularKrausProbability V sigma k then
        (rectangularKrausProbability V sigma k : EReal) * E (normalizedBranch V sigma k) else 0) ≤
          E sigma)

/-- PDF pp.12–14: finite Schmidt data, permitting zero weights and unequal local dimensions. -/
structure FiniteSchmidtExpansion (I J K : Type) [Fintype I] [Fintype J] [Fintype K] where
  weight : K → ℝ
  nonnegative : ∀ k, 0 ≤ weight k
  total : ∑ k, weight k = 1
  left : K → EuclideanSpace ℂ I
  right : K → EuclideanSpace ℂ J
  left_orthonormal : Orthonormal ℂ left
  right_orthonormal : Orthonormal ℂ right

/-- PDF p.14, Eq.(33): the vector constructed from its Schmidt expansion. -/
def finiteSchmidtVector {I J K : Type} [Fintype I] [Fintype J] [Fintype K]
    (s : FiniteSchmidtExpansion I J K) : EuclideanSpace ℂ (I × J) :=
  WithLp.toLp 2 fun p => ∑ k, (Real.sqrt (s.weight k) : ℂ) * s.left k p.1 * s.right k p.2

/-- PDF p.13: the explicitly proposed Schmidt-diagonal comparison state. -/
def schmidtDiagonal {I J K : Type} [Fintype I] [Fintype J] [Fintype K]
    (s : FiniteSchmidtExpansion I J K) : Matrix (I × J) (I × J) ℂ :=
  ∑ k, (s.weight k : ℂ) • Matrix.kronecker (pureDensity (s.left k)) (pureDensity (s.right k))

/-- PDF pp.12–14: Schmidt entropy in nats, with 0 log 0 = 0. -/
def finiteSchmidtEntropyNats {I J K : Type} [Fintype I] [Fintype J] [Fintype K]
    (s : FiniteSchmidtExpansion I J K) : ℝ := -∑ k, s.weight k * Real.log (s.weight k)

/-- PDF p.13, Eqs.(27)–(30): continuous diagonal value and zero-weight boundary.
The source's sentence g(p,p)=1 is read only for p>0. -/
def kernelG (p q : ℝ) : ℝ :=
  if p = 0 ∨ q = 0 then 0 else
    if p = q then 1 else Real.sqrt (p * q) * Real.log (q / p) / (q - p)

/-- PDF p.7, Eq.(6): the finite pure-ensemble convex roof (creation/formation), in nats. -/
def formationNats {I J : Type} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
    (sigma : Matrix (I × J) (I × J) ℂ) : EReal :=
  sInf {v | ∃ m : ℕ, ∃ w : Fin m → ℝ, ∃ psi : Fin m → EuclideanSpace ℂ (I × J),
    (∀ k, 0 ≤ w k) ∧ (∑ k, w k) = 1 ∧ (∀ k, ‖psi k‖ = 1) ∧
    sigma = ∑ k, (w k : ℂ) • pureDensity (psi k) ∧
    v = ((∑ k, w k * entropy (traceLeft (pureDensity (psi k))) : ℝ) : EReal)}

/-- PDF p.17: the actual Bures-generated quantity is 2 minus twice ROOT fidelity. -/
def buresGenerator {I : Type} [Fintype I] [DecidableEq I]
    (sigma rho : Matrix I I ℂ) : ℝ := 2 - 2 * rootFidelity sigma rho

/-- PDF pp.8,17: Bures distance to the separable set, for the generator actually printed. -/
def buresEntanglement {I J : Type} [Fintype I] [Fintype J]
    [DecidableEq I] [DecidableEq J] [Nonempty I] [Nonempty J]
    (sigma : Matrix (I × J) (I × J) ℂ) : EReal :=
  sInf {v | ∃ rho : Matrix (I × J) (I × J) ℂ, IsSeparableDensity rho ∧
    v = (buresGenerator sigma rho : EReal)}

/-- PDF p.19: the indicator of entanglement. -/
def entanglementIndicator {I J : Type} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J]
    (sigma : Matrix (I × J) (I × J) ℂ) : EReal :=
  if IsSeparableDensity sigma then 0 else 1

/-- PDF p.11: product of possibly different-dimensional inputs, across the grouped cut. -/
def groupedStateProduct {T : Type} [Fintype T] {I J : T → Type}
    (sigma : ∀ t, Matrix (I t × J t) (I t × J t) ℂ) :
    Matrix ((∀ t, I t) × (∀ t, J t)) ((∀ t, I t) × (∀ t, J t)) ℂ :=
  fun p q => ∏ t, sigma t (p.1 t,p.2 t) (q.1 t,q.2 t)

/-- Sanity: zero weights do not receive the positive diagonal continuation. -/
example (q : ℝ) : kernelG 0 q = 0 := by simp [kernelG]

/-- Sanity: equal positive weights give the divided difference's continuation. -/
example : kernelG (1 / 2) (1 / 2) = 1 := by norm_num [kernelG]

/-- Sanity: the empty tensor product is the scalar unit, not a zero operator. -/
example {I J : Type} (sigma : Matrix (I × J) (I × J) ℂ)
    (p q : (Fin 0 → I) × (Fin 0 → J)) : copies sigma 0 p q = 1 := by
  simp [copies]

/-- Sanity: the zero positive operator has zero entropy and zero relative entropy to itself. -/
example {I : Type} [Fintype I] [DecidableEq I] :
    entropy (0 : Matrix I I ℂ) = 0 ∧ relativeEntropy (0 : Matrix I I ℂ) 0 = 0 := by
  simp [entropy, relativeEntropy,
    QAlgorithms.Papers.Independent.Dependency50.P21.IsSupported, cfc_zero]

/-- PDF p.22, Eq.(49): a qubit ray parameterized by its polar angle and phase. -/
def qubitAngle (theta phase : ℝ) : EuclideanSpace ℂ Bool :=
  WithLp.toLp 2 fun b => if b then (Real.sin theta : ℂ) * Complex.exp ((phase : ℂ) * Complex.I)
    else (Real.cos theta : ℂ)

/-- PDF p.21, Eq.(48): 16 amplitudes using 15 angles; the last product is empty. -/
def mixingAmplitude (angle : Fin 15 → ℝ) (i : Fin 16) : ℝ :=
  Real.sin (if h : i.val = 0 then Real.pi / 2 else angle ⟨i.val - 1, by omega⟩) *
    ∏ j : Fin 15, if i.val ≤ j.val then Real.cos (angle j) else 1

/-- PDF pp.21–22, Eqs.(47)–(49): the complete 79-angle two-qubit parameterization.
The first 15 entries are mixing angles; each term then uses 4 local ray angles. -/
def angleState (a : Fin 79 → ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  ∑ i : Fin 16, ((mixingAmplitude (fun j => a ⟨j.val, by omega⟩) i)^2 : ℂ) •
    Matrix.kronecker
      (pureDensity (qubitAngle (a ⟨15 + 4*i.val, by omega⟩) (a ⟨16 + 4*i.val, by omega⟩)))
      (pureDensity (qubitAngle (a ⟨17 + 4*i.val, by omega⟩) (a ⟨18 + 4*i.val, by omega⟩)))

/-- PDF p.20: bounded finite pure-product decomposition. -/
def HasPureProductDecomposition {I J : Type} [Fintype I] [Fintype J]
    (rho : Matrix (I × J) (I × J) ℂ) (bound : ℕ) : Prop :=
  ∃ m : ℕ, m ≤ bound ∧ ∃ w : Fin m → ℝ,
    ∃ a : Fin m → EuclideanSpace ℂ I, ∃ b : Fin m → EuclideanSpace ℂ J,
    (∀ i, 0 ≤ w i) ∧ (∑ i, w i) = 1 ∧ (∀ i, ‖a i‖ = 1 ∧ ‖b i‖ = 1) ∧
    rho = ∑ i, (w i : ℂ) • Matrix.kronecker (pureDensity (a i)) (pureDensity (b i))

/-- PDF pp.23–24: matrix units in the ordered two-qubit computational basis. -/
def qubitMatrixUnit (a b c d : Bool) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  Matrix.single (a,b) (c,d) 1

/-- PDF p.23, Eqs.(57)–(58): Phi+, Phi-, Psi+, Psi-, in that order. -/
def bellBasisVector (i : Fin 4) : EuclideanSpace ℂ (Bool × Bool) :=
  let c : ℂ := (Real.sqrt 2)⁻¹
  ![c • (ket (false,false) + ket (true,true)),
    c • (ket (false,false) - ket (true,true)),
    c • (ket (false,true) + ket (true,false)),
    c • (ket (false,true) - ket (true,false))] i

/-- PDF p.23, Eq.(54). -/
def exampleOneInput (t : ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (t : ℂ) • pureDensity (bellBasisVector 0) + ((1-t : ℝ) : ℂ) • qubitMatrixUnit false true false true

/-- PDF p.23, Eq.(55): the actual constructed comparison matrix. -/
def exampleOneMinimum (t : ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  ((t/2*(1-t/2) : ℝ) : ℂ) •
    (qubitMatrixUnit false false false false + qubitMatrixUnit false false true true +
      qubitMatrixUnit true true false false + qubitMatrixUnit true true true true) +
    (((1-t/2)^2 : ℝ) : ℂ) • qubitMatrixUnit false true false true +
    ((t^2/4 : ℝ) : ℂ) • qubitMatrixUnit true false true false

/-- PDF p.24, Eq.(63): complex maximally correlated two-qubit family. -/
def correlated (a : ℝ) (b : ℂ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (a : ℂ) • qubitMatrixUnit false false false false +
    b • qubitMatrixUnit false false true true + conj b • qubitMatrixUnit true true false false +
    ((1-a : ℝ) : ℂ) • qubitMatrixUnit true true true true

/-- PDF pp.23–24, Eqs.(60),(64): the diagonal comparison state. -/
def correlatedMinimum (a : ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (a : ℂ) • qubitMatrixUnit false false false false +
    ((1-a : ℝ) : ℂ) • qubitMatrixUnit true true true true

/-- PDF p.23, Eq.(59). -/
def exampleTwoInput (t : ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (t : ℂ) • pureDensity (bellBasisVector 0) + ((1-t : ℝ) : ℂ) • qubitMatrixUnit false false false false

/-- Corrected eigenvalues for PDF p.24, Eq.(66), determined by Eq.(63).
Printed 1-4A(1-A)-|B|^2 is changed to (2A-1)^2+4|B|^2. -/
def correlatedEigenvalue (a : ℝ) (b : ℂ) (plus : Bool) : ℝ :=
  (1 + (if plus then 1 else -1) * Real.sqrt ((2*a-1)^2 + 4*Complex.normSq b)) / 2

/-- PDF pp.16,33: Bell-diagonal density matrix with the specified four weights. -/
def bellDiagonal (p : Fin 4 → ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  ∑ i, (p i : ℂ) • pureDensity (bellBasisVector i)

/-- PDF p.25: Werner state with singlet weight F. -/
def singletWernerState (f : ℝ) : Matrix (Bool × Bool) (Bool × Bool) ℂ :=
  (f : ℂ) • pureDensity (bellBasisVector 3) + (( (1-f)/3 : ℝ) : ℂ) • (1-pureDensity (bellBasisVector 3))

/-- PDF p.25: all maximally entangled two-qubit vectors via local unitaries. -/
def localBell (U V : Matrix.unitaryGroup Bool ℂ) : EuclideanSpace ℂ (Bool × Bool) :=
  WithLp.toLp 2 ((Matrix.kronecker (U : Matrix Bool Bool ℂ) (V : Matrix Bool Bool ℂ)).mulVec
    (WithLp.ofLp (bellBasisVector 0)))

/-- PDF p.25: optimized maximally-entangled overlap. On density inputs this real
supremum ranges over a nonempty compact set and is attained. -/
def twoQubitMaxEntangledFraction (sigma : Matrix (Bool × Bool) (Bool × Bool) ℂ) : ℝ :=
  sSup {v | ∃ U V : Matrix.unitaryGroup Bool ℂ,
    v = effectProb (pureDensity (localBell U V)) sigma}

/-- Corrected PDF p.25, Eq.(73): zero on the separable Werner regime. -/
def wernerValue (f : ℝ) : ℝ :=
  if f ≤ 1/2 then 0 else f * Real.log f + (1-f)*Real.log (1-f) + Real.log 2

/-- PDF p.34, Eq.(91): product across a specified nontrivial bipartition.
The blocks may each have internal entanglement and arbitrary unequal dimensions. -/
def bipartitionProductMatrix {N : ℕ} (d : Fin N → ℕ) (S : Finset (Fin N))
    (X : Matrix (∀ i : {i // i ∈ S}, Fin (d i.val))
      (∀ i : {i // i ∈ S}, Fin (d i.val)) ℂ)
    (Y : Matrix (∀ i : {i // i ∉ S}, Fin (d i.val))
      (∀ i : {i // i ∉ S}, Fin (d i.val)) ℂ) :
    Matrix (∀ i, Fin (d i)) (∀ i, Fin (d i)) ℂ :=
  fun p q => X (fun i => p i.val) (fun i => q i.val) *
    Y (fun i => p i.val) (fun i => q i.val)

/-- PDF pp.34–35, Eqs.(91)–(92): mixtures over ALL nontrivial bipartitions;
this is biseparability, rather than full product separability (94). -/
def IsMultipartiteBiseparable {N : ℕ} (d : Fin N → ℕ)
    (rho : Matrix (∀ i, Fin (d i)) (∀ i, Fin (d i)) ℂ) : Prop :=
  ∃ m : ℕ, ∃ w : Fin m → ℝ, ∃ S : Fin m → Finset (Fin N),
    ∃ X : ∀ k, Matrix (∀ i : {i // i ∈ S k}, Fin (d i.val))
      (∀ i : {i // i ∈ S k}, Fin (d i.val)) ℂ,
    ∃ Y : ∀ k, Matrix (∀ i : {i // i ∉ S k}, Fin (d i.val))
      (∀ i : {i // i ∉ S k}, Fin (d i.val)) ℂ,
    (∀ k, 0 ≤ w k) ∧ (∑ k, w k) = 1 ∧
    (∀ k, (S k).Nonempty ∧ S k ≠ Finset.univ) ∧
    (∀ k, IsDensityMatrix (X k) ∧ IsDensityMatrix (Y k)) ∧
    rho = ∑ k, (w k : ℂ) • bipartitionProductMatrix d (S k) (X k) (Y k)

/-- PDF p.35, Eq.(93): one product Kraus operator across all parties. -/
def partyKraus {N : ℕ} {d : Fin N → ℕ}
    (A : ∀ i, Matrix (Fin (d i)) (Fin (d i)) ℂ) :
    Matrix (∀ i, Fin (d i)) (∀ i, Fin (d i)) ℂ :=
  fun p q => ∏ i, A i (p i) (q i)

/-- Sanity: the zero-angle qubit is |0>. -/
example : qubitAngle 0 0 false = 1 ∧ qubitAngle 0 0 true = 0 := by
  simp [qubitAngle]

/-- Sanity: zero off-diagonal coherence leaves exactly the diagonal comparison matrix. -/
example (a : ℝ) : correlated a 0 = correlatedMinimum a := by
  simp [correlated, correlatedMinimum]

/-- Sanity: the corrected Werner value at its separable boundary is zero. -/
example : wernerValue (1/2) = 0 := by simp [wernerValue]

/-- Sanity: scalar relative entropy can be negative on unequal subnormalizations. -/
example : ((Real.log (1/2) : ℝ) : EReal) < 0 := by
  exact_mod_cast Real.log_neg (by norm_num : (0 : ℝ) < 1/2) (by norm_num : (1/2 : ℝ) < 1)

end QAlgorithms.Papers.Independent.Intakenext100.P42
Source
Entanglement Measures and Purification Procedures, arXiv:quant-ph/9707035v2, https://arxiv.org/abs/quant-ph/9707035v2
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P42.CompleteProjectors

For finite types I,KI,KI,K, with decidable equality on III, and a family PkP_kPk​ of complex matrices indexed by III, this predicate says that every PkP_kPk​ is Hermitian and satisfies Pk2=PkP_k^2=P_kPk2​=Pk​, that PkPl=0P_kP_l=0Pk​Pl​=0 whenever k≠lk\ne lk=l, and that ∑k∈KPk=1I\sum_{k\in K}P_k=\mathbf1_I∑k∈K​Pk​=1I​. Zero projectors are permitted. Neither type is required to be nonempty: if III is empty these conditions hold for its unique matrix family, while if KKK is empty the completeness condition requires 0=1I0=\mathbf1_I0=1I​, which excludes nonempty III.

QAlgorithms.Papers.Independent.Intakenext100.P42.DistanceFamily

This abbreviates a family of functions that, for every type III equipped with a finite enumeration and decidable equality, takes two complex matrices indexed by III and returns an extended real number in [−∞,+∞][-\infty,+\infty][−∞,+∞]. The indexing type III may be empty, and the matrix arguments are arbitrary. No nonnegativity, symmetry, normalization, or other distance property is required.

QAlgorithms.Papers.Independent.Intakenext100.P42.F3

For a family DDD of extended real valued functions on pairs of complex square matrices, indexed by finite types with decidable equality, and a Boolean parameter blocks\mathrm{blocks}blocks, whose default value is false, this predicate requires the following for every pair of finite, nonempty types I,JI,JI,J with decidable equality and all complex matrices σ,ρ\sigma,\rhoσ,ρ indexed by I×JI\times JI×J:

D(Tr⁡Iσ,Tr⁡Iρ)≤D(σ,ρ),(Tr⁡IX)j,j′=∑i∈IX(i,j),(i,j′).D(\operatorname{Tr}_I\sigma,\operatorname{Tr}_I\rho)\le D(\sigma,\rho), \qquad (\operatorname{Tr}_I X)_{j,j'}=\sum_{i\in I}X_{(i,j),(i,j')}.D(TrI​σ,TrI​ρ)≤D(σ,ρ),(TrI​X)j,j′​=i∈I∑​X(i,j),(i,j′)​.

When blocks\mathrm{blocks}blocks is false, both inputs must be positive semidefinite with complex trace 111; when it is true, both must be positive semidefinite with real part of the trace at most 111, allowing zero inputs. These are hypotheses of the required inequality, and no other conditions on DDD are imposed.

QAlgorithms.Papers.Independent.Intakenext100.P42.F5a

For a family DDD of extended real valued functions on matrix pairs indexed by finite types with decidable equality, this predicate requires that, for every finite, nonempty type III with decidable equality, every finite type KKK, every family of Hermitian idempotent matrices PkP_kPk​ indexed by III satisfying PkPl=0P_kP_l=0Pk​Pl​=0 for k≠lk\ne lk=l and ∑kPk=1I\sum_kP_k=\mathbf1_I∑k​Pk​=1I​, and all positive semidefinite matrices σ,ρ\sigma,\rhoσ,ρ of complex trace 111,

D ⁣(∑kPkσPk,∑kPkρPk)=∑kD(PkσPk,PkρPk).D\!\left(\sum_kP_k\sigma P_k,\sum_kP_k\rho P_k\right) =\sum_kD(P_k\sigma P_k,P_k\rho P_k).D(k∑​Pk​σPk​,k∑​Pk​ρPk​)=k∑​D(Pk​σPk​,Pk​ρPk​).

The summands use the unnormalized compressed matrices directly, including zero matrices, and the right side is a finite sum in the extended reals. Although KKK may be empty in the quantification, the projector hypotheses cannot hold for empty KKK because III is nonempty.

QAlgorithms.Papers.Independent.Intakenext100.P42.F5b

For a family DDD assigning extended real values to matrix pairs on finite types with decidable equality, this predicate requires that, for every finite, nonempty type III with decidable equality, every pair of positive semidefinite matrices σ,ρ\sigma,\rhoσ,ρ indexed by III with complex trace 111, every finite, nonempty type KKK with decidable equality, and every vector α∈CK\alpha\in\mathbb C^Kα∈CK of Euclidean norm 111,

D(σ⊗Pα,ρ⊗Pα)=D(σ,ρ),(Pα)a,b=αaαb‾.D(\sigma\otimes P_\alpha,\rho\otimes P_\alpha)=D(\sigma,\rho), \qquad (P_\alpha)_{a,b}=\alpha_a\overline{\alpha_b}.D(σ⊗Pα​,ρ⊗Pα​)=D(σ,ρ),(Pα​)a,b​=αa​αb​​.

The tensor product has entries (X⊗Pα)(i,a),(j,b)=Xi,jαaαb‾(X\otimes P_\alpha)_{(i,a),(j,b)}=X_{i,j}\alpha_a\overline{\alpha_b}(X⊗Pα​)(i,a),(j,b)​=Xi,j​αa​αb​​. No further properties of DDD are assumed.

QAlgorithms.Papers.Independent.Intakenext100.P42.FiniteSchmidtExpansion

For finite types I,J,KI,J,KI,J,K, this structure consists of real weights wkw_kwk​ and vectors uk∈CIu_k\in\mathbb C^Iuk​∈CI, vk∈CJv_k\in\mathbb C^Jvk​∈CJ, with the standard Euclidean inner products, satisfying wk≥0w_k\ge0wk​≥0 for every kkk, ∑k∈Kwk=1\sum_{k\in K}w_k=1∑k∈K​wk​=1, and ⟨uk,ul⟩=⟨vk,vl⟩=δkl\langle u_k,u_l\rangle=\langle v_k,v_l\rangle=\delta_{kl}⟨uk​,ul​⟩=⟨vk​,vl​⟩=δkl​ for all k,l∈Kk,l\in Kk,l∈K. Zero weights are permitted, and their associated vectors must still belong to the orthonormal families. Although the types are not explicitly assumed nonempty, no such structure exists when any of I,J,KI,J,KI,J,K is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.HasPureProductDecomposition

For any finite types I,JI,JI,J, any complex matrix ρ\rhoρ indexed by I×JI\times JI×J, and any natural number BBB, this predicate means that there exist a natural number m≤Bm\le Bm≤B, real weights w0,…,wm−1w_0,\ldots,w_{m-1}w0​,…,wm−1​, and vectors ai∈CIa_i\in\mathbb C^Iai​∈CI, bi∈CJb_i\in\mathbb C^Jbi​∈CJ, such that every wi≥0w_i\ge0wi​≥0, ∑iwi=1\sum_iw_i=1∑i​wi​=1, every ∥ai∥=∥bi∥=1\|a_i\|=\|b_i\|=1∥ai​∥=∥bi​∥=1, and

ρ(x,y),(x′,y′)=∑i=0m−1wi ai(x)ai(x′)‾ bi(y)bi(y′)‾\rho_{(x,y),(x',y')}= \sum_{i=0}^{m-1}w_i\,a_i(x)\overline{a_i(x')}\,b_i(y)\overline{b_i(y')}ρ(x,y),(x′,y′)​=i=0∑m−1​wi​ai​(x)ai​(x′)​bi​(y)bi​(y′)​

for all x,x′∈Ix,x'\in Ix,x′∈I and y,y′∈Jy,y'\in Jy,y′∈J. Zero weights are allowed. Although m=0m=0m=0 is quantified over, it cannot satisfy the weight sum, so the predicate is false when B=0B=0B=0; it is also false if either III or JJJ is empty, since no unit vector then exists.

QAlgorithms.Papers.Independent.Intakenext100.P42.IsMinimizer

For finite, nonempty types I,JI,JI,J, each with decidable equality, and arbitrary complex matrices σ,ρ\sigma,\rhoσ,ρ indexed by I×JI\times JI×J, this predicate says that ρ\rhoρ is a separable density matrix and that R(σ,ρ)≤R(σ,τ)R(\sigma,\rho)\le R(\sigma,\tau)R(σ,ρ)≤R(σ,τ) for every separable density matrix τ\tauτ. A separable density matrix has a finite representation ∑j=0q−1wj(Aj⊗Bj)\sum_{j=0}^{q-1}w_j(A_j\otimes B_j)∑j=0q−1​wj​(Aj​⊗Bj​), with nonnegative real weights summing to 111 and positive semidefinite factors Aj,BjA_j,B_jAj​,Bj​ of complex trace 111 on I,JI,JI,J, respectively; such a representation necessarily has q>0q>0q>0. For any candidate τ\tauτ, R(σ,τ)R(\sigma,\tau)R(σ,τ) is Re⁡tr⁡(f(σ)−σlog⁡(τ))\operatorname{Re}\operatorname{tr}(f(\sigma)-\sigma\log(\tau))Retr(f(σ)−σlog(τ)), with f(x)=xln⁡xf(x)=x\ln xf(x)=xlnx and matrix functions interpreted through continuous functional calculus, if ker⁡τ⊆ker⁡σ\ker\tau\subseteq\ker\sigmakerτ⊆kerσ, and is +∞+\infty+∞ otherwise. No density condition is imposed on σ\sigmaσ, uniqueness is not required, and the comparison allows infinite values.

QAlgorithms.Papers.Independent.Intakenext100.P42.IsMultipartiteBiseparable

For every natural number NNN, natural dimensions did_idi​ for i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, and complex matrix ρ\rhoρ indexed by configurations ∏i{0,…,di−1}\prod_i\{0,\ldots,d_i-1\}∏i​{0,…,di​−1}, this predicate means that there exist a natural number mmm, real weights wkw_kwk​, subsets SkS_kSk​ of the party indices, and complex matrices Xk,YkX_k,Y_kXk​,Yk​ on the configurations of SkS_kSk​ and its complement, respectively, such that

wk≥0,∑k=0m−1wk=1,∅≠Sk≠{0,…,N−1},w_k\ge0,\qquad \sum_{k=0}^{m-1}w_k=1,\qquad \varnothing\ne S_k\ne\{0,\ldots,N-1\},wk​≥0,k=0∑m−1​wk​=1,∅=Sk​={0,…,N−1},

each XkX_kXk​ and YkY_kYk​ is positive semidefinite with complex trace equal to 111, and

ρp,q=∑k=0m−1wk(Xk)p∣Sk,q∣Sk(Yk)p∣Skc,q∣Skc.\rho_{p,q} =\sum_{k=0}^{m-1}w_k (X_k)_{p|_{S_k},q|_{S_k}} (Y_k)_{p|_{S_k^c},q|_{S_k^c}}.ρp,q​=k=0∑m−1​wk​(Xk​)p∣Sk​​,q∣Sk​​​(Yk​)p∣Skc​​,q∣Skc​​​.

The partition may vary with kkk, and zero weights are allowed, but all stated requirements still apply to their terms. Although m=0m=0m=0 is quantified over, it cannot satisfy the weight sum; the predicate is also impossible when N<2N<2N<2, or when any local dimension is zero.

QAlgorithms.Papers.Independent.Intakenext100.P42.IsSubstate

For any finite type III and complex matrix ρ\rhoρ indexed by III, this predicate means that ρ\rhoρ is positive semidefinite and Re⁡tr⁡ρ≤1\operatorname{Re}\operatorname{tr}\rho\le1Retrρ≤1. There is no nonemptiness or decidable equality assumption on III, and no strictly positive trace requirement. In particular, the zero matrix satisfies the predicate, including when III is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.MeasureConditions

For nonempty finite types I,JI,JI,J, each with decidable equality, and a function E:C(I×J)×(I×J)→[−∞,+∞]E:\mathbb C^{(I\times J)\times(I\times J)}\to[-\infty,+\infty]E:C(I×J)×(I×J)→[−∞,+∞], this predicate requires three properties. First, for every positive semidefinite matrix σ\sigmaσ of trace 111, E(σ)=0E(\sigma)=0E(σ)=0 if and only if σ\sigmaσ has a finite representation σ=∑a=0q−1wa(Aa⊗Ba)\sigma=\sum_{a=0}^{q-1}w_a(A_a\otimes B_a)σ=∑a=0q−1​wa​(Aa​⊗Ba​), where q∈Nq\in\mathbb Nq∈N, wa≥0w_a\ge0wa​≥0, ∑awa=1\sum_a w_a=1∑a​wa​=1, and every Aa∈CI×IA_a\in\mathbb C^{I\times I}Aa​∈CI×I and Ba∈CJ×JB_a\in\mathbb C^{J\times J}Ba​∈CJ×J is positive semidefinite of trace 111. Second, for every such σ\sigmaσ and every pair of unitaries UUU on III and VVV on JJJ, E((U⊗V)σ(U⊗V)†)=E(σ)E((U\otimes V)\sigma(U\otimes V)^\dagger)=E(\sigma)E((U⊗V)σ(U⊗V)†)=E(σ). Third, for every finite type KKK and families Lk∈CI×IL_k\in\mathbb C^{I\times I}Lk​∈CI×I, Rk∈CJ×JR_k\in\mathbb C^{J\times J}Rk​∈CJ×J satisfying ∑k(Lk⊗Rk)†(Lk⊗Rk)=1\sum_k(L_k\otimes R_k)^\dagger(L_k\otimes R_k)=1∑k​(Lk​⊗Rk​)†(Lk​⊗Rk​)=1, every positive semidefinite trace-one σ\sigmaσ satisfies

∑k∈K{pk E(pk−1Bk),pk>0,0,pk≤0≤E(σ),Bk=(Lk⊗Rk)σ(Lk⊗Rk)†,pk=Re⁡tr⁡(Bk).\sum_{k\in K} \begin{cases} p_k\,E(p_k^{-1}B_k),&p_k>0,\\ 0,&p_k\le0 \end{cases} \le E(\sigma), \qquad B_k=(L_k\otimes R_k)\sigma(L_k\otimes R_k)^\dagger,\quad p_k=\operatorname{Re}\operatorname{tr}(B_k).k∈K∑​{pk​E(pk−1​Bk​),0,​pk​>0,pk​≤0​≤E(σ),Bk​=(Lk​⊗Rk​)σ(Lk​⊗Rk​)†,pk​=Retr(Bk​).

Here pkp_kpk​ is embedded in the extended reals for multiplication by EEE, and pk−1p_k^{-1}pk−1​ is embedded in C\mathbb CC for scaling BkB_kBk​; a zero inverse is interpreted as zero. The predicate imposes no separate nonnegativity or finiteness condition on EEE. An empty KKK cannot satisfy the stated completeness identity because I,JI,JI,J are nonempty.

QAlgorithms.Papers.Independent.Intakenext100.P42.ProductComplete

For finite types I,J,A,B,KI,J,A,B,KI,J,A,B,K, with decidable equality on I,JI,JI,J, and families of complex rectangular matrices Lk∈CA×IL_k\in\mathbb C^{A\times I}Lk​∈CA×I and Rk∈CB×JR_k\in\mathbb C^{B\times J}Rk​∈CB×J, this predicate means exactly

∑k∈K(Lk⊗Rk)†(Lk⊗Rk)=1I×J,(Lk⊗Rk)(a,b),(i,j)=(Lk)a,i(Rk)b,j.\sum_{k\in K}(L_k\otimes R_k)^\dagger(L_k\otimes R_k) =\mathbf1_{I\times J}, \qquad (L_k\otimes R_k)_{(a,b),(i,j)}=(L_k)_{a,i}(R_k)_{b,j}.k∈K∑​(Lk​⊗Rk​)†(Lk​⊗Rk​)=1I×J​,(Lk​⊗Rk​)(a,b),(i,j)​=(Lk​)a,i​(Rk​)b,j​.

No nonemptiness assumptions are imposed. In particular, when KKK is empty the condition is 0=1I×J0=\mathbf1_{I\times J}0=1I×J​, which holds exactly when the input indexing type I×JI\times JI×J is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.UnitaryInvariantDistance

For a family DDD assigning an extended real value to each pair of complex square matrices on every finite type with decidable equality, this predicate says that, for every such nonempty type III, every pair σ,ρ\sigma,\rhoσ,ρ of positive semidefinite matrices with complex trace 111, and every unitary matrix UUU indexed by III,

D(UσU†,UρU†)=D(σ,ρ).D(U\sigma U^\dagger,U\rho U^\dagger)=D(\sigma,\rho).D(UσU†,UρU†)=D(σ,ρ).

The equality is required only for these density matrix inputs; no further properties of DDD are assumed.

QAlgorithms.Papers.Independent.Intakenext100.P42.angleState

For any 797979 real parameters a0,…,a78a_0,\ldots,a_{78}a0​,…,a78​, this defines a complex matrix indexed by pairs of Boolean values as

ρ=∑i=015mi2(uiui†)⊗(vivi†),\rho=\sum_{i=0}^{15}m_i^2 \bigl(u_i u_i^\dagger\bigr)\otimes\bigl(v_i v_i^\dagger\bigr),ρ=i=0∑15​mi2​(ui​ui†​)⊗(vi​vi†​),

where, in coordinate order (false,true)(\mathrm{false},\mathrm{true})(false,true),

ui=(cos⁡a15+4isin⁡a15+4i eia16+4i),vi=(cos⁡a17+4isin⁡a17+4i eia18+4i),mi={∏j=014cos⁡aj,i=0,sin⁡ai−1∏j=i14cos⁡aj,1≤i≤15.u_i=\begin{pmatrix}\cos a_{15+4i}\\ \sin a_{15+4i}\,e^{ia_{16+4i}}\end{pmatrix}, \qquad v_i=\begin{pmatrix}\cos a_{17+4i}\\ \sin a_{17+4i}\,e^{ia_{18+4i}}\end{pmatrix}, \qquad m_i= \begin{cases} \displaystyle\prod_{j=0}^{14}\cos a_j,&i=0,\\[3pt] \displaystyle\sin a_{i-1}\prod_{j=i}^{14}\cos a_j,&1\le i\le15. \end{cases}ui​=(cosa15+4i​sina15+4i​eia16+4i​​),vi​=(cosa17+4i​sina17+4i​eia18+4i​​),mi​=⎩⎨⎧​j=0∏14​cosaj​,sinai−1​j=i∏14​cosaj​,​i=0,1≤i≤15.​

Here uu†u u^\daggeruu† has entries uxuy‾u_x\overline{u_y}ux​uy​​, the tensor product has entries (A⊗B)(x,s),(y,t)=Ax,yBs,t(A\otimes B)_{(x,s),(y,t)}=A_{x,y}B_{s,t}(A⊗B)(x,s),(y,t)​=Ax,y​Bs,t​, and an empty product equals 111. No restrictions are imposed on the parameters.

QAlgorithms.Papers.Independent.Intakenext100.P42.bellBasisVector

For each i∈{0,1,2,3}i\in\{0,1,2,3\}i∈{0,1,2,3}, this defines a complex vector indexed by Boolean pairs. Writing 0=false0=\mathrm{false}0=false, 1=true1=\mathrm{true}1=true, and eabe_{ab}eab​ for the vector with coordinate 111 at (a,b)(a,b)(a,b) and 000 elsewhere, its values are

v0=e00+e112,v1=e00−e112,v2=e01+e102,v3=e01−e102.v_0=\frac{e_{00}+e_{11}}{\sqrt2},\qquad v_1=\frac{e_{00}-e_{11}}{\sqrt2},\qquad v_2=\frac{e_{01}+e_{10}}{\sqrt2},\qquad v_3=\frac{e_{01}-e_{10}}{\sqrt2}.v0​=2​e00​+e11​​,v1​=2​e00​−e11​​,v2​=2​e01​+e10​​,v3​=2​e01​−e10​​.

QAlgorithms.Papers.Independent.Intakenext100.P42.bellDiagonal

For any function p:{0,1,2,3}→Rp:\{0,1,2,3\}\to\mathbb Rp:{0,1,2,3}→R, this defines the complex matrix on {false,true}2\{\mathrm{false},\mathrm{true}\}^2{false,true}2 by

∑i=03pi bibi†,\sum_{i=0}^3 p_i\,b_i b_i^\dagger,i=0∑3​pi​bi​bi†​,

where, writing ∣ab⟩|ab\rangle∣ab⟩ for the coordinate vector at (a,b)(a,b)(a,b),

b0=∣00⟩+∣11⟩2,b1=∣00⟩−∣11⟩2,b2=∣01⟩+∣10⟩2,b3=∣01⟩−∣10⟩2,b_0=\frac{|00\rangle+|11\rangle}{\sqrt2},\quad b_1=\frac{|00\rangle-|11\rangle}{\sqrt2},\quad b_2=\frac{|01\rangle+|10\rangle}{\sqrt2},\quad b_3=\frac{|01\rangle-|10\rangle}{\sqrt2},b0​=2​∣00⟩+∣11⟩​,b1​=2​∣00⟩−∣11⟩​,b2​=2​∣01⟩+∣10⟩​,b3​=2​∣01⟩−∣10⟩​,

and 0,10,10,1 denote false and true. Each outer product has entries bi(a,b)bi(c,d)‾b_i(a,b)\overline{b_i(c,d)}bi​(a,b)bi​(c,d)​. There is no assumption that the pip_ipi​ are nonnegative or sum to one.

QAlgorithms.Papers.Independent.Intakenext100.P42.bipartitionProductMatrix

For every natural number NNN, every collection of natural dimensions did_idi​ for i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1}, every subset SSS of these indices, and arbitrary complex matrices XXX and YYY indexed respectively by configurations ∏i∈S{0,…,di−1}\prod_{i\in S}\{0,\ldots,d_i-1\}∏i∈S​{0,…,di​−1} and ∏i∉S{0,…,di−1}\prod_{i\notin S}\{0,\ldots,d_i-1\}∏i∈/S​{0,…,di​−1}, this defines a matrix on all configurations p∈∏i{0,…,di−1}p\in\prod_i\{0,\ldots,d_i-1\}p∈∏i​{0,…,di​−1} by

Zp,q=Xp∣S,q∣S Yp∣Sc,q∣Sc.Z_{p,q}=X_{p|_S,q|_S}\,Y_{p|_{S^c},q|_{S^c}}.Zp,q​=Xp∣S​,q∣S​​Yp∣Sc​,q∣Sc​​.

Neither matrix is required to be positive or normalized. Empty sides are allowed and have a single empty configuration; zero local dimensions are also allowed. In particular, when N=0N=0N=0, all three configuration spaces are singletons and the definition multiplies the sole entries of XXX and YYY.

QAlgorithms.Papers.Independent.Intakenext100.P42.buresEntanglement

For nonempty finite types I,JI,JI,J with decidable equality and an arbitrary complex matrix σ\sigmaσ indexed by I×JI\times JI×J, this definition is the extended-real infimum of

2−2 Re⁡tr⁡(S(S(σ)ρS(σ)))2-2\,\operatorname{Re}\operatorname{tr} \left(\mathcal S\bigl(\mathcal S(\sigma)\rho\mathcal S(\sigma)\bigr)\right)2−2Retr(S(S(σ)ρS(σ)))

over all matrices ρ\rhoρ admitting a finite decomposition ρ=∑a=0q−1wa(Aa⊗Ba)\rho=\sum_{a=0}^{q-1}w_a(A_a\otimes B_a)ρ=∑a=0q−1​wa​(Aa​⊗Ba​), where q∈Nq\in\mathbb Nq∈N, wa≥0w_a\ge0wa​≥0, ∑awa=1\sum_a w_a=1∑a​wa​=1, and each AaA_aAa​ on III and BaB_aBa​ on JJJ is positive semidefinite with trace 111. Here S\mathcal SS is the continuous functional calculus of the real square-root function, and each displayed real value is embedded in the extended reals before taking the infimum. There is no density-matrix assumption on σ\sigmaσ. The decomposition length cannot be zero because the weights sum to 111; the candidate set is nonempty because I,JI,JI,J are nonempty.

QAlgorithms.Papers.Independent.Intakenext100.P42.buresGenerator

For a finite type III with decidable equality and arbitrary complex matrices σ,ρ\sigma,\rhoσ,ρ indexed by III, this definition gives the real number

2−2 Re⁡tr⁡(S(S(σ)ρS(σ))),2-2\,\operatorname{Re}\operatorname{tr} \left(\mathcal S\bigl(\mathcal S(\sigma)\rho\mathcal S(\sigma)\bigr)\right),2−2Retr(S(S(σ)ρS(σ))),

where S(X)\mathcal S(X)S(X) denotes the continuous functional calculus of the real square-root function applied to XXX. Neither matrix is required to be positive semidefinite or trace one; the formula uses the total functional-calculus operation even outside those assumptions. Empty III is included, in which case the trace is zero and the value is 222.

QAlgorithms.Papers.Independent.Intakenext100.P42.correlated

For every real number aaa and complex number bbb, this defines the following complex matrix, with rows and columns ordered as (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true):

(a00b00000000b‾001−a).\begin{pmatrix} a&0&0&b\\ 0&0&0&0\\ 0&0&0&0\\ \overline b&0&0&1-a \end{pmatrix}.​a00b​0000​0000​b001−a​​.

No bounds on aaa or bbb are assumed.

QAlgorithms.Papers.Independent.Intakenext100.P42.correlatedEigenvalue

For any real number aaa, complex number bbb, and Boolean value ppp, this defines the real number

{1+(2a−1)2+4∣b∣22,p=true,1−(2a−1)2+4∣b∣22,p=false,\begin{cases} \displaystyle\frac{1+\sqrt{(2a-1)^2+4|b|^2}}2,&p=\mathrm{true},\\[6pt] \displaystyle\frac{1-\sqrt{(2a-1)^2+4|b|^2}}2,&p=\mathrm{false}, \end{cases}⎩⎨⎧​21+(2a−1)2+4∣b∣2​​,21−(2a−1)2+4∣b∣2​​,​p=true,p=false,​

where ∣b∣2=(Re⁡b)2+(Im⁡b)2|b|^2=(\operatorname{Re}b)^2+(\operatorname{Im}b)^2∣b∣2=(Reb)2+(Imb)2. Neither aaa nor bbb is restricted.

QAlgorithms.Papers.Independent.Intakenext100.P42.correlatedMinimum

For every real number aaa, this defines the complex diagonal matrix

diag⁡(a,0,0,1−a)\operatorname{diag}(a,0,0,1-a)diag(a,0,0,1−a)

in the ordered basis (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true). The parameter aaa is unrestricted.

QAlgorithms.Papers.Independent.Intakenext100.P42.entanglementIndicator

For nonempty finite types I,JI,JI,J and an arbitrary complex matrix σ\sigmaσ indexed by I×JI\times JI×J, this definition returns the extended-real value 000 precisely when there exist q∈Nq\in\mathbb Nq∈N, nonnegative real weights waw_awa​ summing to 111, and positive semidefinite trace-one matrices AaA_aAa​ on III and BaB_aBa​ on JJJ such that σ=∑a=0q−1wa(Aa⊗Ba)\sigma=\sum_{a=0}^{q-1}w_a(A_a\otimes B_a)σ=∑a=0q−1​wa​(Aa​⊗Ba​); otherwise it returns 111. No density-matrix hypothesis is imposed on the input, so matrices without such a decomposition also receive 111. The weight-sum condition excludes q=0q=0q=0.

QAlgorithms.Papers.Independent.Intakenext100.P42.exampleOneInput

For every real number ttt, this defines the following complex matrix, with rows and columns ordered as (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true):

(t/200t/201−t000000t/200t/2).\begin{pmatrix} t/2&0&0&t/2\\ 0&1-t&0&0\\ 0&0&0&0\\ t/2&0&0&t/2 \end{pmatrix}.​t/200t/2​01−t00​0000​t/200t/2​​.

There is no assumption that ttt lies in [0,1][0,1][0,1].

QAlgorithms.Papers.Independent.Intakenext100.P42.exampleOneMinimum

For every real number ttt, this defines the following complex matrix, with rows and columns ordered as (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true):

(t2(1−t2)00t2(1−t2)0(1−t2)20000t2/40t2(1−t2)00t2(1−t2)).\begin{pmatrix} \frac t2(1-\frac t2)&0&0&\frac t2(1-\frac t2)\\ 0&(1-\frac t2)^2&0&0\\ 0&0&t^2/4&0\\ \frac t2(1-\frac t2)&0&0&\frac t2(1-\frac t2) \end{pmatrix}.​2t​(1−2t​)002t​(1−2t​)​0(1−2t​)200​00t2/40​2t​(1−2t​)002t​(1−2t​)​​.

The parameter ttt is unrestricted.

QAlgorithms.Papers.Independent.Intakenext100.P42.exampleTwoInput

For every real number ttt, this defines the following complex matrix, with rows and columns ordered as (false,false),(false,true),(true,false),(true,true)(\mathrm{false},\mathrm{false}),(\mathrm{false},\mathrm{true}),(\mathrm{true},\mathrm{false}),(\mathrm{true},\mathrm{true})(false,false),(false,true),(true,false),(true,true):

(1−t/200t/200000000t/200t/2).\begin{pmatrix} 1-t/2&0&0&t/2\\ 0&0&0&0\\ 0&0&0&0\\ t/2&0&0&t/2 \end{pmatrix}.​1−t/200t/2​0000​0000​t/200t/2​​.

There is no assumption that ttt lies in [0,1][0,1][0,1].

QAlgorithms.Papers.Independent.Intakenext100.P42.finiteSchmidtEntropyNats

For finite types I,J,KI,J,KI,J,K and data sss comprising nonnegative weights wkw_kwk​ with ∑kwk=1\sum_k w_k=1∑k​wk​=1 and orthonormal families uk∈CIu_k\in\mathbb C^Iuk​∈CI, vk∈CJv_k\in\mathbb C^Jvk​∈CJ, the declared real number is −∑k∈Kwkln⁡wk-\sum_{k\in K}w_k\ln w_k−∑k∈K​wk​lnwk​. The logarithm is the real natural logarithm, whose total definition has ln⁡0=0\ln0=0ln0=0, so a zero weight contributes zero. The vector families do not occur in this formula but remain part of the required data; such data cannot exist if any of I,J,KI,J,KI,J,K is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.finiteSchmidtVector

For finite types I,J,KI,J,KI,J,K and data sss consisting of weights wk≥0w_k\ge0wk​≥0 with ∑kwk=1\sum_k w_k=1∑k​wk​=1 and orthonormal families uk∈CIu_k\in\mathbb C^Iuk​∈CI, vk∈CJv_k\in\mathbb C^Jvk​∈CJ, the declared vector in the Euclidean space CI×J\mathbb C^{I\times J}CI×J has coordinates

ψ(i,j)=∑k∈Kwk uk(i)vk(j).\psi(i,j)=\sum_{k\in K}\sqrt{w_k}\,u_k(i)v_k(j).ψ(i,j)=k∈K∑​wk​​uk​(i)vk​(j).

The square roots are real and are then regarded as complex scalars; neither vector coordinate is conjugated. Zero weights are allowed, while the normalization and orthonormality requirements prevent such data from existing if I,JI,JI,J, or KKK is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.formationNats

For finite types I,JI,JI,J with decidable equality and an arbitrary complex matrix σ\sigmaσ indexed by I×JI\times JI×J, this definition takes an infimum in the extended reals over all finite decompositions

σ=∑k=0m−1wkψkψk†,m∈N,wk≥0,∑kwk=1,∥ψk∥=1,\sigma=\sum_{k=0}^{m-1}w_k\psi_k\psi_k^\dagger, \qquad m\in\mathbb N,\quad w_k\ge0,\quad \sum_k w_k=1,\quad \|\psi_k\|=1,σ=k=0∑m−1​wk​ψk​ψk†​,m∈N,wk​≥0,k∑​wk​=1,∥ψk​∥=1,

where ψk∈CI×J\psi_k\in\mathbb C^{I\times J}ψk​∈CI×J. The value associated with a decomposition is the real number ∑kwkH(Rk)\sum_k w_k H(R_k)∑k​wk​H(Rk​), embedded in the extended reals, where

(Rk)j,j′=∑i∈Iψk(i,j)ψk(i,j′)‾,H(R)=−Re⁡tr⁡(f(R)),f(x)=xln⁡x,(R_k)_{j,j'}=\sum_{i\in I}\psi_k(i,j)\overline{\psi_k(i,j')}, \qquad H(R)=-\operatorname{Re}\operatorname{tr}\bigl(f(R)\bigr), \quad f(x)=x\ln x,(Rk​)j,j′​=i∈I∑​ψk​(i,j)ψk​(i,j′)​,H(R)=−Retr(f(R)),f(x)=xlnx,

and f(R)f(R)f(R) is formed using the continuous functional calculus. No density-matrix hypothesis is imposed on σ\sigmaσ; if no decomposition satisfies these conditions, the infimum is +∞+\infty+∞. The case m=0m=0m=0 cannot satisfy the weight-sum condition, and if III or JJJ is empty no admissible decomposition exists. Zero weights are allowed, but even their vectors must have norm 111.

QAlgorithms.Papers.Independent.Intakenext100.P42.groupedStateProduct

For a finite type TTT, arbitrary families of types It,JtI_t,J_tIt​,Jt​ indexed by t∈Tt\in Tt∈T, and arbitrary complex matrices σt\sigma_tσt​ indexed by It×JtI_t\times J_tIt​×Jt​, this definition gives a matrix indexed by (∏tIt)×(∏tJt)(\prod_t I_t)\times(\prod_t J_t)(∏t​It​)×(∏t​Jt​), with entries

Σ(i,j),(i′,j′)=∏t∈T(σt)(it,jt),(it′,jt′).\Sigma_{(i,j),(i',j')}= \prod_{t\in T}(\sigma_t)_{(i_t,j_t),(i'_t,j'_t)}.Σ(i,j),(i′,j′)​=t∈T∏​(σt​)(it​,jt​),(it′​,jt′​)​.

The types It,JtI_t,J_tIt​,Jt​ need not be finite or nonempty, and the matrices have no positivity or normalization requirements. If TTT is empty, both function spaces have one element and the empty product is 111, so the resulting matrix has its single entry equal to 111.

QAlgorithms.Papers.Independent.Intakenext100.P42.kernelG

For arbitrary real numbers p,qp,qp,q, this definition gives

G(p,q)={0,p=0 or q=0,1,p=q and both are nonzero,pq ln⁡(q/p)q−p,p≠q and both are nonzero.G(p,q)= \begin{cases} 0,&p=0\text{ or }q=0,\\ 1,&p=q\text{ and both are nonzero},\\ \dfrac{\sqrt{pq}\,\ln(q/p)}{q-p},&p\ne q\text{ and both are nonzero}. \end{cases}G(p,q)=⎩⎨⎧​0,1,q−ppq​ln(q/p)​,​p=0 or q=0,p=q and both are nonzero,p=q and both are nonzero.​

There is no positivity assumption on either argument: equal negative arguments give 111, and arguments of opposite signs give 000, since the real square root of a negative number is defined as zero. The real logarithm is total, with ln⁡x=ln⁡∣x∣\ln x=\ln|x|lnx=ln∣x∣ for negative xxx.

QAlgorithms.Papers.Independent.Intakenext100.P42.localBell

For any two complex unitary matrices U,VU,VU,V indexed by the Booleans, this defines the vector

(U⊗V)∣00⟩+∣11⟩2(U\otimes V)\frac{|00\rangle+|11\rangle}{\sqrt2}(U⊗V)2​∣00⟩+∣11⟩​

in the complex Euclidean space indexed by pairs of Booleans. Here ∣ab⟩|ab\rangle∣ab⟩ is the coordinate vector at (a,b)(a,b)(a,b), with 0,10,10,1 denoting false and true; explicitly, its coordinate at (a,b)(a,b)(a,b) is

Ua,0Vb,0+Ua,1Vb,12.\frac{U_{a,0}V_{b,0}+U_{a,1}V_{b,1}}{\sqrt2}.2​Ua,0​Vb,0​+Ua,1​Vb,1​​.

QAlgorithms.Papers.Independent.Intakenext100.P42.mixingAmplitude

For any real angles α0,…,α14\alpha_0,\ldots,\alpha_{14}α0​,…,α14​ and any index i∈{0,…,15}i\in\{0,\ldots,15\}i∈{0,…,15}, this defines the real number

mi={∏j=014cos⁡αj,i=0,sin⁡αi−1∏j=i14cos⁡αj,1≤i≤15.m_i= \begin{cases} \displaystyle\prod_{j=0}^{14}\cos\alpha_j,&i=0,\\[4pt] \displaystyle\sin\alpha_{i-1}\prod_{j=i}^{14}\cos\alpha_j,&1\le i\le15. \end{cases}mi​=⎩⎨⎧​j=0∏14​cosαj​,sinαi−1​j=i∏14​cosαj​,​i=0,1≤i≤15.​

The product is empty and equals 111 when i=15i=15i=15, so m15=sin⁡α14m_{15}=\sin\alpha_{14}m15​=sinα14​; all angles are unrestricted.

QAlgorithms.Papers.Independent.Intakenext100.P42.normalizedBranch

For finite types I,JI,JI,J, an arbitrary type KKK, a family of complex matrices Vk∈CJ×IV_k\in\mathbb C^{J\times I}Vk​∈CJ×I, an arbitrary matrix σ∈CI×I\sigma\in\mathbb C^{I\times I}σ∈CI×I, and k∈Kk\in Kk∈K, define Bk=VkσVk†B_k=V_k\sigma V_k^\daggerBk​=Vk​σVk†​ and pk=Re⁡tr⁡(Bk)p_k=\operatorname{Re}\operatorname{tr}(B_k)pk​=Retr(Bk​). The declared matrix is pk−1Bkp_k^{-1}B_kpk−1​Bk​, with the real scalar pk−1p_k^{-1}pk−1​ regarded as complex. There is no positivity, normalization, or completeness assumption on σ\sigmaσ or VVV, and KKK need not be finite. The inverse is total: if pk=0p_k=0pk​=0, the result is the zero matrix.

QAlgorithms.Papers.Independent.Intakenext100.P42.partyKraus

For every natural number NNN, every collection of natural dimensions did_idi​, and every family of complex square matrices AiA_iAi​ indexed by {0,…,di−1}\{0,\ldots,d_i-1\}{0,…,di​−1}, this defines the matrix on configurations p∈∏i{0,…,di−1}p\in\prod_i\{0,\ldots,d_i-1\}p∈∏i​{0,…,di​−1} by

Kp,q=∏i=0N−1(Ai)pi,qi.K_{p,q}=\prod_{i=0}^{N-1}(A_i)_{p_i,q_i}.Kp,q​=i=0∏N−1​(Ai​)pi​,qi​​.

No positivity, unitarity, or Kraus completeness condition is imposed on the family. Zero dimensions are allowed; when N=0N=0N=0, the configuration space is a singleton and the sole matrix entry is the empty product 111.

QAlgorithms.Papers.Independent.Intakenext100.P42.qubitAngle

For arbitrary real numbers θ\thetaθ and φ\varphiφ, this defines a complex vector indexed by Boolean values, with coordinates

vfalse=cos⁡θ,vtrue=sin⁡θ eiφ.v_{\mathrm{false}}=\cos\theta,\qquad v_{\mathrm{true}}=\sin\theta\,e^{i\varphi}.vfalse​=cosθ,vtrue​=sinθeiφ.

Neither real parameter is restricted.

QAlgorithms.Papers.Independent.Intakenext100.P42.qubitMatrixUnit

For any Boolean values a,b,c,da,b,c,da,b,c,d, this defines the complex matrix indexed by Boolean pairs whose entry in row (a,b)(a,b)(a,b) and column (c,d)(c,d)(c,d) is 111, with every other entry 000.

QAlgorithms.Papers.Independent.Intakenext100.P42.rectangularKrausBranch

For finite types I,JI,JI,J, an arbitrary type KKK, a family Vk∈CJ×IV_k\in\mathbb C^{J\times I}Vk​∈CJ×I, any complex matrix σ\sigmaσ indexed by III, and any k∈Kk\in Kk∈K, this defines the complex matrix indexed by JJJ to be VkσVk†V_k\sigma V_k^\daggerVk​σVk†​. No positivity, trace, normalization, or completeness condition is imposed on σ\sigmaσ or the family VVV, and KKK need not be finite. Empty III or empty JJJ is allowed; in either case the resulting matrix is zero.

QAlgorithms.Papers.Independent.Intakenext100.P42.rectangularKrausProbability

For finite types I,JI,JI,J, an arbitrary type KKK, a family Vk∈CJ×IV_k\in\mathbb C^{J\times I}Vk​∈CJ×I, any complex matrix σ\sigmaσ indexed by III, and any k∈Kk\in Kk∈K, this defines the real number

Re⁡tr⁡(VkσVk†).\operatorname{Re}\operatorname{tr}(V_k\sigma V_k^\dagger).Retr(Vk​σVk†​).

No positivity, trace, normalization, or completeness hypotheses are imposed, so the definition does not require this number to lie in [0,1][0,1][0,1]. The type KKK need not be finite, and empty III or empty JJJ is allowed, giving value 000.

QAlgorithms.Papers.Independent.Intakenext100.P42.relativeEntanglementNats

For finite, nonempty types I,JI,JI,J, each with decidable equality, and any complex matrix σ\sigmaσ indexed by I×JI\times JI×J, this defines the extended real number

inf⁡ρ separable densityR(σ,ρ).\inf_{\rho\text{ separable density}} R(\sigma,\rho).ρ separable densityinf​R(σ,ρ).

Here a separable density matrix is a matrix admitting a finite decomposition ρ=∑j=0q−1wj(Aj⊗Bj)\rho=\sum_{j=0}^{q-1}w_j(A_j\otimes B_j)ρ=∑j=0q−1​wj​(Aj​⊗Bj​), where q∈Nq\in\mathbb Nq∈N, the real weights satisfy wj≥0w_j\ge0wj​≥0 and ∑jwj=1\sum_jw_j=1∑j​wj​=1, and every AjA_jAj​ and BjB_jBj​ is positive semidefinite with complex trace 111, indexed by III and JJJ, respectively. The weight condition excludes q=0q=0q=0. The quantity R(σ,ρ)R(\sigma,\rho)R(σ,ρ) equals

Re⁡tr⁡ ⁣(f(σ)−σlog⁡(ρ)),f(x)=xln⁡x,\operatorname{Re}\operatorname{tr}\!\left(f(\sigma)-\sigma\log(\rho)\right), \qquad f(x)=x\ln x,Retr(f(σ)−σlog(ρ)),f(x)=xlnx,

when ker⁡ρ⊆ker⁡σ\ker\rho\subseteq\ker\sigmakerρ⊆kerσ, and equals +∞+\infty+∞ otherwise; both matrix functions use the continuous functional calculus supplied by the code. No positivity, Hermiticity, or trace condition is imposed on σ\sigmaσ, and the definition makes no attainment assertion.

QAlgorithms.Papers.Independent.Intakenext100.P42.schmidtDiagonal

For finite types I,J,KI,J,KI,J,K and data sss consisting of weights wk≥0w_k\ge0wk​≥0 summing to 111 and orthonormal families uk∈CIu_k\in\mathbb C^Iuk​∈CI, vk∈CJv_k\in\mathbb C^Jvk​∈CJ, this definition gives the matrix

D=∑k∈Kwk (ukuk†)⊗(vkvk†),D(i,j),(i′,j′)=∑k∈Kwk uk(i)uk(i′)‾ vk(j)vk(j′)‾.D=\sum_{k\in K}w_k\,(u_ku_k^\dagger)\otimes(v_kv_k^\dagger), \qquad D_{(i,j),(i',j')}= \sum_{k\in K}w_k\,u_k(i)\overline{u_k(i')}\,v_k(j)\overline{v_k(j')}.D=k∈K∑​wk​(uk​uk†​)⊗(vk​vk†​),D(i,j),(i′,j′)​=k∈K∑​wk​uk​(i)uk​(i′)​vk​(j)vk​(j′)​.

The weights are regarded as complex scalars when multiplying matrices. Zero weights are permitted; no such data sss exist if any of I,J,KI,J,KI,J,K is empty.

QAlgorithms.Papers.Independent.Intakenext100.P42.singletWernerState

For every real fff, this defines the complex matrix

f ss†+1−f3(I−ss†)on {false,true}2,s=∣01⟩−∣10⟩2,f\,ss^\dagger+\frac{1-f}{3}(I-ss^\dagger) \quad\text{on }\{\mathrm{false},\mathrm{true}\}^2, \qquad s=\frac{|01\rangle-|10\rangle}{\sqrt2},fss†+31−f​(I−ss†)on {false,true}2,s=2​∣01⟩−∣10⟩​,

where ∣ab⟩|ab\rangle∣ab⟩ is the coordinate vector at (a,b)(a,b)(a,b), 0,10,10,1 denote false and true, III is the identity matrix, and (ss†)u,v=susv‾(ss^\dagger)_{u,v}=s_u\overline{s_v}(ss†)u,v​=su​sv​​. The parameter fff is unrestricted; membership in [0,1][0,1][0,1] is not required.

QAlgorithms.Papers.Independent.Intakenext100.P42.twoQubitMaxEntangledFraction

For an arbitrary complex matrix σ\sigmaσ indexed by pairs of Booleans, this defines the real supremum

sup⁡U,V∈U(2)Re⁡tr⁡ ⁣(χU,VχU,V†σ),χU,V=(U⊗V)∣00⟩+∣11⟩2,\sup_{U,V\in\mathrm U(2)} \operatorname{Re}\operatorname{tr}\!\left(\chi_{U,V}\chi_{U,V}^\dagger\sigma\right), \qquad \chi_{U,V}=(U\otimes V)\frac{|00\rangle+|11\rangle}{\sqrt2},U,V∈U(2)sup​Retr(χU,V​χU,V†​σ),χU,V​=(U⊗V)2​∣00⟩+∣11⟩​,

where ∣ab⟩|ab\rangle∣ab⟩ is the coordinate vector at (a,b)(a,b)(a,b), 0,10,10,1 denote false and true, and (χχ†)u,v=χuχv‾(\chi\chi^\dagger)_{u,v}=\chi_u\overline{\chi_v}(χχ†)u,v​=χu​χv​​. No positivity, Hermiticity, or trace normalization is assumed for σ\sigmaσ.

QAlgorithms.Papers.Independent.Intakenext100.P42.wernerValue

For every real fff, this defines

{0,f≤12,flog⁡f+(1−f)log⁡(1−f)+log⁡2,f>12.\begin{cases} 0,&f\le \tfrac12,\\ f\log f+(1-f)\log(1-f)+\log2,&f>\tfrac12. \end{cases}{0,flogf+(1−f)log(1−f)+log2,​f≤21​,f>21​.​

The logarithms are natural logarithms using the total real logarithm, for which log⁡0=0\log0=0log0=0 and log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣ when x<0x<0x<0. Thus the definition includes f>1f>1f>1, and at f=1f=1f=1 its value is log⁡2\log2log2.

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

    Confirmed by the moderator at approval.

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