Data-Reuploading Classifier
Overview
Data-Reuploading Classifier
This PennyLane demo implements the data-reuploading classifier, an elegant quantum machine-learning model that shows a single qubit can be a universal classifier when classical data is fed into the circuit multiple times. The key idea, introduced by Perez-Salinas and collaborators, is to interleave layers that re-encode the input data with layers of trainable rotations, so the data is uploaded repeatedly throughout the circuit rather than only once at the start. This repeated reuploading lets even a single-qubit circuit represent highly nonlinear decision boundaries, drawing an analogy to how repeated nonlinearities give classical neural networks their expressive power. The tutorial builds the alternating data-encoding and trainable layers in PennyLane, defines a fidelity-based cost that pushes data points toward target states on the Bloch sphere for each class, and trains the model with gradient-based optimization to classify non-trivially-shaped datasets. It visualizes the resulting decision regions and discusses how adding qubits and layers increases capacity. By demonstrating universal classification from minimal quantum resources, the demo is a striking, foundational example of expressive quantum machine learning in PennyLane.
Run it
pip install -r requirements.txt
python demo.py
Source and license
Imported from demonstrations_v2/tutorial_data_reuploading_classifier/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.
This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.
Publication
doi:10.48550/arxiv.1907.02085Adrián Pérez-Salinas, Alba Cervera-Lierta, Elies Gil-Fuster, José I. Latorre
Versions
Cite all versions? Use the base QCR ID to always reference the latest version of this entry.
Join the Discussion
Comments (0)
No comments yet. Be the first to share your thoughts!