Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmarks

Measured on 2026-10-02 by the documentation build, with Qiskit 2.5.2 and tket 2.18.4, so these numbers always match the published compiler.

bench/compare.py compiles the same circuits with Qiskit (transpile at optimization_level=3), tket (FullPeepholeOptimise, then a rebase and squash) and qirc, all to rz, sx, x and cx. The circuits are the straight line programs in tests/corpus and examples with measurements removed, the QFT, Grover search for the all ones state, and the CDKM, VBE and Draper adders from Qiskit. Each cell is two qubit gates / total gates / depth, and the input column counts each Toffoli and SWAP as one gate. Every result up to 12 qubits is checked against the input by exact operator comparison, allowing for the qubit permutation each tool reports.

All to all connectivity

circuitqubitsinputQiskittketqirc -O3 –gates rz-sx-cx –resynth 4 –relabelqirc -O3 –gates rz-sx-cx –resynth 4 –relabel –cost cx
redundant42 / 13 / 50 / 3 / 20 / 3 / 20 / 3 / 20 / 3 / 2
small21 / 3 / 21 / 5 / 41 / 5 / 41 / 5 / 41 / 5 / 4
pyqir_real31 / 4 / 21 / 5 / 41 / 5 / 41 / 5 / 41 / 5 / 4
pyqir_simple32 / 12 / 76 / 26 / 186 / 30 / 176 / 24 / 146 / 24 / 14
qsharp_loop43 / 4 / 43 / 6 / 63 / 6 / 63 / 6 / 63 / 6 / 6
unrestricted_dynamic54 / 6 / 54 / 8 / 74 / 8 / 74 / 8 / 74 / 8 / 7
qft_4414 / 36 / 2412 / 33 / 2312 / 33 / 2312 / 34 / 2312 / 34 / 23
qft_6633 / 84 / 4030 / 73 / 3730 / 73 / 3730 / 71 / 3530 / 71 / 35
qft_8860 / 152 / 5656 / 131 / 5156 / 129 / 5156 / 120 / 4756 / 120 / 47
qft_101095 / 240 / 7290 / 201 / 6590 / 201 / 6590 / 181 / 5990 / 181 / 59
grover_334 / 39 / 2124 / 81 / 5520 / 140 / 8624 / 89 / 5523 / 153 / 94
grover_4484 / 250 / 17184 / 228 / 16684 / 243 / 18384 / 234 / 17184 / 234 / 171
grover_55288 / 941 / 681288 / 786 / 606288 / 849 / 662288 / 732 / 603288 / 732 / 603
adder_cdkm_4924 / 24 / 2164 / 151 / 11447 / 130 / 8844 / 107 / 8444 / 107 / 84
adder_vbe_3813 / 13 / 1137 / 87 / 5437 / 87 / 5625 / 63 / 4125 / 81 / 55
adder_draper_4848 / 122 / 7440 / 123 / 6740 / 107 / 5743 / 94 / 5340 / 110 / 60
total740 / 1947 / 1279719 / 2049 / 1348711 / 1776 / 1208707 / 1874 / 1268

compile time: Qiskit 0.09 s, tket 4.85 s, qirc -O3 –gates rz-sx-cx –resynth 4 –relabel 0.16 s, qirc -O3 –gates rz-sx-cx –resynth 4 –relabel –cost cx 0.24 s

A line of qubits

Routed with --coupling line:n for qirc, CouplingMap.from_line for Qiskit and DefaultMappingPass for tket.

circuitqubitsinputQiskittketqirc -O3 –gates rz-sx-cx –resynth 4 –relabelqirc -O3 –gates rz-sx-cx –resynth 4 –relabel –cost cx
redundant42 / 13 / 50 / 3 / 20 / 3 / 20 / 3 / 20 / 3 / 2
small21 / 3 / 21 / 5 / 41 / 5 / 41 / 5 / 41 / 5 / 4
pyqir_real31 / 4 / 21 / 5 / 41 / 5 / 41 / 5 / 41 / 5 / 4
pyqir_simple32 / 12 / 77 / 36 / 249 / 33 / 207 / 25 / 157 / 25 / 16
qsharp_loop43 / 4 / 43 / 6 / 63 / 6 / 63 / 6 / 63 / 6 / 6
unrestricted_dynamic54 / 6 / 58 / 12 / 1111 / 15 / 116 / 10 / 96 / 10 / 9
qft_4414 / 36 / 2419 / 49 / 3324 / 45 / 3519 / 41 / 2919 / 41 / 29
qft_6633 / 84 / 4051 / 145 / 6972 / 115 / 7151 / 92 / 5445 / 111 / 59
qft_8860 / 152 / 5690 / 324 / 114137 / 210 / 10397 / 161 / 8183 / 203 / 89
qft_101095 / 240 / 72147 / 531 / 159222 / 333 / 135149 / 240 / 106135 / 285 / 103
grover_334 / 39 / 2137 / 122 / 8935 / 155 / 9847 / 110 / 8835 / 198 / 111
grover_4484 / 250 / 171165 / 402 / 294171 / 330 / 259209 / 365 / 263171 / 485 / 309
grover_55288 / 941 / 681543 / 1411 / 894639 / 1200 / 840681 / 1123 / 867597 / 1422 / 973
adder_cdkm_4924 / 24 / 2193 / 251 / 18486 / 169 / 13478 / 141 / 12366 / 184 / 135
adder_vbe_3813 / 13 / 1166 / 162 / 10179 / 129 / 9152 / 90 / 6444 / 144 / 83
adder_draper_4848 / 122 / 7490 / 202 / 117112 / 179 / 11986 / 137 / 7681 / 174 / 88
total1321 / 3666 / 21051602 / 2932 / 19321487 / 2554 / 17911294 / 3301 / 2020

compile time: Qiskit 0.13 s, tket 4.83 s, qirc -O3 –gates rz-sx-cx –resynth 4 –relabel 0.40 s, qirc -O3 –gates rz-sx-cx –resynth 4 –relabel –cost cx 1.05 s

To run it yourself, install qiskit and pytket, build qirc in release mode and run python bench/compare.py, adding --line for the routed table.