Gemini 4 Wrote the Circuit. Lean Checked the Proof
DeepMind used Gemini 4 agents to find faster quantum circuits, then checked the proofs in Lean. Your product needs a checker the model does not grade.
By Muhammad Saif and Aashan Khan · Techtribe co-founders
DeepMind's note on faster quantum algorithms is a research result and a product lesson sitting in the same place. Teams of Gemini 4 agents searched for quantum circuits that did less work. The researchers then checked that the circuits were mathematically correct with formal proofs in Lean. The agents were allowed to be inventive. The proof checker was not asked to be kind. A circuit that did not pass did not count.
The write-up is Finding faster quantum algorithms with agents and formal verification. You do not need a quantum roadmap to use the pattern. You need a task where a fluent answer can be wrong, and a check that does not live inside the same model that wrote the answer. Most AI products have the fluent answer. Fewer have the check. The ones that lose customers are the ones that shipped the answer and called the demo an eval.
This is the same shape as what breaks when an AI-built app has no tests, moved up one level. Tests tell you the code still builds. An eval tells you the model's behavior still matches the job. Formal verification tells a mathematician the object meets a spec a machine can refuse. You pick the strongest check you can actually run on every change. You do not pick the one that sounds like DeepMind if you cannot staff it.
What the research actually split in two
The agents' job was search. Quantum circuits are a huge space of equivalent ways to compute something, and most of that space is wasteful. An agent team can propose rewrites, try them, and keep the ones that look shorter or cheaper. That is a good job for a system that is tireless and sometimes wrong. Wrong is cheap when a checker throws the candidate away. Wrong is expensive when the candidate is a refund, a medical routing decision, or a sentence in front of a customer.
Lean's job was the opposite of search. A proof in Lean type-checks or it does not. The model does not get a vote at the end. DeepMind's point, in the framing of the post, is that agent search plus a machine-checked proof is a way to move faster without relaxing the definition of correct. The speed is in the proposal. The standard is in the verifier.
You can copy the split without copying the tools. Proposal: the model drafts, retrieves, calls a tool, suggests a patch. Verifier: something that fails closed. A schema that rejects a missing field. A policy engine that rejects a refund over a limit. A unit test the agent did not write. A diff a person must approve on the paths you named. An eval set of questions with answers you graded last week. These are all verifiers. They vary in strength. They share the property that the generator does not grade its own homework.
The failure mode in product teams is to use the generator as the verifier because it is already in the request path. "Ask the model if the answer is grounded." Sometimes that catches a slip. It is not a proof. The model can be wrong twice, consistently. A second model from another vendor is a better check than the same model, and it is still a model. For some decisions that is enough. For a decision you would not want to reverse in public, add a check that is not a language model at all.
What a checker looks like in a product
Start from the incident you do not want, not from a framework.
If the product answers from documents, the checker is whether the cited passage exists and whether it belongs to this tenant. A citation that does not match the retrieved text fails the request. You show a fallback, not the fluent paragraph. That check is a string compare plus the tenant filter. It is closer to Lean than it is to a vibe. The tenant half of that failure is the incident in when one customer sees another's data.
If the product calls tools, the checker is the schema and the authorization, executed in code. The model proposes arguments. The handler rejects an argument the schema does not allow, and rejects an action the user cannot take. Tool calling without that handler is a demo. Gemini's tool-loading feature does not change the handler. It is discussed in how to build multi-tool agents. Load fewer schemas if you want. Still verify the call.
If the product writes code, the checker is the test suite, the type checker, and the policy on which files a person must approve. DeepMind checked mathematics with Lean. You check a pull request with CI that fails. An agent that can push, including one like Claude Ship, is only as safe as the checks it cannot talk its way past. Path-based approval is a verifier. A prompt that says "be careful" is not.
If the product gives advice a person will act on, the checker may be the person. That is allowed. Write it down. The draft sits in a queue. The send button is human. You have then not claimed the model is verified. You have claimed a workflow. Workflows are honest. Autonomous send, with a model judging itself, is how a wrong price leaves the building.
Evals sit beside these checks. An eval set is a list of inputs and a grading rule you can rerun when you change a prompt, a model, or a retrieval setting. Twenty cases beat a leaderboard. The cases should include the ones you got wrong in production, added the week they happened. A set that only contains the happy path will pass on the day you regress. DeepMind's verifier is extreme because the domain allows it. Your eval is the version you will actually run in CI. An eval that lives in a notebook nobody runs is a research note, which is fine for research and useless as a release gate.
How to introduce the split without a research org
Name the proposal and the verifier in the design doc in two lines. "The model drafts the refund reason. The billing service issues the refund only if the amount is under the user's limit and the order is in their account." The first line is the agent. The second is the checker. If you cannot write the second line, you are not ready to let the first line touch customers.
Put the verifier where a failed check stops the side effect. Logging a warning and proceeding is a metric. It is not a verifier. Lean does not warn and emit the circuit anyway. Your refund tool should not warn and refund anyway. The user can see a message that a person will review it. That message is a product decision. Ship it on purpose.
Store the failures. A rejected tool call, a citation mismatch, an eval case that flipped from pass to fail. These are the traces that tell you whether the generator is getting worse. A dashboard of latency without a dashboard of rejected checks hides the quality regression inside a fast response. Speed is what the agents in the DeepMind setup were optimizing. Correctness was a separate system. Your latency graph is not your quality graph.
Review the verifier when you change models. A new model can pass the old eval and fail a case you have not written. Add cases when you change models, from a sample of production traffic you are allowed to store. Do not paste raw customer content into a personal notebook to do it. The permission to store eval data is part of the design, covered alongside retention in keeping business data out of the wrong prompt path.
Keep a person on the irreversible set even after the eval looks good. Irreversible means money moved, a message sent, a record deleted, an access grant changed. The DeepMind result did not deploy a quantum computer off a green proof with no one watching. It produced a candidate a researcher could stand behind. Your production deploy is the moment you stand behind the candidate. For the long tail of reversible drafts, let the checker auto-accept. For the short list, require the person. Write the short list. If everything is on it, you have not split the work. If nothing is on it, you have not met a customer yet.
What does not hold
"We use a frontier model" does not hold as a verifier. Frontier models still propose false steps. The research result is interesting because the proof system is what made the speed usable. The model name is not the result.
Asking the same model to critique itself does not hold as the only gate. It catches some class of errors and misses the class where the model is confidently wrong. Use it as a cheap filter if you want. Keep a check that is not that model for the actions that matter.
A formal proof of a spec you do not have does not hold as a recommendation for a CRUD app. Adopting Lean for a marketing site is theater. Adopting a schema, a permission check, and twenty eval questions is the proportional version. Match the tool to the claim. If you claim a calculation is exact, test the calculation in code, not in prose.
An eval set written by the model and graded by the model does not hold. You can ask a model to draft cases. A person labels the ones that define the product. Otherwise you have built a loop that agrees with itself, which is the thing DeepMind's proof checker exists to interrupt.
Shipping the agent team before any checker because the demo recorded well does not hold. Demos are proposals. The week after launch is when you discover which verifier you skipped. Add the smallest one before the launch. Expand it from real failures after. A launch with no check is not a research program. It is a bet with the customer's data.
A release rule a small team can keep
Every prompt or model change reruns the eval set. A failed case blocks the change. New production failures become cases within the week, with the data minimized. Tool handlers reject unauthorized or ill-typed calls without calling the model for permission to reject. A named list of actions still requires a person. Someone owns the list.
That rule fits in a page. It is also the difference between an AI feature and a script that calls an API and hopes. DeepMind published a result that depended on the hope being checked by a system that can say no. Your customers will not read the paper. They will notice the first time you could not say no.
If you want the pattern in a product you are about to launch, the work is the eval set, the tool contracts, and the monitoring that shows a check failing. That is a production build, not a model selection. An agent that works in the demo and fails on customers is the symptom. The checker is the treatment. You can add it to a feature you already shipped. You cannot add it by rewriting the system prompt again.
What you can ship in the next two weeks
Week one, pick one feature and write twenty cases. Ten should be answers you would send to a customer. Ten should be answers you would be ashamed to send, including the empty retrieval, the wrong tenant if you can simulate it safely, and the tool call with a missing id. Store them as files. Wire a command that runs them and exits non-zero on a miss. It can be a script. It does not need a platform.
Week two, put the script in CI on the pull requests that touch the prompt, the retrieval, or the tool handler. Fail the pull request. The first week of failures will be grading arguments, not model regressions. Settle the grader in code so the argument ends. Add the person-required list to the same pull request as a short document. If the list is empty, say why each side effect is reversible.
Do not spend the two weeks selecting a new model. The checker makes the current model safer to change later. Teams that start with a model bake-off and no cases pick a winner on a demo and cannot tell when the winner gets worse. DeepMind could search a large space because the proof checker was boring and strict. Your two-week version is boring and strict in a smaller way. That is the part worth copying.
When a case fails in production and not in the set, add it before you patch the prompt. The order matters. A prompt patch without the case will be undone by the next patch. The case is how you keep the fix.
Show the case list to the person who talks to customers. They will recognize a failure you phrased in engineering language and missed in product language, or the reverse. That conversation is short and it is how the set stops being a private file. A checker nobody in support has seen will not be fed the next complaint. The complaint will become a Slack thread instead of a case, and the thread will not fail CI.
Teams that already have tests for the app and none for the model behavior should start there. The test file is a habit. An eval file is the same habit pointed at outputs. Check in the cases. Fail the build. You will argue about grading rules, and the argument is the spec you did not have. Write the rule down when you resolve it. A spec that only exists in a reviewer's head leaves with the reviewer.
If this is your app, send the repo.
A 30-minute scope call. We read what is live, name what is dangerous, and quote a fixed scope.
How Techtribe puts a checker in front of the model
We take the feature you are about to trust with customers and write the verifier that can reject it: eval cases from real examples, tool handlers that enforce types and permissions, and the short list of actions a person still has to confirm. You get those checks in the repo, wired so a bad change fails before it ships. We do not hand you a proof assistant for a problem that needed a refund limit.
That work is part of a Production MVP when the feature is launching: the path, the eval, the monitoring, the fallback when the check fails. A Dedicated Team fits when the model and the tools keep changing and the case list has to grow with them. The build side of agents with those contracts is AI agent development.
Bring ten answers you are willing to call good and ten you are willing to call bad. If you do not have them, the first deliverable is collecting them from traffic you are allowed to store. A checker without cases is a slogan. We would rather spend the call naming the cases than naming a model.
The fixed scope for taking a generated app to production is a page per tool: Lovable, Bolt, v0, and Replit.
Questions
What did DeepMind announce?
DeepMind reported that teams of Gemini 4 agents searched for more efficient quantum circuits, and that the researchers checked the mathematical correctness of the results with formal proofs in Lean. The agents proposed the work. A checker outside the model accepted or rejected it.
Does this mean we should formalize our SaaS in Lean?
Not as the first step. Lean fits mathematics where a proof is the definition of done. A product needs a checker matched to the failure you cannot afford: an eval set, a typed tool result, a second system that rejects a bad write. The lesson is the split, not the proof assistant.
Why is the model's own confidence not the check?
The model that wrote the answer is the one scoring it if you only ask 'are you sure.' DeepMind did not ask Gemini whether the circuit was correct and stop there. They ran a verifier with a different standard. Production systems need that second standard.
What should a team bring if the demo works and production does not?
Ten examples of a good answer and ten of a bad one, from real traffic if you have it. The scope of the call is which of those examples can become an automated check before the next release, and which still need a person.