Aether Catalog definitions — Tropical_QuantumSystems_QuantumTropicalComputation
DefinitionTropical_QuantumSystems_QuantumTropicalComputationaether-catalogtropical
Definition bundle for the Aether Catalog module Tropical.QuantumSystems.QuantumTropicalComputation, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Tropical/QuantumSystems/QuantumTropicalComputation.lean by skeleton subtraction import Mathlib /-! # CatalogBuild.Bridges.QuantumTropicalComputation Auto-generated from theorem catalog database. Domain: Bridges Declarations: 30 -/ noncomputable section /-- A qubit state: pair of complex amplitudes with |α|² + |β|² = 1. -/ structure Qubit where alpha : ℂ beta : ℂ normalized : Complex.normSq alpha + Complex.normSq beta = 1 /-- The |0⟩ state. -/ def qubit0 : Qubit where alpha := 1; beta := 0 normalized := by simp [Complex.normSq_one, Complex.normSq_zero] /-- The |1⟩ state. -/ def qubit1 : Qubit where alpha := 0; beta := 1 normalized := by simp [Complex.normSq_one, Complex.normSq_zero] /-- Born rule: probability of measuring |0⟩. -/ def probZero (q : Qubit) : ℝ := Complex.normSq q.alpha /-- Born rule: probability of measuring |1⟩. -/ def probOne (q : Qubit) : ℝ := Complex.normSq q.beta /-- The Hadamard coefficient: 1/√2. -/ def hadamardCoeff : ℝ := 1 / Real.sqrt 2 /-- Tropical inner product: ⟨x, y⟩_trop = max_i(xᵢ + yᵢ). -/ def tropicalInnerProduct2 (x₁ x₂ y₁ y₂ : ℝ) : ℝ := max (x₁ + y₁) (x₂ + y₂) /-- Boolean → Tropical embedding. -/ def boolToTropical (b : Bool) : ℝ := if b then 0 else -1 /-- Tropical → Quantum embedding: x ↦ exp(x). -/ def tropicalToQuantum (x : ℝ) : ℝ := Real.exp x /-- The Maslov deformation: a ⊕_ε b = ε · log(exp(a/ε) + exp(b/ε)). -/ def maslovDeform (eps : ℝ) (a b : ℝ) : ℝ := eps * Real.log (Real.exp (a / eps) + Real.exp (b / eps)) /-- Classical repetition code: majority vote. -/ def majorityVote3 (b₁ b₂ b₃ : Bool) : Bool := (b₁ && b₂) || (b₂ && b₃) || (b₁ && b₃) end