The trigger
A paper by Google DeepMind and Google Quantum AI (arXiv 2611.09822, submitted November 6, 2026) has been released. In this study, the Gemini language model team was tasked with designing quantum circuits, and Lean 4-based quantum Hoare logic was used to mechanically prove their correctness and cost. It is reported that the cost, calculated as the product of the number of qubits and the number of T gates, was reduced to 1/290 for the arcsin circuit. However, the related code has not yet been made public. We also discussed this topic in our AI dialogue program, where the question of whether it could actually be tested locally arose. Therefore, we examined QEDIA, a verification framework, and attempted to build and run the environment.
What is QEDIA?
This time, we focused on "QEDIA: Quantum Program Verification in Lean" (arXiv 2610.17708). The authors are Yuanjie (Collin) Ren, Mingsheng Ying, and five others. This project implements a quantum Hoare logic (QHL+) that can handle classical variables on top of Lean 4. It is built on Mathlib, a standard library for mathematics, and can handle quantum while-programs, arrays, and parameterized gates. The paper reports that most of the components and proofs were created by an LLM proof agent while humans were supervising. It is positioned as "the first mechanically formalized quantum program logic created by an LLM agent." The code is publicly available under the Apache-2.0 license on GitHub, and we tested the version from October 12, 2026.
Running it locally
We set up the environment on November 11, 2026. First, we installed elan, a tool for managing Lean 4 versions, and downloaded the dependencies for Lean 4 (v4.33.0-rc1) and Mathlib specified by QEDIA. The download size was approximately 7.5 GB, and it took about 2 minutes and 25 seconds. Next, we ran the lake build command to compile the examples, and all builds succeeded. This success means that Lean mechanically verified the proofs from start to finish. It is also notable that this was done on a single server with 32 CPU cores without using a GPU. The repository contains 218 .lean files and about 60,000 lines of code, but our search of the entire files revealed not a single "sorry," which marks skipped proofs.
Reading the Bell state proof
Let's look in detail at one of the successfully built examples, the generation of the Bell state. Here, it is proven that applying the Hadamard gate H and then the CNOT gate to the initial state |00⟩ results in the state ( |00⟩+|11⟩ )/√2. On Lean, this is expressed as the triple {|00⟩} H; CNOT {|Φ⁺⟩}, and the assembly of all 3,105 components succeeded. This proof follows the same flow as the program: it applies the "unitary rule" once for each gate and combines them using the "sequential composition rule." The remaining calculations are just H|0⟩⊗|0⟩ = |+⟩⊗|0⟩ and CNOT(|+⟩⊗|0⟩) = |Φ⁺⟩. The triple {P} C {Q} mentioned here asserts that "executing program C from a state where the previous condition P holds results in a state where the subsequent condition Q holds." Here, the conditions are represented by projections to states |v⟩⟨v|, and it is shown up to the form that "for any input density matrix, the probability of being |00⟩ becomes the lower bound of the probability of being |Φ⁺⟩ after the operation."
QFT without fixing n
Furthermore, there are examples proved in a general form without specifying the number of qubits n. The paper proves that the QFT (Quantum Fourier Transform) circuit matches its mathematical definition, except for a global phase, using notation independent of n. Here, the assembly of all 3,121 components succeeded as well. It expands from the triples for each basis input and the triple for a uniform superposition input, determining the remaining relative phases. When we asked Lean to verify this using #print axioms, it showed that the only axioms relied upon were the three commonly used in Lean (propext, Classical.choice, Quot.sound). No extra axioms were added for workarounds.
Findings and limitations
We confirmed that even with a large number of qubits, proofs can be carried out symbolically without writing out the entire state vector. The fact that QFT is proved without specifying n is a good example of this. However, what we must recognize is that the scope of what can be proved is limited to the scope of the written specifications. If the specification itself is incorrect, it will still be mechanically proven as correct. The part of Google's paper where AI searches for circuits and writes the proofs was not tested this time. Additionally, what we performed this time was only the assembly (= verification of the proofs); we did not write new proofs ourselves.
We also discussed the content of Google's paper in the AI dialogue. It covers the concept of using quantum Hoare logic to "verify backwards from the final state to the input." Please also watch the YouTube episode.