BraketSimulatorClient¶
- class BraketSimulatorClient¶
ベースクラス:
QuantumBaseClient[AlgoType,BraketJobMeta,QiskitCircuit]Client that executes quantum circuits on Amazon Braket simulators.
Supports both local simulators (
braket_sv,braket_dm) and managed AWS simulators (SV1,TN1,DM1). Accepts any algorithm conforming toQuantumAlgoProtocolvia the algo parameter.Methods
Initialize a BraketSimulatorClient.
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 Braket simulator.
Authentication for AWS-managed simulators.
Algorithm parameters instance.
- __init__(
- algo: type[AlgoType],
- device: Literal['braket_sv', 'braket_dm', 'SV1', 'TN1', 'DM1'] = 'braket_sv',
- provider: AwsSession | None = None,
Initialize a BraketSimulatorClient.
- パラメータ:
algo (type[AlgoType]) -- The algorithm class to use (e.g.,
QAOA).device (BraketSimulatorName) -- Simulator name. One of
"braket_sv","braket_dm","SV1","TN1", or"DM1".provider (AwsSession | None) -- Authentication for AWS-managed simulators (
"SV1","TN1","DM1"). Set to anbraket.aws.AwsSessionto configure credentials. Required for on-demand simulators; ignored for local simulators ("braket_sv","braket_dm").
- solve(
- objective: Poly | Matrix,
- constraints: ConstraintList | None,
- dry_run: bool = False,
Call the solver service to solve the given optimization problem.
- パラメータ:
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.
- 戻り値:
The algorithm result, or
Noneif dry_run isTrue.- 戻り値の型:
CustomClientResultProtocol | None
- property acceptable_degrees: AcceptableDegrees¶
Polynomial degrees accepted by the algorithm for the objective and constraints.
- property device: Literal['braket_sv', 'braket_dm', 'SV1', 'TN1', 'DM1']¶
Name of the target Braket simulator.
- 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¶
Authentication for AWS-managed simulators.
Set to an
braket.aws.AwsSessionto configure credentials. Required for on-demand simulators ("SV1","TN1","DM1"); ignored for local simulators ("braket_sv","braket_dm"). Set to None to clear configured credentials.