PennyLane vs PennyLane Lightning
The same circuits, one host
PennyLane and PennyLane Lightning both finished 147 of the 175 workloads measured here. PennyLane was faster in 6 of them and PennyLane Lightning in 141. At the median PennyLane Lightning was 3.4× faster.
By circuit family
Who was faster where
| Circuit family | Workloads both finished | PennyLane faster in | PennyLane Lightning faster in | Faster at the median |
|---|---|---|---|---|
| Workloads both finished 14 | PennyLane faster in 0 | PennyLane Lightning faster in 14 | Faster at the median PennyLane Lightning 3.9× | |
| Workloads both finished 22 | PennyLane faster in 0 | PennyLane Lightning faster in 22 | Faster at the median PennyLane Lightning 4.1× | |
| Workloads both finished 25 | PennyLane faster in 0 | PennyLane Lightning faster in 25 | Faster at the median PennyLane Lightning 4.1× | |
| Workloads both finished 14 | PennyLane faster in 0 | PennyLane Lightning faster in 14 | Faster at the median PennyLane Lightning 4.6× | |
| Workloads both finished 22 | PennyLane faster in 0 | PennyLane Lightning faster in 22 | Faster at the median PennyLane Lightning 3.8× | |
| Workloads both finished 8 | PennyLane faster in 3 | PennyLane Lightning faster in 5 | Faster at the median PennyLane Lightning 1.2× | |
| Workloads both finished 17 | PennyLane faster in 0 | PennyLane Lightning faster in 17 | Faster at the median PennyLane Lightning 4.1× | |
| Workloads both finished 14 | PennyLane faster in 0 | PennyLane Lightning faster in 14 | Faster at the median PennyLane Lightning 4.8× | |
| Workloads both finished 11 | PennyLane faster in 3 | PennyLane Lightning faster in 8 | Faster at the median PennyLane Lightning 2.0× |
Local circuit dynamics
Brickwork nearest-neighbour layers: lattice models, quench dynamics
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 2.07 ms | PennyLane Lightning 1.48 ms | Faster PennyLane Lightning 1.4× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 3.73 ms | PennyLane Lightning 2.18 ms | Faster PennyLane Lightning 1.7× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 6.19 ms | PennyLane Lightning 2.88 ms | Faster PennyLane Lightning 2.2× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 30.3 ms | PennyLane Lightning 5.58 ms | Faster PennyLane Lightning 5.4× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 697 ms | PennyLane Lightning 66.6 ms | Faster PennyLane Lightning 10.5× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 2.46 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 2.48 ms | PennyLane Lightning 1.70 ms | Faster PennyLane Lightning 1.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 4.76 ms | PennyLane Lightning 2.50 ms | Faster PennyLane Lightning 1.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 8.07 ms | PennyLane Lightning 3.49 ms | Faster PennyLane Lightning 2.3× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 43.5 ms | PennyLane Lightning 9.80 ms | Faster PennyLane Lightning 4.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 891 ms | PennyLane Lightning 177 ms | Faster PennyLane Lightning 5.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 8.20 s | Faster – |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 10.7 ms | PennyLane Lightning 3.25 ms | Faster PennyLane Lightning 3.3× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 22.3 ms | PennyLane Lightning 4.77 ms | Faster PennyLane Lightning 4.7× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 43.4 ms | PennyLane Lightning 6.94 ms | Faster PennyLane Lightning 6.3× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 268 ms | PennyLane Lightning 27.7 ms | Faster PennyLane Lightning 9.7× |
Hamiltonian time evolution
Trotterised spin chain: ZZ + XX couplings with local fields
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 9.46 ms | PennyLane Lightning 4.43 ms | Faster PennyLane Lightning 2.1× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 23.2 ms | PennyLane Lightning 9.09 ms | Faster PennyLane Lightning 2.6× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 43.8 ms | PennyLane Lightning 14.5 ms | Faster PennyLane Lightning 3.0× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 208 ms | PennyLane Lightning 32.9 ms | Faster PennyLane Lightning 6.3× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 4.57 s | PennyLane Lightning 444 ms | Faster PennyLane Lightning 10.3× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 16.1 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 9.82 ms | PennyLane Lightning 4.63 ms | Faster PennyLane Lightning 2.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 24.4 ms | PennyLane Lightning 9.47 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 46.3 ms | PennyLane Lightning 14.9 ms | Faster PennyLane Lightning 3.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 223 ms | PennyLane Lightning 37.6 ms | Faster PennyLane Lightning 5.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 4.86 s | PennyLane Lightning 563 ms | Faster PennyLane Lightning 8.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 21.9 s | Faster – |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane 25.0 ms | PennyLane Lightning 9.63 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane 46.9 ms | PennyLane Lightning 15.2 ms | Faster PennyLane Lightning 3.1× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane 236 ms | PennyLane Lightning 45.6 ms | Faster PennyLane Lightning 5.2× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane 5.11 s | PennyLane Lightning 795 ms | Faster PennyLane Lightning 6.4× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane 23.7 ms | PennyLane Lightning 9.40 ms | Faster PennyLane Lightning 2.5× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane 44.4 ms | PennyLane Lightning 14.8 ms | Faster PennyLane Lightning 3.0× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane 211 ms | PennyLane Lightning 38.4 ms | Faster PennyLane Lightning 5.5× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane 4.76 s | PennyLane Lightning 588 ms | Faster PennyLane Lightning 8.1× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 29.5 ms | PennyLane Lightning 8.08 ms | Faster PennyLane Lightning 3.7× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 72.7 ms | PennyLane Lightning 15.9 ms | Faster PennyLane Lightning 4.6× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 212 ms | PennyLane Lightning 26.4 ms | Faster PennyLane Lightning 8.1× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 1.64 s | PennyLane Lightning 116 ms | Faster PennyLane Lightning 14.1× |
MaxCut on a ring
QAOA over a cycle graph
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 5.17 ms | PennyLane Lightning 2.84 ms | Faster PennyLane Lightning 1.8× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 10.6 ms | PennyLane Lightning 4.94 ms | Faster PennyLane Lightning 2.1× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 17.8 ms | PennyLane Lightning 6.97 ms | Faster PennyLane Lightning 2.6× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 82.9 ms | PennyLane Lightning 14.2 ms | Faster PennyLane Lightning 5.8× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 1.82 s | PennyLane Lightning 176 ms | Faster PennyLane Lightning 10.4× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 6.43 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 5.56 ms | PennyLane Lightning 3.02 ms | Faster PennyLane Lightning 1.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 11.3 ms | PennyLane Lightning 5.23 ms | Faster PennyLane Lightning 2.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 19.9 ms | PennyLane Lightning 7.65 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 95.7 ms | PennyLane Lightning 18.2 ms | Faster PennyLane Lightning 5.3× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 2.05 s | PennyLane Lightning 285 ms | Faster PennyLane Lightning 7.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 12.2 s | Faster – |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane 12.7 ms | PennyLane Lightning 5.59 ms | Faster PennyLane Lightning 2.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane 22.7 ms | PennyLane Lightning 8.47 ms | Faster PennyLane Lightning 2.7× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane 116 ms | PennyLane Lightning 27.1 ms | Faster PennyLane Lightning 4.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane 2.39 s | PennyLane Lightning 543 ms | Faster PennyLane Lightning 4.4× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane 11.7 ms | PennyLane Lightning 5.43 ms | Faster PennyLane Lightning 2.2× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane 20.2 ms | PennyLane Lightning 7.92 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane 93.4 ms | PennyLane Lightning 20.6 ms | Faster PennyLane Lightning 4.5× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane 1.88 s | PennyLane Lightning 332 ms | Faster PennyLane Lightning 5.7× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 23.6 ms | PennyLane Lightning 5.73 ms | Faster PennyLane Lightning 4.1× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 48.6 ms | PennyLane Lightning 9.69 ms | Faster PennyLane Lightning 5.0× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 113 ms | PennyLane Lightning 14.9 ms | Faster PennyLane Lightning 7.6× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 764 ms | PennyLane Lightning 61.5 ms | Faster PennyLane Lightning 12.4× |
Statevector, global observable (all_z), depth 3 | Qubits 8 | PennyLane 10.9 ms | PennyLane Lightning 7.03 ms | Faster PennyLane Lightning 1.5× |
Statevector, global observable (all_z), depth 3 | Qubits 12 | PennyLane 19.1 ms | PennyLane Lightning 9.39 ms | Faster PennyLane Lightning 2.0× |
Statevector, global observable (all_z), depth 3 | Qubits 16 | PennyLane 88.1 ms | PennyLane Lightning 17.3 ms | Faster PennyLane Lightning 5.1× |
MaxCut, arbitrary graph
QAOA over a random-edge graph
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 6.19 ms | PennyLane Lightning 3.28 ms | Faster PennyLane Lightning 1.9× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 14.4 ms | PennyLane Lightning 6.53 ms | Faster PennyLane Lightning 2.2× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 28.0 ms | PennyLane Lightning 10.8 ms | Faster PennyLane Lightning 2.6× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 115 ms | PennyLane Lightning 18.6 ms | Faster PennyLane Lightning 6.2× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 2.79 s | PennyLane Lightning 258 ms | Faster PennyLane Lightning 10.8× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 9.47 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 6.57 ms | PennyLane Lightning 3.46 ms | Faster PennyLane Lightning 1.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 15.4 ms | PennyLane Lightning 6.83 ms | Faster PennyLane Lightning 2.3× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 30.3 ms | PennyLane Lightning 11.4 ms | Faster PennyLane Lightning 2.7× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 126 ms | PennyLane Lightning 23.0 ms | Faster PennyLane Lightning 5.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 3.07 s | PennyLane Lightning 366 ms | Faster PennyLane Lightning 8.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 15.3 s | Faster – |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 26.9 ms | PennyLane Lightning 6.49 ms | Faster PennyLane Lightning 4.1× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 63.3 ms | PennyLane Lightning 12.6 ms | Faster PennyLane Lightning 5.0× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 170 ms | PennyLane Lightning 21.5 ms | Faster PennyLane Lightning 7.9× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 1.08 s | PennyLane Lightning 77.4 ms | Faster PennyLane Lightning 13.9× |
Sampling / IQP
Diagonal phase circuit between Hadamard layers
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 5.68 ms | PennyLane Lightning 2.97 ms | Faster PennyLane Lightning 1.9× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 11.3 ms | PennyLane Lightning 5.19 ms | Faster PennyLane Lightning 2.2× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 19.7 ms | PennyLane Lightning 7.50 ms | Faster PennyLane Lightning 2.6× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 95.5 ms | PennyLane Lightning 15.5 ms | Faster PennyLane Lightning 6.2× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 2.15 s | PennyLane Lightning 206 ms | Faster PennyLane Lightning 10.4× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 7.66 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 6.14 ms | PennyLane Lightning 3.18 ms | Faster PennyLane Lightning 1.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 12.6 ms | PennyLane Lightning 5.57 ms | Faster PennyLane Lightning 2.3× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 21.6 ms | PennyLane Lightning 8.14 ms | Faster PennyLane Lightning 2.7× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 105 ms | PennyLane Lightning 20.3 ms | Faster PennyLane Lightning 5.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 2.48 s | PennyLane Lightning 317 ms | Faster PennyLane Lightning 7.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 13.6 s | Faster – |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane 13.7 ms | PennyLane Lightning 5.87 ms | Faster PennyLane Lightning 2.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane 24.5 ms | PennyLane Lightning 8.96 ms | Faster PennyLane Lightning 2.7× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane 127 ms | PennyLane Lightning 28.1 ms | Faster PennyLane Lightning 4.5× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane 2.74 s | PennyLane Lightning 566 ms | Faster PennyLane Lightning 4.9× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane 12.8 ms | PennyLane Lightning 5.76 ms | Faster PennyLane Lightning 2.2× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane 22.2 ms | PennyLane Lightning 8.48 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane 108 ms | PennyLane Lightning 22.2 ms | Faster PennyLane Lightning 4.9× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane 2.21 s | PennyLane Lightning 363 ms | Faster PennyLane Lightning 6.1× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 20.1 ms | PennyLane Lightning 5.95 ms | Faster PennyLane Lightning 3.4× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 43.1 ms | PennyLane Lightning 10.1 ms | Faster PennyLane Lightning 4.3× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 112 ms | PennyLane Lightning 15.4 ms | Faster PennyLane Lightning 7.3× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 742 ms | PennyLane Lightning 65.3 ms | Faster PennyLane Lightning 11.4× |
Quantum kernel feature map
Data-encoding circuit for kernel methods
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, global observable (all_z), depth 2 | Qubits 8 | PennyLane 8.00 ms | PennyLane Lightning 4.26 ms | Faster PennyLane Lightning 1.9× |
Expectation value, global observable (all_z), depth 2 | Qubits 12 | PennyLane 12.7 ms | PennyLane Lightning 5.92 ms | Faster PennyLane Lightning 2.1× |
Expectation value, global observable (all_z), depth 2 | Qubits 16 | PennyLane skip | PennyLane Lightning 12.9 ms | Faster – |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 8 | PennyLane 10.6 ms | PennyLane Lightning 40.2 ms | Faster PennyLane 3.8× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 12 | PennyLane 76.1 ms | PennyLane Lightning 66.1 ms | Faster PennyLane Lightning 1.2× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 16 | PennyLane skip | PennyLane Lightning 262 ms | Faster – |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 8 | PennyLane 30.3 ms | PennyLane Lightning 301 ms | Faster PennyLane 9.9× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 12 | PennyLane 652 ms | PennyLane Lightning 501 ms | Faster PennyLane Lightning 1.3× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 16 | PennyLane skip | PennyLane Lightning 2.19 s | Faster – |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 8 | PennyLane 110 ms | PennyLane Lightning 1.41 s | Faster PennyLane 12.8× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 12 | PennyLane 7.92 s | PennyLane Lightning 2.25 s | Faster PennyLane Lightning 3.5× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 16 | PennyLane skip | PennyLane Lightning 8.28 s | Faster – |
Hardware-efficient VQE
RY/RZ layers with a CNOT ring
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 3.43 ms | PennyLane Lightning 2.18 ms | Faster PennyLane Lightning 1.6× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 6.83 ms | PennyLane Lightning 3.48 ms | Faster PennyLane Lightning 2.0× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 12.0 ms | PennyLane Lightning 4.96 ms | Faster PennyLane Lightning 2.4× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 61.6 ms | PennyLane Lightning 10.3 ms | Faster PennyLane Lightning 6.0× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 1.41 s | PennyLane Lightning 136 ms | Faster PennyLane Lightning 10.4× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 4.80 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 3.91 ms | PennyLane Lightning 2.41 ms | Faster PennyLane Lightning 1.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 7.93 ms | PennyLane Lightning 3.81 ms | Faster PennyLane Lightning 2.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 14.0 ms | PennyLane Lightning 5.56 ms | Faster PennyLane Lightning 2.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 72.0 ms | PennyLane Lightning 14.5 ms | Faster PennyLane Lightning 5.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 1.54 s | PennyLane Lightning 248 ms | Faster PennyLane Lightning 6.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 10.6 s | Faster – |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 19.4 ms | PennyLane Lightning 4.69 ms | Faster PennyLane Lightning 4.1× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 38.7 ms | PennyLane Lightning 7.64 ms | Faster PennyLane Lightning 5.1× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 82.6 ms | PennyLane Lightning 11.5 ms | Faster PennyLane Lightning 7.2× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 462 ms | PennyLane Lightning 54.3 ms | Faster PennyLane Lightning 8.5× |
Statevector, global observable (all_z), depth 3 | Qubits 8 | PennyLane 6.89 ms | PennyLane Lightning 5.38 ms | Faster PennyLane Lightning 1.3× |
Statevector, global observable (all_z), depth 3 | Qubits 12 | PennyLane 12.1 ms | PennyLane Lightning 6.94 ms | Faster PennyLane Lightning 1.7× |
Statevector, global observable (all_z), depth 3 | Qubits 16 | PennyLane 62.8 ms | PennyLane Lightning 12.4 ms | Faster PennyLane Lightning 5.1× |
Strongly-entangling ansatz
RX/RY/RZ layers with a CNOT ring
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane 4.02 ms | PennyLane Lightning 2.43 ms | Faster PennyLane Lightning 1.7× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane 7.98 ms | PennyLane Lightning 4.09 ms | Faster PennyLane Lightning 2.0× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane 14.3 ms | PennyLane Lightning 5.88 ms | Faster PennyLane Lightning 2.4× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane 70.1 ms | PennyLane Lightning 13.1 ms | Faster PennyLane Lightning 5.3× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane 1.67 s | PennyLane Lightning 177 ms | Faster PennyLane Lightning 9.5× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 6.45 s | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane 4.44 ms | PennyLane Lightning 2.65 ms | Faster PennyLane Lightning 1.7× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane 8.95 ms | PennyLane Lightning 4.38 ms | Faster PennyLane Lightning 2.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane 16.0 ms | PennyLane Lightning 6.44 ms | Faster PennyLane Lightning 2.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane 78.2 ms | PennyLane Lightning 17.1 ms | Faster PennyLane Lightning 4.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane 2.73 s | PennyLane Lightning 290 ms | Faster PennyLane Lightning 9.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane skip | PennyLane Lightning 12.3 s | Faster – |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane 29.0 ms | PennyLane Lightning 5.82 ms | Faster PennyLane Lightning 5.0× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane 58.9 ms | PennyLane Lightning 9.62 ms | Faster PennyLane Lightning 6.1× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane 125 ms | PennyLane Lightning 15.2 ms | Faster PennyLane Lightning 8.2× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane 538 ms | PennyLane Lightning 77.4 ms | Faster PennyLane Lightning 7.0× |
Data re-uploading QML
Repeated encode-and-rotate classifier
| Workload | Qubits | PennyLane | PennyLane Lightning | Faster |
|---|---|---|---|---|
Expectation value, global observable (all_z), depth 2 | Qubits 8 | PennyLane 10.4 ms | PennyLane Lightning 5.31 ms | Faster PennyLane Lightning 2.0× |
Expectation value, global observable (all_z), depth 2 | Qubits 12 | PennyLane 18.2 ms | PennyLane Lightning 7.58 ms | Faster PennyLane Lightning 2.4× |
Expectation value, global observable (all_z), depth 2 | Qubits 16 | PennyLane 81.9 ms | PennyLane Lightning 17.0 ms | Faster PennyLane Lightning 4.8× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 8 | PennyLane 14.7 ms | PennyLane Lightning 53.2 ms | Faster PennyLane 3.6× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 12 | PennyLane 121 ms | PennyLane Lightning 88.0 ms | Faster PennyLane Lightning 1.4× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 16 | PennyLane 8.25 s | PennyLane Lightning 354 ms | Faster PennyLane Lightning 23.3× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 8 | PennyLane 53.8 ms | PennyLane Lightning 398 ms | Faster PennyLane 7.4× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 12 | PennyLane 1.08 s | PennyLane Lightning 670 ms | Faster PennyLane Lightning 1.6× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 16 | PennyLane 71.1 s | PennyLane Lightning 2.81 s | Faster PennyLane Lightning 25.3× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 8 | PennyLane 200 ms | PennyLane Lightning 1.80 s | Faster PennyLane 9.0× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 12 | PennyLane 13.7 s | PennyLane Lightning 2.91 s | Faster PennyLane Lightning 4.7× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 16 | PennyLane skip | PennyLane Lightning 11.3 s | Faster – |
Gradient, local observable, depth 2 | Qubits 8 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2 | Qubits 12 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2 | Qubits 16 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 8 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 12 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 16 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 8 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 12 | PennyLane unsupported | PennyLane Lightning unsupported | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 16 | PennyLane skip | PennyLane Lightning unsupported | Faster – |
How this was measured
One host, one harness
Every simulator ran the same circuits on one host, single-threaded and core-pinned, driven through one common harness, so any overhead the harness adds is charged to the simulator. Each result was checked against a reference implementation: a simulator that ran fast but returned the wrong answer is left out of the ranking. Nothing is interpolated or rescaled. A time was measured, or it is not shown.
Run 2026-08-10, 8 cores, threads=1. numpy 2.4.6, scipy 1.18.0, torch 2.13.0, numba 0.66.0, pennylane 0.45.1, pennylane_lightning 0.45.0, qiskit 2.5.1, qulacs 0.6.14, tensorcircuit 1.8.0, cudaq 0.15.1. One host and one thread make the comparison reproducible. It is not a prediction for your laptop.
The interactive tool shows the same measurements for any workload you pick, with the quantum hardware that could run it and what a run would cost.