By using the Qiskit qasm-simulator, I want to simulate a quantum circuit of 40 qubits. However, the number of qubits 40 is greater than maximum number (24) for qasm-simulator. Is there any possibility to increase this number?
-
$\begingroup$ Hey, could you tell me how you found this 24 limit? When searching I have a 30 limits but no 24 anywhere $\endgroup$– LenaDec 2, 2020 at 9:39
-
3$\begingroup$ The limit is set by the available local RAM. As such, there is variation in the limits. $\endgroup$– Paul NationDec 2, 2020 at 11:25
2 Answers
Actually, the maximum number of qubits in the local qasm_simulator
is 30, and 32 for the ibmq_qasm_simulator
. You can see this 30-limit by running Aer.get_backend('qasm_simulator').configuration().to_dict()
and you can see the configuration for the simulator, including the max number of qubits.
However, I believe it is possible to play with the matrix product state option to get a little bit more, I am not sure, I invite you to check this tuto from Qiskit, they might go through it :)
EDIT : Actually the 24-limit comes from BasicAer, I invite you to use the simulators from Aer, or the ibmq_qasm_simulator that have better limits. You can also play with the backend options, see in this documentation from Qiskit that explains pretty much everything there is to know!
Hope this helps :)
-
$\begingroup$ More specifically, the following command will give you the max number of qubits:
Aer.get_backend('qasm_simulator').configuration().n_qubits
$\endgroup$– SethMar 22 at 2:51
If you use ibmq_qasm_simulator
then the maximum number of qubit supported is 32. And you can't increase this number. Here is Qiskit documentation on this simulator.
Remember that simulating quantum system is very resource extensive, and being able to simulating a system with 32 qubits is pretty impressive.
-
$\begingroup$ On my PC, Qiskit runs under the Windows XP operating system. When I submit the circuit code to the qasm simulator I got the following message back: qiskit.providers.basicaer.exceptions.BasicAerError: 'Number of qubits 40 is greater than maximum (24) for "qasm_simulator'. $\endgroup$ Dec 2, 2020 at 10:42
-
1$\begingroup$ note that there is a difference between
qasm_simulator
andibmq_qasm_simulator
. The latter run on IBM's cluster which is (I guess) pretty powerful. $\endgroup$– KAJ226Dec 2, 2020 at 11:01