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
extract_braket_program(
quera_task_ir: QuEraTaskSpecification,
)
Extracts the Braket program.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
quera_task_ir
|
QuEraTaskSpecification
|
Quera IR(Intermediate representation) of the task. |
required |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
from_braket_status_codes
from_braket_status_codes(
braket_status: str,
) -> QuEraTaskStatusCode
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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
from_braket_task_results
from_braket_task_results(
braket_task_results: AnalogHamiltonianSimulationTaskResult,
) -> QuEraTaskResults
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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
to_braket_field
to_braket_field(
quera_field: Union[GlobalField, LocalField],
) -> 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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
to_braket_task
to_braket_task(
quera_task_ir: QuEraTaskSpecification,
) -> Tuple[int, AnalogHamiltonianSimulation]
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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
to_braket_task_ir
to_braket_task_ir(
quera_task_ir: QuEraTaskSpecification,
) -> BraketTaskSpecification
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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
to_braket_time_series
to_braket_time_series(
times: List[Decimal], values: List[Decimal]
) -> TimeSeries
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 .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
to_quera_capabilities
to_quera_capabilities(paradigm) -> cp.QuEraCapabilities
Converts to QuEraCapabilities
object supported by Braket.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paradigm
|
The |
required |
Returns:
Type | Description |
---|---|
QuEraCapabilities
|
An object of the type |
Source code in .venv/lib/python3.12/site-packages/bloqade/analog/submission/ir/braket.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|