Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Random quantum circuits are approximate unitary ttt-designs in depth O(nt5+o(1))O\left(nt^{5+o(1)}\right)O(nt5+o(1))

Definition
QAlgorithms_Papers_Independent_Extend50_P45

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

prove2quantum

The objects the formalized statements of Random quantum circuits are approximate unitary ttt-designs in depth O(nt5+o(1))O\left(nt^{5+o(1)}\right)O(nt5+o(1)) (arXiv:2203.16571) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • QMat: PDF pp.2–4: matrices in the frozen most-significant-wire-first qubit basis.
  • haarLaw: PDF p.3: normalized Haar law in the frozen bit-string coordinates.
  • convolve: PDF p.3, Eq.(4): independent composition, the right factor acts first.
  • steps: PDF p.3, Eq.(4): k independent steps; zero steps is the identity.
  • nextWire: PDF p.4, Definition 2: successor on the periodic ring.
  • edgeLift: PDF p.4: lift a two-qubit matrix to the ordered edge (i,i+1). The outside coordinates are left unchanged. Only n >= 2 is used in results.
  • edgeLaw: PDF p.4: independent Haar U(4) on the chosen edge.
  • localHaarRingLaw: PDF p.4, Definition 2(1): each of the n oriented adjacent pairs has weight 1/n. For n=2 the two oriented copies are retained. The unused n=0 extension is zero.
  • matchingLaw: PDF p.4, Definition 2(2): a parity matching with independent gates. For even n, parity zero gives (1,2),(3,4),... and parity one ends in (n,1).
  • brickworkLaw: PDF p.4: one brickwork step consists of the even matching followed by the odd matching, hence TWO parallel gate layers. All gates are independent.
  • qubitTensorPower: PDF p.3, Eq.(3): tensor-power matrix, including the empty tensor product.
  • balancedUnitaryMoment: PDF p.3, Eqs.(2)–(3): U^tensor(t) tensor conjugate(U)^tensor(t), entrywise expectation; vec(|i><j|)=|i> tensor |j>. Circuit integrands are continuous and bounded on their compact unitary supports.
  • momentDistance: PDF p.3, Eq.(2): Schatten infinity norm relative to the Haar moment.
  • unitaryMomentTwirl: PDF p.2, Eq.(1): twirl reconstructed from its vectorized moment matrix.
  • twirlDiamondDistance: PDF p.3: stabilized induced trace norm (no factor 1/2), using a reference of input dimension. For these finite-dimensional linear maps the unit-ball image is bounded and nonempty.
  • IsApproximateDesign: PDF p.3, Definition 1(1), Eq.(5): the additive diamond error is epsilon/2^(nt).
  • momentHamiltonian: PDF p.4, Eq.(9): sum of complementary two-site Haar moment projections. The formula n(I-M(local,t)) equals that sum; ground-space multiplicity is unrestricted.
  • reductionLength: PDF p.7, Observation 1: the ceiling, including the square-root correction.
  • designFactor: PDF pp.7–8: the exact noninteger exponent; used only at integer t >= 2.
  • cliffordLaw: PDF pp.4,9: uniform GLOBAL Clifford law modulo phase, using the frozen full normalizer quotient. The finite enumeration is a representation of the whole group, never a caller-selected subset or a hypothesis about spectral mixing.
  • firstWireLift: PDF p.9: Haar U(2) on the first wire and identity on every other wire.
  • auxiliaryLaw: PDF p.9, Eq.(26): two independent global Cliffords sandwich first-wire Haar. Scalar choices of Clifford representatives are absorbed by the Haar U(2) factor.
  • cliffordBrickworkLaw: PDF p.13: Clifford brickwork, with independent uniform TWO-qubit Clifford gates.
  • couplingCosts: PDF p.10, Eq.(28): probability couplings with the two prescribed marginals. Finite second moment is explicit; on the unitary supports it is automatic.
  • frobeniusWasserstein: PDF p.10, Eq.(28): Wasserstein-2 for the Frobenius CHORD distance. For the laws used here product coupling makes the set nonempty; costs lie in [0,2 sqrt(2^n)], so the real infimum never uses an empty/unbounded default.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Basic
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_SchurUnitaryEnsembles
import Definitions.Def_QAlgorithms_Defs_ProjectiveCliffords

noncomputable section

open MeasureTheory
open scoped ComplexConjugate ENNReal

namespace QAlgorithms.Papers.Independent.Extend50.P45

/-- PDF pp.2–4: matrices in the frozen most-significant-wire-first qubit basis. -/
abbrev QMat (n : ℕ) := Matrix (Qubits n) (Qubits n) ℂ

/-- PDF pp.2–3: the Borel sigma-algebra of the finite-dimensional matrix space.
All circuit measures below are supported on unitaries on their stated domains. -/
local instance qubitMatrixMeasurable (n : ℕ) : MeasurableSpace (QMat n) := borel _

/-- PDF pp.2–3: measurability uses exactly the matrix topology's Borel sets. -/
local instance qubitMatrixBorel (n : ℕ) : BorelSpace (QMat n) := ⟨rfl⟩

/-- PDF p.3: normalized Haar law in the frozen bit-string coordinates. -/
def haarLaw (n : ℕ) : Measure (QMat n) :=
  Measure.map (fun U : Matrix.unitaryGroup (Fin (2 ^ n)) ℂ =>
    (fun x y => U.val (bitsEquivFin n x) (bitsEquivFin n y) : QMat n))
    (Schur.unitaryHaar (2 ^ n))

/-- PDF p.3, Eq.(4): independent composition, the right factor acts first. -/
def convolve {n : ℕ} (mu nu : Measure (QMat n)) : Measure (QMat n) :=
  Measure.map (fun p : QMat n × QMat n => p.1 * p.2) (mu.prod nu)

/-- PDF p.3, Eq.(4): k independent steps; zero steps is the identity. -/
def steps {n : ℕ} (mu : Measure (QMat n)) : ℕ → Measure (QMat n)
  | 0 => Measure.dirac (1 : QMat n)
  | k + 1 => convolve mu (steps mu k)

/-- PDF p.4, Definition 2: successor on the periodic ring. -/
def nextWire {n : ℕ} (i : Fin n) : Fin n :=
  if h : i.val + 1 < n then ⟨i.val + 1, h⟩
  else ⟨0, lt_of_le_of_lt (Nat.zero_le i.val) i.isLt⟩

