qiskit模拟器及方法汇总

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
使用methodkwarg设置模拟方法。可以使用返回支持的模拟方法列表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 中获得此许可证的副本。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Android模拟器检测及对抗方法主要针对一些恶意软件或者安全测试工具会利用Android模拟器进行仿真攻击或者测试的现象进行针对性的处理。 在进行Android模拟器检测时,主要需要关注一些与真实Android设备不同的特征,例如与硬件相关的参数、系统属性或者程序运行环境等等。 对于仿真攻击的防范,可以采取识别或者拦截多次尝试注入攻击代码的恶意软件,限制模拟器的资源使用或者对模拟器的输入输出等进行限制。 同时,还可以针对模拟器本身的漏洞或者安全问题进行加强和升级,例如提高模拟器执行效率、加强其隔离能力和安全控制等等,以提高其整体的安全性和稳定性。 总之,针对Android模拟器的检测与对抗是一个不断发展的过程,需要综合运用安全技术和策略手段来保障Android系统的安全和稳定性。 ### 回答2: 随着Android开发工具的不断完善,现今已经出现了许多神经网络和机器学习模型,这些都是建立在手机设备的真实运行平台上的。因此,检测和对抗模拟器成为保护应用软件安全和用户隐私的重要一步。在下面的内容中,将就Android模拟器检测及对抗方法进行简要说明。 检测方法 如何检测模拟器就可以通过检测特定的硬件规范的方式来进行。通过检测设备的Sim卡号、IMEI、MAC地址等硬件定义能力,以此来进行模拟器的检测。此外,还有一些开源的用于检测模拟器的工具,例如Anti-Emulator、J2Android等。 对抗方法 对于安卓模拟器检测的对抗方法,主要可以从以下几个方面来进行: (1)虚拟机检测绕过 在模拟器中检查与真实设备硬件参数相同的数据,以绕过检测,提高识别难度。此外还可以使用XPOSED框架,来使硬件参数信息看上去更加真实。 (2)操作系统绕过 使用修改后的ROM来绕过对模拟器的检测。例如,Genymotion和AndroVM权限更高的虚拟化环境,同时支持模拟不同版本的Android。 (3)应用层绕过 可以通过模拟器操作系统中不可见的或者不常用的系统调用来绕过检测。此外,还可以通过代理或反向代理技术来绕过复杂的脚本或网络检测。 总之,基于某种检测方式设计的对抗方法是不固定的;因此,开发人员要考虑多种检测模拟器方法,进行合理的应对。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值