Preparation law: from to the phased uniform superposition over
ProvedOPI.SymEnc.prep_lawFix the qubit layout PrepLay of the preparation for the real decoder: symbol registers , word register , resource registers, a basis of with identity on the pivot columns, ancillas and the -qubit gradient register. Let and . Let be a finite set of words with and injective; in the application, is the code . The preparation program runs:
- the repeat-until-success jobs, with attempts each;
- the reversible linear map on the pivot coordinates;
- the table phase on , implemented approximately by kickback into the gradient register.
Statement. With the product of the job weights and ,
where . Explicitly: if a continuation succeeds with probability at least from the target state, for every classical memory, then the prepared program succeeds with probability at least from .
This is the complete state-preparation step of each trial. It reaches the ideal input of the Regev-style reduction, up to the success weight of the repeat-until-success stages and a phase error of order .
import Definitions.Def_TwoFoldOPI_CL_Part02
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Circuit
import Definitions.Def_QAlgorithms_Defs_GradientMethods
import Definitions.Def_QAlgorithms_Defs_OPIOraclePrograms
import Definitions.Def_QAlgorithms_Defs_OPIUniformity
import Definitions.Def_QAlgorithms_Defs_Fourier
import Definitions.Def_TwoFoldOPI_elemBits
import Definitions.Def_TwoFoldOPI_schurSquare
import Definitions.Def_TwoFoldOPI_schurFailureSum
import Definitions.Def_CodingTheory
import Definitions.Def_OAIThreeMachineSched01
import Definitions.Def_CookLevin_Cost
import Definitions.Def_TwoFoldOPI_codeOf
import Definitions.Def_TwoFoldOPI_solves
import Definitions.Def_TwoFoldOPI_Input
import Definitions.Def_TwoFoldOPI_CLSerializableF
open OPI OPI.SymEnc
open QAlgorithms TwoFoldOPI
variable {n b : ℕ}
variable {F : AvgCaseTI.FieldPres} {m t : ℕ}
set_option hygiene false in
local notation "L" => bitsPerSymbol F
variable {reg : Fin m × Bool × Fin L ↪ Fin n} {D : RealDec F reg b t} {kd : ℕ}
open Classical
theorem OPI.SymEnc.prep_law (hq : 2 ≤ Fintype.card F.F) (hp : 0 < F.p) {c out : ℕ} (event : Option (Fin out → Bool) → Prop)
(X : PrepLay D kd) (β : Fin m → F.F) (Ds : Finset (Fin m → F.F))
(hDs : ∀ d, d ∈ Ds ↔ ∃ a, Matrix.vecMul a X.G = d)
(hGi : Function.Injective fun a : Fin kd → F.F => Matrix.vecMul a X.G) (dst : Fin c) (R : ℕ) :
PreLaw (N := n + b) (c := c) (out := out) event (X.pre β dst R) (tens (sysZero n) (gradVec b))
(tens (∑ d ∈ Ds, bfac (wRof (F := F) X.Rr X.hRd) (delta (encW F m d)) (psiN D Ds β d)) (gradVec b))
(X.W β R * (Complex.normSq (cAll D kd) * Ds.card))
(2 * (m * (2 * Real.pi / 2 ^ b)) * (X.W β R * (Complex.normSq (cAll D kd) * Ds.card))) := by sorry