/-- PDF p.4: lift a two-qubit matrix to the ordered edge (i,i+1).
The outside coordinates are left unchanged. Only n >= 2 is used in results. -/
def edgeLift {n : ℕ} (i : Fin n) (U : QMat 2) : QMat n :=
  fun x y => if ∀ q, q ≠ i → q ≠ nextWire i → x q = y q then
    U (fun j => if j.val = 0 then x i else x (nextWire i))
      (fun j => if j.val = 0 then y i else y (nextWire i)) else 0

/-- PDF p.4: independent Haar U(4) on the chosen edge. -/
def edgeLaw {n : ℕ} (i : Fin n) : Measure (QMat n) :=
  Measure.map (edgeLift i) (haarLaw 2)

/-- PDF p.4, Definition 2(1): each of the n oriented adjacent pairs has weight 1/n.
For n=2 the two oriented copies are retained. The unused n=0 extension is zero. -/
def localHaarRingLaw (n : ℕ) : Measure (QMat n) :=
  (n : ℝ≥0∞)⁻¹ • ∑ i : Fin n, edgeLaw i

/-- PDF p.4, Definition 2(2): a parity matching with independent gates.
For even n, parity zero gives (1,2),(3,4),... and parity one ends in (n,1). -/
def matchingLaw (n parity : ℕ) (gateLaw : Measure (QMat 2)) : Measure (QMat n) :=
  ((List.finRange n).filter (fun i => i.val % 2 == parity)).foldl
    (fun mu i => convolve (Measure.map (edgeLift i) gateLaw) mu) (Measure.dirac (1 : QMat n))

/-- PDF p.4: one brickwork step consists of the even matching followed by the odd
matching, hence TWO parallel gate layers. All gates are independent. -/
def brickworkLaw (n : ℕ) : Measure (QMat n) :=
  convolve (matchingLaw n 1 (haarLaw 2)) (matchingLaw n 0 (haarLaw 2))

/-- PDF p.3, Eq.(3): tensor-power matrix, including the empty tensor product. -/
def qubitTensorPower {n : ℕ} (t : ℕ) (U : QMat n) :
    Matrix (Fin t → Qubits n) (Fin t → Qubits n) ℂ :=
  fun x y => ∏ j, U (x j) (y j)

/-- PDF p.3, Eqs.(2)–(3): U^tensor(t) tensor conjugate(U)^tensor(t),
entrywise expectation; vec(|i><j|)=|i> tensor |j>. Circuit integrands are
continuous and bounded on their compact unitary supports. -/
def balancedUnitaryMoment {n : ℕ} (mu : Measure (QMat n)) (t : ℕ) :
    Matrix ((Fin t → Qubits n) × (Fin t → Qubits n))
      ((Fin t → Qubits n) × (Fin t → Qubits n)) ℂ :=
  fun x y => ∫ U, qubitTensorPower t U x.1 y.1 *
    conj (qubitTensorPower t U x.2 y.2) ∂mu

/-- PDF p.3, Eq.(2): Schatten infinity norm relative to the Haar moment. -/
def momentDistance {n : ℕ} (mu : Measure (QMat n)) (t : ℕ) : ℝ :=
  specNorm (balancedUnitaryMoment mu t - balancedUnitaryMoment (haarLaw n) t)

/-- PDF p.2, Eq.(1): twirl reconstructed from its vectorized moment matrix. -/
def unitaryMomentTwirl {n : ℕ} (mu : Measure (QMat n)) (t : ℕ)
    (A : Matrix (Fin t → Qubits n) (Fin t → Qubits n) ℂ) :
    Matrix (Fin t → Qubits n) (Fin t → Qubits n) ℂ :=
  fun x y => ∑ a, ∑ b, balancedUnitaryMoment mu t (x,y) (a,b) * A a b

/-- PDF p.3: stabilized induced trace norm (no factor 1/2), using a reference of
input dimension. For these finite-dimensional linear maps the unit-ball image is
bounded and nonempty. -/
def twirlDiamondDistance {n : ℕ} (mu nu : Measure (QMat n)) (t : ℕ) : ℝ :=
  sSup {v : ℝ | ∃ X : Matrix
    ((Fin t → Qubits n) × (Fin t → Qubits n))
    ((Fin t → Qubits n) × (Fin t → Qubits n)) ℂ,
    traceNorm X ≤ 1 ∧ v = traceNorm
      (idTensorSuperop (R := Fin t → Qubits n)
        (fun A => unitaryMomentTwirl mu t A - unitaryMomentTwirl nu t A) X)}

/-- PDF p.3, Definition 1(1), Eq.(5): the additive diamond error is epsilon/2^(nt). -/
def IsApproximateDesign {n : ℕ} (mu : Measure (QMat n)) (t : ℕ) (epsilon : ℝ) : Prop :=
  twirlDiamondDistance mu (haarLaw n) t ≤ epsilon / (2 : ℝ) ^ (n * t)

/-- PDF p.4, Eq.(9): sum of complementary two-site Haar moment projections.
The formula n(I-M(local,t)) equals that sum; ground-space multiplicity is unrestricted. -/
def momentHamiltonian (n t : ℕ) :
    Matrix ((Fin t → Qubits n) × (Fin t → Qubits n))
      ((Fin t → Qubits n) × (Fin t → Qubits n)) ℂ :=
  (n : ℂ) • (1 - balancedUnitaryMoment (localHaarRingLaw n) t)

/-- PDF p.7, Observation 1: the ceiling, including the square-root correction. -/
def reductionLength (t : ℕ) : ℕ :=
  ⌈2 * Real.logb 2 (4 * (t : ℝ)) +
    (3 / 2 : ℝ) * Real.sqrt (Real.logb 2 (4 * (t : ℝ)))⌉₊

/-- PDF pp.7–8: the exact noninteger exponent; used only at integer t >= 2. -/
def designFactor (t : ℕ) : ℝ :=
  Real.log (t : ℝ) ^ 5 *
    (t : ℝ) ^ (4 + 3 / Real.sqrt (Real.logb 2 (t : ℝ)))

/-- PDF pp.4,9: uniform GLOBAL Clifford law modulo phase, using the frozen full
normalizer quotient. The finite enumeration is a representation of the whole group,
never a caller-selected subset or a hypothesis about spectral mixing. -/
def cliffordLaw (n : ℕ) [Fintype (Clifford.ProjectiveGroup n)] : Measure (QMat n) :=
  ∑ C : Clifford.ProjectiveGroup n,
    (Clifford.uniformGlobalEnsemble n C) •
      Measure.dirac ((Clifford.representative C).val.val)

