Skip to main content
KetQat

Appearance

Definition · intermediate

Quantum random access memory (QRAM) and amplitude encoding

A QRAM is a unitary that loads classical data addressed by a superposition of indices, |i>|0> to |i>|x_i>; amplitude encoding prepares the state proportional to sum_i x_i |i>. Many quantum machine-learning speed-ups assume both can be done in time polylogarithmic in the data size.

Established definitionMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let x=(x0,…,xN−1)x = (x_0, \dots, x_{N-1}) be classical data with entries encoded as bb-bit strings. A quantum random access memory for xx is a unitary Qx\mathcal{Q}_x on an address register of ⌈log⁡2N⌉\lceil\log_2 N\rceil qubits and a bb-qubit data register with

Qx∣i⟩∣z⟩=∣i⟩∣z⊕xi⟩for all i,z,\mathcal{Q}_x \ket{i}\ket{z} = \ket{i}\ket{z \oplus x_i} \qquad \text{for all } i, z ,

so that a superposition of addresses ∑iαi∣i⟩∣0⟩\sum_i \alpha_i \ket{i}\ket{0} is mapped to ∑iαi∣i⟩∣xi⟩\sum_i \alpha_i \ket{i}\ket{x_i} in one call. For x∈CNx \in \C^N with x≠0x \ne 0, amplitude encoding is the preparation of

∣x⟩=1∥x∥∑i=0N−1xi∣i⟩\ket{x} = \frac{1}{\norm{x}} \sum_{i=0}^{N-1} x_i \ket{i}

on ⌈log⁡2N⌉\lceil\log_2 N\rceil qubits. The QRAM input model assumes that Qx\mathcal{Q}_x, and hence (with suitable precomputed partial norms) the preparation of ∣x⟩\ket{x}, cost time polylogarithmic in NN after a one-time loading of the data.

The physical cost is a separate question. In the bucket-brigade architecture of Giovannetti, Lloyd and Maccone a memory call throws only O(log⁡N)O(\log N) switches instead of the NN of conventional designs, which reduces the number of components that must be entangled during a query. Whether such devices can be built with the required error rates is open, and Aaronson lists data loading among the caveats that decide whether a claimed speed-up survives. The classical analogue of this input model, sample-and-query access, is the one under which Tang and later work dequantize several algorithms.

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Vittorio Giovannetti, Seth Lloyd, Lorenzo Maccone (2008). Quantum random access memory. Physical Review Letters 100, 160501. doi:10.1103/PhysRevLett.100.160501arXiv:0708.1879
  2. Scott Aaronson (2015). Read the fine print. Nature Physics 11, 291-293. doi:10.1038/nphys3272
  3. Ewin Tang (2019). A quantum-inspired classical algorithm for recommendation systems. Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC 2019). doi:10.1145/3313276.3316310arXiv:1807.04271

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    QRAM unitary and amplitude-encoding definitions checked as standard; bucket-brigade claim (O(log N) switches instead of N, less entanglement among gates) compared with Giovannetti-Lloyd-Maccone arXiv:0708.1879 abstract; Aaronson (2015) and Tang (2019) roles checked against their titles/metadata (Read the fine print; quantum-inspired classical algorithm for recommendation systems, sample-and-query access) via Crossref.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision 5a87e2a786505614. Source file knowledge/records/definition/quantum-random-access-memory.md in the content repository (readable there once it is public).