Quantum random-access memory
Understand coherent data lookup and include its construction and loading costs.
- Trace a coherent address–data query.
- Distinguish basis encoding from amplitude encoding.
- Include loading and maintenance in a cost comparison.
Before you begin: Reversible circuits, CNOT, superposition and entanglement.
What does coherent lookup mean?
Section titled “What does coherent lookup mean?”A classical memory query takes an address and returns the value stored there. A quantum memory interface must preserve a superposition of addresses while relating each address to its corresponding value. This interface is often called quantum random access memory, or QRAM.
For a fixed table of classical bit strings, a useful reversible definition is
The first register holds an address . The second is a data bus , and denotes bitwise XOR. XOR makes the transformation reversible: applying the same lookup twice returns the original bus. A bus initially in zero receives the addressed table entry.
Linearity determines what happens to a superposition:
This equation describes coherent correlations. Measuring once yields one address–value pair. An algorithm gains something useful only if its subsequent transformations exploit the state before measurement.
Checkpoint. Does the bus alone contain a readable printout of every entry? No. Read the joint state and ask what a particular measurement can return. Interference and further processing determine which global properties can be extracted efficiently.
Worked example: build a small lookup exactly
Section titled “Worked example: build a small lookup exactly”Use two address qubits, written , and one bus qubit. Store the four-bit table
| Address | 00 | 01 | 10 | 11 |
|---|---|---|---|---|
| 0 | 1 | 1 | 0 |
Here the table is the parity function . A CNOT from to the bus, followed by a CNOT from to the bus, implements the lookup. Two Hadamards prepare uniform addresses. The output is
All four joint outcomes have probability . The bus alone gives zero or one with equal probability. Its correlation with the addresses identifies the table.
This table has a short algebraic rule, which is why two CNOTs suffice. An arbitrary four-entry table may need a different circuit. Scaling this tiny parity example does not establish a cheap implementation of arbitrary large datasets.
The plot writes outcomes in wire order . Its four nonzero bars, 000,011,101,110, each have probability . These are the allowed address–bus pairs after one lookup.
Use and uncompute the data
Section titled “Use and uncompute the data”Often the data is needed only temporarily. Suppose the bus controls a phase operation, after which the lookup is applied again. The second call clears the bus while retaining a useful phase on the addresses. With the bus prepared in , phase kickback gives the shorter identity
For the table above, this assigns signs to the uniform address state. Applying again to both address qubits yields . The known parity rule has become a measurable interference pattern. This worked example links a memory interface to the oracle model used in algorithms.
Architecture and data preparation are different costs
Section titled “Architecture and data preparation are different costs”QRAM architecture proposals include routing networks in which an address coherently directs a bus through a tree. An address of bits refers to cells. A short route through a tree does not remove the physical cost of supplying those cells, loading their contents, controlling switches, maintaining coherence and managing errors. The original bucket-brigade proposal distinguishes the number of elements installed from the elements activated during a query.
A compiled quantum read-only memory circuit, often called QROM, provides another way to implement a fixed classical lookup through gates. Its table-dependent gate count, auxiliary space and depth must be accounted for. Coherent access to arbitrary stored quantum states raises additional questions about the allowed memory operation and whether values are moved, swapped or otherwise accessed.
Also distinguish lookup from amplitude encoding. Preparing
requires amplitudes proportional to data values. A lookup that writes into a separate register is one ingredient in some preparations, rather than automatically the completed amplitude-encoded state.
Exercises
Section titled “Exercises”Change one table entry in a simulator and rebuild the reversible circuit. Check all four basis addresses before using superpositions. Then run a superposition, apply the same lookup twice and verify that the bus returns to zero. Basis-address correctness and coherent reversibility test different parts of the implementation.
-
For address 10 and bus 1, what does the example lookup return?
-
A speedup assumes unit-cost access to a million-entry table. What must an end-to-end comparison add?
Worked answers
-
address 10 and bus 0, since .
-
data ingestion, memory construction, query implementation, updates, error management and the final output task.
Check your understanding
Section titled “Check your understanding”What does one coherent query guarantee?
Answer: The defined address–data transformation, on every superposed branch. Subsequent processing decides what information the computation extracts.
QRAM is a coherent memory interface. A credible algorithm comparison states how that interface is built and how its data reaches the machine.
Sources
Section titled “Sources”Giovannetti, Lloyd and Maccone, QRAM proposal; the authors’ architecture analysis. The parity table, gate circuit, uncomputation exercise and amplitude-encoding comparison above are original teaching material.
Ready for the next step?
Your progress stays in this browser.