autoqasm.simulator package
This module contains a local simulator implementation which can be used to simulate AutoQASM programs at the full OpenQASM 3.0 scope of functionality, including programs which contain mid-circuit measurement and classical control flow.
The recommended usage of this simulator is by instantiating the Braket LocalSimulator object with the “autoqasm” backend:
import autoqasm as aq
from braket.devices import LocalSimulator
@aq.main
def bell_state():
h(0)
cnot(0, 1)
return measure([0, 1])
device = LocalSimulator("autoqasm")
result = device.run(bell_state, shots=100).result()