Qiskit Aer API 参考
Aer Provider Aer提供者(qiskit.providers.aer)
Instruction Library 指令库(qiskit.providers.aer.library)
Noise Models 噪声模型(qiskit.providers.aer.noise)
Pulse System Models 脉冲系统模型(qiskit.providers.aer.pulse)
Utilities 实用程序(qiskit.providers.aer.utils)
Circuit Extensions 电路扩展 (qiskit.providers.aer.extensions)
Aer.backends()
[AerSimulator('aer_simulator'),
AerSimulator('aer_simulator_statevector'),
AerSimulator('aer_simulator_density_matrix'),
AerSimulator('aer_simulator_stabilizer'),
AerSimulator('aer_simulator_matrix_product_state'),
AerSimulator('aer_simulator_extended_stabilizer'),
AerSimulator('aer_simulator_unitary'),
AerSimulator('aer_simulator_superop'),
QasmSimulator('qasm_simulator'),
StatevectorSimulator('statevector_simulator'),
UnitarySimulator('unitary_simulator'),
PulseSimulator('pulse_simulator')]
Aer Provider (qiskit.providers.aer)
Simulator Provider 模拟器提供者
AerProvider( ) -Qiskit Aer 后端的提供者。
Simulator Backends 模拟器后端
AerSimulator([configuration, properties, …])
Noisy quantum circuit simulator backend.嘈杂的量子电路模拟器后端。SOURCE
AerSimulator支持多个模拟方法以及对于每个模拟方法可配置的选项。这些可以在初始化期间使用适当的kwargs
设置。它们也可以使用该set_options()
方法进行更新。
还可以使用run()
方法将运行时选项指定为kwargs。这些将不会存储在后端,只适用于该执行。它们还将覆盖以前设置的任何选项。
Simulation Method Option
The simulation method is set using the method
kwarg. A list supported
simulation methods can be returned using :meth:available_methods
, these
are
使用method
kwarg设置模拟方法。可以使用返回支持的模拟方法列表available_methods()
"automatic"
: Default simulation method. Select the simulation
method automatically based on the circuit and noise model.
默认模拟方法。根据电路和噪声模型自动选择仿真方法。"statevector"
: A dense statevector simulation that can sample
measurement outcomes from ideal circuits with all measurements at
end of the circuit. For noisy simulations each shot samples a
randomly sampled noisy circuit from the noise model.
密集状态向量模拟,可以从理想电路中采样测量结果,所有测量都在电路末端。对于噪声模拟,每个镜头从噪声模型中对随机采样的噪声电路进行采样。"density_matrix"
: A dense density matrix simulation that may
sample measurement outcomes from noisy circuits with all
measurements at end of the circuit.
密集密度矩阵模拟,可以从噪声电路中采样测量结果,所有测量都在电路末端。"stabilizer"
: An efficient Clifford stabilizer state simulator
that can simulate noisy Clifford circuits if all errors in the noise
model are also Clifford errors.
一个高效的 Clifford 稳定器状态模拟器,如果噪声模型中的所有错误也是 Clifford 错误,则可以模拟嘈杂的 Clifford 电路。"extended_stabilizer"
: An approximate simulated for Clifford + T
circuits based on a state decomposition into ranked-stabilizer state.
The number of terms grows with the number of non-Clifford (T) gates.
基于状态分解为分级稳定器状态的 Clifford + T 电路的近似模拟。项的数量随着非 Clifford (T) 门的数量而增加。"matrix_product_state"
: A tensor-network statevector simulator that
uses a Matrix Product State (MPS) representation for the state. This
can be done either with or without truncation of the MPS bond dimensions
depending on the simulator options. The default behaviour is no
truncation.
张量网络状态向量模拟器,使用矩阵乘积状态 (MPS) 表示状态。这可以在截断或不截断 MPS 键尺寸的情况下完成,具体取决于模拟器选项。默认行为是不截断。"unitary"
: A dense unitary matrix simulation of an ideal circuit.
This simulates the unitary matrix of the circuit itself rather than
the evolution of an initial quantum state. This method can only
simulate gates, it does not support measurement, reset, or noise.
理想电路的密集酉矩阵模拟。这模拟了电路本身的酉矩阵,而不是初始量子态的演化。该方法只能模拟门,不支持测量、复位或噪声。"superop"
: A dense superoperator matrix simulation of an ideal or
noisy circuit. This simulates the superoperator matrix of the circuit
itself rather than the evolution of an initial quantum state. This method
can simulate ideal and noisy gates, and reset, but does not support
measurement.
理想或嘈杂电路的密集超级算子矩阵模拟。这模拟了电路本身的超级算子矩阵,而不是初始量子态的演化。这种方法可以模拟理想和有噪声的门,并复位,但不支持测量。
PulseSimulator([configuration, properties, …])
Pulse schedule simulator backend. 脉冲调度模拟器后端。
Legacy Simulator Backends 传统模拟器后端
QasmSimulator([configuration, properties, …])
Noisy quantum circuit simulator backend.嘈杂的量子电路模拟器后端。
StatevectorSimulator([configuration, …])
Ideal quantum circuit statevector simulator.理想量子电路状态向量模拟器
UnitarySimulator([configuration, …])
Ideal quantum circuit unitary simulator.理想量子电路酉模拟器。
Job Class
AerJob(backend, job_id, fn, qobj, *args)
AerJob class.
Exceptions
AerError(*message)
Base class for errors raised by simulators.
```python
provider = IBMQ.load_account()
backend = provider.get_backend('ibmq_athens')
aersim_backend = AerSimulator.from_backend(backend)
此代码是 Qiskit 的一部分
© 版权所有 IBM 2017、2021。
此代码根据 Apache 许可,版本 2.0 获得许可。您可以在 http://www.apache.org/licenses/LICENSE-2.0 中获得此许可证的副本。