qbraid.devices.aws package

Submodules

qbraid.devices.aws.device module

Module defining BraketDeviceWrapper Class

class AwsDeviceType(value)[source]

Bases: str, Enum

Possible AWS device types

SIMULATOR = 'SIMULATOR'
QPU = 'QPU'
class AwsDeviceWrapper(**kwargs)[source]

Bases: DeviceLikeWrapper

Wrapper class for Amazon Braket Device objects.

Create a AwsDeviceWrapper.

refresh_metadata()[source]

Refresh the AwsDevice object with the most recent Device metadata.

Return type

None

property status: DeviceStatus

Return the status of this Device.

Returns

The status of this Device

property properties: DeviceCapabilities

Return the device properties

Please see braket.device_schema in amazon-braket-schemas-python

Type

DeviceCapabilities

property is_available: Tuple[bool, str]

Returns true if the device is currently available, and the available time.

Returns

Current device availability and hr/min/sec until next available.

Return type

Tuple[bool, str]

run(run_input, *args, **kwargs)[source]

Run a quantum task specification on this quantum device. Task must represent a quantum circuit, annealing problems not supported.

Parameters

run_input – Specification of a task to run on device.

Keyword Arguments

shots (int) – The number of times to run the task on the device.

Returns

The job like object for the run.

run_batch(run_input, **kwargs)[source]

Run batch of quantum tasks on this quantum device.

Parameters

run_input – A circuit object list to run on the wrapped device.

Keyword Arguments

shots (int) – The number of times to run the task on the device. Default is 1024.

Returns

List of AwsQuantumTaskWrapper objects for the run.

qbraid.devices.aws.job module

Module defining AwsQuantumtaskWrapper Class

class AwsQuantumTaskWrapper(job_id, **kwargs)[source]

Bases: JobLikeWrapper

Wrapper class for Amazon Braket QuantumTask objects.

Create a AwsQuantumTaskWrapper.

result()[source]

Return the results of the job.

Return type

AwsGateModelResultWrapper

cancel()[source]

Cancel the quantum task.

Return type

None

qbraid.devices.aws.result module

Module defining BraketResultWrapper Class

class AwsGateModelResultWrapper(vendor_rlo)[source]

Bases: ResultWrapper

Wrapper class for Amazon Braket result objects.

measurements()[source]

2d array - row is shot and column is qubit. Default is None. Only available when shots > 0. The qubits in measurements are the ones in GateModelQuantumTaskResult.measured_qubits.

TODO: Make doc-string consistent with parent.

raw_counts()[source]

Returns the histogram data of the run