3
$\begingroup$

I am using Qiskit to run some circuits and a question arises in my mind. I know that when we run in the simulators we are running in "ideal" environments. This means there is no noise that could cause errors in the readouts. So I expect this to be reflected in the expected results.

But when I run a circuit for example, the running time on a real machine is much bigger than in a simulator.

So my question is: why is it faster to run programs or circuits on a simulator? Is the noise of the real device affecting the speed of the computations?

Thank you very much in advance!

$\endgroup$
3
  • 1
    $\begingroup$ The speed-up in quantum computing is not about having a faster processor than classical processor. It comes from the way you design the algorithm. The noise on the current device is not the reason why for the longer run time, but it does effect the quality of your solution. Yes, it is possible to simulate a 5 or 10 or 20 qubits arbitrary quantum circuit easily with classical computer. However, when you hit above 50 qubits, it is very hard to simulate such circuit on the classical computer. You should try to simulate a 32 qubit random circuits with depth say 1000 and see how long it takes. $\endgroup$
    – KAJ226
    Dec 15 '21 at 17:09
  • $\begingroup$ The algorithm that I am running is the same for the simulator than for the real backend. I will try what you say, but either way, for what you have proposed I can expect a faster performance with the simulator for all what @Martin Vesely said, right? Also, thank you very much for your reply! $\endgroup$
    – aivare
    Dec 16 '21 at 9:56
  • 1
    $\begingroup$ @aivare: Yes, despite the algorithm is the same, until number of qubits employed is low (as pointed out by @KAJ226), a simulator can run faster because it consists of matrices (or similar) operations and you do not need to set up a real quantum processor, hence the simulation can be faster than actual run on a quantum processor. However, once number of qubits exceeds some threshold, the simulation would be almost impossible because of exponential scalling of a quantum system simulation. $\endgroup$ Dec 16 '21 at 18:03
2
$\begingroup$

In case of real machine, a time is consumed by transpiling the circuit to reflect native gates set and qubits connectivity (a simulator has full connectivity a native gates set is richer). It also takes some time to set up a real processor (i.e. to reset qubits, execute gates and measure results) and finally sometimes you have to wait in a queue before your circuit is processed. Currently many teams developing quantum processors strive to shorten above mentioned procedures as much as possible.

EDIT: However, once a number of qubits exceeds some threshold (around 50 qubits), the simulation becomes almost impossible because of exponential scaling of the quantum system simulation.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you very much for your answer! Also I was removing the queue time to make a comparision, just the "running time" of my job in a real device vs the "running time" of my job on a simulator. $\endgroup$
    – aivare
    Dec 16 '21 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.