Quantum data encoding
Quantum data encoding maps classical or quantum information into a state or operation, with costs and information-access limits that depend on the chosen representation.
On this page
Definition and plain explanation
Basis encoding stores a classical bit string in a computational-basis state. Angle encoding uses data to choose gate parameters. Amplitude encoding uses a normalized vector as state amplitudes. These representations have different preparation and readout costs. The number of qubits alone does not describe how expensive it is to load or retrieve the data.
Solved amplitude encoding
For real vector v=(3,4), its norm is 5 and the normalized state is |v>=0.6|0>+0.8|1>. Computational-basis probabilities are 0.36 and 0.64. The original magnitude 5 is not recoverable from the normalized state alone and must be retained separately if the application needs it. Replacing v by (6,8) produces the same normalized state. A single measurement does not output both numerical components.
State-preparation accounting
An arbitrary length-N vector contains N values; reading those values already costs order N in a conventional input model. Special structure, pre-existing quantum data or a strong memory-access model can change the accounting, but the assumptions must be explicit. A logarithmic qubit representation does not establish logarithmic loading time for arbitrary data.
Limits and classical alternatives
If the desired output is every component of a transformed vector, measurement can remove an apparent advantage that existed for estimating one expectation value. Classical randomized linear algebra can exploit sampling access to data and may be the appropriate comparison to algorithms assuming similar access. Noise in angles or amplitudes changes the encoded object and should be included in the error model.
Normalization removes scale unless scale is retained separately
Amplitude encoding maps a nonzero vector v to |v>=sum_j v_j|j>/||v||. The vectors (3,4) and (6,8) produce the same normalized state because both have the ratio 3:4. Their norms, 5 and 10, are different. Any task that depends on absolute magnitude must retain the norm in additional classical or quantum information. A normalized state alone cannot recover a scale that the encoding discarded.
For real vectors v=(3,4) and w=(4,-3), normalized states are 0.6|0>+0.8|1> and 0.8|0>-0.6|1>. Their inner product is 0.48-0.48=0, although computational-basis probability distributions are (0.36,0.64) and (0.64,0.36). For v=(3,4) and u=(3,-4), the measurement probabilities in that basis are identical, yet the inner product is 0.36-0.64=-0.28. Basis probabilities therefore do not specify the relative signs or phases of an amplitude-encoded vector.
Encoding an angle makes a periodic identification
A single-qubit rotation Ry(theta)|0> gives cos(theta/2)|0>+sin(theta/2)|1>. Measurement of Z has expectation cos(theta). The angles theta and -theta have the same Z expectation, although their states generally differ in the sign of the |1> coefficient. Measuring X instead gives sin(theta), which resolves this sign ambiguity except at special values. A feature map followed by a fixed measurement can discard information that the state itself retains.
Changing theta by 2pi multiplies this state by -1, a global phase, so the physical single-qubit state is unchanged. Thus a scalar encoding that uses this rotation identifies values modulo 2pi at the level of the prepared state. A data preprocessing rule should explain whether that periodicity is intended. Mapping an unbounded physical quantity to an angle without specifying scale or range can create accidental collisions between different inputs.
A controlled phase can make a relative phase observable
The vectors |psi> and exp(i phi)|psi> describe the same isolated pure state. However, a controlled operation with identity on one branch and exp(i phi)U on another is not generally equivalent to a controlled-U operation. Acting on |+>|psi>, a controlled global phase produces [|0>|psi>+exp(i phi)|1>U|psi>]/sqrt(2). The phase now compares two branches of a larger state. Consequently, replacing a state-preparation unitary by a globally phased version may matter when that unitary is used coherently under control.
For U=I and phi=pi, the control changes from |+> to |->. Measuring the control in the X basis distinguishes the two cases perfectly. This example reconciles two statements that otherwise sound contradictory: a global state phase is unobservable, while the phase convention of a controlled implementation can affect an algorithm. The distinction is the physical operation on the enlarged system.
Sparse data and promises change the accounting
A length-N vector with only k nonzero entries may admit preparation methods that depend on k or on a structured access oracle. This is a promise about the input representation, not a free consequence of using log2(N) qubits. An explicit list of arbitrary nonzero amplitudes still contains numerical information that must reach the device. A preparation bound should state precision, connectivity, available auxiliary registers and whether a data structure has already been built.
Likewise, an algorithm whose output is an encoded vector has not necessarily produced every vector component as a classical number. If the downstream task asks for one expectation value, a compact quantum output may be appropriate. If it asks for the entire N-component vector to fixed precision, readout can dominate. The encyclopedia should state the required output before using compact state representation as evidence of computational benefit.
Recovering an encoded output can erase a compact-representation benefit
Suppose an algorithm returns a pure state with N unknown amplitudes, while the downstream request asks for every computational-basis probability to additive accuracy. A measurement of one prepared copy returns one label, not the list of probabilities. Repeated preparation and measurement are needed to estimate that distribution. If the desired output is only one expectation of a bounded observable, the output requirement can be much smaller.
For a Bernoulli event with probability p, N_shots independent samples give estimator variance p(1-p)/N_shots. This elementary measurement cost belongs to the final task even when the intermediate state was stored using only logarithmically many qubits. Compact representation, efficient transformation and efficient extraction of the requested classical answer are three different claims. A scientific application record should state all three before interpreting a small register as an end-to-end speedup.
Sources
Verification scope
Metadata and abstract checked ·
Version-specific publication metadata beyond the first submission are not asserted. Learning with data and computing a function are different comparison tasks.
Verification scope
Available excerpt checked ·
Perspective about evaluation goals and assumptions, not a no-go theorem against quantum machine learning.