2
$\begingroup$

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.

$\endgroup$
8
  • $\begingroup$ Can you provide a minimal working example of the quantity you want to achieve? For simple noise models, I think this can be more efficient without Qiskit. Also, how many qubits do you want to use in your real use case? And what is your target evaluation time? $\endgroup$
    – Tristan Nemoz
    Oct 30, 2023 at 12:32
  • $\begingroup$ @TristanNemoz I would like to simulate quantum circuits with 14 qubits in a time comparable with the simulation of ideal circuits (1s for my old pc). I'm interested in simple noise models (depolarizing, bitflip, phaseflip, etc.). The problem is that with 1000 shots, the best I can do is more than 30 seconds for 14 qubits. $\endgroup$
    – stopper
    Oct 30, 2023 at 16:43
  • $\begingroup$ How deep is your circuit typically, excluding noise operations? $\endgroup$
    – Tristan Nemoz
    Oct 30, 2023 at 18:05
  • $\begingroup$ @TristanNemoz it has 30 Ry gates per qubit (so 30*14 single qubit gates for circuits with 14 qubits) and 30 CNOT gates per neighobur pairs (so 30*13 CNOTs for circuits with 14 qubits). $\endgroup$
    – stopper
    Oct 30, 2023 at 18:39
  • $\begingroup$ And the way you apply your noise model (e.g. the depolarizing one) is by applying a noise gate after each gate that you apply, correct? $\endgroup$
    – Tristan Nemoz
    Oct 30, 2023 at 18:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.