RQISM optimization update: 20 qubit GHZ 720x faster than Cirq
Aug 23, 2025 - ⧖ 1 minI have been working on implementing block-based optimizations for rqism, that divide the statevector into blocks depending on the type of gate to efficiently implement that gate directly, avoiding the complex linear algebra of quantum gate application. So far, the optimizations are applied to single qubit phase gates, controlled versions of single qubit phase gates, single qubit superposition gates, controlled versions of single qubit superposition gates, and of course pauli and clifford gates. Theoretically, arbitrary swap gates can be optimized using a block-based method, but it has proven to be quite difficult to implement.
Cirq benchmark
I benchmarked the simulator running a 20 qubit GHZ gate, and compared the results to Cirq doing the same task. My simulator took an average of 44 microseconds, while Cirq took an average of ~32000 microseconds, which is around 720x slower.