AFTD Auto-Formalizing Theoretical Domains

ising_graph_state

def

For a graph G on n vertices with edge angles θ, the Ising graph state psi_G is exp(-i sum_{uv in E} θ_uv Z_u Z_v) |+⟩^{⊗ n}, with amplitude on computational basis bitstring x given by (1 / sqrt(2^n)) exp(-i sum_{uv in E} θ_uv (-1)^{x_u + x_v}).

Statement

open scoped Classical in
noncomputable def ising_graph_state (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (θ : Sym2 (Fin n) → ℝ) : Hn n
Defined in
OP-1695; arXiv:2610.27080
Verified
14 Nov 2026
Axioms
none listed
Built on 1
  • HnThe $n$-qubit Hilbert space $\mathcal{H}_n = \ell^2\!\bigl(\{0,1\}^n,\mathbb{C}\bigr)$, implemented as \texttt{EuclideanSpace ℂ (Fin n →…

Read back from the Lean

ising_graph_state n G θ defines a state vector in EuclideanSpace ℂ (Fin n → Fin 2) (abbreviated Hn n), parameterized by: - a natural number n, - a simple graph G on vertex set Fin n with decidable adjacency ([DecidableRel G.Adj]), - a function θ : Sym2 (Fin n) → ℝ assigning a real weight to each unordered pair of vertices. The resulting vector assigns to each binary string/assignment x : Fin n → Fin 2 the complex amplitude: $$\frac{1}{\sqrt{2^n}} \exp\left( -i \sum_{e \in G\text{.edgeFinset}} \theta(e) \cdot s_x(e) \right)$$ where for each edge $e = \{u, v\}$, the sign factor $s_x(e)$ is $1$ if $x(u) = x(v)$ and $-1$ if $x(u) \neq x(v)$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

open scoped Classical in
/-- The Ising graph quantum state exp(-i ∑ θ_uv Z_u Z_v) |+⟩^{⊗ n}. -/
noncomputable def ising_graph_state (n : ℕ) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] (θ : Sym2 (Fin n) → ℝ) : Hn n := EuclideanSpace.equiv (Fin n → Fin 2) ℂ |>.symm (fun x =>
    (1 / Real.sqrt (2 ^ n : ℝ) : ℂ) *
    Complex.exp (- Complex.I * ∑ e ∈ G.edgeFinset,
      ((θ e : ℂ) * Sym2.lift ⟨fun u v => if x u = x v then (1 : ℂ) else (-1 : ℂ),
                             fun u v => by simp [eq_comm]⟩ e)))
See it in the graphDiscuss this resultChallenge it