AerClient

class AerClient

ベースクラス: QuantumBaseClient[AlgoType, QiskitJobMeta, QiskitCircuit]

Client that executes quantum circuits using the Qiskit Aer simulator.

Runs circuits locally on CPU or GPU via Aer, or can noise-model a specific QPU by providing its name. Accepts any algorithm conforming to QuantumAlgoProtocol via the algo parameter.

Methods

__init__

Initialize an AerClient.

get_options

Current AerSimulator options, including device and method.

set_options

Set AerSimulator options.

solve

Call the solver service to solve the given optimization problem.

version

Return the qiskit-aer package version.

Attributes

acceptable_degrees

Polynomial degrees accepted by the algorithm for the objective and constraints.

algo

The algorithm class used by this client.

channel

IBM Quantum channel type (e.g., "ibm_quantum_platform"), or None.

device

Simulation device.

method

Aer simulation method (e.g., "automatic", "statevector").

noise_model

Name of the target backend to simulate, or None for an ideal simulator.

proxy

Proxy server URL used for network requests, or None for no proxy.

qiskit_pass_manager

Qiskit transpilation pass manager.

token

IBM Quantum API token used to authenticate, or None if not set.

url

IBM Quantum service URL, or None to use the default endpoint.

verify

Whether to verify SSL certificates, or None to use the system default.

parameters

Algorithm parameters instance.

__init__(
algo: type[AlgoType],
token: str | None = None,
url: str | None = None,
proxy: str | None = None,
verify: bool | None = None,
noise_model: str | None = None,
channel: ChannelType | None = None,
qiskit_pass_manager: PassManager | EllipsisType | None = Ellipsis,
device: AerDeviceType = 'CPU',
method: str = 'automatic',
**options,
) None

Initialize an AerClient.

パラメータ:
  • algo (type[AlgoType]) -- The algorithm class to use (e.g., QAOA).

  • token (str | None) -- IBM Quantum API token. Required when noise_model refers to a real IBM backend (used to fetch the noise model).

  • url (str | None) -- IBM Quantum service URL. Uses the default endpoint if None.

  • proxy (str | None) -- Proxy server URL for network requests.

  • verify (bool | None) -- Whether to verify SSL certificates. Uses the system default if None.

  • noise_model (str | None) -- Name of the backend to simulate. Accepts "fake_*" names for built-in fake backends, "ibm_*" names to noise-model a real IBM device, or any other name which is converted automatically. If None, an ideal simulator is used.

  • channel (ChannelType | None) -- IBM Quantum channel type (e.g., "ibm_quantum_platform"). Only relevant when noise_model refers to a real IBM backend.

  • qiskit_pass_manager (PassManager | EllipsisType | None) -- Custom Qiskit transpilation pass manager. If ... (default), a preset pass manager is generated automatically. Pass None to skip transpilation.

  • device (AerDeviceType) -- Simulation device. One of "CPU", "GPU", or "Thrust". Defaults to "CPU".

  • method (str) -- Aer simulation method (e.g., "automatic", "statevector", "density_matrix"). Defaults to "automatic".

  • **options -- Additional options forwarded to qiskit_aer.AerSimulator.set_options().

get_options() dict[str, Any]

Current AerSimulator options, including device and method.

set_options(**options) None

Set AerSimulator options.

パラメータ:

**options -- Options forwarded to qiskit_aer.AerSimulator.set_options(). device and method are handled specially and update the corresponding properties.

solve(objective: Poly | Matrix, constraints: ConstraintList | None, dry_run: bool = False) CustomClientResultProtocol | None

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 return None.

戻り値:

The algorithm result, or None if dry_run is True.

戻り値の型:

CustomClientResultProtocol | None

version() str

Return the qiskit-aer package version.

property acceptable_degrees: AcceptableDegrees

Polynomial degrees accepted by the algorithm for the objective and constraints.

property algo: type[AlgoType]

The algorithm class used by this client.

property channel: ChannelType | None

IBM Quantum channel type (e.g., "ibm_quantum_platform"), or None.

property device: Literal['CPU', 'GPU', 'Thrust']

Simulation device. One of "CPU", "GPU", or "Thrust".

property method: str

Aer simulation method (e.g., "automatic", "statevector").

property noise_model: str | None

Name of the target backend to simulate, or None for an ideal simulator.

parameters

Algorithm parameters instance. The concrete type depends on the algorithm; for QAOA this is QAOA.Parameters. Modify this to configure the algorithm before calling solve().

property proxy: str | None

Proxy server URL used for network requests, or None for no proxy.

property qiskit_pass_manager: PassManager | EllipsisType | None

Qiskit transpilation pass manager.

... (default) generates a preset pass manager automatically; None skips transpilation.

property token: str | None

IBM Quantum API token used to authenticate, or None if not set.

property url: str | None

IBM Quantum service URL, or None to use the default endpoint.

property verify: bool | None

Whether to verify SSL certificates, or None to use the system default.