I want to classically simulate quantum circuits with noise. This noise can be a custom one (noise.NoiseModel()
) or a fake quantum computer (QasmSimulator.from_backend(FakeMontreal()
).
I want to calculate the expectation value of an observable, for example $\langle Z \rangle$ of the first qubit with a finite amount of shots.
I tried different scripts and the computational time is order of magnitude larger than the equivalent codes for ideal quantum circuits (like 10x or more). If I understood correctly, it creates multiple instances of the circuit (one for each shot) and each instance is a different quantum circuit (different because, for example, new gates are added with a probability that depends on the noise model).
What's the way to do that in the most efficient way with Qiskit or other libraries?
Thank you.