Quantum random access memory
A proposed coherent memory interface that addresses data in superposition while preserving quantum correlations.
Also called qRAM, QRAM
On this page
Definition and significance
Quantum random access memory, or QRAM, supplies a coherent address-to-data operation. It is an architectural or access-model assumption used by some algorithms, not a default capability of every quantum processor. The memory size, loading cost and error behavior must accompany claims that depend on it.
Mechanism and mathematical treatment
For classical stored data d_j, an ideal reversible lookup maps |j>|b> to |j>|b XOR d_j>. A superposed address sum_j alpha_j|j> yields correlated address-data amplitudes. This operation differs from measuring the address and performing an ordinary classical lookup.
Fully worked reference example
Store one-bit data d0=0,d1=1 and use address |+> with a zero data register. Ideal coherent lookup produces (|00>+|11>)/sqrt(2). Measuring the address before lookup instead gives the mixture of |00> and |11>, with no coherence between them. Their ZZ correlations agree, but their XX expectations differ: one versus zero.
Limitations and common misconceptions
A logarithmic-depth addressing proposal does not eliminate the need to store and load N data items or protect a large memory structure. Algorithms using QRAM should be compared with classical methods granted an appropriately matched data structure.
Scientific relationships
Coherent memory is one possible input-access model, not a universal default.
Historical source context
Giovannetti, Lloyd and Maccone submitted the cited QRAM proposal in August 2007 and revised it in March 2008, with Physical Review Letters publication in 2008. A proposed architecture must remain distinct from a verified large-scale deployed capability.
A structured two-bit memory table
Let a two-qubit address select the two-bit words d0=01, d1=11, d2=10, and d3=00. With a zero data register and uniform addresses, coherent lookup produces (|00>|01>+|01>|11>+|10>|10>+|11>|00>)/2. The four words are distinct, so the address and data registers are maximally entangled across a four-by-four partition. Each reduced state is I4/4, with two bits of entanglement entropy.
This particular table has a simple Boolean structure. If the address bits are a0 and a1, in most-to-least significance order, the high data bit is a0 xor a1 and the low data bit is one xor a0. An XOR lookup therefore uses CNOT from each address bit into the high data bit, followed by X and CNOT from a0 into the low data bit. Its logical implementation has three CNOTs and one X. The lookup is its own inverse because it XORs the same word into the target each time.
Applying it twice restores the zero data register and the original uniform address state. If the data register is measured between those applications, the distinct stored words reveal the address. Applying the inverse then returns the data to zero but leaves a classical mixture of addresses, not the original coherent uniform state. Cleanup removes the stored word; it cannot reverse information that has already been irreversibly recorded elsewhere.
Turning values into amplitudes requires another operation
Interpret the stored words as numerical values d=(1,3,2,0). A uniform coherent lookup by itself does not prepare the address state with these amplitudes. To encode a bounded mean, compute d, rotate a success flag so its conditional success probability is d/3, and uncompute the data register. The flag then has total success probability (1+3+2+0)/(4 times 3)=1/2. Conditioned on success, the address amplitudes are proportional to sqrt(1), sqrt(3), sqrt(2), and zero.
To prepare amplitudes proportional to the values themselves, use conditional success probability (d/3) squared instead. The total success probability is (1+9+4)/(4 times 9)=7/18. After coherent data cleanup and a successful flag outcome, the address state is (|00>+3|01>+2|10>)/sqrt(14). The two rotation choices solve different encoding tasks, even though they use the same memory values.
If the success flag is amplified, the preparation circuit, its inverse, and the relevant reflections are required coherently. The cost includes the table lookup, arithmetic or angle selection, flag rotation, and cleanup on every use. A stored classical value register is not an interchangeable substitute for a normalized amplitude state. The original vector norm sqrt(14) is also information outside that normalized state if a later classical answer needs the unnormalized scale.
What the small circuit does and does not establish
The cheap lookup circuit follows from the table's algebraic structure. An arbitrary table with N entries of w bits contains Nw classical bits of description before any compression is justified. A coherent addressing model specifies how those bits can affect a quantum query, while the representation, loading, and maintenance of the table are additional resources. A logarithmic address register does not make that description disappear.
Different access models also offer different algorithmic capabilities. A reversible address-value oracle preserves the address and writes a word by XOR. An in-place permutation of addresses is another interface, and state preparation is another. Claims that move from one to another must include the required construction. For the displayed permutation-valued table, a special relationship exists because all words are distinct; it should not be generalized to a table containing arbitrary repeated values.
Classical comparison methods should be given the same stored table and any preprocessing that the quantum method assumes. If many queries reuse an expensive prepared memory, amortized cost may be meaningful, but the number of uses and update frequency must be stated. For one use of a four-entry table, direct classical computation is the straightforward baseline. This example illustrates coherent access and data conversion, not a demonstrated memory architecture or practical speedup.
Sources
Verification scope
Selected source text checked ·
Formal or reference-semantic source anchor only; no SDK execution, hardware run, or empirical advantage is asserted. Original worked examples are independent mathematical constructions.