Quantum
Quantum copied to clipboard
Add Sparse Simulator Samples
Repo: https://github.com/microsoft/Quantum Dir: https://github.com/microsoft/Quantum/tree/main/samples
Demo: http://aka.ms/try-qsharp Consider:
- Sudoku solving with Grover's
- Integer factorization (Shor's algo) - https://github.com/microsoft/Quantum/pull/619
- The samples that tell about simulation. We can add one more cell: "You can also use the SparseSimulator. The SparseSimulator is faster".
- Intro to IQ# (search for "%simulate")
- Dumping states and operations
The first bullet on the list is complete, https://github.com/microsoft/Quantum/commit/7aa68811824093d3be663dd81fb58178d3d11697 updated Sudoku solver sample to use sparse simulator instead of the full state simulator.
@kuzminrobin: Was there any other work that you were suggesting as part of this feature request, or can this be closed? Thank you!
I imagine https://github.com/microsoft/Quantum/pull/713 and its counterpart for IonQ will contribute to this as well, since they'll show up in the gallery.
@cgranade, I believe the last bullet item (with 2 sub-bullets) is still TODO (something that can be done). However the LT is considering making the sparse simulator a default simulator (and fully dropping the full-state simulator). After which the last bullet item will stop being applicable.
Oddly enough, I've found one case on which the sparse simulator was significantly slower than the full state one. If that's of interest, I try to dig up the example at the end of this week. So maybe dropping the full state sim completely is excessive?
Would be nice to get more details about "significantly slower". We know that one of the perf tests shows that the SS is about 6 times slower than FSS for the case of dense state. Management's opinion is close to "we can live with that". The deprecation of FSS is caused by the fact that the support burden is high for FSS (from the recent discussion with @bettinaheim).