Skip to content

Braket

BraketDeviceRoute

BraketDeviceRoute(parent=None)

Bases: Builder

Source code in src/bloqade/builder/base.py
def __init__(
    self,
    parent: Optional["Builder"] = None,
) -> None:
    self.__parent__ = parent

aquila

aquila()

Specify QuEra's Aquila QPU on Braket to submit your program to.

The number of shots you specify in the subsequent .run method will either: - dictate the number of times your program is run - dictate the number of times per parameter your program is run if you have a variable with batch assignments/intend to conduct a parameter sweep

  • Possible next steps are:
    • ...aquila().run(shots): To submit to hardware and WAIT for results (blocking)
    • ...aquila().run_async(shots): To submit to hardware and immediately allow for other operations to occur
Source code in src/bloqade/builder/backend/braket.py
def aquila(self) -> "BraketHardwareRoutine":
    """
    Specify QuEra's Aquila QPU on Braket to submit your program to.

    The number of shots you specify in the subsequent `.run` method will either:
        - dictate the number of times your program is run
        - dictate the number of times per parameter your program is run if
          you have a variable with batch assignments/intend to conduct
          a parameter sweep


    - Possible next steps are:
        - `...aquila().run(shots)`: To submit to hardware and WAIT for
            results (blocking)
        - `...aquila().run_async(shots)`: To submit to hardware and immediately
            allow for other operations to occur
    """
    return self.parse().braket.aquila()

device

device(device_arn)

Specify QPU based on the device ARN on Braket to submit your program to.

The number of shots you specify in the subsequent .run method will either: - dictate the number of times your program is run - dictate the number of times per parameter your program is run if you have a variable with batch assignments/intend to conduct a parameter sweep

  • Possible next steps are:
    • ...device(arn).run(shots): To submit to hardware and WAIT for results (blocking)
    • ...device(arn).run_async(shots): To submit to hardware and immediately allow for other operations to occur
Source code in src/bloqade/builder/backend/braket.py
def device(self, device_arn) -> "BraketHardwareRoutine":
    """
    Specify QPU based on the device ARN on Braket to submit your program to.

    The number of shots you specify in the subsequent `.run` method will either:
        - dictate the number of times your program is run
        - dictate the number of times per parameter your program is run if
            you have a variable with batch assignments/intend to conduct
            a parameter sweep


    - Possible next steps are:
        - `...device(arn).run(shots)`: To submit to hardware and WAIT for
            results (blocking)
        - `...device(arn).run_async(shots)`: To submit to hardware and immediately
            allow for other operations to occur
    """
    return self.parse().braket.device(device_arn)

local_emulator

local_emulator()

Specify the Braket local emulator to submit your program to.

  • The number of shots you specify in the subsequent .run method will either:
    • dictate the number of times your program is run
    • dictate the number of times per parameter your program is run if you have a variable with batch assignments/intend to conduct a parameter sweep
  • Possible next steps are:
    • ...local_emulator().run(shots): to submit to the emulator and await results
Source code in src/bloqade/builder/backend/braket.py
def local_emulator(self) -> "BraketLocalEmulatorRoutine":
    """
    Specify the Braket local emulator to submit your program to.

    - The number of shots you specify in the subsequent `.run` method will either:
        - dictate the number of times your program is run
        - dictate the number of times per parameter your program is run if
          you have a variable with batch assignments/intend to
          conduct a parameter sweep
    - Possible next steps are:
        - `...local_emulator().run(shots)`: to submit to the emulator
            and await results

    """
    return self.parse().braket.local_emulator()

BraketService

BraketService(parent=None)

Bases: Builder

Source code in src/bloqade/builder/base.py
def __init__(
    self,
    parent: Optional["Builder"] = None,
) -> None:
    self.__parent__ = parent

braket property

braket

Specify the Braket backend. This allows you to access the AWS Braket local emulator OR go submit things to QuEra hardware on AWS Braket service.

  • Possible Next Steps are:
    • ...braket.aquila(): target submission to the QuEra Aquila QPU
    • ...braket.local_emulator(): target submission to the Braket local emulator