Documentation

CsdLean4.Mathlib.QuantumInfo.CliffordTDensity

Clifford+T fills SU(2): two orthogonal dense circles and the Euler decomposition #

Category: 1-Mathlib (CSD-free; staged for upstream). BACKLOG #81, part (b2) of R-005; the single-qubit half of Clifford+T universality. #68 and #80 built one dense circle, #84 the Euler decomposition; this file closes the gap between them.

★★ det_one_mem_cliffordTLim: every determinant-one 2 × 2 unitary is a limit of Clifford+T words, and hence ★★ exists_phase_mem_cliffordTLim: Clifford+T is dense in U(2) modulo phase. The obstruction that shaped the proof is worth recording: no two axes in the Clifford orbit of the word's own axis are orthogonal, so a third axis has to be manufactured, and the mechanism is the cross product.

The second axis. The π rotation about the word's axis (htA, htB, htA) — available because #80's circle is dense and the closure is closed — followed by H, is a rotation about (1, 0, -1)/√2, the cross product of the two axes (★ axisRot_htAxis_pi_mul_hGateM; the y components cancel because the word's axis has equal x and z components). Its angle wAngle satisfies 2 cos wAngle = (6 + 16√2)/17.

That angle is irrational over 2π, and the cheap test of #68 cannot see it: x² + x = q needs an integer linear coefficient, and here the minimal polynomial is X² - (12/17)X - 28/17. So this file proves the general form, ★ not_isIntegral_of_quadratic: a monic rational quadratic whose linear coefficient is not an integer has no algebraic-integer root, because the minimal polynomial of an algebraic integer has integer coefficients and, for an irrational root, that quadratic is the minimal polynomial. With #68's isIntegral_two_mul_cos_of_eq_two_pi_mul that gives ★★ irrational_wAngle_div_two_pi.

Two orthogonal circles. Conjugating the new circle by Z = T⁴ reflects its axis to (1, 0, 1)/√2 (★★ axisRot_uAxis_mem), which is orthogonal to it. The Euler decomposition about that pair, ★★ exists_euler_two_axes, comes from #84's z-y-z form by two conjugations: R_z(π/2) turns the y axis into x (rzMat_conj_ryMat), and R_y(π/4) tilts z and x onto (1, 0, 1)/√2 and (1, 0, -1)/√2 (ryMat_conj_rzMat, ryMat_conj_axisRot_x).

Honest scope #

⚠️ One qubit, and density rather than exactness: the statement is that SU(2) lies in the topological closure of the Clifford+T monoid, which is what a synthesis theorem needs and all that is true (the monoid itself is countable). The n-qubit statement is BACKLOG #73, which assembles this with #70, #71 and #85. ⚠️ No efficiency claim. How many gates an ε-approximation costs is Solovay–Kitaev, BACKLOG #74, deliberately not claimed.

References: M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information §4.5.3 and Exercise 4.11; C. M. Dawson, M. A. Nielsen, quant-ph/0505030 §2; CsdLean4/Mathlib/QuantumInfo/CliffordTAngle.lean and SU2Rotation.lean for the first circle, EulerDecomposition.lean for the z-y-z form; specs/magic-plan.md; specs/BACKLOG.md #81, #73; specs/future-work.md.

No algebraic integer satisfies a monic rational quadratic with a fractional coefficient #

theorem not_isIntegral_of_quadratic {x : ℝ} {p q : ℚ} (hx : x ^ 2 + ↑p * x + ↑q = 0) (hirr : Irrational x) (hp : p.den ≠ 1) :

★ A monic rational quadratic whose linear coefficient is not an integer has no algebraic-integer root, provided the root is irrational: the minimal polynomial of an algebraic integer has integer coefficients, and for an irrational root this quadratic is the minimal polynomial. The x² + x = 7/4 helper of #68 is the case where the trick is cheaper; this is the general form, needed because the second axis of #81 has 17 in its denominators.

The word's axis in closed form #

theorem QuantumInfo.SU2.htA_sq :
htA ^ 2 = (5 + 2 * √2) / 17
theorem QuantumInfo.SU2.htB_sq :
htB ^ 2 = (7 - 4 * √2) / 17

The second axis and its angle #

The π rotation about the word's axis, followed by H, is a rotation about (1, 0, -1)/√2: the cross product of the two axes. Its angle is wAngle.

noncomputable def QuantumInfo.SU2.wHalfCos :

The cosine of half the second rotation's angle.

Equations
Instances For
    noncomputable def QuantumInfo.SU2.wAngle :

    The angle of the second rotation.

    Equations
    Instances For

      The second angle in the form the algebraic-integer test wants.

      ★★ The second angle is an irrational multiple of 2π, so the powers of the second rotation fill its own circle.

      Conjugation moves the axis #

      theorem QuantumInfo.SU2.axisRot_neg_axis (a b c θ : ℝ) :
      axisRot (-a) (-b) (-c) θ = axisRot a b c (-θ)

      Conjugating a z rotation by R_y(π/4) tilts its axis to (1, 0, 1)/√2.

      Conjugating an x rotation by R_y(π/4) tilts its axis to (1, 0, -1)/√2.

      Conjugating a y rotation by R_z(-π/2) turns its axis into x.

      The Euler decomposition about two explicit orthogonal axes #

      theorem QuantumInfo.SU2.conj_mul_three {g g' A B C : Matrix (Fin 2) (Fin 2) ℂ} (h : g' * g = 1) :
      g * A * g' * (g * B * g') * (g * C * g') = g * (A * B * C) * g'
      theorem QuantumInfo.SU2.exists_euler_zxz {U : Matrix (Fin 2) (Fin 2) ℂ} (hU : U ∈ Matrix.unitaryGroup (Fin 2) ℂ) (hdet : U.det = 1) :
      ∃ (β : ℝ) (γ : ℝ) (δ : ℝ), U = Euler.rzMat β * axisRot 1 0 0 γ * Euler.rzMat δ

      The z-x-z Euler decomposition, from the z-y-z one by conjugating with R_z(π/2).

      theorem QuantumInfo.SU2.exists_euler_two_axes {U : Matrix (Fin 2) (Fin 2) ℂ} (hU : U ∈ Matrix.unitaryGroup (Fin 2) ℂ) (hdet : U.det = 1) :
      ∃ (β : ℝ) (γ : ℝ) (δ : ℝ), U = axisRot (√2 / 2) 0 (√2 / 2) β * axisRot (√2 / 2) 0 (-(√2 / 2)) γ * axisRot (√2 / 2) 0 (√2 / 2) δ

      ★★ The Euler decomposition about the two orthogonal axes (1, 0, ±1)/√2: every determinant-one unitary is a product of three rotations about them, alternating. These are the two axes the Clifford+T words reach.

      The generators as a monoid #

      theorem QuantumInfo.SU2.pow_mul_pow_eq_one {A B : Matrix (Fin 2) (Fin 2) ℂ} (h : A * B = 1) (n : ℕ) :
      A ^ n * B ^ n = 1

      The limits of Clifford+T words: a closed submonoid of the 2 × 2 matrices.

      Equations
      Instances For

        A dense circle of angles fills the circle #

        theorem QuantumInfo.SU2.mem_closure_range_axisRot_of_irrational {a b c θ : ℝ} (hirr : Irrational (θ / (4 * Real.pi))) (α : ℝ) :
        axisRot a b c α ∈ closure (Set.range fun (k : ℤ) => axisRot a b c (↑k * θ))

        The rotations about a fixed axis by the integer multiples of an angle that is an irrational multiple of 4π are dense in the whole circle of rotations about that axis.

        theorem QuantumInfo.SU2.axisRot_int_mul_mem {K : Submonoid (Matrix (Fin 2) (Fin 2) ℂ)} {a b c θ : ℝ} (hu : a ^ 2 + b ^ 2 + c ^ 2 = 1) (hg : axisRot a b c θ ∈ K) (hg' : axisRot a b c (-θ) ∈ K) (k : ℤ) :
        axisRot a b c (↑k * θ) ∈ K
        theorem QuantumInfo.SU2.axisRot_mem_of_irrational {K : Submonoid (Matrix (Fin 2) (Fin 2) ℂ)} (hK : IsClosed ↑K) {a b c θ : ℝ} (hu : a ^ 2 + b ^ 2 + c ^ 2 = 1) (hirr : Irrational (θ / (4 * Real.pi))) (hg : axisRot a b c θ ∈ K) (hg' : axisRot a b c (-θ) ∈ K) (α : ℝ) :
        axisRot a b c α ∈ K

        ★ One rotation with an irrationally related angle gives the whole circle, inside any closed submonoid that contains it and its inverse.

        The two circles the words reach #

        theorem QuantumInfo.SU2.wAxis_unit :
        (√2 / 2) ^ 2 + 0 ^ 2 + (-(√2 / 2)) ^ 2 = 1
        theorem QuantumInfo.SU2.uAxis_unit :
        (√2 / 2) ^ 2 + 0 ^ 2 + (√2 / 2) ^ 2 = 1

        H is the π rotation about (1, 0, 1)/√2, up to the phase i.

        ★ The second axis. The π rotation about the word's axis, followed by H, is (up to the phase i) a rotation about (1, 0, -1)/√2 — the cross product of the two axes — through wAngle.

        The first circle is reached by the word's powers #

        ★★ Every rotation about the word's own axis is a limit of Clifford+T words.

        The second circle #

        ★★ Every rotation about (1, 0, -1)/√2 is a limit of Clifford+T words.

        The third circle: conjugating by Z #

        noncomputable def QuantumInfo.SU2.zGateM :
        Matrix (Fin 2) (Fin 2) ℂ

        Z, as the fourth power of T.

        Equations
        Instances For
          theorem QuantumInfo.SU2.zGateM_eq :
          zGateM = !![1, 0; 0, -1]
          theorem QuantumInfo.SU2.zGateM_conj_su2 (w x y z : ℝ) :
          zGateM * su2 w x y z * zGateM = su2 w (-x) (-y) z
          theorem QuantumInfo.SU2.zGateM_conj_axisRot (α : ℝ) :
          zGateM * axisRot (√2 / 2) 0 (-(√2 / 2)) (-α) * zGateM = axisRot (√2 / 2) 0 (√2 / 2) α

          ★★ Every rotation about (1, 0, 1)/√2 is a limit of Clifford+T words — the Z conjugate of the second circle, and the axis orthogonal to it.

          Clifford+T fills SU(2) #

          ★★ Every determinant-one 2 × 2 unitary is a limit of Clifford+T words. The two circles (1, 0, ±1)/√2 are orthogonal, so the Euler decomposition about them writes any such unitary as a product of three rotations, each of them a limit of words.

          ★★ Clifford+T is dense in U(2) modulo phase: every 2 × 2 unitary becomes a limit of Clifford+T words after multiplication by one phase.