recent years, quantum computing has attracted growing interest from researchers, businesses, and the general public. “Quantum” has develop into a buzzword that many use to draw attention. As this field has gained popularity, quantum machine learning (QML) has emerged as an area where quantum computing and machine learning meet.
As someone with an interest in machine learning and a deep love for math and quantum computing, I discovered the concept of quantum machine learning very appealing. But as a researcher in the sphere, I used to be also somewhat skeptical in regards to the near-term applications of QML.
Today, machine learning powers tools comparable to suggestion systems and medical diagnostics by finding patterns in data and making predictions. Quantum computing, in contrast, processes information in another way by leveraging effects comparable to superposition and entanglement.
The sphere of quantum machine learning explores this possibility and seeks to reply this query.
Nonetheless, as with anything related to quantum computing, it’s vital to set clear expectations. Quantum computers at the moment are faulty and incapable of running large-scale programs. That being said, they’re able to providing a proof of concept on the utility of QML in various applications.
Furthermore, QML isn’t meant to interchange classical machine learning. As a substitute, it looks for parts of the educational process where quantum systems might offer a bonus, comparable to data representation, exploring complex feature spaces, or optimization.
With that in mind, how can a knowledge scientist or a machine learning engineer dip their toe within the pool that’s QML? Any machine learning algorithm (quantum or classical) requires data. Step one is at all times data preparation and cleansing.
This text is all about QML workflows and data encoding.
Quantum Machine Learning Workflows
Before we jump into data, let’s take a fast pause and briefly define what quantum machine learning is. At a high level, quantum machine learning refers to algorithms that use quantum systems to perform machine learning tasks, including:
1. Classification
2. Regression
3. Clustering
4. Optimization
Most approaches today fall into what we call hybrid quantum-classical models, wherein classical computers handle data input and optimization, while quantum circuits are a part of the model.
A helpful option to take into consideration that is: Classical machine learning focuses on , while quantum machine learning often focuses on .
Since data can take many forms, QML workflows may look different depending on the style of input and algorithm.
If now we have classical data and a classical algorithm, that’s our typical machine learning workflow. The opposite three options are where things get somewhat interesting.
1. Quantum Data with a Quantum Model (Fully Quantum)
Probably the most straightforward approach is to have some quantum data and use it with a quantum model. In theory, what would this workflow seem like?
1- Quantum Data Input: The input is already a quantum state: ∣ψ⟩
2- Quantum Processing: A circuit transforms the state: U(θ)∣ψ⟩
3- Measurement
The information we’re working with might come from:
1. A quantum experiment (e.g., a physical system being measured).
2. A quantum sensor.
3. One other quantum algorithm or simulation.
Because the information is already quantum, there is no such thing as a need for an encoding step. At a conceptual level, that is the “purest” type of quantum machine learning, so we would expect the strongest type of quantum advantage here!
But, this workflow continues to be limited in practice because of some challenges, including:
1. Access to Quantum Data: Most real-world datasets (images, text, tabular data) are classical. Truly, quantum data is far harder to acquire.
2. State Preparation and Control: Even with quantum data, preparing and maintaining the state ∣ψ⟩ with high fidelity is difficult because of noise and decoherence.
3. Measurement Constraints: While we delay measurement until the top, we still face limitations, comparable to we only extract partial information from the quantum state, and we’d like careful design of observables.
In the sort of workflow, the goal is to learn directly from quantum systems.
2. Quantum Data with Classical Algorithms
Up to now, now we have focused on workflows wherein quantum data is utilized in a quantum system. But we should always also consider the scenario where now we have quantum data, and we would like to make use of it with a classical ML algorithm.
At first glance, this looks as if a natural extension. If quantum systems can generate wealthy, high-dimensional data,
In practice, this workflow is possible, but with a crucial limitation.
A quantum system is described by a state comparable to:
which comprises exponentially many amplitudes. Nonetheless, classical algorithms cannot directly access this state. As a substitute, we must measure the system to extract classical information, for instance, through expectation values:
These measured quantities can then be used as features in a classical model.
The challenge is that measurement fundamentally limits the quantity of knowledge we will extract. Each measurement provides only partial information in regards to the state, and recovering the total state would require an impractical variety of repeated experiments.
That being said, classical machine learning can play a beneficial role in analyzing noisy measurement data, identifying patterns, or improving signal processing.
Hence, most quantum machine learning approaches aim to maintain data within the quantum system for so long as possible—bringing us back to the central challenge of this text:
So, let’s talk in regards to the final workflow.
3. Classical Data with a Quantum Model (Hybrid QML)
That is probably the most common workflow used today. Mainly, it’s a model where we encode classical data into quantum states after which apply QML to acquire results. Hybrid QML algorithms like this have 5 steps:
1- Classical Data Input
Data starts in a well-known form:
2- Encoding Step
The information is mapped right into a quantum state:
3- Quantum Processing
A parameterized circuit processes the information:
4- Measurement
Results are extracted as expectation values:
5- Classical Optimization Loop
Parameters θ are updated using classical optimizers.
This workflow brings a brand new challenge that isn’t present in classical machine learning:
How will we efficiently encode classical data right into a quantum system?
That’s what we’ll answer next!

