braket.default_simulator.simulator module

class braket.default_simulator.simulator.BaseLocalSimulator[source]

Bases: braket.simulator.braket_simulator.BraketSimulator

run(circuit_ir:, qubit_count: int, shots: int = 0, *, batch_size: int = 1) → braket.task_result.gate_model_task_result_v1.GateModelTaskResult[source]

Executes the circuit specified by the supplied circuit_ir on the simulator.

  • circuit_ir (Program) – ir representation of a braket circuit specifying the instructions to execute.
  • qubit_count (int) – The number of qubits to simulate.
  • shots (int) – The number of times to run the circuit.
  • batch_size (int) – The size of the circuit partitions to contract, if applying multiple gates at a time is desired; see StateVectorSimulation. Must be a positive integer. Defaults to 1, which means gates are applied one at a time without any optimized contraction.

GateModelTaskResult – object that represents the result


ValueError – If result types are not specified in the IR or sample is specified as a result type when shots=0. Or, if StateVector and Amplitude result types are requested when shots>0.


Properties of simulator such as supported IR types, quantum operations, and result types.

initialize_simulation(**kwargs) → braket.default_simulator.simulation.Simulation[source]

Initializes simulation with keyword arguments