-
Notifications
You must be signed in to change notification settings - Fork 376
Cannot construct large Grover circuit #1186
Comments
Did the same construction succeed on an earlier version of qiskit? |
Also tested on Aqua 0.6.5. It also fails. |
You may be allocating all of your RAM. Does the following also abort with from qiskit.aqua.algorithms import Grover
from qiskit.aqua.components import oracles
full_circ_size = 59
width=int((full_circ_size+1)/2)
truthtable = '0'*(2**width-1)+'1'
oracle = oracles.TruthTableOracle(truthtable,optimization=True,mct_mode='basic') |
When I tried the code the other day it was killed when building the oracle. Looking at the system log showed it was killed due to lack of memory. Changing optimization=False allows it to build the oracle but it then fails later during the custom initial state creation, again due to memory for me
|
I ran the code for varying values of full_circ_size and found a threshold at 48. So any value above 48 gives this error "Killed" |
I'm pretty sure the algorithm is attempting to consume all your RAM (memory) and your OS is killing the process. As @woodsp-ibm notes, there is more than one part of the algorithm that can do this. |
Will there be a fix to this? I agree it was because part of the algorithm requires too much RAM. |
It needs investigating as to what appears to be consuming the memory and then, as we understand that, it can be determined how to proceed with this. |
I faced similar issue while running it on IBM-Q Experience. |
The usage is in I tried doing a map so the DLX algorithm uses a generator instead but I got |
Information
Springdale Linux 7.8 (Verona)
What is the current behavior?
Program fails when trying to construct large Grover circuit.
Steps to reproduce the problem
Program returns
killed
.What is the expected behavior?
Should produce a 59-qubit Grover circuit.
Suggested solutions
The text was updated successfully, but these errors were encountered: