量子神经网络 - 噪声模型

Quantum Neural Networks - Noise Models

正在为量子神经网络项目调查 Qiskit 中的 QML 模块,想知道是否支持添加噪声模型和 运行 噪声模拟?

正在阅读 this 教程,想知道在进行批量前向传递时如何在 qnn.forward 的参数中定义噪声模型。

您可以像下面的代码片段一样创建一个嘈杂的模拟器,然后在创建 QuantumInstance:

时使用它
    from qiskit.providers.aer import AerSimulator
    from qiskit.providers.aer.noise import NoiseModel
    from qiskit.test.mock import FakeVigo
    from qiskit.utils import QuantumInstance

    # We create a simulator with a noise model from this backend
    fake_backend = FakeVigo()
    noise_model = NoiseModel.from_backend(fake_backend)
    backend = AerSimulator(noise_model=noise_model)
    quantum_instance = QuantumInstance(backend=backend)
    # Then pass quantum_instance to a VQC instance or another algorithm.

你可以在这里查看噪声包的文档:https://qiskit.org/documentation/apidoc/aer_noise.html or at the tutorial here: https://qiskit.org/documentation/tutorials/simulators/3_building_noise_models.html