← All comparisons

Fanal vs. QBricks

ESOP 2021 · Why3 / SMT

About QBricks

Automated verification of quantum circuit-building programs using Why3 and SMT solvers. Achieves 94%+ automated proof rate through path-sum semantics. Verified Shor’s order-finding circuit.

Verification Paradigm

AspectQBricksFanal
ApproachDeductive verification with SMT solversFoundational interactive theorem proving
LogicHybrid Quantum Hoare Logic (HQHL) embedded in Why3Planned: Quantum Hoare Logic over labelled Dirac assertions
Proof dischargeProof obligations sent to SMT solvers (Alt-Ergo, CVC4, Z3)Proofs checked by Lean 4 kernel; planned D-Hammer tactic
WorkflowWrite code + specs -> HQHL generates obligations -> SMT solvers dischargeWrite definitions + state theorems -> prove interactively with tactics

Semantics

AspectQBricksFanal
Core representationHigher-Order Path-Sums (HOPS) — symbolic decomposition of unitariesConcrete matrices via Mathlib with Dirac notation layer
ScalabilityAvoids matrix explosion; symbolic path-sum representationMatrices grow exponentially; mitigated by symbolic Dirac layer
CompositionalityHOPS closed under sequential/parallel compositionDirac terms compose; matrix semantics via tensor product
Register managementContiguous blocks of qubits; bit-vectorsHierarchical access-path labels
ParametricityNative — HOPS terms reference DSL variablesSupported via Lean variables and CExpr
PartialityUses bottom element for invalid circuitsOption-returning eval for dynamic premises

Automation Level

AspectQBricksFanal
Deutsch-Jozsa72 obligations, >84% automatedDirac encoding available; full verification planned
Grover698 obligations, >95% automatedNot yet verified
QFT62 obligations, >85% automatedNot yet verified
QPE423 obligations, >93% automatedNot yet verified
Shor-OF1522 obligations, >95% automatedFinal verification goal (planned)
Overall2777 obligations total, >94% automatedAutomation under development (D-Hammer integration)

Expressiveness

AspectQBricksFanal
Circuit descriptionFirst-class via QBricks-DSL (SEQ, PAR, ANC, CTL, invert)Planned via Program module
Dirac notationIndirect (via HOPS path-sums)First-class, multi-layered (Dirac + LDirac)
Classical computationIntegers, booleans, iterationCExpr with data types, variables, arithmetic
MeasurementNot a language construct; probabilistic reasoning via specsPlanned in Program module
Classical controlNot supportedPlanned in Program module
Specification languageQBricks-Spec (first-order predicate logic)Planned Assertion module (orthomodular lattice-based)

Trust Base

AspectQBricksFanal
Core TCBWhy3 + SMT solvers (Alt-Ergo, CVC4, Z3)Lean 4 kernel (~10K lines of C++)
TCB sizeLarge (Why3 + multiple SMT solvers)Small (Lean 4 kernel)
Axioms32 axiomatic definitions for math structuresLean standard axioms only
Proof certificatesSMT solver output (not independently checkable)Lean kernel-checked terms
Logic soundnessClaimed, not mechanizedWould be mechanized within Lean
Math library14,000+ lines WhyML with axiomsMathlib (kernel-verified, no custom axioms)

Case Studies

AspectQBricksFanal
QFTVerified parametrically — 65 LOC, 62 proof obligationsNot yet verified
QPEVerified parametrically — 319 LOC, 423 proof obligationsNot yet verified
Shor-OFVerified parametrically — 809 LOC, 1522 proof obligations, includes complexity proofFinal verification goal
GroverVerified parametrically — 416 LOC, 698 proof obligationsNot yet verified
Deutsch-JozsaVerified parametrically — 53 LOC, 72 proof obligationsDirac encoding available
Development effort1.5 person-years for framework + 1-10 person-days per algorithmActive development with AI-assisted workflow

Strengths and Trade-offs

AspectQBricksFanal
Automation94%+ proof obligations discharged automaticallyAutomation under development; aims for kernel-checked push-button proofs
Complexity reasoningCan reason about circuit size (polynomial gate count)Not yet addressed
Foundational assurancePragmatic (cross-checking via multiple SMT solvers)Strong (every proof independently verifiable by Lean 4)
EcosystemWhyML (smaller community)Lean 4 + Mathlib (growing community)

Summary: Key Differences

AspectQBricksFanal
Proof SystemWhy3 / First-order logic + SMTLean 4 / Dependent type theory
Trust BaseWhy3 + SMT solvers (not kernel-checked)Lean 4 kernel (fully verified)
Automation94%+ automatic via SMTTactic-assisted, D-Hammer integration
SemanticsPath-sum semanticsLabelled Dirac notation
ExpressivenessCircuit-building programsGeneral classical-quantum programs