4colors Quantum Compiler
Better circuits for the hardware you use
The Compiler searches placements, routes and native gates for your device within the time you set. Use it from Qiskit, Python or the API.
Over 50% fewer two-qubit gates and over 50% lower two-qubit depth than Qiskit, in the same time.
Start Compiler free trialCompare plans15-day free trial · 120 minutes · No credit card required
More right answers from every shot
Every two-qubit gate added for routing lowers the chance that a shot returns the right answer. The Compiler cuts that overhead, so its circuits are estimated to succeed up to several times more often per shot than Qiskit's.
Twice the success rate means half the shots for the same results: more experiments from the same device time.
Against Qiskit O3
- Up to 5.5× higher estimated success per shot than Qiskit O3
- Up to 80% fewer shots for the same number of right answers
Cuccaro adder 16 qubits 2.7×
4colors17.3%
Qiskit O36.3%
Bernstein-Vazirani 48 qubits 1.9×
4colors16.0%
Qiskit O38.2%
Ising chain 32 qubits 3.4×
4colors15.8%
Qiskit O34.6%
Draper adder 16 qubits 3.1×
4colors11.6%
Qiskit O33.7%
Cuccaro adder 20 qubits 5.5×
4colors7.3%
Qiskit O31.3%
- 4colors
- Qiskit O3
How we measuredClose ×
Estimated success probability: a model of gate, readout and idle errors from FakeFez 1.2.8's calibration, applied to each compiled circuit; an estimate, not a hardware measurement. Median of 3 seeds per circuit.
Freshly generated circuits from public generators with fixed seeds. Shown: the circuits with the largest gain among those where both estimates are 1% or more. QFT-type circuits are left out, because Qiskit's output is approximate there.
4colors Quantum Compiler and Qiskit 2.5.2 at optimization level 3, each on 2 cores with the same 30 s per circuit, for the IBM Heron heavy-hex layout with FakeFez 1.2.8 calibration.
Measured on 29 October 2026.
From your circuit to a better one
Choose a target, set a time budget, and watch better circuits arrive.
Input
- Circuit Qiskit or OpenQASM 2/3
- Target Device architecture, with optional calibration data
- Time budget From 1 ms to 600 s
- Parameters Symbolic parameters kept for repeated experiments
4colors Quantum Compiler
- Placement Chooses the physical qubits for your circuit
- Routing Finds efficient paths through the device connectivity
- Native gates Builds circuits from the gates your device supports
- Search Keeps improving the circuit until the time budget is spent
Output
- Compiled circuit With the qubit mapping
- Metrics Gate counts, depth and target-specific output
- Live results The first circuit, every improvement and the final circuit
- Parameterized circuit Bind new values without recompiling
Fits into the tools you already use
Keep writing circuits the way you do now. Add one call.
Existing code
Qiskit plugin
Drop it into your Qiskit workflow as a pass manager.
Qiskit plugin documentationfrom fourcolors.quantum.compiler import generate_pass_managerpm = generate_pass_manager(backend, time_budget_s=30)compiled = pm.run(qc)Scripts and notebooks
Python module
Submit a job and follow each better circuit as it arrives.
Python module documentationfrom fourcolors.quantum import compilerjob = compiler.submit(open("circuit.qasm").read(), "heavy_hex_156_cz", time_budget_s=30)for res in job.incumbents(): print(res.metrics["two_qubit_gates"], res.metrics["depth"])print(res.circuit)Any language or pipeline
Direct API
Submit from any language, follow results live, and stop early when the circuit is good enough.
API documentation- POST /v1/jobs
- Submit a circuit and a time budget
- GET /v1/jobs/{id}/events
- Follow each better circuit live
- GET /v1/jobs/{id}
- Read the final circuit and its metrics
- POST /v1/jobs/{id}/stop
- Stop early and keep the best circuit
Performance
Smaller circuits, measured
Biggest gains on the biggest circuits
The bigger the circuit, the more compilation matters, and the further the Compiler pulls ahead. On IBM's heavy-hex layout, most qubit pairs are not directly connected.
Every interaction between distant qubits costs extra two-qubit gates to bring them together, and each one is another source of noise. On a large circuit, routing decides the result.
The Compiler finds placements and routes that need far fewer of these gates, and packs the rest into fewer layers, so the circuit also finishes before decoherence takes over.
Bernstein-Vazirani · 100 qubits −41%
4colors132
Qiskit O3226
Bernstein-Vazirani · 150 qubits −57%
4colors158
Qiskit O3370
Cuccaro adder · 100 qubits −41%
4colors964
Qiskit O31,634
Cuccaro adder · 50 qubits −33%
4colors470
Qiskit O3706
QAOA 3-regular, 2 layers · 150 qubits −22%
4colors4,528
Qiskit O35,870
QAOA random graph p=0.1 · 100 qubits −15%
4colors6,081
Qiskit O37,184
Bernstein-Vazirani · 100 qubits −43%
4colors128
Qiskit O3226
Bernstein-Vazirani · 150 qubits −55%
4colors149
Qiskit O3337
Cuccaro adder · 100 qubits −42%
4colors797
Qiskit O31,390
Cuccaro adder · 50 qubits −36%
4colors383
Qiskit O3603
QAOA 3-regular, 2 layers · 150 qubits −10%
4colors469
Qiskit O3526
QAOA random graph p=0.1 · 100 qubits −24%
4colors836
Qiskit O31,109
- 4colors
- Qiskit O3
How we measuredClose ×
4colors Quantum Compiler 1.0.0, measured 31 Oct 2026 (2 threads on one whole core, exact mode unless marked) vs Qiskit 2.6.0 at optimization level 3 (two single-threaded seed streams on the same core, better of the two kept per seed), each given the same time budget, on the IBM heavy-hex 156-qubit target with the FakeFez 1.2.8 calibration. 5 seeds per circuit, median over seeds. Qiskit was run on the 169 working couplers and on the full 176-coupler map; every number is against the lower of its two counts. 4colors uses the calibration and never places gates on failed couplers. Timed runs on a dedicated machine.
Measured on 31 October 2026.
Ahead from the first second
You set the time, and the Compiler spends it improving your circuit. Short budgets suit quick iteration in a notebook; longer ones polish the final circuit you send to hardware.
Given more time, the Compiler keeps finding better circuits, with the largest gains on the largest circuits. Each better circuit reaches you as it is found, so you can stop as soon as it is good enough.
- 4colors
- Qiskit O3
How we measuredClose ×
4colors Quantum Compiler 1.0.0, measured 31 Oct 2026 (2 threads on one whole core, exact mode unless marked) vs Qiskit 2.6.0 at optimization level 3 (two single-threaded seed streams on the same core, better of the two kept per seed), each given the same time budget, on the IBM heavy-hex 156-qubit target with the FakeFez 1.2.8 calibration. 5 seeds per circuit, median over seeds. Qiskit was run on the 169 working couplers and on the full 176-coupler map; every number is against the lower of its two counts. 4colors uses the calibration and never places gates on failed couplers. Timed runs on a dedicated machine. Circuits from IBM's Benchpress suite.
Measured on 31 October 2026.
Shallower circuits across workloads
Two-qubit depth is the number of sequential two-qubit layers: how long the qubits must hold their state. The Compiler keeps it low across workloads, so more of your circuit runs inside the coherence window.
Depth falls even where the gate count changes little: the Compiler arranges gates so that more of them run side by side in the same layer. Fewer layers also mean less idle time, when errors build up while qubits wait.
Bernstein-Vazirani 4 circuits
4colors−32%
QAOA 3-regular, 1 layer 4 circuits
4colors−28%
UCCSD LiH 2 circuits
4colors−23%
- Median lower two-qubit depth than Qiskit O3
How we measuredClose ×
Per circuit, the change in two-qubit depth against Qiskit O3 (median over seeds); per family, the median over its circuits. Shown: the families where 4colors is 10% or more lower. QFT-type circuits are left out, because Qiskit's output is approximate there.
On IBM heavy-hex, Qiskit was given the full 156-qubit, 176-coupler map, failed couplers included. 4colors uses only working couplers.
4colors Quantum Compiler 1.0.0, measured 31 Oct 2026 (2 threads on one whole core; exact mode) vs Qiskit 2.6.0 at optimization level 3 (two single-threaded seed streams, better of the two kept per seed), same time budget, on four targets: IBM heavy-hex 156 qubits (FakeFez 1.2.8 calibration), square lattices of 108 qubits (CZ), 54 and 20 qubits (PRX). 5 seeds per circuit, median over seeds. Timed runs on a dedicated machine.
Measured on 31 October 2026.
Gates only on couplers that work
Real devices have couplers that the calibration marks as failed. Qiskit, given the full device map, routed gates through them. The Compiler reads the calibration and keeps every gate on working couplers.
Gates on failed couplers
- 0 by 4colors, on every circuit
- Up to 220 by Qiskit O3 on a single circuit
QAOA random graph p=0.1 · 100 qubits
Qiskit O3220
QAOA 3-regular, 2 layers · 150 qubits
Qiskit O3197
Benchpress QAOA (Barabasi-Albert, 3 layers) · 50 qubits
Qiskit O360
Cuccaro adder · 100 qubits
Qiskit O347
Bernstein-Vazirani · 150 qubits
Qiskit O314
How we measuredClose ×
Failed couplers as marked in the device calibration snapshot we used (IBM FakeFez, February 2025 data), not today's live device.
4colors Quantum Compiler 1.0.0, measured 31 Oct 2026 (2 threads on one whole core, exact mode unless marked) vs Qiskit 2.6.0 at optimization level 3 (two single-threaded seed streams on the same core, better of the two kept per seed), each given the same time budget, on the IBM heavy-hex 156-qubit target with the FakeFez 1.2.8 calibration. 5 seeds per circuit, median over seeds. Qiskit was run on the 169 working couplers and on the full 176-coupler map; this chart shows its full-map output. 4colors uses the calibration and never places gates on failed couplers. Timed runs on a dedicated machine.
Measured on 31 October 2026.
Performance
Across devices and benchmarks
The same gains on other devices
The Compiler performs well across devices. Whatever the topology or native gate set, it finds leaner circuits, so one compiler serves your whole hardware portfolio.
Give it your device's coupling map and native gates, and it compiles for the hardware as it stands today, routing around failed couplers.
Try it on your device and your quantum hardware| IBM heavy-hex, 156 qubits | square lattice, 108 qubits (CZ) | square lattice, 54 qubits (PRX) | square lattice, 20 qubits (PRX) | |
|---|---|---|---|---|
| Bernstein-Vazirani | −31% | −35% | −25% | −4% |
| UCCSD LiH | −12% | −23% | −24% | −25% |
| QAOA 3-regular, 1 layer | −9% | −10% | −10% | −7% |
How we measuredClose ×
Per circuit, the change in two-qubit gates against Qiskit O3 at optimization level 3 (median over seeds); per family and target, the median over the family's circuits. A dash: no result shown for that pair.
On IBM heavy-hex, Qiskit was given the full 156-qubit, 176-coupler map, failed couplers included. 4colors uses only working couplers.
Per target, at a 10 s budget in exact mode: IBM heavy-hex, 156 qubits: fewer two-qubit gates on 12 of 29 circuits, equal on 11; square lattice, 108 qubits (CZ): fewer two-qubit gates on 11 of 29 circuits, equal on 14; square lattice, 54 qubits (PRX): fewer two-qubit gates on 11 of 29 circuits, equal on 13; square lattice, 20 qubits (PRX): fewer two-qubit gates on 5 of 16 circuits, equal on 9.
4colors Quantum Compiler 1.0.0, measured 31 Oct 2026 (2 threads on one whole core; exact mode) vs Qiskit 2.6.0 at optimization level 3 (two single-threaded seed streams, better of the two kept per seed), same time budget, on four targets: IBM heavy-hex 156 qubits (FakeFez 1.2.8 calibration), square lattices of 108 qubits (CZ), 54 and 20 qubits (PRX). 5 seeds per circuit, median over seeds. Timed runs on a dedicated machine.
Measured on 31 October 2026.
What a smaller circuit buys your team
Gate count and depth are not vanity metrics. They set the error budget, the shot count and the bill for every experiment you run.
Fewer errors
Two-qubit gates fail about ten times as often as single-qubit gates, and each avoided SWAP removes three of them from the error budget.
Fewer shots
Shots needed for a fixed number of correct outcomes scale with one over the success rate, so doubling the success halves the shots for the same answers.
Shallower circuits
Lower two-qubit depth shortens the run against T1 and T2 decoherence, so larger algorithms come within reach of the same device.
Lower cost
Cloud QPUs bill by the shot or by runtime. Fewer shots and shorter circuits lower the bill for the same result.
Features built for real devices
Placement and routing
Fits your circuit to the device's real connectivity with fewer SWAPs.
Calibration-aware
Favors strong qubits and couplers; never uses failed ones.
Native gates
cz, cx or ecr gate sets, including IQM's prx.
Parameterized circuits
Compile once, bind new values for every run.
Your time budget
1 ms to 600 s. Stop early and keep the best circuit.
Verified results
Equivalence checked wherever practical, and reported with every result.
Clear output
Circuit, mapping, gate counts, depth and validation report.
Exact or approximate
Exact by default; approximate mode removes more gates within a reported bound.
Missing something?
Tell us which feature would help your work.
Request a feature
Supported hardware and inputs
Compile for named IBM, IQM and Rigetti architectures, or define your own target topology and gate set.
Inputs: Qiskit circuits and OpenQASM 2/3, including symbolic parameters.
Output: a circuit in the target's native gates, with its qubit mapping and metrics.
| Target | Qubits | Native gates |
|---|---|---|
| Heron r2/r3 (fez, boston) | 156 | cz, rz, sx, x |
| Nighthawk (miami) | 120 | cz, rz, sx, x |
| Target | Qubits | Native gates |
|---|---|---|
| Garnet | 20 | cz, prx |
| Emerald | 54 | cz, prx |
| Target | Qubits | Native gates |
|---|---|---|
| Cepheus-1 | 108 | cz, rx, rz |
| Target | Qubits | Native gates |
|---|---|---|
| Your topology | Up to 156 | cz, cx, ecr, rz, sx, x, prx |
Why search beats step-by-step compilation
Circuit compilation is an optimization problem
Placement, routing and gate choice interact: a swap that makes the next gate cheap can make a later one expensive. The Compiler treats the whole circuit as one optimization problem and searches layouts, routes and native gates together.
The search runs on the 4colors Optimizer. Your time budget is its search budget: a good circuit early, better ones as it runs.
Powered by
4colors Optimizer
Original search algorithms for placement, routing and gate choices, tested on demanding benchmarks. Also powers the Optimizer for Scheduling, the Optimizer for QUBO and the planning apps.
Explore the 4colors OptimizerThe ideas behind quantum compilation
Explore all articles and guides- Insight
The Hidden Decisions in Quantum Circuit Compilation
Mapping, routing and native gates determine what a logical circuit costs on hardware.
Read the insight - Insight
What Better Quantum Compilation Buys You
What fewer gates can mean for execution, and what they cannot establish on their own.
Read the insight - Insight
What Is Quantum Optimization, and Where Does Classical Computing Fit?
Where circuit compilation sits in a quantum optimization workflow.
Read the insight - Insight
CPU, GPU and QPU: Different Machines, Different Strengths
A clear account of what each computing platform contributes.
Read the insight
Bring a circuit you know well
Compile it for your target and compare it with your current toolchain. The numbers speak for themselves.