qrunch.quantum.backends.amazon.local_amazon_braket_backend

Module with implementation of the local Braket simulator.

Classes

LocalAmazonBraketBackend

Class for handling Amazon Braket's local simulator.

class LocalAmazonBraketBackend

Bases: Backend

Class for handling Amazon Braket’s local simulator.

__init__(transpiler: Transpiler[Circuit] | None = None, device_to_simulate: DeviceData | None = None) None

Initialize a local Braket Backend.

The backend calculates the full state vector or density matrix of the given circuit, and uses this to find the probabilities for each possible state in the Hilbert space.

Parameters:
  • transpiler (Transpiler[Circuit] | None) – Transpiler for converting circuits into a format suitable for the backend.

  • device_to_simulate (DeviceData | None) – Device data to simulate noise from. If None, no noise is applied.

Return type:

None

property name: str

Name of the backend.

run(circuits: Circuit | Sequence[Circuit], shots: int | None) SimulatedJob

Run circuit on the backend.

Parameters:
  • circuits (Circuit | Sequence[Circuit]) – circuits to run on backend.

  • shots (int | None) – number of shots. Must be a positive integer.

Return type:

SimulatedJob

validate_shots_type(shots_type: Type[int | None]) list[str]

Validate that the sampler supports the given shots type. Return a list of error messages if not supported.

Parameters:

shots_type (Type[int | None])

Return type:

list[str]