QulacsClient¶
- class QulacsClient¶
Bases:
QuantumBaseClient[AlgoType,QulacsJobMeta,QulacsCircuit]Client that executes quantum circuits using the Qulacs simulator.
Runs circuits locally using Qulacs state-vector simulation. Accepts any algorithm conforming to
QuantumAlgoProtocolvia the algo parameter.Methods
Initialize a QuantumBaseClient.
Call the solver service to solve the given optimization problem.
Return the Qulacs package version.
Attributes
Polynomial degrees accepted by the algorithm for the objective and constraints.
The algorithm class used by this client.
Algorithm parameters instance.
- __init__(algo: type[AlgoType]) None¶
Initialize a QuantumBaseClient.
- Parameters:
algo (type[AlgoType]) – The algorithm class to use. Must conform to the
QuantumAlgoProtocolprotocol.
- 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().