Classical Data Encoding
If we step back and compare these workflows, one thing becomes clear: the principal structural difference is the encoding step.
Because most real-world applications use classical datasets, this step is frequently mandatory. So,
In classical computing, data is stored as numbers in memory.
In quantum computing, data have to be represented as a quantum state:
For multiple qubits:
Where: are complex amplitudes . So, in easy terms, encoding means: Taking classical data and mapping it into the amplitudes, phases, or rotations of a quantum state.
Now, let’s take a deeper take a look at the different sorts of knowledge encoding.
1. Basis Encoding (Binary Mapping)
That is the only approach to encoding classical data. Mainly, we represent classical binary data directly as qubit states.
Qiskit Example
from qiskit import QuantumCircuit
qc = QuantumCircuit(3)
qc.x(0) # 1
qc.x(2) # 1
qc.draw('mpl')

Here, each bit maps on to a qubit, and no superposition is used. This approach only works if the dataset we’re using is easy. and it is frequently utilized in demonstrations and teaching moderately than actual implementation of QML.
In the sort of data encoding, you would want one qubit per feature, which doesn’t scale well to larger, more realistic problems.
2. Angle Encoding
To have a richer encoding, as a substitute of turning values into 0 or 1, we use rotations to encode our classical data. Quantum data will be rotated in three directions, X, Y, and Z.
In angle encoding, we take a classical feature x and map it onto a quantum state using a rotation:
, where α∈{x, y, z}.
So in principle, you should use Rx(x), Ry(x), or Rz(x).
But not all of them encode data in the identical way. Typically, Rx or Ry is used for data encoding.
Qiskit Example
from qiskit import QuantumCircuit
import numpy as np
x = [0.5, 1.2]
qc = QuantumCircuit(2)
qc.ry(x[0], 0)
qc.ry(x[1], 1)
qc.draw('mpl')

Angle encoding can, in principle, be implemented using rotations about any axis (e.g., Rx, Ry, Rz). Nonetheless, rotations in regards to the Y- and X-axes directly affect measurement probabilities, while Z-rotations encode information in phase and require additional operations to develop into observable.
After we use rotation to encode data, continuous data are handled naturally, leading to a compact representation that is simple to implement. By itself, this method is generally linear unless we add entanglement.
3. Amplitude Encoding
That is where things begin to feel “quantum.” In amplitude encoding, the information is encoded into the amplitudes of a quantum state.
With qubits, we will encode values, which implies we get exponential compression.
Qiskit Example
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
import numpy as np
x = np.array([1, 1, 0, 0])
x = x / np.linalg.norm(x)
qc = QuantumCircuit(2)
qc.initialize(x, [0,1])
qc.draw('mpl')

The challenge with this approach is that state preparation is pricey (circuit-wise), which may make circuits deep and noisy. So, regardless that amplitude encoding seems powerful in theory, it’s not at all times practical with current hardware.
4. Feature Maps (Higher-Order Encoding)
Up to now, we’ve mostly just classical data into quantum states. Feature maps go a step further by introducing nonlinearity, capturing feature interactions, and leveraging entanglement.
The structure of this encoding would seem like:
Meaning features don’t just act independently; they interact with one another.
Qiskit Example
from qiskit import QuantumCircuit
x1, x2 = 0.5, 1.0
qc = QuantumCircuit(2)
qc.ry(x1, 0)
qc.ry(x2, 1)
qc.cx(0, 1)
qc.rz(x1 * x2, 1)
qc.draw('mpl')

The sort of encoding is the quantum equivalent of polynomial features or kernel transformations. This lets the model find complex relationships in the information.
You’ll be able to consider feature maps as transforming data right into a recent space, much as kernels do in classical machine learning. As a substitute of mapping data right into a higher-dimensional classical space, QML maps it right into a quantum Hilbert space.

Final Thoughts
Regardless that quantum computers will not be fully there, hardware-wise, there’s quite a bit we will do with them today. One of the vital promising applications of quantum computers is quantum machine learning. If there’s one idea value holding onto from this text, it’s this:
This might sound surprising at first, nevertheless it’s actually just like classical machine learning. The difference is that in QML, encoding isn’t just preprocessing; it’s a part of the model itself.
And, similar to the broader field of quantum computing, this area continues to be developing. We don’t yet know the “best” encoding strategies. The hardware constraints shape what’s practical today, and recent approaches are still being explored.
So in case you’re trying to get into quantum computing, quantum machine learning is one of the impactful places to begin. Not by jumping straight into complex algorithms, but by starting with a much simpler query:
Answering that query allows us to completely utilize the ability of the quantum computers now we have today.
References & Further Reading
- Schuld, M., & Petruccione, F. (2018). (Vol. 17, p. 3). Berlin: Springer.
- Havlíček, V., Córcoles, A. D., Temme, K., Harrow, A. W., Kandala, A., Chow, J. M., & Gambetta, J. M. (2019). Supervised learning with quantum-enhanced feature spaces. , (7747), 209-212.
- Qiskit Documentation: https://qiskit.org/documentation/
- Schuld, M., & Killoran, N. (2019). Quantum machine learning in feature Hilbert spaces. , (4), 040504.
