Quantum icon indicating copy to clipboard operation
Quantum copied to clipboard

Add Sparse Simulator Samples

Open kuzminrobin opened this issue 3 years ago • 6 comments
trafficstars

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".

kuzminrobin avatar Feb 23 '22 21:02 kuzminrobin

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.

tcNickolas avatar Aug 15 '22 19:08 tcNickolas

@kuzminrobin: Was there any other work that you were suggesting as part of this feature request, or can this be closed? Thank you!

cgranade avatar Sep 18 '22 18:09 cgranade

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.

tcNickolas avatar Sep 18 '22 20:09 tcNickolas

@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.

kuzminrobin avatar Sep 19 '22 20:09 kuzminrobin

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?

tcNickolas avatar Sep 19 '22 22:09 tcNickolas

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).

kuzminrobin avatar Sep 19 '22 23:09 kuzminrobin