§XI.C (150)–(154), Fig.7: finite Shor-state circuit
OpenQAlgorithms.Papers.Independent.Intakenext100.P12.shor_state_circuitUse the paper's and the chronological Fig.7 decompositions. The explicitly defined three-qubit circuit contains exactly five , four , and eight CNOT gates, counted from its own gate list. Its matrix is
On it prepares, up to this global phase, . This vector spans the simultaneous eigenspace of and its cyclic permutations.
The gate counts are tied to the actual matrix-evaluated circuit.
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P12
noncomputable section
open scoped BigOperators
open MeasureTheory Matrix ComplexConjugate
open QAlgorithms.Papers.Independent.Dependency50.P10 (Phase sigma)
namespace QAlgorithms.Papers.Independent.Intakenext100.P12
/-- Section XI.C (150)–(154), Fig.7, PDF pp.18–19: exact finite Shor-state circuit.
The source S phases are retained, so the resulting global phase is exp(-i*pi/8). -/
theorem shor_state_circuit :
(∀ k : Fin 3, (shorStabilizer k).mulVec shorState = shorState) ∧
(∀ psi : (Fin 3 → Bool) → ℂ,
(∀ k : Fin 3, (shorStabilizer k).mulVec psi = psi) ↔ ∃ c : ℂ, psi = c • shorState) ∧
shorWord.countP (fun g => match g with | .phase false _ => true | _ => false) = 5 ∧
shorWord.countP (fun g => match g with | .phase true _ => true | _ => false) = 4 ∧
shorWord.countP (fun g => match g with | .cx _ _ => true | _ => false) = 8 ∧
shorEval shorWord = cisPhase (-Real.pi / 8) • ccz ∧
(∀ b : Fin 3 → Bool,
(shorEval shorWord).mulVec (fun _ => (Real.sqrt 8 : ℂ)⁻¹) b =
cisPhase (-Real.pi / 8) *
(if b 0 && b 1 && b 2 then -1 else 1) / (Real.sqrt 8 : ℂ)) := by sorry
end QAlgorithms.Papers.Independent.Intakenext100.P12
end
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
Let for , where when all three bits are , and otherwise; let be unless is with bit flipped, in which case it is when both other bits of are , and otherwise. The declaration asserts simultaneously that for every ; that for every function , all three equalities hold if and only if for some , including ; and the following facts about the ordered instruction list
Here has diagonal matrix entries , and has matrix entry exactly at pairs , with all other entries . The list contains exactly five instructions, four instructions, and eight instructions. If and , then , where is diagonal with ; moreover, for every , applying to the constant amplitude function gives .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.