qiskit模拟器及⽅法汇总
Qiskit Aer API 参考
Aer Provider Aer提供者(qiskit.providers.aer)
Instruction Library 指令库(qiskit.providers.aer.library)
Noise Models 噪声模型(qiskit.ise)
Pulse System Models 脉冲系统模型(qiskit.providers.aer.pulse)
Utilities 实⽤程序(qiskit.providers.aer.utils)
Circuit Extensions 电路扩展(qiskit.sions)
Aer.backends()
[AerSimulator('aer_simulator'),
AerSimulator('aer_simulator_statevector'),
AerSimulator('aer_simulator_density_matrix'),
AerSimulator('aer_simulator_stabilizer'),
python在线模拟器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.嘈杂的量⼦电路模拟器后端。
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 = _backend('ibmq_athens')
aersim_backend = AerSimulator.from_backend(backend)
此代码是 Qiskit 的⼀部分
© 版权所有 IBM 2017、2021。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论