# Managing memory while running a high depth circuit simulation (amplitude amplification) using Qiskit

I am running an instance of amplitude amplification using Qiskit (v 26) on Google Colab.

The circuit is approximately 17 qubits in space and $$O(ck)$$ in depth where $$k \in \left \{1,2,3....,22 \right \}$$ and $$c\approx120$$.
k is related to the number of amplifications in Amplitude Amplification

I've already gotten results when $$k < 15$$, but for any other case I seem to get an "out of memory" problem (i've got approximately 27 RAM on my colab notebook)

Are there any good options on simulating such circuit on qiskit while keeping the limit on memory at bay?

I am working towards simply running each amplification separately, save the statevector on memory, and recycle the circuit over and over until I get the k amplifications. Are there any other options (maybe possibly within Qiskit)?

• Hello, did you try to play with the different kind of simulation? For example, the simulators available on the cloud and the ones available via Aer – Lena Jul 16 at 13:23
• Thank you! Yes, I tried that way but seems depth was causing some trouble as well. On side news I was able to run my code successfully by just evolving my statevector by parts (1 amplification at a time) and keeping the evolution of my statevector on memory. :) – César Leonardo Clemente López Jul 16 at 20:58