/-- PDF p.9: Haar U(2) on the first wire and identity on every other wire. -/
def firstWireLift (n : ℕ) (U : QMat 1) : QMat n :=
  fun x y => if h : 0 < n then
    if ∀ q : Fin n, q.val ≠ 0 → x q = y q then
      U (fun _ => x ⟨0,h⟩) (fun _ => y ⟨0,h⟩) else 0
    else (1 : QMat n) x y

/-- PDF p.9, Eq.(26): two independent global Cliffords sandwich first-wire Haar.
Scalar choices of Clifford representatives are absorbed by the Haar U(2) factor. -/
def auxiliaryLaw (n : ℕ) [Fintype (Clifford.ProjectiveGroup n)] : Measure (QMat n) :=
  convolve (cliffordLaw n)
    (convolve (Measure.map (firstWireLift n) (haarLaw 1)) (cliffordLaw n))

/-- PDF p.13: Clifford brickwork, with independent uniform TWO-qubit Clifford gates. -/
def cliffordBrickworkLaw (n : ℕ) [Fintype (Clifford.ProjectiveGroup 2)] : Measure (QMat n) :=
  convolve (matchingLaw n 1 (cliffordLaw 2)) (matchingLaw n 0 (cliffordLaw 2))

/-- PDF p.10, Eq.(28): probability couplings with the two prescribed marginals.
Finite second moment is explicit; on the unitary supports it is automatic. -/
def couplingCosts {n : ℕ} (mu nu : Measure (QMat n)) : Set ℝ :=
  {v | ∃ gamma : Measure (QMat n × QMat n), IsProbabilityMeasure gamma ∧
    Measure.map Prod.fst gamma = mu ∧ Measure.map Prod.snd gamma = nu ∧
    Integrable (fun p => frobNorm (p.1 - p.2) ^ 2) gamma ∧
    v = Real.sqrt (∫ p, frobNorm (p.1 - p.2) ^ 2 ∂gamma)}

/-- PDF p.10, Eq.(28): Wasserstein-2 for the Frobenius CHORD distance.
For the laws used here product coupling makes the set nonempty; costs lie in
[0,2 sqrt(2^n)], so the real infimum never uses an empty/unbounded default. -/
def frobeniusWasserstein {n : ℕ} (mu nu : Measure (QMat n)) : ℝ :=
  sInf (couplingCosts mu nu)

/-! The short names flagged by the prior checker belong to unrelated accepted
objects (finite classical laws/marginals, a fixed rational sign-count tensor,
coherence moments, and task-specific twirls). They are not replacements for these
paper-specific constructions. See ASSESSMENT.json and MODERATION_NOTES.md. -/

/-! Definitional sanity examples. No theorem proofs are attempted. -/

example {n : ℕ} (mu : Measure (QMat n)) : steps mu 0 = Measure.dirac (1 : QMat n) := rfl

example {n : ℕ} (mu : Measure (QMat n)) (k : ℕ) :
    steps mu (k + 1) = convolve mu (steps mu k) := rfl

example {n : ℕ} (U : QMat n) (x y : Fin 0 → Qubits n) :
    qubitTensorPower 0 U x y = 1 := by simp [qubitTensorPower]

example : nextWire (n := 2) (0 : Fin 2) = 1 := rfl

example : nextWire (n := 2) (1 : Fin 2) = 0 := rfl

example (U : QMat 1) (x y : Qubits 1) :
    firstWireLift 1 U x y = U (fun _ => x 0) (fun _ => y 0) := by
  have hout : ∀ q : Fin 1, q.val ≠ 0 → x q = y q := by
    intro q hq
    have hz : q.val = 0 := by omega
    exact (hq hz).elim
  simp [firstWireLift, hout]

example (n : ℕ) : brickworkLaw n =
    convolve (matchingLaw n 1 (haarLaw 2)) (matchingLaw n 0 (haarLaw 2)) := rfl

end QAlgorithms.Papers.Independent.Extend50.P45
Source
Random quantum circuits are approximate unitary ttt-designs in depth O(nt5+o(1))O\left(nt^{5+o(1)}\right)O(nt5+o(1)), arXiv:2203.16571v3, https://arxiv.org/abs/2203.16571v3
Read-back

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

QAlgorithms.Papers.Independent.Extend50.P45.IsApproximateDesign

For every natural number nnn, every measure μ\muμ on complex matrices indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, every natural number ttt, and every real number ϵ\epsilonϵ, let J=QntJ=Q_n^tJ=Qnt​ and let HnH_nHn​ be normalized Haar measure on U(2n)\mathrm U(2^n)U(2n), reindexed by binary strings through b(x)=∑i=0n−1xi2n−1−ib(x)=\sum_{i=0}^{n-1}x_i2^{n-1-i}b(x)=∑i=0n−1​xi​2n−1−i. For λ=μ,Hn\lambda=\mu,H_nλ=μ,Hn​, define

Tλ,t(A)i,j=∑a,b∈J[∫∏ℓ=0t−1Uiℓ,aℓ ∏ℓ=0t−1Ujℓ,bℓ‾ dλ(U)]Aa,b.\mathcal T_{\lambda,t}(A)_{i,j} =\sum_{a,b\in J} \left[\int \prod_{\ell=0}^{t-1}U_{i_\ell,a_\ell}\, \overline{\prod_{\ell=0}^{t-1}U_{j_\ell,b_\ell}} \,d\lambda(U)\right]A_{a,b}.Tλ,t​(A)i,j​=a,b∈J∑​​∫ℓ=0∏t−1​Uiℓ​,aℓ​​ℓ=0∏t−1​Ujℓ​,bℓ​​​dλ(U)​Aa,b​.

For each complex matrix XXX indexed by J×JJ\times JJ×J, form YXY_XYX​ by applying Tμ,t−THn,t\mathcal T_{\mu,t}-\mathcal T_{H_n,t}Tμ,t​−THn​,t​ to every block Xa,br,s=X(r,a),(s,b)X^{r,s}_{a,b}=X_{(r,a),(s,b)}Xa,br,s​=X(r,a),(s,b)​. The defined predicate is precisely

sup⁡∥X∥tr≤1∥YX∥tr≤ϵ2nt,∥Z∥tr=Re⁡tr⁡Z∗Z,\sup_{\|X\|_{\mathrm{tr}}\le1}\|Y_X\|_{\mathrm{tr}} \le \frac{\epsilon}{2^{nt}}, \qquad \|Z\|_{\mathrm{tr}}=\operatorname{Re}\operatorname{tr}\sqrt{Z^\ast Z},∥X∥tr​≤1sup​∥YX​∥tr​≤2ntϵ​,∥Z∥tr​=RetrZ∗Z​,

