PennyLane Lightning vs TensorCircuit
The same circuits, one host
PennyLane Lightning and TensorCircuit both finished 142 of the 175 workloads measured here. PennyLane Lightning was faster in 51 of them and TensorCircuit in 91. At the median TensorCircuit was 3.4× faster.
By circuit family
Who was faster where
| Circuit family | Workloads both finished | PennyLane Lightning faster in | TensorCircuit faster in | Faster at the median |
|---|---|---|---|---|
| Workloads both finished 16 | PennyLane Lightning faster in 3 | TensorCircuit faster in 13 | Faster at the median TensorCircuit 6.3× | |
| Workloads both finished 24 | PennyLane Lightning faster in 7 | TensorCircuit faster in 17 | Faster at the median TensorCircuit 9.5× | |
| Workloads both finished 24 | PennyLane Lightning faster in 11 | TensorCircuit faster in 13 | Faster at the median TensorCircuit 3.0× | |
| Workloads both finished 0 | PennyLane Lightning faster in 0 | TensorCircuit faster in 0 | Faster at the median – | |
| Workloads both finished 24 | PennyLane Lightning faster in 11 | TensorCircuit faster in 13 | Faster at the median TensorCircuit 3.2× | |
| Workloads both finished 11 | PennyLane Lightning faster in 3 | TensorCircuit faster in 8 | Faster at the median TensorCircuit 1.3× | |
| Workloads both finished 16 | PennyLane Lightning faster in 7 | TensorCircuit faster in 9 | Faster at the median TensorCircuit 2.8× | |
| Workloads both finished 16 | PennyLane Lightning faster in 6 | TensorCircuit faster in 10 | Faster at the median TensorCircuit 3.4× | |
| Workloads both finished 11 | PennyLane Lightning faster in 3 | TensorCircuit faster in 8 | Faster at the median TensorCircuit 1.5× |
Local circuit dynamics
Brickwork nearest-neighbour layers: lattice models, quench dynamics
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 1.48 ms | TensorCircuit 159 µs | Faster TensorCircuit 9.3× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 2.18 ms | TensorCircuit 249 µs | Faster TensorCircuit 8.7× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 2.88 ms | TensorCircuit 378 µs | Faster TensorCircuit 7.6× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 5.58 ms | TensorCircuit 2.17 ms | Faster TensorCircuit 2.6× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 66.6 ms | TensorCircuit 63.5 ms | Faster TensorCircuit 1.0× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 2.46 s | TensorCircuit 1.16 s | Faster TensorCircuit 2.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 1.70 ms | TensorCircuit 181 µs | Faster TensorCircuit 9.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 2.50 ms | TensorCircuit 285 µs | Faster TensorCircuit 8.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 3.49 ms | TensorCircuit 848 µs | Faster TensorCircuit 4.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 9.80 ms | TensorCircuit 33.5 ms | Faster PennyLane Lightning 3.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 177 ms | TensorCircuit 735 ms | Faster PennyLane Lightning 4.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 8.20 s | TensorCircuit 16.2 s | Faster PennyLane Lightning 2.0× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 3.25 ms | TensorCircuit 253 µs | Faster TensorCircuit 12.8× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 4.77 ms | TensorCircuit 426 µs | Faster TensorCircuit 11.2× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 6.94 ms | TensorCircuit 758 µs | Faster TensorCircuit 9.2× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 27.7 ms | TensorCircuit 5.49 ms | Faster TensorCircuit 5.0× |
Hamiltonian time evolution
Trotterised spin chain: ZZ + XX couplings with local fields
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 4.43 ms | TensorCircuit 267 µs | Faster TensorCircuit 16.6× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 9.09 ms | TensorCircuit 468 µs | Faster TensorCircuit 19.4× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 14.5 ms | TensorCircuit 749 µs | Faster TensorCircuit 19.3× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 32.9 ms | TensorCircuit 4.46 ms | Faster TensorCircuit 7.4× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 444 ms | TensorCircuit 164 ms | Faster TensorCircuit 2.7× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 16.1 s | TensorCircuit 6.20 s | Faster TensorCircuit 2.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 4.63 ms | TensorCircuit 275 µs | Faster TensorCircuit 16.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 9.47 ms | TensorCircuit 522 µs | Faster TensorCircuit 18.1× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 14.9 ms | TensorCircuit 1.42 ms | Faster TensorCircuit 10.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 37.6 ms | TensorCircuit 45.6 ms | Faster PennyLane Lightning 1.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 563 ms | TensorCircuit 1.43 s | Faster PennyLane Lightning 2.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 21.9 s | TensorCircuit 45.3 s | Faster PennyLane Lightning 2.1× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane Lightning 9.63 ms | TensorCircuit 593 µs | Faster TensorCircuit 16.2× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane Lightning 15.2 ms | TensorCircuit 2.12 ms | Faster TensorCircuit 7.2× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane Lightning 45.6 ms | TensorCircuit 78.8 ms | Faster PennyLane Lightning 1.7× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane Lightning 795 ms | TensorCircuit 2.65 s | Faster PennyLane Lightning 3.3× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane Lightning 9.40 ms | TensorCircuit 537 µs | Faster TensorCircuit 17.5× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane Lightning 14.8 ms | TensorCircuit 1.74 ms | Faster TensorCircuit 8.5× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane Lightning 38.4 ms | TensorCircuit 60.3 ms | Faster PennyLane Lightning 1.6× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane Lightning 588 ms | TensorCircuit 1.90 s | Faster PennyLane Lightning 3.2× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 8.08 ms | TensorCircuit 442 µs | Faster TensorCircuit 18.3× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 15.9 ms | TensorCircuit 962 µs | Faster TensorCircuit 16.5× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 26.4 ms | TensorCircuit 1.61 ms | Faster TensorCircuit 16.4× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 116 ms | TensorCircuit 10.7 ms | Faster TensorCircuit 10.9× |
MaxCut on a ring
QAOA over a cycle graph
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 2.84 ms | TensorCircuit 199 µs | Faster TensorCircuit 14.3× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 4.94 ms | TensorCircuit 387 µs | Faster TensorCircuit 12.8× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 6.97 ms | TensorCircuit 1.43 ms | Faster TensorCircuit 4.9× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 14.2 ms | TensorCircuit 21.2 ms | Faster PennyLane Lightning 1.5× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 176 ms | TensorCircuit 596 ms | Faster PennyLane Lightning 3.4× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 6.43 s | TensorCircuit 12.8 s | Faster PennyLane Lightning 2.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 3.02 ms | TensorCircuit 207 µs | Faster TensorCircuit 14.5× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 5.23 ms | TensorCircuit 428 µs | Faster TensorCircuit 12.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 7.65 ms | TensorCircuit 2.01 ms | Faster TensorCircuit 3.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 18.2 ms | TensorCircuit 58.3 ms | Faster PennyLane Lightning 3.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 285 ms | TensorCircuit 1.66 s | Faster PennyLane Lightning 5.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 12.2 s | TensorCircuit 42.9 s | Faster PennyLane Lightning 3.5× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane Lightning 5.59 ms | TensorCircuit 541 µs | Faster TensorCircuit 10.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane Lightning 8.47 ms | TensorCircuit 2.90 ms | Faster TensorCircuit 2.9× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane Lightning 27.1 ms | TensorCircuit 96.2 ms | Faster PennyLane Lightning 3.6× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane Lightning 543 ms | TensorCircuit 2.50 s | Faster PennyLane Lightning 4.6× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane Lightning 5.43 ms | TensorCircuit 502 µs | Faster TensorCircuit 10.8× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane Lightning 7.92 ms | TensorCircuit 2.53 ms | Faster TensorCircuit 3.1× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane Lightning 20.6 ms | TensorCircuit 77.6 ms | Faster PennyLane Lightning 3.8× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane Lightning 332 ms | TensorCircuit 2.25 s | Faster PennyLane Lightning 6.8× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 5.73 ms | TensorCircuit 372 µs | Faster TensorCircuit 15.4× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 9.69 ms | TensorCircuit 858 µs | Faster TensorCircuit 11.3× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 14.9 ms | TensorCircuit 4.31 ms | Faster TensorCircuit 3.5× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 61.5 ms | TensorCircuit 104 ms | Faster PennyLane Lightning 1.7× |
Statevector, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 7.03 ms | TensorCircuit unsupported | Faster – |
Statevector, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 9.39 ms | TensorCircuit unsupported | Faster – |
Statevector, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 17.3 ms | TensorCircuit unsupported | Faster – |
MaxCut, arbitrary graph
QAOA over a random-edge graph
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 3.28 ms | TensorCircuit error | Faster – |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 6.53 ms | TensorCircuit error | Faster – |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 10.8 ms | TensorCircuit error | Faster – |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 18.6 ms | TensorCircuit error | Faster – |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 258 ms | TensorCircuit error | Faster – |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 9.47 s | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 3.46 ms | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 6.83 ms | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 11.4 ms | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 23.0 ms | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 366 ms | TensorCircuit error | Faster – |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 15.3 s | TensorCircuit error | Faster – |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 6.49 ms | TensorCircuit error | Faster – |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 12.6 ms | TensorCircuit error | Faster – |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 21.5 ms | TensorCircuit error | Faster – |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 77.4 ms | TensorCircuit error | Faster – |
Sampling / IQP
Diagonal phase circuit between Hadamard layers
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 2.97 ms | TensorCircuit 209 µs | Faster TensorCircuit 14.2× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 5.19 ms | TensorCircuit 425 µs | Faster TensorCircuit 12.2× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 7.50 ms | TensorCircuit 1.49 ms | Faster TensorCircuit 5.0× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 15.5 ms | TensorCircuit 21.1 ms | Faster PennyLane Lightning 1.4× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 206 ms | TensorCircuit 633 ms | Faster PennyLane Lightning 3.1× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 7.66 s | TensorCircuit 13.7 s | Faster PennyLane Lightning 1.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 3.18 ms | TensorCircuit 229 µs | Faster TensorCircuit 13.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 5.57 ms | TensorCircuit 464 µs | Faster TensorCircuit 12.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 8.14 ms | TensorCircuit 2.04 ms | Faster TensorCircuit 4.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 20.3 ms | TensorCircuit 59.5 ms | Faster PennyLane Lightning 2.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 317 ms | TensorCircuit 1.53 s | Faster PennyLane Lightning 4.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 13.6 s | TensorCircuit 45.0 s | Faster PennyLane Lightning 3.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 8 | PennyLane Lightning 5.87 ms | TensorCircuit 568 µs | Faster TensorCircuit 10.3× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 12 | PennyLane Lightning 8.96 ms | TensorCircuit 2.94 ms | Faster TensorCircuit 3.1× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 16 | PennyLane Lightning 28.1 ms | TensorCircuit 96.1 ms | Faster PennyLane Lightning 3.4× |
Expectation value, global observable (pauli_mix), depth 3 | Qubits 20 | PennyLane Lightning 566 ms | TensorCircuit 2.76 s | Faster PennyLane Lightning 4.9× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 8 | PennyLane Lightning 5.76 ms | TensorCircuit 525 µs | Faster TensorCircuit 11.0× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 12 | PennyLane Lightning 8.48 ms | TensorCircuit 2.56 ms | Faster TensorCircuit 3.3× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 16 | PennyLane Lightning 22.2 ms | TensorCircuit 79.0 ms | Faster PennyLane Lightning 3.6× |
Expectation value, global observable (zz_sum), depth 3 | Qubits 20 | PennyLane Lightning 363 ms | TensorCircuit 2.22 s | Faster PennyLane Lightning 6.1× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 5.95 ms | TensorCircuit 425 µs | Faster TensorCircuit 14.0× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 10.1 ms | TensorCircuit 898 µs | Faster TensorCircuit 11.2× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 15.4 ms | TensorCircuit 4.39 ms | Faster TensorCircuit 3.5× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 65.3 ms | TensorCircuit 104 ms | Faster PennyLane Lightning 1.6× |
Quantum kernel feature map
Data-encoding circuit for kernel methods
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, global observable (all_z), depth 2 | Qubits 8 | PennyLane Lightning 4.26 ms | TensorCircuit 288 µs | Faster TensorCircuit 14.8× |
Expectation value, global observable (all_z), depth 2 | Qubits 12 | PennyLane Lightning 5.92 ms | TensorCircuit 871 µs | Faster TensorCircuit 6.8× |
Expectation value, global observable (all_z), depth 2 | Qubits 16 | PennyLane Lightning 12.9 ms | TensorCircuit 30.7 ms | Faster PennyLane Lightning 2.4× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 8 | PennyLane Lightning 40.2 ms | TensorCircuit 1.28 ms | Faster TensorCircuit 31.5× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 12 | PennyLane Lightning 66.1 ms | TensorCircuit 52.5 ms | Faster TensorCircuit 1.3× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 16 | PennyLane Lightning 262 ms | TensorCircuit 1.09 s | Faster PennyLane Lightning 4.2× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 8 | PennyLane Lightning 301 ms | TensorCircuit 8.45 ms | Faster TensorCircuit 35.7× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 12 | PennyLane Lightning 501 ms | TensorCircuit 428 ms | Faster TensorCircuit 1.2× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 16 | PennyLane Lightning 2.19 s | TensorCircuit 8.81 s | Faster PennyLane Lightning 4.0× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 8 | PennyLane Lightning 1.41 s | TensorCircuit 79.4 ms | Faster TensorCircuit 17.7× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 12 | PennyLane Lightning 2.25 s | TensorCircuit 1.79 s | Faster TensorCircuit 1.3× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 16 | PennyLane Lightning 8.28 s | TensorCircuit error | Faster – |
Hardware-efficient VQE
RY/RZ layers with a CNOT ring
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 2.18 ms | TensorCircuit 211 µs | Faster TensorCircuit 10.3× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 3.48 ms | TensorCircuit 386 µs | Faster TensorCircuit 9.0× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 4.96 ms | TensorCircuit 1.50 ms | Faster TensorCircuit 3.3× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 10.3 ms | TensorCircuit 20.7 ms | Faster PennyLane Lightning 2.0× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 136 ms | TensorCircuit 488 ms | Faster PennyLane Lightning 3.6× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 4.80 s | TensorCircuit 13.7 s | Faster PennyLane Lightning 2.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 2.41 ms | TensorCircuit 212 µs | Faster TensorCircuit 11.3× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 3.81 ms | TensorCircuit 454 µs | Faster TensorCircuit 8.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 5.56 ms | TensorCircuit 2.02 ms | Faster TensorCircuit 2.8× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 14.5 ms | TensorCircuit 53.9 ms | Faster PennyLane Lightning 3.7× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 248 ms | TensorCircuit 1.09 s | Faster PennyLane Lightning 4.4× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 10.6 s | TensorCircuit 27.5 s | Faster PennyLane Lightning 2.6× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 4.69 ms | TensorCircuit 340 µs | Faster TensorCircuit 13.8× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 7.64 ms | TensorCircuit 830 µs | Faster TensorCircuit 9.2× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 11.5 ms | TensorCircuit 4.05 ms | Faster TensorCircuit 2.8× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 54.3 ms | TensorCircuit 66.6 ms | Faster PennyLane Lightning 1.2× |
Statevector, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 5.38 ms | TensorCircuit unsupported | Faster – |
Statevector, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 6.94 ms | TensorCircuit unsupported | Faster – |
Statevector, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 12.4 ms | TensorCircuit unsupported | Faster – |
Strongly-entangling ansatz
RX/RY/RZ layers with a CNOT ring
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, local observable, depth 3 | Qubits 4 | PennyLane Lightning 2.43 ms | TensorCircuit 224 µs | Faster TensorCircuit 10.8× |
Expectation value, local observable, depth 3 | Qubits 8 | PennyLane Lightning 4.09 ms | TensorCircuit 418 µs | Faster TensorCircuit 9.8× |
Expectation value, local observable, depth 3 | Qubits 12 | PennyLane Lightning 5.88 ms | TensorCircuit 1.46 ms | Faster TensorCircuit 4.0× |
Expectation value, local observable, depth 3 | Qubits 16 | PennyLane Lightning 13.1 ms | TensorCircuit 20.7 ms | Faster PennyLane Lightning 1.6× |
Expectation value, local observable, depth 3 | Qubits 20 | PennyLane Lightning 177 ms | TensorCircuit 467 ms | Faster PennyLane Lightning 2.6× |
Expectation value, local observable, depth 3 | Qubits 24 | PennyLane Lightning 6.45 s | TensorCircuit 13.0 s | Faster PennyLane Lightning 2.0× |
Expectation value, global observable (all_z), depth 3 | Qubits 4 | PennyLane Lightning 2.65 ms | TensorCircuit 229 µs | Faster TensorCircuit 11.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 8 | PennyLane Lightning 4.38 ms | TensorCircuit 458 µs | Faster TensorCircuit 9.6× |
Expectation value, global observable (all_z), depth 3 | Qubits 12 | PennyLane Lightning 6.44 ms | TensorCircuit 2.01 ms | Faster TensorCircuit 3.2× |
Expectation value, global observable (all_z), depth 3 | Qubits 16 | PennyLane Lightning 17.1 ms | TensorCircuit 50.3 ms | Faster PennyLane Lightning 2.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 20 | PennyLane Lightning 290 ms | TensorCircuit 1.13 s | Faster PennyLane Lightning 3.9× |
Expectation value, global observable (all_z), depth 3 | Qubits 24 | PennyLane Lightning 12.3 s | TensorCircuit 26.2 s | Faster PennyLane Lightning 2.1× |
Gradient, local observable, depth 3 | Qubits 4 | PennyLane Lightning 5.82 ms | TensorCircuit 395 µs | Faster TensorCircuit 14.7× |
Gradient, local observable, depth 3 | Qubits 8 | PennyLane Lightning 9.62 ms | TensorCircuit 986 µs | Faster TensorCircuit 9.8× |
Gradient, local observable, depth 3 | Qubits 12 | PennyLane Lightning 15.2 ms | TensorCircuit 4.28 ms | Faster TensorCircuit 3.6× |
Gradient, local observable, depth 3 | Qubits 16 | PennyLane Lightning 77.4 ms | TensorCircuit 69.9 ms | Faster TensorCircuit 1.1× |
Data re-uploading QML
Repeated encode-and-rotate classifier
| Workload | Qubits | PennyLane Lightning | TensorCircuit | Faster |
|---|---|---|---|---|
Expectation value, global observable (all_z), depth 2 | Qubits 8 | PennyLane Lightning 5.31 ms | TensorCircuit 388 µs | Faster TensorCircuit 13.7× |
Expectation value, global observable (all_z), depth 2 | Qubits 12 | PennyLane Lightning 7.58 ms | TensorCircuit 1.20 ms | Faster TensorCircuit 6.3× |
Expectation value, global observable (all_z), depth 2 | Qubits 16 | PennyLane Lightning 17.0 ms | TensorCircuit 43.8 ms | Faster PennyLane Lightning 2.6× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 8 | PennyLane Lightning 53.2 ms | TensorCircuit 2.00 ms | Faster TensorCircuit 26.6× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 12 | PennyLane Lightning 88.0 ms | TensorCircuit 59.8 ms | Faster TensorCircuit 1.5× |
Expectation value, global observable (all_z), depth 2, batch of 32 | Qubits 16 | PennyLane Lightning 354 ms | TensorCircuit 2.02 s | Faster PennyLane Lightning 5.7× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 8 | PennyLane Lightning 398 ms | TensorCircuit 14.7 ms | Faster TensorCircuit 27.1× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 12 | PennyLane Lightning 670 ms | TensorCircuit 497 ms | Faster TensorCircuit 1.3× |
Expectation value, global observable (all_z), depth 2, batch of 256 | Qubits 16 | PennyLane Lightning 2.81 s | TensorCircuit 16.9 s | Faster PennyLane Lightning 6.0× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 8 | PennyLane Lightning 1.80 s | TensorCircuit 107 ms | Faster TensorCircuit 16.7× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 12 | PennyLane Lightning 2.91 s | TensorCircuit 2.17 s | Faster TensorCircuit 1.3× |
Expectation value, global observable (all_z), depth 2, batch of 1024 | Qubits 16 | PennyLane Lightning 11.3 s | TensorCircuit error | Faster – |
Gradient, local observable, depth 2 | Qubits 8 | PennyLane Lightning unsupported | TensorCircuit 596 µs | Faster – |
Gradient, local observable, depth 2 | Qubits 12 | PennyLane Lightning unsupported | TensorCircuit 1.16 ms | Faster – |
Gradient, local observable, depth 2 | Qubits 16 | PennyLane Lightning unsupported | TensorCircuit 7.10 ms | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 8 | PennyLane Lightning unsupported | TensorCircuit 3.46 ms | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 12 | PennyLane Lightning unsupported | TensorCircuit 19.9 ms | Faster – |
Gradient, local observable, depth 2, batch of 32 | Qubits 16 | PennyLane Lightning unsupported | TensorCircuit 424 ms | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 8 | PennyLane Lightning unsupported | TensorCircuit 26.0 ms | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 12 | PennyLane Lightning unsupported | TensorCircuit 243 ms | Faster – |
Gradient, local observable, depth 2, batch of 256 | Qubits 16 | PennyLane Lightning unsupported | TensorCircuit 3.51 s | 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.