Skip to main content
KetQat

Appearance

Workbench

Edit an OpenQASM 3 circuit, see it drawn, simulate it, and optimize it. Everything shown here is computed by the same engine the CLI and MCP tools use, so the page cannot display a result the engine would not produce.

Circuit

Add a gate

Inserted before the first measurement. Use your browser's back button to undo, or Remove last gate.

Place a gate by dragging

Drag a gate onto a qubit, or click the gate then the qubit — both do the same thing. Two-qubit gates ask for the control first. The circuit stays in the URL, so Back is undo.

Gates

Drop on a qubit, or click to place

Snapshots & shortcuts

Kept in this browser only — a snapshot is an editing checkpoint, not a published record. Keys: z undo · y redo · s save.

Up to 12 qubits. Unsupported constructs are rejected by name rather than silently ignored.

A seeded run is reproducible; without one the result says so.

These are synthetic topologies for exploring routing, not observations of any real device.

Expert editing — select, copy, group, parameters, registers

Operations — select, then act. Back is undo; forward is redo.

  1. 0h q[0];
  2. 1h q[0];

Select operations above to copy, delete or group them.

Parameterised gate

Position is the operation index shown in the list; empty appends before measurement.

Registers

Shrinking below a used qubit is refused with the operations that block it — deleting them silently would change the circuit.

Sign in to queue a circuit. A job belongs to an account, so its results and cancellation are scoped to you.

Diagram

Quantum circuit2 qubits, 2 operations. A text listing follows the diagram.q[0]q[1]hh
  1. h on q[0]
  2. h on q[0]
qubits
2
clbits
0
gate count
2
two qubit gate count
0
depth
2
uses mid circuit measurement
no
uses classical control
no
uses reset
no

Qubit states

Qubit 0 Bloch vector: x 0.00, y 0.00, z 1.00, length 1.00|0⟩|1⟩

Qubit 0

Reduced density matrix for qubit 0
Row⟨0|⟨1|
|0⟩1.0000.000
|1⟩0.0000.000
Bloch vector
(0.000, 0.000, 1.000)
Length |r|
1.000
Purity Tr(ρ²)
1.000

Pure: this qubit has a state of its own, unentangled with the rest.

Qubit 1 Bloch vector: x 0.00, y 0.00, z 1.00, length 1.00|0⟩|1⟩

Qubit 1

Reduced density matrix for qubit 1
Row⟨0|⟨1|
|0⟩1.0000.000
|1⟩0.0000.000
Bloch vector
(0.000, 0.000, 1.000)
Length |r|
1.000
Purity Tr(ρ²)
1.000

Pure: this qubit has a state of its own, unentangled with the rest.

Timeline

Circuit timeline: 1 qubits over 2 layers. 0 layer(s) run more than one operation at once.12q[0]hh
layers (depth)
2
concurrent layers
0
idle cells
0

Columns are layers, not source order: operations in the same column run at once. The column count is the circuit depth reported above, computed the same way. Dashed cells are qubits waiting while others work — where decoherence accumulates on hardware.

Correlations

Every pair is uncorrelated: on these qubits this is a product state.

Connected two-qubit correlations. Row and column are qubit indices; the diagonal is each qubit’s variance. Values run from −1 to 1.
qubit01⟨Z⟩
0-0.000-0.0001.000
1-0.000-0.0001.000

No pair is correlated: on these qubits the state is a product state, so each qubit's outcome says nothing about any other.

Connected correlation <Z_i Z_j> − <Z_i><Z_j>, computed exactly from the statevector rather than sampled. The subtraction matters: raw <Z_i Z_j> is 1 for two qubits that are merely both fixed.

Colour is redundant with the numbers, not a substitute: intensity shows magnitude and hue shows sign, but every value is printed. The last column is each qubit’s ⟨Z⟩ — two qubits can both be fully biased and still be uncorrelated, which is why the marginals are shown beside the matrix.