with the square root given by continuous functional calculus. It imposes no separate probability or unitary-support condition on μ\muμ, and no restriction on the sign of ϵ\epsilonϵ. Nonintegrable integrands have integral zero. The values n=0n=0n=0 and t=0t=0t=0 are included; empty products equal 111, and the denominator is always positive.

QAlgorithms.Papers.Independent.Extend50.P45.QMat

For every natural number nnn, QMat(n)\mathrm{QMat}(n)QMat(n) is the type of complex matrices whose rows and columns are indexed by all Boolean strings of length nnn, where such a string is a function {0,…,n−1}→{false,true}\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}{0,…,n−1}→{false,true}. Thus these matrices have size 2n×2n2^n\times 2^n2n×2n, with no unitarity or other restriction. When n=0n=0n=0, there is one empty string, so these are 1×11\times11×1 matrices.

QAlgorithms.Papers.Independent.Extend50.P45.auxiliaryLaw

For every natural number nnn, let Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, and form the subgroup Pn\mathcal P_nPn​ generated by the unitary matrices ic⨂jPji^c\bigotimes_jP_jic⨂j​Pj​, with c∈{0,1,2,3}c\in\{0,1,2,3\}c∈{0,1,2,3} and Pj∈{I,X,Y,Z}P_j\in\{I,X,Y,Z\}Pj​∈{I,X,Y,Z}. Take its normalizer and quotient it by equality of conjugation maps X↦UXU∗X\mapsto UXU^\astX↦UXU∗. Assuming a finite enumeration of this quotient, let κn\kappa_nκn​ assign equal mass to one chosen unitary representative of each quotient class. Let H1H_1H1​ be normalized Haar measure on U(2)\mathrm U(2)U(2), indexed by one-bit strings, and let Ln(U)L_n(U)Ln​(U) apply the entries of UUU to wire 000, with entries zero unless all other bits agree; for n=0n=0n=0, set L0(U)=IL_0(U)=IL0​(U)=I. For measures α,β\alpha,\betaα,β on matrices, define α∗β\alpha*\betaα∗β as the pushforward of α⊗β\alpha\otimes\betaα⊗β under (A,B)↦AB(A,B)\mapsto AB(A,B)↦AB. The defined measure is

κn∗((Ln)∗H1∗κn),\kappa_n*\bigl((L_n)_\ast H_1*\kappa_n\bigr),κn​∗((Ln​)∗​H1​∗κn​),

equivalently the distribution of CLLn(U)CRC_L L_n(U)C_RCL​Ln​(U)CR​ for independent draws CL,CRC_L,C_RCL​,CR​ from the equal-weight representative measure and UUU from H1H_1H1​. Zero qubits are included, using empty Pauli tensor products and the identity-valued lift.

QAlgorithms.Papers.Independent.Extend50.P45.balancedUnitaryMoment

For every natural number nnn, every measure μ\muμ on complex matrices indexed by length-nnn Boolean strings, and every natural number ttt, this defines a complex matrix whose row and column indices are pairs of ordered ttt-tuples of such strings. Its entry at row (x,x′)(x,x')(x,x′) and column (y,y′)(y,y')(y,y′) is

∫(∏j=0t−1Uxj,yj)(∏j=0t−1Uxj′,yj′)‾ dμ(U).\int \left(\prod_{j=0}^{t-1}U_{x_j,y_j}\right) \overline{\left(\prod_{j=0}^{t-1}U_{x'_j,y'_j}\right)} \,d\mu(U).∫(j=0∏t−1​Uxj​,yj​​)(j=0∏t−1​Uxj′​,yj′​​)​dμ(U).

The measure is not assumed to be finite, a probability measure, or supported on unitaries, and no integrability hypothesis is imposed; the integral is the total Bochner integral, which is defined to be 000 when the integrand is not integrable. When t=0t=0t=0, the matrix has a single entry, equal to ∫1 dμ\int 1\,d\mu∫1dμ. The definition also permits n=0n=0n=0, when the matrices integrated over are 1×11\times11×1.

QAlgorithms.Papers.Independent.Extend50.P45.brickworkLaw

For every natural number nnn, this defines a measure on complex matrices indexed by length-nnn Boolean strings by taking two independently formed products of lifted Haar matrices, one over the even indices and one over the odd indices, and multiplying the odd-index product on the left of the even-index product. Within each parity, indices are processed in increasing order, with each new factor multiplying on the left. For each index iii, the matrix is drawn from normalized Haar measure on U(4)U(4)U(4), indexed by two-bit strings in binary order, and lifted to the matrix whose (x,y)(x,y)(x,y)-entry is U(xi,xi+),(yi,yi+)U_{(x_i,x_{i^+}),(y_i,y_{i^+})}U(xi​,xi+​),(yi​,yi+​)​ if x,yx,yx,y agree outside {i,i+}\{i,i^+\}{i,i+}, and 000 otherwise, where i+i^+i+ is the successor wrapping to 000. An empty product is the identity. The definition imposes no disjointness condition on the pairs within a parity. For n=0n=0n=0, the result is the Dirac measure at the 1×11\times11×1 identity; for n=1n=1n=1, the sole even-index lift repeats the only wire.

QAlgorithms.Papers.Independent.Extend50.P45.cliffordBrickworkLaw

For every natural number nnn, consider the subgroup of U(4)\mathrm U(4)U(4) generated by all two-qubit Pauli matrices with phases 1,i,−1,−i1,i,-1,-i1,i,−1,−i, take its normalizer, and identify two normalizer elements exactly when they induce the same conjugation map on every 4×44\times44×4 complex matrix. Assuming a finite enumeration of this quotient, let κ2\kappa_2κ2​ be the measure assigning equal weight to one chosen unitary representative of each class, indexed by two-bit strings. For each i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1}, let i+=i+1i^+=i+1i+=i+1 modulo nnn, and define

