QuantumLibraries
QuantumLibraries copied to clipboard
Consider adding the SparseSimulator
After the SparseSimulator is added, consider adding to the QuantumLibraries
the support for the SparseSimulator.
In particular
- In Standard/src/Diagnostics/Emulation/Internal.cs consider replacing all the occurrences of
QuantumSimulator
withCommonNativeSimulator
- the common base class for QuantumSimulator and SparseSimulator, such that both the QuantumSimulator and SparseSimulator are covered. - For all the occurrences of
@Test("QuantumSimulator")
consider adding (in the next line) also@Test("SparseSimulator")
, such that the test is run on both simulators. See example in the .qs files of this PR.
To clarify slightly on the first point, I'm not sure that it makes sense to generalize that to support all native simulators. The emulation for DumpOperation
is fairly specific to using the Choi–Jamiłkowski isomorphism to decompose state-level diagnostics from the full-state simulator into operation-level diagnostics, such that it would be a more significant feature to generalize that to allow visualizing unitary operations that are sparse in the computational basis.