Seeded Haar-mixture testing experiment
DefinitionIncoherentPurity_Adaptive_Supplement_TestingFor and , compute the two strengths
Given the published protocol , a copy budget , and the published normalized Haar law, define the testing law under hypothesis by drawing a single unit direction and then drawing the entire Born transcript on . The same protocol and its same state-independent seed law are used under either hypothesis. Thus
The seed is kept in the transcript. When is non-adaptive, conditioning on both the seed and the one shared direction yields independent outcomes of its preselected POVMs. The direction is not resampled for each copy. These are computed laws, not free transcript measures or KL certificates. This experiment is the testing model in the proof of Proposition 5.4.
Formalization Note Histories retain the published infinite tagged sequence with unused entries fixed. The spike-parameter constructor proves its range from the displayed dimension and precision bounds.
import Definitions.Def_IncoherentPurity_Adaptive_Supplement_Spike
open MeasureTheory ProbabilityTheory
open scoped ENNReal
set_option autoImplicit false
noncomputable section
namespace IncoherentPurity.Adaptive.Supplement
/-- The two spike strengths used in Proposition 5.4. -/
def testStrength (d : ℕ) (ε : ℝ) (b : Bool) : ℝ :=
(if b then 1 + 8*ε else 1) / Real.sqrt d
/-- A constructor check on the proof-supported range, not a promise about an unknown state. -/
def testParameter {d : ℕ} (hd : 16 ≤ d) (ε : ℝ) (hε : 0 < ε)
(hsmall : ε ≤ 1/576) (b : Bool) : Set.Icc (0 : ℝ) 1 := by
have hd' : (16 : ℝ) ≤ d := by exact_mod_cast hd
have hs : 0 ≤ Real.sqrt (d : ℝ) := Real.sqrt_nonneg _
have hs2 := Real.sq_sqrt (Nat.cast_nonneg d : (0 : ℝ) ≤ d)
have hs4 : 4 ≤ Real.sqrt (d : ℝ) := by nlinarith
refine ⟨testStrength d ε b, ?_⟩
cases b <;> simp only [testStrength, Bool.false_eq_true, ↓reduceIte]
· constructor
· positivity
· apply (div_le_one (by linarith : 0 < Real.sqrt (d : ℝ))).2
linarith
· constructor
· positivity
· apply (div_le_one (by linarith : 0 < Real.sqrt (d : ℝ))).2
linarith
/-- The experiment (5.13)--(5.16): draw ONE Haar direction, then the entire published
Born transcript with its independent classical seed. The seed remains in the transcript.
For `IsNonadaptive P`, all the measurement choices depend only on that seed; conditioning
on seed and direction therefore gives the product of the preselected single-copy laws. -/
def testingLaw {d : ℕ} (hd : 16 ≤ d) (H : HaarBasis d) (P : Protocol d)
(N : ℕ) (ε : ℝ) (hε : 0 < ε) (hsmall : ε ≤ 1/576) (b : Bool) :
Measure (P.Seed × (ℕ → (Unit ⊕ P.Outcome))) :=
let hpos : 0 < d := lt_of_lt_of_le (by norm_num : 0 < 16) hd
(directionHaar hpos H).bind (fun v =>
transcriptLaw P (spikeState hpos (testParameter hd ε hε hsmall b) v) N)
end IncoherentPurity.Adaptive.Supplement