Ei(V)x,y={V(xi,xi+),(yi,yi+),xq=yq for all q≠i,i+,0,otherwise,x,y∈{0,1}n.E_i(V)_{x,y} = \begin{cases} V_{(x_i,x_{i^+}),(y_i,y_{i^+})}, &x_q=y_q\text{ for all }q\ne i,i^+,\\ 0,&\text{otherwise}, \end{cases} \qquad x,y\in\{0,1\}^n.Ei​(V)x,y​={V(xi​,xi+​),(yi​,yi+​)​,0,​xq​=yq​ for all q=i,i+,otherwise,​x,y∈{0,1}n.

For parity p∈{0,1}p\in\{0,1\}p∈{0,1}, start with the point mass at the identity, traverse the indices iii in increasing order with i mod 2=pi\bmod2=pimod2=p, and at each index replace the current measure λ\lambdaλ by (Ei)∗κ2∗λ(E_i)_\ast\kappa_2*\lambda(Ei​)∗​κ2​∗λ, where convolution is the pushforward of the product measure under matrix multiplication. Calling the two resulting measures M0,M1M_0,M_1M0​,M1​, the defined measure is M1∗M0M_1*M_0M1​∗M0​. The definition includes n=0n=0n=0, when both index lists are empty and the result is the identity point mass, and n=1n=1n=1, when i=i+i=i^+i=i+. It does not require even nnn or disjointness of the wire pairs within either traversal.

QAlgorithms.Papers.Independent.Extend50.P45.cliffordLaw

For every natural number nnn, write Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n. Inside the unitary matrices indexed by QnQ_nQn​, let Pn\mathcal P_nPn​ be the subgroup generated by all matrices ic⨂j=0n−1Pji^c\bigotimes_{j=0}^{n-1}P_jic⨂j=0n−1​Pj​, where c∈{0,1,2,3}c\in\{0,1,2,3\}c∈{0,1,2,3} and each PjP_jPj​ is one of the standard Pauli matrices I,X,Y,ZI,X,Y,ZI,X,Y,Z. Let Nn\mathcal N_nNn​ be its normalizer, consisting of unitary matrices whose conjugation preserves Pn\mathcal P_nPn​, and identify U,V∈NnU,V\in\mathcal N_nU,V∈Nn​ precisely when UXU∗=VXV∗UXU^\ast=VXV^\astUXU∗=VXV∗ for every complex matrix XXX indexed by QnQ_nQn​. Assuming a finite enumeration of the resulting quotient set Cn\mathcal C_nCn​, choose for each class CCC the representative RCR_CRC​ supplied by the quotient representative operation. The defined measure on all complex matrices indexed by QnQ_nQn​ is

∑C∈Cn1∣Cn∣ δRC.\sum_{C\in\mathcal C_n}\frac1{|\mathcal C_n|}\,\delta_{R_C}.C∈Cn​∑​∣Cn​∣1​δRC​​.

Thus its atoms are the chosen unitary representatives, with weights from the uniform probability mass function on the quotient. The quotient is nonempty because it contains the identity class. The definition includes n=0n=0n=0, with the empty tensor product interpreted as 111.

QAlgorithms.Papers.Independent.Extend50.P45.convolve

For every natural number nnn and every pair of measures μ,ν\mu,\nuμ,ν on the complex matrices indexed by length-nnn Boolean strings, this defines their convolution to be the pushforward of the product measure μ×ν\mu\times\nuμ×ν under matrix multiplication (A,B)↦AB(A,B)\mapsto AB(A,B)↦AB. The first measure supplies the left factor and the second supplies the right factor. Neither measure is assumed to be a probability measure, finite, or supported on unitary matrices. This also applies when n=0n=0n=0, when the matrices are 1×11\times11×1.

QAlgorithms.Papers.Independent.Extend50.P45.couplingCosts

For every natural number nnn and every pair of measures μ,ν\mu,\nuμ,ν on complex matrices indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, the defined set consists exactly of the real numbers

v=∫∥U−V∥F 2 dγ(U,V),∥U−V∥F 2=∑x,y∈Qn∣Ux,y−Vx,y∣2,v=\sqrt{\int\|U-V\|_{\mathrm F}^{\,2}\,d\gamma(U,V)}, \qquad \|U-V\|_{\mathrm F}^{\,2} =\sum_{x,y\in Q_n}|U_{x,y}-V_{x,y}|^2,v=∫∥U−V∥F2​dγ(U,V)​,∥U−V∥F2​=x,y∈Qn​∑​∣Ux,y​−Vx,y​∣2,

for which there exists a probability measure γ\gammaγ on pairs of such matrices whose first marginal is μ\muμ, whose second marginal is ν\nuν, and for which the squared Frobenius distance is integrable. Both marginal equalities and integrability are required. No initial probability or unitary-support assumptions are imposed on μ,ν\mu,\nuμ,ν; if either cannot be a marginal of such a probability measure, the set is empty. Every member is nonnegative, and n=0n=0n=0 is included, in which case the matrices are 1×11\times11×1.

QAlgorithms.Papers.Independent.Extend50.P45.designFactor

For every natural number ttt, the defined real number is

(log⁡t)5 t 4+3/log⁡2t,(\log t)^5\,t^{\,4+3/\sqrt{\log_2 t}},(logt)5t4+3/log2​t​,

where log⁡\loglog is the real natural logarithm, log⁡2t=log⁡t/log⁡2\log_2 t=\log t/\log2log2​t=logt/log2, and the power with real exponent is the real-power operation. There is no assumption t>1t>1t>1. The total-function conventions include log⁡0=0\log0=0log0=0, 0=0\sqrt0=00​=0, and division by zero equal to zero; consequently, at both t=0t=0t=0 and t=1t=1t=1, the exponent evaluates to 444 and the defined factor is 000.

QAlgorithms.Papers.Independent.Extend50.P45.edgeLaw

For every natural number nnn and every index i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1}, this defines a measure on complex matrices indexed by length-nnn Boolean strings by drawing a 4×44\times44×4 unitary matrix from normalized Haar measure and pushing that measure forward through the following map: first index its rows and columns by two-bit strings in binary order, and then assign the entry U(xi,xi+),(yi,yi+)U_{(x_i,x_{i^+}),(y_i,y_{i^+})}U(xi​,xi+​),(yi​,yi+​)​ when xxx and yyy agree at every other index, and 000 otherwise, where i+=i+1i^+=i+1i+=i+1 with wraparound to 000. For n=1n=1n=1, the entry uses the repeated bits (x0,x0)(x_0,x_0)(x0​,x0​) and (y0,y0)(y_0,y_0)(y0​,y0​). For n=0n=0n=0, no such index iii exists.

QAlgorithms.Papers.Independent.Extend50.P45.edgeLift

For every natural number nnn, every index i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1}, and every complex matrix UUU indexed by two-bit Boolean strings, this defines a matrix Li(U)L_i(U)Li​(U) indexed by length-nnn Boolean strings by

