The matrices , , and the roots
Definitionhardy2001_qubitFor real parameters , Section 8.6 (and Section 5) of the paper consider the matrix
the change-of-variables matrix
the matrix
and the two numbers
is the probability of obtaining the -th fiducial measurement on the -th fiducial state of a system with , . Pure states then lie on the surface .
Formalization Note Rows and columns are indexed from . is Real.sqrt, which returns on negative arguments. Statements that use assume , where the radicand is nonnegative.
import Mathlib
namespace HardyFiveAxioms
/-- The matrix `D` of the `N = 2`, `K = 4` case (Hardy 2001, Eqs. (34) and (74)), with
fiducial vectors indexed `0, 1, 2, 3` (the paper's `1, 2, 3, 4`). -/
def qubitD (a b c : ℝ) : Matrix (Fin 4) (Fin 4) ℝ :=
!![1, 0, 1 - a, 1 - b;
0, 1, a, b;
1 - a, a, 1, c;
1 - b, b, c, 1]
/-- The change of variables `r = C v` (Hardy 2001, Eq. (78)). -/
def qubitC : Matrix (Fin 4) (Fin 4) ℝ :=
!![1, 0, 0, 0;
1, 1, 0, 0;
0, 0, 1, 0;
0, 0, 0, 1]
/-- The `3 × 3` matrix `A` of Hardy 2001, Eq. (83). -/
noncomputable def qubitA (a b c : ℝ) : Matrix (Fin 3) (Fin 3) ℝ :=
!![1 / 2, a - 1 / 2, b - 1 / 2;
a - 1 / 2, 1 / 2, c - 1 / 2;
b - 1 / 2, c - 1 / 2, 1 / 2]
/-- `c₊ = 1 - a - b + 2ab + 2√(ab(1-a)(1-b))` (Hardy 2001, Eqs. (37) and (85)). -/
noncomputable def cPlus (a b : ℝ) : ℝ :=
1 - a - b + 2 * a * b + 2 * Real.sqrt (a * b * (1 - a) * (1 - b))
/-- `c₋ = 1 - a - b + 2ab - 2√(ab(1-a)(1-b))` (Hardy 2001, Eqs. (37) and (85)). -/
noncomputable def cMinus (a b : ℝ) : ℝ :=
1 - a - b + 2 * a * b - 2 * Real.sqrt (a * b * (1 - a) * (1 - b))
end HardyFiveAxioms
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
NON-BLIND READ-BACK — NOT INDEPENDENT TESTIMONY. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, with full knowledge of the source paper and of the intended meaning. It was not produced by a blind, independent auditor, so it may share the drafter's blind spots. Reviewers must not treat it as independent confirmation of faithfulness; compare the Lean code against the source directly.
For real numbers (no constraints):
- is the real matrix with rows , , , . It is symmetric.
- is the real matrix with rows , , , .
- is the real symmetric matrix with diagonal entries , entry , entry , and entry .
- and . Here is the nonnegative square root for and is for , so outside the radicand may be negative and then .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.