Exact factor masks for the binary Pauli sampler #
The factor program is independent of the field basis and the question type. Its masks are the actual downsized, numbered factors on every binary prefix.
Equations
- MIPRE.QLD.PauliCL.factorFlag r (MIPRE.QLD.PauliCL.Coord.point W i) = decide (r = 3)
- MIPRE.QLD.PauliCL.factorFlag r (MIPRE.QLD.PauliCL.Coord.scalar W) = decide (r = 3)
- MIPRE.QLD.PauliCL.factorFlag r MIPRE.QLD.PauliCL.Coord.seed = decide (r = 1)
- MIPRE.QLD.PauliCL.factorFlag r (MIPRE.QLD.PauliCL.Coord.direction i) = decide (r = 2)
Instances For
theorem
MIPRE.QLD.PauliCL.factorFlags_getD
(m r : ℕ)
(c : Coord m)
:
List.getD (Introspection.PauliStageProgram.factorFlags m r) (↑((coordNumbering m) c)) false = factorFlag r c
theorem
MIPRE.QLD.PauliCL.factorFlags_ofFn
(m r : ℕ)
:
Introspection.PauliStageProgram.factorFlags m r = List.ofFn fun (i : Fin (3 * m + 3)) => factorFlag r ((coordNumbering m).symm i)
theorem
MIPRE.QLD.PauliCL.indicatorBits_binaryRegister
{m k : ℕ}
(S : Finset (Coord m))
:
CL.indicatorBits (Finset.map (binaryCoordEquiv m k).toEmbedding (S ×ˢ Finset.univ)) = (List.ofFn fun (i : Fin (3 * m + 3)) => List.replicate k (decide ((coordNumbering m).symm i ∈ S))).flatten
theorem
MIPRE.QLD.PauliCL.binaryPresentation_factor
{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
[Algebra (ZMod 2) F]
{m k : ℕ}
[NeZero m]
(χ : F → Fin m)
(b : Module.Basis (Fin k) (ZMod 2) F)
(T : Ty)
(r : ℕ)
(u : Coord m → F)
:
(ExplicitSeed.binaryPresentation χ b T).factorOfPrefix r ((binaryVectorEquiv b) u) = Finset.map (binaryCoordEquiv m k).toEmbedding ((ExplicitSeed.presentation χ T).factorOfPrefix r u ×ˢ Finset.univ)
theorem
MIPRE.QLD.PauliCL.factorBits_correct
{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
[Algebra (ZMod 2) F]
{m k : ℕ}
[NeZero m]
(χ : F → Fin m)
(b : Module.Basis (Fin k) (ZMod 2) F)
(T : Ty)
(j r : ℕ)
(hr1 : 1 ≤ r)
(hr3 : r ≤ 3)
(u : Fin ((3 * m + 3) * k) → ZMod 2)
:
Exact correctness for every type, every legal stage, every binary prefix, and any chosen field basis. No prefix validity assumption is needed.