[Li(U)]x,y={U(xi,xi+),(yi,yi+),xq=yq for every q∉{i,i+},0,otherwise,[L_i(U)]_{x,y}= \begin{cases} U_{(x_i,x_{i^+}),(y_i,y_{i^+})},& x_q=y_q\text{ for every }q\notin\{i,i^+\},\\ 0,&\text{otherwise}, \end{cases}[Li​(U)]x,y​={U(xi​,xi+​),(yi​,yi+​)​,0,​xq​=yq​ for every q∈/{i,i+},otherwise,​

where i+=i+1i^+=i+1i+=i+1 if i+1<ni+1<ni+1<n, and i+=0i^+=0i+=0 otherwise, and an ordered pair of bits denotes the two-bit string with those bits in positions 0,10,10,1. No unitarity assumption is made on UUU. For n=1n=1n=1, the two selected indices coincide, so the entry is U(x0,x0),(y0,y0)U_{(x_0,x_0),(y_0,y_0)}U(x0​,x0​),(y0​,y0​)​. For n=0n=0n=0, there is no admissible iii.

QAlgorithms.Papers.Independent.Extend50.P45.firstWireLift

For every natural number nnn and every complex matrix UUU indexed by the one-bit strings Q1={0,1}1Q_1=\{0,1\}^1Q1​={0,1}1, with no unitarity assumption on UUU, the defined matrix is indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n. When n>0n>0n>0, its entries are

Ln(U)x,y={U(x0),(y0),xq=yq for every q≠0,0,otherwise,L_n(U)_{x,y} = \begin{cases} U_{(x_0),(y_0)},&x_q=y_q\text{ for every }q\ne0,\\ 0,&\text{otherwise}, \end{cases}Ln​(U)x,y​={U(x0​),(y0​)​,0,​xq​=yq​ for every q=0,otherwise,​

where (x0)(x_0)(x0​) denotes the one-bit string with value x0x_0x0​. When n=0n=0n=0, the defined matrix is the identity matrix on the singleton Q0Q_0Q0​, independently of UUU.

QAlgorithms.Papers.Independent.Extend50.P45.frobeniusWasserstein

For every natural number nnn, including 000, and any two measures μ,ν\mu,\nuμ,ν on the space of complex matrices indexed by nnn-bit strings, define

WF(μ,ν)=inf⁡{∫∥U−V∥F2 dγ(U,V)  |  γ is a probability measure on pairs of matrices,(pr⁡1)∗γ=μ,(pr⁡2)∗γ=ν,(U,V)↦∥U−V∥F2 is integrable with respect to γ},W_F(\mu,\nu)= \inf\left\{ \sqrt{\int \|U-V\|_F^2\,d\gamma(U,V)} \;\middle|\; \begin{array}{l} \gamma\text{ is a probability measure on pairs of matrices},\\ (\operatorname{pr}_1)_*\gamma=\mu,\quad(\operatorname{pr}_2)_*\gamma=\nu,\\ (U,V)\mapsto\|U-V\|_F^2\text{ is integrable with respect to }\gamma \end{array} \right\},WF​(μ,ν)=inf⎩⎨⎧​∫∥U−V∥F2​dγ(U,V)​​γ is a probability measure on pairs of matrices,(pr1​)∗​γ=μ,(pr2​)∗​γ=ν,(U,V)↦∥U−V∥F2​ is integrable with respect to γ​⎭⎬⎫​,

where ∥A∥F=∑x,y∣Axy∣2\|A\|_F=\sqrt{\sum_{x,y}|A_{xy}|^2}∥A∥F​=∑x,y​∣Axy​∣2​ is the Frobenius norm. The infimum is taken in the real numbers, with the convention that it equals 000 when the displayed set is empty. In particular, the definition does not assume that μ\muμ and ν\nuν are probability measures; if no integrable probability coupling with these marginals exists, its value is 000.

QAlgorithms.Papers.Independent.Extend50.P45.haarLaw

For every natural number nnn, this defines a measure on complex matrices indexed by length-nnn Boolean strings as the pushforward of normalized Haar measure on the unitary group U(2n)U(2^n)U(2n) under the map U↦AU\mapsto AU↦A given by Ax,y=Ubn(x),bn(y)A_{x,y}=U_{b_n(x),b_n(y)}Ax,y​=Ubn​(x),bn​(y)​, where bn(x)=∑i=0n−11{xi=true}2n−1−ib_n(x)=\sum_{i=0}^{n-1}\mathbf 1_{\{x_i=\mathrm{true}\}}2^{n-1-i}bn​(x)=∑i=0n−1​1{xi​=true}​2n−1−i identifies Boolean strings with {0,…,2n−1}\{0,\ldots,2^n-1\}{0,…,2n−1}. The Haar measure used here is normalized to give the entire unitary group mass 111. For n=0n=0n=0, this is a measure on 1×11\times11×1 matrices obtained from normalized Haar measure on U(1)U(1)U(1).

QAlgorithms.Papers.Independent.Extend50.P45.localHaarRingLaw

For every natural number nnn, this defines a measure on complex matrices indexed by length-nnn Boolean strings as n−1∑i=0n−1λin^{-1}\sum_{i=0}^{n-1}\lambda_in−1∑i=0n−1​λi​, with the reciprocal and scalar multiplication taken in the extended nonnegative reals. Here λi\lambda_iλi​ is the pushforward of normalized Haar measure on U(4)U(4)U(4), indexed by two-bit strings in binary order, through the map whose (x,y)(x,y)(x,y)-entry is U(xi,xi+),(yi,yi+)U_{(x_i,x_{i^+}),(y_i,y_{i^+})}U(xi​,xi+​),(yi​,yi+​)​ if xxx and yyy agree outside {i,i+}\{i,i^+\}{i,i+}, and 000 otherwise; i+i^+i+ is the successor with wraparound to 000. For positive nnn, this is the equally weighted average over the nnn indices. For n=0n=0n=0, the sum is the zero measure and its scalar multiple is again the zero measure, even though the extended nonnegative reciprocal of 000 is +∞+\infty+∞. For n=1n=1n=1, both selected positions are the sole wire.

QAlgorithms.Papers.Independent.Extend50.P45.matchingLaw

For every pair of natural numbers n,pn,pn,p and every measure λ\lambdaλ on complex matrices indexed by two-bit Boolean strings, this defines a measure on matrices indexed by length-nnn Boolean strings as follows. List the indices i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1} satisfying i mod 2=pi\bmod2=pimod2=p in increasing order; start with the Dirac measure at the identity; and, for each listed iii, replace the current measure ν\nuν by m∗((Li)∗λ×ν)m_*((L_i)_*\lambda\times\nu)m∗​((Li​)∗​λ×ν), where m(A,B)=ABm(A,B)=ABm(A,B)=AB and Li(U)L_i(U)Li​(U) has entry U(xi,xi+),(yi,yi+)U_{(x_i,x_{i^+}),(y_i,y_{i^+})}U(xi​,xi+​),(yi​,yi+​)​ when x,yx,yx,y agree outside {i,i+}\{i,i^+\}{i,i+}, and 000 otherwise, with i+i^+i+ the successor wrapping to 000. Later listed factors therefore multiply on the left. The measure λ\lambdaλ is unrestricted, and disjointness of the selected pairs is not a condition. If p≥2p\ge2p≥2, or if n=0n=0n=0, the list is empty and the result is the Dirac measure at the identity. For n=1,p=0n=1,p=0n=1,p=0, the selected pair repeats the sole index.

QAlgorithms.Papers.Independent.Extend50.P45.momentDistance

For every natural number nnn, every measure μ\muμ on the complex matrices indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, and every natural number ttt, put J=QntJ=Q_n^tJ=Qnt​ and define the matrix

Bμ,t((x,x′),(y,y′))=∫(∏j=0t−1Uxj,yj)(∏j=0t−1Uxj′,yj′)‾ dμ(U).B_{\mu,t}\bigl((x,x'),(y,y')\bigr) =\int \left(\prod_{j=0}^{t-1}U_{x_j,y_j}\right) \overline{\left(\prod_{j=0}^{t-1}U_{x'_j,y'_j}\right)}\,d\mu(U).Bμ,t​((x,x′),(y,y′))=∫(j=0∏t−1​Uxj​,yj​​)(j=0∏t−1​Uxj′​,yj′​​)​dμ(U).

Let HnH_nHn​ be the measure obtained from normalized Haar measure on U(2n)\mathrm U(2^n)U(2n) by indexing its rows and columns by QnQ_nQn​, using the binary index b(x)=∑i=0n−1xi2n−1−ib(x)=\sum_{i=0}^{n-1}x_i2^{n-1-i}b(x)=∑i=0n−1​xi​2n−1−i. The defined distance is

∥Bμ,t−BHn,t∥op,\left\|B_{\mu,t}-B_{H_n,t}\right\|_{\mathrm{op}},∥Bμ,t​−BHn​,t​∥op​,

where the norm is the operator norm induced by the Euclidean norm on CJ×J\mathbb C^{J\times J}CJ×J. No probability, finiteness, or unitary-support assumption is imposed on μ\muμ. The integrals use the convention that a nonintegrable integrand has integral zero. Both n=0n=0n=0 and t=0t=0t=0 are included; Q0Q_0Q0​ is a singleton, and when t=0t=0t=0, each product in the integrand is the empty product 111.

QAlgorithms.Papers.Independent.Extend50.P45.momentHamiltonian

For every pair of natural numbers n,tn,tn,t, let Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n and J=QntJ=Q_n^tJ=Qnt​. For n>0n>0n>0, define i+i^+i+ to be i+1i+1i+1 modulo nnn, and for a complex matrix VVV indexed by Q2Q_2Q2​, define

Ei(V)x,y={V(xi,xi+),(yi,yi+),xq=yq for every q≠i,i+,0,otherwise.E_i(V)_{x,y} = \begin{cases} V_{(x_i,x_{i^+}),(y_i,y_{i^+})}, &x_q=y_q\text{ for every }q\ne i,i^+,\\ 0,&\text{otherwise}. \end{cases}Ei​(V)x,y​={V(xi​,xi+​),(yi​,yi+​)​,0,​xq​=yq​ for every q=i,i+,otherwise.​

Let λi\lambda_iλi​ be the pushforward of normalized Haar measure on U(4)\mathrm U(4)U(4), indexed by two-bit strings in binary order, under V↦Ei(V)V\mapsto E_i(V)V↦Ei​(V), and set λn=n−1∑i=0n−1λi\lambda_n=n^{-1}\sum_{i=0}^{n-1}\lambda_iλn​=n−1∑i=0n−1​λi​. At n=0n=0n=0, this measure is defined instead by the literal extended-nonnegative-real expression 0−1⋅00^{-1}\cdot00−1⋅0, which is the zero measure. Define

Bλn,t((x,x′),(y,y′))=∫∏j=0t−1Uxj,yj ∏j=0t−1Uxj′,yj′‾ dλn(U).B_{\lambda_n,t}\bigl((x,x'),(y,y')\bigr) =\int \prod_{j=0}^{t-1}U_{x_j,y_j}\, \overline{\prod_{j=0}^{t-1}U_{x'_j,y'_j}} \,d\lambda_n(U).Bλn​,t​((x,x′),(y,y′))=∫j=0∏t−1​Uxj​,yj​​j=0∏t−1​Uxj′​,yj′​​​dλn​(U).

The defined matrix is n(I−Bλn,t)n(I-B_{\lambda_n,t})n(I−Bλn​,t​), indexed by J×JJ\times JJ×J. No lower bound on nnn or ttt is required: at n=0n=0n=0 the resulting matrix is zero; at n=1n=1n=1, the two selected wire indices coincide, so the formula uses V(x0,x0),(y0,y0)V_{(x_0,x_0),(y_0,y_0)}V(x0​,x0​),(y0​,y0​)​; and at t=0t=0t=0, the products are empty products equal to 111. Nonintegrable integrands have integral zero.

QAlgorithms.Papers.Independent.Extend50.P45.nextWire

For every natural number nnn and every index i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1}, this defines the next index to be i+1i+1i+1 if i+1<ni+1<ni+1<n, and 000 otherwise. In particular, it sends n−1n-1n−1 to 000; for n=1n=1n=1, it sends the sole index 000 to itself. For n=0n=0n=0, there is no index iii to which the definition can be applied.

QAlgorithms.Papers.Independent.Extend50.P45.qubitTensorPower

For every natural number nnn, every natural number ttt, and every complex matrix UUU indexed by length-nnn Boolean strings, this defines a matrix indexed by ordered ttt-tuples of those strings by

[U⊗t]x,y=∏j=0t−1Uxj,yj.[U^{\otimes t}]_{x,y}=\prod_{j=0}^{t-1}U_{x_j,y_j}.[U⊗t]x,y​=j=0∏t−1​Uxj​,yj​​.

There is no unitarity assumption on UUU. When t=0t=0t=0, the indexing set consists of the single empty tuple and the empty product is 111, so the resulting matrix is the 1×11\times11×1 identity. The definition also includes n=0n=0n=0, when UUU itself is 1×11\times11×1.

QAlgorithms.Papers.Independent.Extend50.P45.reductionLength

For every natural number ttt, the defined natural number is

⌈2log⁡2(4t)+32log⁡2(4t)⌉N,\left\lceil 2\log_2(4t)+\frac32\sqrt{\log_2(4t)} \right\rceil_{\mathbb N},⌈2log2​(4t)+23​log2​(4t)​⌉N​,

where log⁡2x=log⁡x/log⁡2\log_2 x=\log x/\log2log2​x=logx/log2, log⁡\loglog is the real natural logarithm, and ⌈r⌉N\lceil r\rceil_{\mathbb N}⌈r⌉N​ is the least natural number at least rrr, taking the value 000 when r≤0r\le0r≤0. These are total real functions: log⁡0=0\log0=0log0=0, and the real square root of a nonpositive number is 000. In particular, t=0t=0t=0 is included and gives reduction length 000.

QAlgorithms.Papers.Independent.Extend50.P45.steps

For every natural number nnn and every measure μ\muμ on complex matrices indexed by length-nnn Boolean strings, this defines a sequence of measures μ[k]\mu^{[k]}μ[k], indexed by natural numbers kkk, by μ[0]=δI\mu^{[0]}=\delta_Iμ[0]=δI​, the Dirac measure at the identity matrix, and μ[k+1]=m∗(μ×μ[k])\mu^{[k+1]}=m_*(\mu\times\mu^{[k]})μ[k+1]=m∗​(μ×μ[k]), where m(A,B)=ABm(A,B)=ABm(A,B)=AB and m∗m_*m∗​ denotes pushforward. Thus each recursive step puts a new factor governed by μ\muμ on the left. There is no assumption that μ\muμ is finite, a probability measure, or supported on unitaries. The definition includes k=0k=0k=0 and n=0n=0n=0, the latter giving 1×11\times11×1 matrices.

QAlgorithms.Papers.Independent.Extend50.P45.twirlDiamondDistance

For every natural number nnn, every pair of measures μ,ν\mu,\nuμ,ν on complex matrices indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, and every natural number ttt, set J=QntJ=Q_n^tJ=Qnt​ and, for λ=μ\lambda=\muλ=μ or ν\nuν, define

Tλ,t(A)i,j=∑a,b∈J[∫∏ℓ=0t−1Uiℓ,aℓ ∏ℓ=0t−1Ujℓ,bℓ‾ dλ(U)]Aa,b.\mathcal T_{\lambda,t}(A)_{i,j} =\sum_{a,b\in J} \left[\int \prod_{\ell=0}^{t-1}U_{i_\ell,a_\ell}\, \overline{\prod_{\ell=0}^{t-1}U_{j_\ell,b_\ell}} \,d\lambda(U)\right]A_{a,b}.Tλ,t​(A)i,j​=a,b∈J∑​​∫ℓ=0∏t−1​Uiℓ​,aℓ​​ℓ=0∏t−1​Ujℓ​,bℓ​​​dλ(U)​Aa,b​.

For a complex matrix XXX indexed by J×JJ\times JJ×J, write Xa,br,s=X(r,a),(s,b)X^{r,s}_{a,b}=X_{(r,a),(s,b)}Xa,br,s​=X(r,a),(s,b)​, and define YXY_XYX​ by

(YX)(r,i),(s,j)=Tμ,t(Xr,s)i,j−Tν,t(Xr,s)i,j.(Y_X)_{(r,i),(s,j)} =\mathcal T_{\mu,t}(X^{r,s})_{i,j} -\mathcal T_{\nu,t}(X^{r,s})_{i,j}.(YX​)(r,i),(s,j)​=Tμ,t​(Xr,s)i,j​−Tν,t​(Xr,s)i,j​.

The defined distance is the real supremum

sup⁡{∥YX∥tr: X is a complex matrix indexed by J×J, ∥X∥tr≤1},∥Z∥tr=Re⁡tr⁡Z∗Z,\sup\left\{\|Y_X\|_{\mathrm{tr}}:\ X\text{ is a complex matrix indexed by }J\times J,\ \|X\|_{\mathrm{tr}}\le1\right\}, \qquad \|Z\|_{\mathrm{tr}}=\operatorname{Re}\operatorname{tr}\sqrt{Z^\ast Z},sup{∥YX​∥tr​: X is a complex matrix indexed by J×J, ∥X∥tr​≤1},∥Z∥tr​=RetrZ∗Z​,

where the square root is defined by continuous functional calculus. The auxiliary index set is exactly JJJ, and XXX need not be Hermitian or positive. Neither measure is required to be a probability measure or supported on unitaries; nonintegrable integrands have integral zero. The definition includes n=0n=0n=0 and t=0t=0t=0, with empty products equal to 111.

QAlgorithms.Papers.Independent.Extend50.P45.unitaryMomentTwirl

For every natural number nnn, every measure μ\muμ on complex matrices indexed by Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, every natural number ttt, and every complex matrix AAA indexed by J=QntJ=Q_n^tJ=Qnt​, the defined matrix has entries

Tμ,t(A)x,y=∑a∈J∑b∈J[∫(∏j=0t−1Uxj,aj)(∏j=0t−1Uyj,bj)‾ dμ(U)]Aa,b.\mathcal T_{\mu,t}(A)_{x,y} =\sum_{a\in J}\sum_{b\in J} \left[ \int \left(\prod_{j=0}^{t-1}U_{x_j,a_j}\right) \overline{\left(\prod_{j=0}^{t-1}U_{y_j,b_j}\right)} \,d\mu(U) \right]A_{a,b}.Tμ,t​(A)x,y​=a∈J∑​b∈J∑​​∫(j=0∏t−1​Uxj​,aj​​)(j=0∏t−1​Uyj​,bj​​)​dμ(U)​Aa,b​.

Thus the integral coefficients are formed first and then contracted with AAA. There are no assumptions that AAA is Hermitian or positive, or that μ\muμ is a probability measure or supported on unitaries. Nonintegrable integrands have integral zero. Zero values of nnn and ttt are allowed; for t=0t=0t=0, JJJ is a singleton and the displayed products equal 111.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

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

View graph

Get started

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

About Prove2Me

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

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me