Hi,
I tried using the noise model from qiskit in pennylane. But I have some questions about the simulation. My code is as follows.
import pennylane as qml
from pennylane import numpy as np
from qiskit_aer.noise import NoiseModel
from qiskit.providers.fake_provider import *
backend = FakeCambridgeV2()
noise_model = NoiseModel.from_backend(backend)
dev = qml.device("qiskit.aer", wires=5, noise_model=noise_model)
@qml.qnode(dev)
def noise_circuit():
qml.CNOT(wires=[0, 1])
qml.CNOT(wires=[2, 1])
qml.CNOT(wires=[3, 1])
qml.CNOT(wires=[4, 1])
qml.CNOT(wires=[4, 2])
return qml.expval(qml.Z(0)), qml.expval(qml.Z(1))
My questions are as follows:
- Since quantum computers have different topology (at least superconducting quantum computers). It means that qubits are not fully connected. So I think I should transpile this circuit and insert some swap gates. But I didn’t do anything. Is the noise simulation just inserting error channels after quantum gates, such as phaseflip?
- I checked the phaseflip. It seems that the answer of question 1 is yes. Since the noise is different for different qubit pairs. How to quantize qubit pairs that are not physically connected?
I haven’t delved into Pennylane’s source code. So please correct me if I’m wrong.