AFTD Auto-Formalizing Theoretical Domains

phase_query_acceptance_probability

def

The probability that the output bit is true after a specified finite-dimensional phase-query circuit on a Boolean input.

Statement

noncomputable def phase_query_acceptance_probability {N q : ℕ}
    {B : Type} [Fintype B] (reg : B → Option (Fin N)) (ψ0 : B → ℂ)
    (U0 : Matrix B B ℂ) (steps : Fin q → Matrix B B ℂ)
    (out : B → Bool) (x : Fin N → Bool) : ℝ
Source
The phase-query circuit model in arXiv:2611.16412 Section 2.1, matching the existing exact_quantum_query_complexity definition.
Verified
17 Nov 2026
Axioms
none listed
Used by 1

Lean source view module on GitHub

/-- Acceptance probability of a finite phase-query circuit. -/
noncomputable def phase_query_acceptance_probability {N q : ℕ}
    {B : Type} [Fintype B] (reg : B → Option (Fin N)) (ψ0 : B → ℂ)
    (U0 : Matrix B B ℂ) (steps : Fin q → Matrix B B ℂ)
    (out : B → Bool) (x : Fin N → Bool) : ℝ :=
  ∑ b, if out b then Complex.normSq
    (((List.ofFn steps).foldl
      (fun v U => Matrix.mulVec U (fun b =>
        (match reg b with | none => (1 : ℂ) | some i => if x i then -1 else 1) * v b))
      (Matrix.mulVec U0 ψ0)) b) else 0
See it in the graphDiscuss this resultChallenge it