All my work on Qrack is public and open, by nature of being an open source project—by license, platform, and philosophy. I have to be careful about conclusions people may attempt to draw from my work in progress. On the other hand, this openness is a wonderful thing, for general scientific transparency and ultimately scientific quality, I hope. The work-in-progress PR #244 has been hanging out for a few days, and it was commented on in issue #245. I think it's important to set aside a place for discussion on general relevant topics and issues. I also think I should start to invite discussion and peer review with some significant initial word of personal explanation.
#244 (which should be renamed) attempts to implement the closest equivalent test it can to the so-called "quantum supremacy" benchmark that has recently made some headlines. It is fantastic for the field in general that native quantum hardware has come this far and generated such positive interest, even from those who do not study the topic formally. That experiment and benchmark is a major achievement, and it greatly encourages me.
The work presented in #244 has meandered a bit, over days. I personally found it slightly challenging to translate the verbal and pictorial explanations of https://doi.org/10.1038/s41586-019-1666-5 into a practical Qrack program, at first, (though such is typical to a day's work in software development). The commit history, as it has progressed, remains available for access via that PR. By now, here's what the practical implementation seems to boil down to, in my personal understanding:
- Random gates from the set of square root of Pauli X, square root of Pauli Y, and square root of Walsh-Hadamard transform are applied to every single bit. (I read "square root of W" to mean square root of Walsh-Hadamard transform gate, maybe more commonly rendered "H" instead of "W.")
- A particular 2-qubit gate is applied across pairs in a tiling pattern, with the "tile" varying by depth iteration. I inferred this partially from the numeric counts of single-bit and 2-bit gates given in the text. The gate is approximately or exactly the composition of an "iSWAP" with a "1/6 of CZ." (Again, the nomenclature has not fully crystalized across the community. "iSWAP" I read to mean a SWAP gate where a phase factor of "i" is applied to eigenstates that are actually changed by the swap. "1/6" of CZ, I take to be the 6th root of the gate, as 6 successive applications would produce CZ.) The tiling pattern Qrack uses is meant to be the same as the example of an "intractable" sequence given in the paper, as opposed to, for example, the "easy" sequence referred to.
- We repeat 1 and 2 for 20 iterations, incrementing the "tiling" pattern at each iteration.
- We measure across the entire set of bits at the end.
This is the "circuit," or program, I have attempted to implement. I invite all criticism, commentary, concerns, etc., about the implementation. (Peer review is how we get science right.) I am still reviewing it for correctness, but, again, all my work ends up in the open.
The results are provisional. However, the provisional results seem quite exciting! Qrack::QUnit
seems very well suited for the circuit. On my personal Alienware 17 development machine, the benchmarks stay tractable up to 63 qubits, which is Qrack's general limit for such optimizable cases for QUnit, by default. The effective spatially 2-dimensional circuit exhibits significant dependence on the geometry of the qubit mapping. "Perfect square" arrangements of qubits are hardest, (and probably represent the most powerful architectures for real hardware, of the class of circuits simulated here). I am attaching a gist with my development machine benchmarks and system information: https://gist.github.com/WrathfulSpatula/15ec777d4c6cd18125728449fe25ddae
It's probably slightly too early to start a detailed analysis for conclusions. However, on the back of an envelope, 56 qubits is a local maximum for overhead, at about 2 seconds per iteration on my machine. If this holds up as representative, that's very roughly about 23 to 24 days, to run one million iterations, which is a commonly quoted point of reference on this topic.
Certain other arbitrary circuits quickly become intractable for QUnit in the same way as for simple "Schrödinger method" simulators in general; this particular circuit might be amenable to fundamental improvement in simulation method.
(Finally, I should point once again with thanks, as I am wont to do, to a work very important to the design of QUnit, "Breaking the 49-Qubit Barrier in the Simulation of Quantum Circuits," by Edwin Pednault, John A. Gunnels, Giacomo Nannicini, Lior Horesh, Thomas Magerlein, Edgar Solomonik, Erik W. Draeger, Eric T. Holland, and Robert Wisnieff: https://arxiv.org/abs/1710.05867)