jaqalpaq.emulator package

class jaqalpaq.emulator.UnitarySerializedEmulator

Bases: jaqalpaq.emulator.pygsti.backends.pyGSTiEmulator

Serialized emulator using pyGSTi circuit objects

This object should be treated as an opaque symbol to be passed to run_jaqal_circuit.

jaqalpaq.emulator.run_jaqal_circuit(circuit, backend=None)

Execute a Jaqal Circuit in a noiseless emulator.

Parameters
  • circuit (Circuit) – The Jaqalpaq circuit to be run.

  • backend – The backend to perform the circuit simulation/emulation. Defaults to UnitarySerializedEmulator.

Return type

ExecutionResult

Note

Random seed is controlled by numpy.random.seed. Consider calling

numpy.random.seed(int(time.time()))

for random behavior.

jaqalpaq.emulator.run_jaqal_file(fname, backend=None)

Execute a Jaqal program in a file in a noiseless emulator.

Parameters
  • fname (str) – The path to a Jaqal file to execute.

  • backend – The backend to perform the circuit simulation/emulation. Defaults to UnitarySerializedEmulator.

Return type

ExecutionResult

Note

Random seed is controlled by numpy.random.seed. Consider calling

numpy.random.seed(int(time.time()))

for random behavior.

jaqalpaq.emulator.run_jaqal_string(jaqal, backend=None)

Execute a Jaqal string in a noiseless emulator.

Parameters
  • jaqal (str) – The literal Jaqal program text.

  • backend – The backend to perform the circuit simulation/emulation. Defaults to UnitarySerializedEmulator.

Return type

ExecutionResult

Note

Random seed is controlled by numpy.random.seed. Consider calling

numpy.random.seed(int(time.time()))

for random behavior.