Angle encoding is a method of loading classical data into a quantum state by mapping data values to rotation angles of qubits (e.g., using quantum gates like Rx Gate, Ry Gate, or Rz Gate) Each feature of the data is represented as the angle of the quantum state vector’s rotation, which changes its probability amplitudes. This allows continuous classical values to be embedded in quantum states for use in quantum algorithms or quantum circuits.
by Frank ZickertJanuary 6, 2026
You Never Get Your Angles Back
Angle Encoding looks simple. You take numbers and convert them into angles. You apply rotations. Later, you measure.
What is not obvious is that the angles entered never reappear. They are not stored. They are not read out. And yet they determine everything you observe.
Why nothing is actually stored
Most people start with the wrong idea.
They imagine a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit as a tiny container. You put information in. You take information out. Just like a classic A bit (short for “binary digit”) is the smallest unit of data in computing, representing a value of either 0 or 1. It’s the fundamental building block of all digital information. Multiple bits combine to form larger units like bytes (8 bits) and encode more complex data such as numbers, text, or images. Learn more about Binary Digit But more powerful. In this idea, Angle Encoding sounds like a strange way of writing numbers.
But this idea fails immediately.
A A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit does not contain any values. There is nothing in it that can be examined. A A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit is not a data storage. What exists is a A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum StateAnd the only thing that can ever be accessed from this state is how often certain results occur when it is measured.
This becomes clearly visible when looking at the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit in a quantum circuit.
1
2
3
4
5
import numpy as np
from qiskit import QuantumCircuit
x = np.array([0.3, 1.1])
qc = QuantumCircuit(2)
When we create a A quantum circuit is a sequence of quantum gates applied to qubits, representing the operations in a quantum computation. Each gate changes the qubits’ state using quantum mechanics principles like superposition and entanglement. The final qubit states, when measured, yield the circuit’s computational result probabilistically. Learn more about Quantum Circuit object, Qiskit is an open-source Python framework for programming and simulating quantum computers. It lets users create quantum circuits, run them on real quantum hardware or simulators, and analyze the results. Essentially, it bridges high-level quantum algorithms with low-level hardware execution. Learn more about Qiskit is only interested in how many A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit we want to have. There is no way to initialize a quantum circuit with classical inputs.
Qiskit is an open-source Python framework for programming and simulating quantum computers. It lets users create quantum circuits, run them on real quantum hardware or simulators, and analyze the results. Essentially, it bridges high-level quantum algorithms with low-level hardware execution. Learn more about Qiskit QuantumCircuit class provides a function called “initialize” that accepts an array of normalized In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude as input and sets theA qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit to a corresponding A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State
However, this function is just a convenient wrapper. Internally,Qiskit is an open-source Python framework for programming and simulating quantum computers. It lets users create quantum circuits, run them on real quantum hardware or simulators, and analyze the results. Essentially, it bridges high-level quantum algorithms with low-level hardware execution. Learn more about Qiskit applies A quantum gate is a basic operation that changes the state of one or more qubits, similar to how a logic gate operates on bits in classical computing. It uses unitary transformations, meaning it preserves the total probability (the state’s length in complex space). Quantum gates enable superposition and entanglement, allowing quantum computers to perform computations that classical ones cannot efficiently replicate. Learn more about Quantum Gate to the specified A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit to put the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bitinto A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State corresponding to these In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude
Qiskit is an open-source Python framework for programming and simulating quantum computers. It lets users create quantum circuits, run them on real quantum hardware or simulators, and analyze the results. Essentially, it bridges high-level quantum algorithms with low-level hardware execution. Learn more about Qiskit initializes all A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit to . This is theA basis state in quantum computing is one of the fundamental states that form the building blocks of a quantum system’s state space. For a single qubit, the basis states are and ; any other qubit state is a superposition of these. In systems with multiple qubits, basis states are all possible combinations of s and s (e.g., , , , and ), forming an orthonormal basis for the system’s Hilbert space. Learn more about Basis State of the The computational basis is the standard set of basis states used to describe qubits in quantum computing. These are typically and for a single qubit. For multi-qubit systems all possible combinations of basis states denote the computational basis, like , , , and . These states correspond to classical bit strings and form an orthonormal basis for the system's Hilbert space. Any quantum state can be expressed as a superposition of these computational basis states. Learn more about Computational Basis which lets us measure the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bitas . Almost allA quantum circuit is a sequence of quantum gates applied to qubits, representing the operations in a quantum computation. Each gate changes the qubits’ state using quantum mechanics principles like superposition and entanglement. The final qubit states, when measured, yield the circuit’s computational result probabilistically. Learn more about Quantum Circuit diagrams adhere to the same convention, as you can see if you look at the state to the left of the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit wire.
Figure 1 A quantum circuit initialized in state |0⟩
All you can do is apply A quantum gate is a basic operation that changes the state of one or more qubits, similar to how a logic gate operates on bits in classical computing. It uses unitary transformations, meaning it preserves the total probability (the state’s length in complex space). Quantum gates enable superposition and entanglement, allowing quantum computers to perform computations that classical ones cannot efficiently replicate. Learn more about Quantum Gate to the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit Some of these gates have parameters that you can use to provide your data.
1
2
qc.ry(x[0], 0)
qc.ry(x[1], 1)
One might think that these gates write the data into the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum BitHowever, they do not. If Encoding is the process of converting information from one form into another, usually so it can be stored, transmitted, or processed more efficiently. For example, text can be encoded into binary for computers to handle, or sounds into digital signals for transmission. The key idea is that encoding changes the representation, not the meaning, of the data. Learn more about Encoding were simply a matter of writing numbers, that would be the end of the story.
However, A quantum gate is a basic operation that changes the state of one or more qubits, similar to how a logic gate operates on bits in classical computing. It uses unitary transformations, meaning it preserves the total probability (the state’s length in complex space). Quantum gates enable superposition and entanglement, allowing quantum computers to perform computations that classical ones cannot efficiently replicate. Learn more about Quantum Gate do not write numbers into quantum memory. Never.
These operations merely cause a rotation of the A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State However, this happens under strict conditions. For example, the operator (here “ry”) rotates the A quantum state vector is a mathematical object (usually denoted |ψ⟩) that fully describes the state of a quantum system. Its components give the probability amplitudes for finding the system in each possible basis state. The squared magnitude of each component gives the probability of measuring that corresponding outcome. Learn more about Quantum State Vector by the angle (“theta”) around the Y-axis of the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit It therefore interprets our data as angles in a circle. The circle around the Y-axis.
Rotations of A vector is a mathematical object that has both magnitude (size) and direction. It’s often represented as an arrow or as an ordered list of numbers (components) that describe its position in space, such as . Vectors are used to represent quantities like velocity, force, or displacement. Learn more about Vector preserve their length. The In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude therefore remain normalized. This is important because In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude cannot be freely chosen. Only the A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State as a whole can be controlled.
So the question is inevitable.
If nothing is written, what exactly do we get?
The moment you look, the state is gone
So. let's look at the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states. Learn more about Quantum Bit
1
qc.measure_all()
However, the In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually or ), with probabilities determined by the amplitudes of those states. After measurement, the qubit’s state becomes definite, destroying the original superposition. Learn more about Measurement does not give us access to the A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum StateAngles are not returned, nor are In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude What we get are A bit (short for “binary digit”) is the smallest unit of data in computing, representing a value of either 0 or 1. It’s the fundamental building block of all digital information. Multiple bits combine to form larger units like bytes (8 bits) and encode more complex data such as numbers, text, or images. Learn more about Binary Digitstrings.
A In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually or ), with probabilities determined by the amplitudes of those states. After measurement, the qubit’s state becomes definite, destroying the original superposition. Learn more about Measurement provides a sample. However, a single sample is virtually meaningless. Only many samples together provide information about something. Therefore, we instruct Qiskit is an open-source Python framework for programming and simulating quantum computers. It lets users create quantum circuits, run them on real quantum hardware or simulators, and analyze the results. Essentially, it bridges high-level quantum algorithms with low-level hardware execution. Learn more about Qiskit to repeat the sampling process many times.
The circuit develops a A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State that you never observe.
You collect samples.
There is no decoding step. There is no verification of the state. The only classical output is a distribution over A bit (short for “binary digit”) is the smallest unit of data in computing, representing a value of either 0 or 1. It’s the fundamental building block of all digital information. Multiple bits combine to form larger units like bytes (8 bits) and encode more complex data such as numbers, text, or images. Learn more about Binary Digit strings.
1
{'00': 7162, '10': 2608, '01': 171, '11': 59}
The input, quantum evolution, and output are only indirectly connected via statistics.
But if you never read the angles, never observe the In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude and only see samples, how can we do anything meaningful with angle-encoded data?
The mistake lies in assuming that doing something meaningful means accessing or restoring what you put into it.
Angle Encoding does not work by preserving angles so that they can be read later. It works because these angles influence the evolution of theA quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin. Learn more about Quantum State before you even look at it.
The rotations that are applied do two things at once.
First, they establish relative orientations and A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves. Learn more about Quantum Phase in the quantum state. These A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves. Learn more about Quantum Phase are not In quantum computing, an **observable** is a physical quantity (like energy, spin, or position) that can be **measured** from a quantum state. Mathematically, it’s represented by a **Hermitian operator**, whose eigenvalues correspond to the possible measurement outcomes. When you measure an observable, the quantum state **collapses** into one of its eigenstates, yielding one of those eigenvalues as the result. Learn more about Observable in themselves, but they control how different parts of the state connect.
Second, these parts interfere with each other as the cycle continues. Some paths reinforce each other. Others cancel out. This redistribution takes place entirely during the Unitary evolution is the rule that describes how a closed quantum system changes over time according to the Schrödinger equation. The system’s state vector is transformed by a *unitary operator*, meaning probabilities (the total norm) are exactly preserved. This ensures quantum evolution is reversible and information is never lost. Learn more about Unitary Evolution while the state is still quantum and inaccessible.
When you measure, the angles are gone. The In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions. Learn more about Amplitude are gone. What remains is their consequence: a structured A probability distribution describes how the probabilities of different possible outcomes of a random variable are spread out. It shows which values are more or less likely to occur, either as a list (for discrete variables) or a curve (for continuous ones). Essentially, it’s a complete mathematical summary of a random variable’s behavior. Learn more about Probability DistributionThat is why sampling is inevitable when working with Angle Encoding. But it is the interface to access the computational result, not the angles we started with.
So, with angle-coded values, you never work directly with the data. You work with how they interfere with each other.