Braket
Helper functions related to IR submission co-ordinations between Bloqade and Braket
BraketTaskSpecification ¶
 Bases: BaseModel
Class representing geometry of an atom arrangement.
Attributes:
| Name | Type | Description | 
|---|---|---|
| nshots | int | Number of shots | 
| program | Program | IR(Intermediate Representation) program suitable for braket | 
extract_braket_program ¶
Extracts the Braket program.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| quera_task_ir | QuEraTaskSpecification | Quera IR(Intermediate representation) of the task. | required | 
Source code in src/bloqade/analog/submission/ir/braket.py
 from_braket_status_codes ¶
Gets the QuEraTaskStatusCode object for working with Bloqade SDK.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| braket_status | str | str The value of status in metadata() in the Amazon Braket.  | required | 
Returns:
| Type | Description | 
|---|---|
| QuEraTaskStatusCode | An object of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 from_braket_task_results ¶
Get the QuEraTaskResults object for working with Bloqade SDK.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| braket_task_results | AnalogHamiltonianSimulationTaskResult | AnalogHamiltonianSimulationTaskResult Quantum task result of braket system | required | 
Returns:
| Type | Description | 
|---|---|
| QuEraTaskResults | An object of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 to_braket_field ¶
Converts to TimeSeries object supported by Braket.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| quera_field | Union[GlobalField, LocalField)] | Field supported by Quera | required | 
Returns:
| Type | Description | 
|---|---|
| Field | An object of the type  | 
Raises:
| Type | Description | 
|---|---|
| TypeError | If field is not of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 to_braket_task ¶
Converts to Tuple[int, AnalogHamiltonianSimulation] object supported by Braket.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| quera_task_ir | QuEraTaskSpecification | Quera IR(Intermediate representation) of the task. | required | 
Returns:
| Type | Description | 
|---|---|
| Tuple[int, AnalogHamiltonianSimulation] | An tuple of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 to_braket_task_ir ¶
Converts quera IR(Intermendiate Representation) to to BraketTaskSpecification object.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| quera_task_ir | QuEraTaskSpecification | Quera IR(Intermediate representation) of the task. | required | 
Returns:
| Type | Description | 
|---|---|
| BraketTaskSpecification | An object of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 to_braket_time_series ¶
Converts to TimeSeries object supported by Braket.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| times | List[Decimal] | Times of the value. | required | 
| values | List[Decimal] | Corresponding values to add to the time series | required | 
Returns:
| Type | Description | 
|---|---|
| TimeSeries | An object of the type  | 
Source code in src/bloqade/analog/submission/ir/braket.py
 to_quera_capabilities ¶
Converts to QuEraCapabilities object supported by Braket.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| paradigm | The  | required | 
Returns:
| Type | Description | 
|---|---|
| QuEraCapabilities | An object of the type  |