Skip to content
QORECHAIN
Register

Protocol Builders

Coherence

Don’t trust the answer. Re-check it.

Share on X

About

Coherence lets labs rent quantum compute without broadcasting their circuits or accepting results on faith. Circuits are sealed with ML-KEM-1024, results are signed with ML-DSA-87, and hidden Bernstein–Vazirani circuits catch providers that return random bits instead of running the job. Honest work releases the provider's payment and bond. A failed trap check refuses payment and returns the slashed bond to the lab. Anyone can re-check the verdict in the browser from revealed traps, counts and Merkle proofs, and verify the settlement receipt against QoreChain with the official RDK. Everything runs on QoreChain Diana testnet, on a based qledger-v1 rollup. Honest Q was paid (traps 682/844/784 of 1,000) and Lazy Q was slashed (0/0/1). A withdrawal was paid once and the replay was refused. A batch with a wrong root was challenged and rejected. A job also ran on real IBM quantum hardware (ibm_kingston, traps 769/893/824) and was judged on Diana. On the Diana EVM, VerdictRegistry recounts each verdict's traps and checks the watchtower's ML-DSA-87 signature with the pqcVerify precompile before recording it. Every hash is in docs/PROOF.md. Testnet only. Limits: the provider sees the circuits it executes, trap disguise is heuristic, and the watchtower holds the escrow key. The EVM contract records verdicts but does not move funds.

How it's made

Coherence is a TypeScript monorepo with a Python quantum runner. packages/chain uses @qorechain/rdk 0.9.0 for QoreChain Diana hybrid transactions, the based qledger-v1 rollup, the ML-KEM key registry and QoreSeal envelopes. Circuits, trap secrets and results are sealed with ML-KEM-1024. Results and watchtower verdicts use ML-DSA-87 application signatures; qledger accounts use ML-DSA-44. packages/verdict canonicalises measurement counts, builds SHA3-256 Merkle roots and proofs, verifies trap commitments, scores every trap independently and exposes the same recheck() engine to the API and the browser. packages/registry is VerdictRegistry.sol. It rebuilds each verdict's signed bytes, recounts its traps and verifies the ML-DSA-87 signature with pqcVerify, so a verdict its own numbers don't support (Lazy Q paid) is refused. packages/sim plays a whole job in the browser with the real ML-KEM sealing, ML-DSA signatures and watchtower scoring; only the chain is simulated. quantum/ uses Qiskit, Aer and the FakeTorino noise model, plus an IBM runner used for the ibm_kingston job. Each job has eight circuits, including three disguised Bernstein–Vazirani traps, with 1,000 shots per circuit and a 30% threshold on every trap. apps/api orchestrates the lab, providers and watchtower, rebuilds the public read model from inbox posts and batches, challenges fraudulent roots, executes finalized withdrawals and builds settlement receipts. It only shows verdicts signed by the watchtower. apps/web is a vanilla TypeScript/Vite interface: Lab and simulation, provider registry, jobs, browser Re-check, receipts and a "Verified on the EVM" badge. It holds no private keys. The public site on GitHub Pages serves a recorded snapshot of the Diana data. Large Coherence posts are gzipped and split into entries of at most 6 KiB so a fraudulent batch remains challengeable. This works around the gap between the generic 128 KiB posting docs and the qledger fraud-proof limit. The threat model covers the provider's visibility into circuits, heuristic trap disguise, archive/pruning requirements and the watchtower's escrow-key trust assumption.

Timeline

CoherenceProtocol Builders

Pushed 4 commits to main

  • e80d470 Merge pull request #42 from nielslecodeur/dev-b/refinements · noegng
  • 1c561e5 Web: rename the final stylesheet to refinements.css · noegng
  • fbbf13e Merge pull request #41 from nielslecodeur/dev-b/unslop · noegng
  • 7a22a2b Web: unslop polish pass · noegng
CoherenceProtocol Builders

Pushed 4 commits to main

  • b339f29 Merge pull request #40 from nielslecodeur/dev-b/result-label · noegng
  • 1064073 Web: jobs list no longer says 'Quantum result pending' on finished jobs · noegng
  • d329853 Merge pull request #39 from nielslecodeur/docs/video-link · noegng
  • c0567ad README: link to the demo video · noegng
CoherenceProtocol Builders

Pushed 5 commits to main

  • 737379b Merge pull request #38 from nielslecodeur/docs/final-state · noegng
  • bba89af Docs: final state before the freeze (AI_USAGE for the last Dev B work, video and cover; plan status; cover link) · noegng
  • b7dff4e Merge pull request #37 from nielslecodeur/dev-b/audit8-web · noegng
  • 351da36 Web, audit #8: validate API and snapshot data before rendering, stricter EVM badge and receipt VALID, lab token never in a production build · noegng
  • 5cb0765 Web dependencies: @noble/hashes for the EVM badge's verdict hash (keccak-256) · noegng
CoherenceProtocol Builders

Pushed 9 commits to main

  • f485638 Merge pull request #36 from nielslecodeur/docs/readme-refresh · noegng
  • 8661fa0 Docs: README refreshed with a screenshot of the current site, Lab simulation and packages/sim documented, status condensed · noegng
  • 46b103e Web: show the monolith at once when returning to the Lab; clearer pending label on jobs · noegng
  • a9eb6b8 Merge pull request #35 from nielslecodeur/dev-a/trap-to-sim · noegng
  • d29fba3 Web (for Noé's review): chain the machine-screen game into the Lab simulation · nielslecodeur

and 4 more commits

CoherenceProtocol Builders

Earned a Ship Weeks badge.

CoherenceProtocol Builders

Earned a Ship Weeks badge.

CoherenceProtocol Builders

Newly verified on chain: EVM window (incl. scoped)

CoherenceProtocol Builders

Pushed 119 commits to main

  • 27fd367 Merge pull request #32 from nielslecodeur/dev-a/ibm-hardware · nielslecodeur
  • 02a32ac Real quantum hardware: a job on IBM ibm_kingston, judged on diana and recorded on the EVM · nielslecodeur
  • f2235fa IBM runner: saved-account credentials, --fake rehearsal on a local backend, transpiled depth and quantum seconds in the run file · nielslecodeur
  • 49772d6 Merge pull request #30 from nielslecodeur/dev-a/lab-sim · noegng
  • ca8909c Merge pull request #31 from nielslecodeur/dev-a/final-docs · nielslecodeur

and 114 more commits

CoherenceProtocol Builders

Earned a Ship Weeks badge.

CoherenceProtocol Builders

Earned a Ship Weeks badge.

CoherenceProtocol Builders

Earned a Ship Weeks badge.

CoherenceProtocol Builders

First on-chain deployment detected on testnet.

CoherenceProtocol Builders

New project.

Comments and questions

  • No comments yet.