IonQClient¶
- class IonQClient¶
Bases:
QuantumBaseClient[AlgoType,BraketJobMeta,QiskitCircuit]Client that executes quantum circuits on IonQ hardware via Amazon Braket.
Connects to IonQ trapped-ion devices through the Amazon Braket service and runs circuits on the specified device. Accepts any algorithm conforming to
QuantumAlgoProtocolvia the algo parameter.Methods
Initialize an IonQClient.
Call the solver service to solve the given optimization problem.
Return the backend version string.
Attributes
Polynomial degrees accepted by the algorithm for the objective and constraints.
The algorithm class used by this client.
Name of the target IonQ device.
Provider used to connect to the IonQ device.
Algorithm parameters instance.
- __init__(
- algo: type[AlgoType],
- device: str = 'Aria1',
- provider: AwsSession | None = None,
Initialize an IonQClient.
- Parameters:
algo (type[AlgoType]) – The algorithm class to use (e.g.,
QAOA).device (str) – Name or ARN of the IonQ device. Defaults to the first non-underscore member of
braket.devices.Devices.IonQ.provider (AwsSession | None) – Provider used to connect to the IonQ device. Currently only Braket connection is supported; set to an
braket.aws.AwsSessionto configure credentials.
- solve(objective: Poly | Matrix, constraints: ConstraintList | None, dry_run: bool = False) CustomClientResultProtocol | None¶
Call the solver service to solve the given optimization problem.
- Parameters:
objective (Poly | Matrix) – The objective function to minimize.
constraints (ConstraintList | None) – Constraints for the problem. If
None, no constraints are applied.dry_run (bool) – If
True, validate inputs without executing circuits and returnNone.
- Returns:
The algorithm result, or
Noneif dry_run isTrue.- Return type:
CustomClientResultProtocol | None
- property acceptable_degrees: AcceptableDegrees¶
Polynomial degrees accepted by the algorithm for the objective and constraints.
- parameters¶
Algorithm parameters instance. The concrete type depends on the algorithm; for
QAOAthis isQAOA.Parameters. Modify this to configure the algorithm before callingsolve().
- property provider: AwsSession | None¶
Provider used to connect to the IonQ device.
Currently only Braket connection is supported; set to an
braket.aws.AwsSessionto configure credentials. Set to None to clear configured credentials.