Quantum Memory: QRAM. What is it and why do we need it?

Classical Memory and Drives

Quantum memory is proposed as an analogue to classical computer memory. And while Quantum Random Access Memory (QRAM) gets most of the attention, there are also proposals for Quantum Read-Only Memory (QROM). The difference between QRAM and QROM is fundamentally no different than the difference between their respective classical analogues: changeable versus not changeable. Therefore, QRAM is proposed to allow retrieval of stored quantum information, as well as the updating of stored information after quantum computation. QROM, on the other hand, is proposed to allow only retrieval of stored quantum information; the stored information cannot be updated.

So, what’s the big deal? Why is quantum memory so important?

Quantum Computational Advantage

Quantum memory is often cited as being essential to achieving quantum computational advantage. This is due to the fact that quantum state preparation can be computationally expensive, especially when amplitude encoding is involved. The concern, therefore, is that the time it takes to prepare quantum states will diminish, or even negate, the computational advantage that the algorithms are otherwise expected to provide. If quantum states can be prepared ahead of time and stored, stored in between multiple runs of an experiment, or even stored in between different experiments, hopefully, we can achieve the computational advantage that we’ve all been promised.

If you think about it, quantum memory isn’t terribly far removed from classical memory. Imagine you have a program stored on your hard drive, and it has to be loaded into memory before it can be run. Also, if you have insufficient memory to load the full program, your computer has to constantly free up lesser-needed memory in order to load needed parts of the program from the hard drive into memory. The problem is that hard drive access is slower than memory access, and access is even slower if you’re loading from other data storage devices. So, while CPU clock speeds have received top billing for decades, memory is a major contributor to how fast your computer runs.

If you have insufficient classical memory, your classical computer will slow down. And, if you don’t have quantum memory, your quantum algorithm will slow down. It’s that simple.

Perfect Storage

One limitation of not having quantum memory is that unknown quantum states, except for the basis states of |0>, |1>, |+>, |->, |i> and |-I>, cannot be perfectly copied. Using tomography, we can measure many times in all three bases and closely estimate those unknown states, but the probabilistic nature of measurements prohibits us from determining those states with perfect precision. Therefore, since we do not precisely know what those quantum states are, we can only perform further computation with states that are very, very close, but not exact, to what they should be.

If we do not measure, however, we can move quantum states perfectly. Do you see those “memory” qubits over there? If we only had coherence — if we could perfectly maintain the states of those qubits for indefinite lengths of time — we could store our quantum states perfectly for future computation needs. Unfortunately, that technological ability does not yet exist, and we cannot store any quantum states for any practical length of time.

You might encounter the “No-cloning theorem” as an obstacle here, but that’s irrelevant for retrieval and storage. We can retrieve quantum states, perform computation, and store them again with no problems whatsoever, as long as the information is replaced by something else — anything else — on the qubits that our information is moving from. In classical terms, we can move quantum states around perfectly; we just can’t copy them; a classical “move” removes files and folders from their source locations and makes them available only in their destination locations.

It’s also worth noting that tomography and re-encoding states is slow. I refer you to the immediately previous section on computational advantage as to why that’s bad.

Addressing Quantum Memory

You can actually experiment with small scale quantum memory with an algorithm referred to as the “Bucket Brigade.” It’s just a binary tree, but it establishes quantum registers for computation, addressing, and storage, and demonstrates the seemingly most popular proposal for implementing quantum memory. You can read papers such as “Quantum random access memory,””Architectures for a quantum random access memory,” and “On the robustness of bucket brigade quantum RAM,” or you can read about a simple implementation of it at Quantum Computing UK.

The downside to the Bucket Brigade is that it’s very classical. Notwithstanding the example data itself is binary, although that’s likely for ease of demonstration, the addressing is binary: this is memory qubit 000, and this is memory qubit 001, and this is memory qubit 010, and so forth. Not that I have a better idea at the time that I’m writing this, but when anything “quantum” is binary, there’s always a more “quantum” way of doing it.

A Little Less Classical

Despite what I just wrote about the Bucket Brigade being too classical, working with qubits automatically gives us one feature that is impossible with classical memory: phases. In a worst-case scenario where we are retrieving and storing binary information, we can at least store binary information in two bases. In other words, we can store one bit of information in the computation basis, aka the z basis, aka |0> and |1>, and we can store another bit of information in the phase: either in the x basis, aka Hadamard basis, aka Fourier basis, aka |+> and |->, or in the y basis, aka |i> and |-i>. As is the case with superdense coding, we can store two bits per qubit.

Unfortunately, storing bits is still not the best application of quantum memory. As a proof of point, we can almost do that today with mid-circuit measurements. We don’t have to store binary strings in qubits, we can store them in classical registers. When this classical information is needed, we can retrieve it, re-retrieve it, and overwrite it all within the middle of a circuit. Technologically, it shouldn’t be too challenging to retain classical registers between experiments, or even have all kinds of pre-prepared classical registers, because classical memory can already do all that.


If you do a quick search for information on Quantum memory, the top results pertain to photonics, and the top applications pertain to communication and cryptography. In other words, you’ll find research into long-distance quantum networking. For example on arxiv.

But, that’s definitely not the only application. Without specifically looking up “QRAM” or “quantum memory,” you can encounter it in scientific papers for all sorts of quantum algorithms. For example, here is a proposed algorithm, and it offers an exponential speed-up because it uses QRAM. Never mind that QRAM doesn’t exist; if it did exist, this algorithm achieves quantum computational advantage. A couple of proposed algorithms that require QRAM are “q-means: A quantum algorithm for unsupervised machine learning” and “A quantum active learning algorithm for sampling against adversarial attacks.”


The existing implementations of quantum memory include nothing, nada, zip, zilch, and zero. It simply doesn’t exist. While you can simulate QRAM, in a way, it’s still not actually QRAM because the qubits in use are neither error-free nor long-lasting. So, anytime you encounter the acronym QRAM, you have to keep in mind that such content is forward-thinking. Sadly, it might also be wishful thinking. Just as easily as you can find algorithms proposing quantum computational advantage using QRAM, you can find papers admitting it’s unclear if we’ll ever actually have QRAM. And that makes sense because when industry leaders are pressed on when we’ll ever have practical quantum computers, they can’t answer because they don’t know.