The binary diagonal formula for collective F_z
OpenQAlgorithms.Papers.Independent.Intake100.P95.collectiveZBinaryFormulaLet and define , with identities on the other qubits. For a computational basis string , including leading zeroes,
Equivalently the th diagonal entry in the paper's one-based indexing is obtained from the -digit binary expansion of . The formal index conversion uses the fixed most-significant-bit-first equivalence. This explicit formula keeps both the factor and all digits.
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P95
namespace QAlgorithms.Papers.Independent.Intake100.P95
open scoped BigOperators
open QAlgorithms.Papers.Independent.Information100.P32 (Op evolution)
open QAlgorithms.Papers.Independent.Advance50.P38 (comm realHSPairing)
open QAlgorithms.Papers.Independent.Information100.P10 (pauli)
open QAlgorithms.Papers.Independent.Claimed50.P03 (wordMatrix wordSupport)
noncomputable section
/-- Lemma 8, PDF p.16, (86)–(89): n binary digits, including leading
zeroes, and the essential factor 1/2. Bit order is the frozen MSB convention;
the diagonal sum itself is invariant under reversing the bit order. -/
theorem collectiveZBinaryFormula {n : ℕ} (hn : 0 < n) :
collectiveZ n = Matrix.diagonal (fun b : QAlgorithms.Qubits n =>
(1 / 2 : ℂ) * ∑ k : Fin n, if b k then (-1 : ℂ) else 1) ∧
(∀ i : Fin (2 ^ n),
collectiveZ n ((QAlgorithms.bitsEquivFin n).symm i) ((QAlgorithms.bitsEquivFin n).symm i) =
(1 / 2 : ℂ) * ∑ k : Fin n,
if ((QAlgorithms.bitsEquivFin n).symm i) k then (-1 : ℂ) else 1) := by sorry
end
end QAlgorithms.Papers.Independent.Intake100.P95
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
For every natural number , let be the set of -bit strings and let be the matrix acting as , in Boolean order false then true, on bit , and as the identity on every other bit. The matrix equals the diagonal matrix whose entry at is . In addition, for every integer index with , let be the unique -bit string with , so bit is most significant. Then , with the scalar and sums regarded as complex numbers.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.