Subcircuitsshow / hideRepeated blocks in the circuit, shown as units rather than flattened.

This circuit declares no custom gates, so there are no subcircuits to group. Writing gate Name a, b {} and calling it will show the expansion here.

Step throughshow / hideThe state after each gate, one step at a time.
just applied
— (initial state)
next
h q[0]
matches full run
only checked at the end
Basis states with non-zero amplitude after step 0 of 2.
basis stateamplitudeprobability
|001.0000 + 0.0000i1.0000

Each step simulates the circuit prefix exactly, so this is the real intermediate state rather than an animation. Only basis states with non-zero weight are listed. Every step is a URL, so a particular step can be shared.

Q-sphere

Q-sphere of 2 qubits: 1 basis states with non-zero amplitude, largest 00|00⟩|11⟩
Basis states with non-zero amplitude
stateprobabilityphase
|00⟩1.00000.00π

Latitude is the number of ones: |00⟩ at the top, |11⟩ at the bottom. Spoke length is amplitude relative to the largest, and hue is phase.

A phase shown as — belongs to an amplitude too small to carry one; it is not a phase of zero.

Conversion lossshow / hideWhat is dropped when this circuit is exported to another framework.

No conversion loss: the circuit round-tripped exactly.

Resource estimateshow / hideLogical counts, and what they become on a fault-tolerant machine.

NISQ resources

logical qubits
2
circuit depth
2
gate count
2
one qubit gate count
2
two qubit gate count
0
measurement count
0
reset count
0
swap count
0
barrier count
0
conditional count
0

Fault-tolerant counts

t count
0
clifford count
2
toffoli count
0
unsupported for ft count
0

Assumptions

  • Estimator: ketqat-static v0.1.0
  • Static count over the circuit as written. No synthesis, decomposition, or optimization is applied.
  • Success probability not estimated: the hardware snapshot does not characterize every gate used.
  • No hardware snapshot supplied, so duration and fidelity are not estimated.

Fault-tolerant physical cost

The distillation factory dominates this estimate.

  • This algorithm consumes no magic states, so no factory is needed. A Clifford circuit needs no distillation at all.
code distance
3
algorithm qubits
36
factory qubits
0
total physical qubits
36
factory share
0%
distillation levels
2
raw magic states
0
magic states
0
logical cycles
2
runtime
0.0 ms
logical error
1.2e-3 of 0.01
How the answer moves with device quality. The physical error rate is an assumption, not a measurement of your hardware.
physical error ratecode distancealgorithm qubits
2.5e-4336
5.0e-4336
1.0e-3336
2.0e-3336
4.0e-35100
Routing space is not free. These rows are not equally valid — the bare register omits the space lattice surgery needs to move information, so it is an underestimate rather than an alternative reading.
layoutlogical qubitsalgorithm qubits
Bare register236
2D lattice-surgery layout (QDK)9162

The summary above uses the bare register. Magic-state factories are counted as states, not as a footprint, and on a T-heavy circuit a factory is the majority of a real machine — so neither figure here is a machine size.

The same circuit costed under each published prefactor. Both values are in use and neither is more correct — the spread is the part of this estimate no better device removes.
modelprefactor Acode distancealgorithm qubits
Fowler conventional(used above)0.03336
Gidney-Fowler (Qualtran)0.1336

Both prefactors happen to give the same distance for this circuit, so this choice costs nothing here. That is not generally true.

What this estimate assumes, and what it leaves out
  • Surface code under circuit-level depolarizing noise.
  • Logical error model p_L = 0.03 (p/0.01)^((d+1)/2), fitted rather than derived.
  • Magic states are counted, not costed: distillation factory footprint is not modelled.
  • Routing and layout overhead beyond the per-logical-qubit patch is not modelled.
  • Each Toffoli is charged 4 T gates.
  • Physical error rate 0.001, error budget 0.01, cycle time 1000 ns, threshold 0.01.
  • This is a model, not a measurement. No circuit here has run on hardware, and the prefactor and threshold are fitted constants from the literature.
