amazon-braket / amazon-braket-default-simulator-python

Quantum program simulators that can run locally
https://amazon-braket-default-simulator-python.readthedocs.io/
Apache License 2.0
67 stars 22 forks source link

Add Clifford simulator implementation #253

Open speller26 opened 1 month ago

speller26 commented 1 month ago

Describe the feature you'd like Stabilizer circuits can be classically simulated efficiently, and are very useful in quantum information research, for example in quantum error correction. To support these use cases, it would be good to have a Clifford simulator target for the local simulator:

sim = LocalSimulator("braket.clifford")

This should be done by implementing the OpenQASMSimulator interface to translated OpenQASM into simulator instructions.

How would this feature be used? Please describe. Fast simulation of large stabilizer circuits, for example with thousands of qubits and gates.

AbdullahKazi500 commented 4 weeks ago

Hi @rmshaffer made a PR to clear the issue

AbdullahKazi500 commented 3 weeks ago

Hi @speller26 and @rmshaffer I Have to give up on this issue unfortunately it was great working on this but I will be active for contributions later on

golanor commented 3 weeks ago

Hi, Do you expect a full simulator, or a wrapper over an existing simulator, such as stim?

speller26 commented 3 weeks ago

Either is fine; a wrapper is much more doable, but we're not ruling out a high-performance custom implementation, which would be incredibly impressive!

dobbse42 commented 2 days ago

Hello, Am I correct in understanding that OpenQASMSimulator implementations do not support modifying existing circuits? Additionally, AbstractProgramContexts require appropriate handling of custom unitaries. While this is convenient for a general simulator, a clifford simulator would have to verify that the provided unitary can be implemented by only clifford gates and also find a corresponding clifford decomposition. This seems beyond the scope of this issue, so would it be acceptable to simply raise an exception if that function is ever called?