Braket
BraketHardwareRoutine ¶
Bases: RoutineBase
__call__ ¶
Compile to a RemoteBatch, which contain Braket backend specific tasks, run_async to Braket, and wait until the results are coming back.
Note
This is sync, and will wait until remote results finished.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shots | int | number of shots | 1 |
args | LiteralType | additional arguments for args variables. | () |
name | str | custom name of the batch | None |
shuffle | bool | shuffle the order of jobs | False |
Return
RemoteBatch
Source code in src/bloqade/ir/routine/braket.py
run ¶
Compile to a RemoteBatch, which contain Braket backend specific tasks, run_async to Braket, and wait until the results are coming back.
Note
This is sync, and will wait until remote results finished.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shots | int | number of shots | required |
args | Tuple | additional arguments | () |
name | str | custom name of the batch | None |
shuffle | bool | shuffle the order of jobs | False |
Return
RemoteBatch
Source code in src/bloqade/ir/routine/braket.py
run_async ¶
Compile to a RemoteBatch, which contain Braket backend specific tasks, and run_async to Braket.
Note
This is async.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shots | int | number of shots | required |
args | Tuple | Values of the parameter defined in | () |
name | str | None | custom name of the batch, defaults to None | None |
use_experimental | bool | Use experimental hardware capabilities | False |
shuffle | bool | shuffle the order of jobs | False |
Return
RemoteBatch
Source code in src/bloqade/ir/routine/braket.py
BraketLocalEmulatorRoutine ¶
Bases: RoutineBase
__call__ ¶
Compile to a LocalBatch, and run. The LocalBatch contain tasks to run on local emulator.
Note
This is sync, and will wait until remote results finished.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shots | int | number of shots | 1 |
args | LiteralType | additional arguments for args variables. | () |
multiprocessing | bool | enable multi-process | False |
num_workers | int | number of workers to run the emulator | None |
Return
LocalBatch
Source code in src/bloqade/ir/routine/braket.py
run ¶
Compile to a LocalBatch, and run. The LocalBatch contain tasks to run on local emulator.
Note
This is sync, and will wait until remote results finished.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shots | int | number of shots | required |
args | Tuple[LiteralType, ...] | additional arguments for args variables. | () |
multiprocessing | bool | enable multi-process | False |
num_workers | int | number of workers to run the emulator | None |
Return
LocalBatch