Factory cost: what is arithmetic and what is a model

The split matters. The first group is checkable by hand from the 15-to-1 protocol; the second is an assumption about layout, like the logical-error formula above it.

  • exact: 15-to-1 consumes 15 inputs per output and suppresses error as p -> 35 p^3.
  • exact: 2 level(s) needed: 1.0e-3 -> 3.5e-8 -> 1.5e-21.
  • exact: Raw states per usable output: 15^2 = 225.
  • exact: Total raw states: 0 x 225 = 0.
  • model: Footprint model: 15 logical patches per level at the factory distance, 2d^2 physical qubits per patch.
  • model: This is a reading of the standard construction, NOT a measured or published figure -- treat it as a model, as with the surrounding logical-error formula.
  • model: Factory and algorithm are charged separately; no sharing of routing space is assumed either way.
  • model: Only the leading order of the 15-to-1 error polynomial is used.
  • model: Distillation throughput is not modelled, so this is a space estimate rather than a space-time one.

Error mitigation, compared

Error mitigation methods compared by estimate, uncertainty, uncertainty amplification and sampling cost.
method⟨Z⟩uncertaintyamplificationcostbasis
Clifford data regressionnot applicablecomputed
Virtual distillation (modelled)0.99992 copies4 qubits, ×1.0 samplesmodelled
Probabilistic error cancellationnot runγ = 1.0201.08e+3 shots for paritycomputed

Amplification is how much a method multiplies the statistical uncertainty. Extrapolation removes bias by taking a weighted difference, and the same weights inflate variance — so a mitigated value can be closer to noiseless and less well resolved at the same time. PEC is costed, not run: γ is the quasi-probability norm, and the shot figure is what matching the raw estimator’s precision would take. The basis column says where each number comes from: measured rows consume sampled counts, computed rows are arithmetic on the noise model, and the modelled row applies its method to the ideal state degraded by the assumed noise rather than to a sampled one.

noisy locations
2
1-qubit error
0.10%
2-qubit error
1.00%
readout error
2.00%

Clifford data regression does not apply to this circuit.

This circuit declares no classical bits, so there is nothing to sample. Add a measurement, or omit shots to get the exact statevector.

Assumptions and limits
  • This circuit produced no counts, so there is no unmitigated estimate to compare against.
  • Zero-noise extrapolation could not run: This circuit declares no classical bits, so there is nothing to sample. Add a measurement, or omit shots to get the exact statevector.
  • Clifford data regression could not run: This circuit declares no classical bits, so there is nothing to sample. Add a measurement, or omit shots to get the exact statevector.
  • Error rates are assumed, not measured. The hardware profiles in this app carry topology and native gates but no calibration data, so none of these figures describes a real device.
  • Virtual distillation is modelled, not measured: it needs a density matrix, so the ideal state is degraded by the assumed noise rather than sampled. The other rows consume real counts.
  • Single-qubit depolarizing noise, inverted exactly as a Pauli quasi-probability.
  • Every noisy location is assumed independent and identically distributed.
  • Overhead is gamma^(2 x locations), so it compounds exponentially in circuit size.
  • Cost is computed, not incurred: this reports what PEC would take, it does not sample.
  • Expectation is Tr[O rho^M] / Tr[rho^M], the M-copy virtual-distillation estimator.
  • Converges to the dominant eigenvector of the NOISY state, which is not the ideal state.
  • Stochastic error is suppressed; a coherent error is not, at any M.
  • Cost is M copies of the register plus a sampling overhead of 1 / Tr[rho^M].
Canonical OpenQASM 3show / hideThe circuit as this engine re-emits it, for comparing against your source.
OPENQASM 3;
include "stdgates.inc";

qubit[2] q;

h q[0];
h q[0];