quil-lang / qvm

The high-performance and featureful Quil simulator.
Other
411 stars 57 forks source link

add support for serial kernels #197

Closed stylewarning closed 4 years ago

stylewarning commented 4 years ago

The point of this PR is to allow smaller qubit simulations to be faster. The QVM is pretty fast for large numbers of qubits, but definitely doesn't do the best job for small numbers, which is an important case to many people.

This PR adds macros for definiting qubit application operators as "stupid" loops that kick in when there aren't enough qubits for the full-blown parallelized code.

NOTE: This code is still buggy, hence the draft PR.

stylewarning commented 4 years ago

26q hadamard benchmark goes from 7s (multi-threaded, interpreted) to 4s (single-threaded, interpreted). Compiled mode still beats both at 3.6s.

ecpeterson commented 4 years ago

pan de muerto 🤤sam's not super into it, but i like the vaguely fruity flavor a lot

appleby commented 4 years ago

pan de muerto 🤤sam's not super into it, but i like the vaguely fruity flavor a lot

🍞 💀 I like the hint-of-orange as well, but find it too sugary. I usually dust the sugar off and it's just right 👌

ecpeterson commented 4 years ago

unfortunately, i have a sweet tooth, so i don't often object to extra sugar. old age (rather: dental work) has given me the wisdom not to mind if it isn't sweet to start with, though.