Deep Dive

Protocol

Quantum computation on-chain.

01

Quantum Computation

A qubit is a two-level quantum system. Its state is a complex vector.

Qubit state

|ψ⟩ = α|0⟩ + β|1⟩

Normalization

|α|² + |β|² = 1

Measurement prob.

P(|0⟩) = |α|² P(|1⟩) = |β|²

Bell state

|Φ⁺⟩ = (|00⟩ + |11⟩) / √2

Measurement collapses the state. Gates apply unitary matrices.

02

Native Gates

Universal gate set supported by the verifier.

Hadamard (H)

Creates superposition.

1/√2 [[1, 1], [1, -1]]

Pauli-X (X)

Bit-flip.

[[0, 1], [1, 0]]

CNOT

Entangles two qubits.

[[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]

03

On-chain Encoding

Amplitudes are encoded as 64.64 fixed-point uint256. Real and imaginary parts are packed sequentially.

2-3

Qubits

4-8

State vector

64.64

Fixed-point

QuantumState.sol
struct State {
  uint256[8] amplitudes;
  uint8 qubitCount;
}

04

Verification Flow

Deterministic simulation inside the EVM. Checks unitarity and fidelity.

01

Parse

Decode gate sequence.

02

Simulate

Apply gates to state vector.

03

Measure

Compute probabilities.

04

Validate

Compare to target within ε.

05

Properties

Deterministic

Same result on every node. No off-chain randomness.

Auditable

All logic is open-source and on-chain.

Permissionless

No whitelists or admin keys.

Immutable

Rules are set at deployment.