Skip to content

bloqade.qbraid.target.qBraid

← Module overview

classqBraidsource

bloqade.qbraid.target.qBraid

qBraid target for Bloqade kernels.

Signature
class qBraid(*, allow_parallel: bool = False, allow_global: bool = False, provider: QbraidProvider, qelib1: bool = True)

qBraid target that accepts a Bloqade kernel and submits the kernel to the QuEra simulator hosted on qBraid. A QbraidJob is obtainable that then lets you query the status of the submitted program on the simulator as well as obtain results.

Parameters

NameTypeDefaultDescription
allow_parallelboolFalseAllow parallel gate in the resulting QASM2 AST. Defaults to `False`. In the case its False, and the input kernel uses parallel gates, they will get rewrite into uop gates.
allow_globalboolFalseAllow global gate in the resulting QASM2 AST. Defaults to `False`. In the case its False, and the input kernel uses global gates, they will get rewrite into parallel gates. If both `allow_parallel` and `allow_global` are False, the input kernel will be rewritten to use uop gates.
providerQbraidProviderrequiredQbraid-provided object to allow submission of the kernel to the QuEra simulator.
qelib1boolTrueInclude the `include "qelib1.inc"` line in the resulting QASM2 AST that's submitted to qBraid. Defaults to `True`.

Attributes

NameTypeDefaultDescription
qelib1—qelib1
provider—provider
allow_parallel—allow_parallel
allow_global—allow_global

methodemitsource

bloqade.qbraid.target.qBraid.emit

Signature
def emit(method: ir.Method, shots: Optional[int] = None, tags: Optional[dict[str, str]] = None) -> Union[QbraidJob, list[QbraidJob]]

Submit the Bloqade kernel to the QuEra simulator on qBraid.

Parameters

NameTypeDefaultDescription
methodir.MethodrequiredThe kernel to submit to qBraid.
shotsOptional[int]None(Optional[int]): Number of times to run the kernel. Defaults to None.
tagsOptional[dict[str, str]]None(Optional[dict[str,str]]): A dictionary of tags to associate with the Job.

Returns

Union[QbraidJob, list[QbraidJob]]An object you can query for the status of your submission as well as obtain simulator results from.

source