LocalEmulator

class braket.emulation.local_emulator.LocalEmulator(backend, noise_model=None, passes=None, **kwargs)[source]

Bases: Emulator

A local emulator that mimics the restrictions and noises of a QPU based on the provided device properties.

Parameters:

Initializes a Device.

Parameters:
  • name (str) – Name of quantum device

  • status (str) – Status of quantum device

  • backend (Device)

  • noise_model (NoiseModel | None)

  • passes (Iterable[ValidationPass] | None)

classmethod from_device_properties(device_properties, backend='braket_dm', **kwargs)[source]

Create a LocalEmulator instance from device properties.

Parameters:
  • device_properties (DeviceCapabilities, DeviceEmulatorProperties) – The device properties to use for emulation.

  • backend (str) – The backend to use for simulation. Default is “braket_dm”.

  • **kwargs – Additional keyword arguments to pass to the LocalEmulator constructor.

Return type:

LocalEmulator

Returns:

LocalEmulator – A new LocalEmulator instance configured with the given properties.

Raises:

TypeError – If the device_properties is not a DeviceCapabilities or DeviceEmulatorProperties object

classmethod from_json(device_properties_json, backend='braket_dm', **kwargs)[source]

Create a LocalEmulator instance from a device properties JSON string.

Parameters:
  • device_properties_json (str) – Device properties JSON string.

  • backend (str) – The backend to use for simulation. Defaults to “braket_dm”.

  • **kwargs – Additional keyword arguments to pass to the LocalEmulator constructor.

Return type:

LocalEmulator

Returns:

LocalEmulator – A new LocalEmulator instance configured with the given properties.