Skip to content

Conversation

@fkiwit
Copy link

@fkiwit fkiwit commented Sep 22, 2025

Title:
Add demo on loading classical data with low-depth circuits

Summary:
This pull request adds a new demonstration on how to efficiently load classical image data into quantum states using low-depth quantum circuits, based on the paper "Typical Machine Learning Datasets as Low‑Depth Quantum Circuits". The demo uses the MNIST dataset and shows how to train a variational quantum classifier on the encoded data. This demo leverages the new qml.data module for dataset loading.

Relevant references:

  • "Typical Machine Learning Datasets as Low‑Depth Quantum Circuits" (2025) [1]
  • "A flexible representation of quantum images for polynomial preparation, image compression, and processing operations" [2, 3]
  • "A Multi-Channel Representation for images on quantum computers using the RGBα color space" [4, 5]
  • "Efficient MPS representations and quantum circuits from the Fourier modes of classical image data" [6]

Possible Drawbacks:
The dataset required for this demo is large (~1GB), which might be a consideration for users with limited bandwidth or storage.

Related GitHub Issues:
None


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?

Promote the new qml.data feature for loading datasets and show a PennyLane implementation of a recent paper on efficient data loading for QML.

  • AUDIENCE — Who is this for?

QML researchers, students, and practitioners interested in efficient data loading techniques and their application to image classification tasks.

  • KEYWORDS — What words should be included in the marketing post?

Quantum Machine Learning, Quantum Datasets, Image Loading, Low-depth circuits, Variational Quantum Classifier, MNIST, PennyLane, qml.data

  • Which of the following types of documentation is most similar to your file?
    (more details here)
  • Tutorial
  • Demo
  • How-to
@github-actions
Copy link

Your preview is ready 🎉!

You can view your changes here

Copy link
Contributor

@DSGuala DSGuala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made an initial skim and left comments. Overall a very nice/complete first draft.

Still pending from my side:

  • In depth review of the text for clarity
  • In depth review of the code for efficiency and output

But basically I think 1 or two more rounds of review and this should be ready to go.

DSGuala and others added 16 commits September 29, 2025 17:52
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Comment on lines 221 to 223
# overlap between the exact FRQI state $
# \|:raw-latex:`\psi`\_{:raw-latex:`\text{exact}`}:raw-latex:`\rangle `$ and its 4-layer
# center-sequential approximation :math:`|\psi_{\text{circ.}}\rangle`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not properly formatted, :math: and so on

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah true, thanks for checking! I think Diego made a change and it should be fixed now

#
# On the right we decode the states back into pixel space. In line with the histogram, the
# reconstructed “1” is virtually indistinguishable from its original, whereas the reconstructed “0”
# shows minor blurring. By selecting a deeper circuit the quality of the reconstructed images could be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# shows minor blurring. By selecting a deeper circuit the quality of the reconstructed images could be
# shows minor blurring. By selecting a deeper, circuit the quality of the reconstructed images could be
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, but I think the original version was right. Deeper is just an adjective modifying circuit.

Co-authored-by: Daniela Angulo <42325731+daniela-angulo@users.noreply.github.com>
fkiwit and others added 3 commits November 2, 2025 19:58
Co-authored-by: Daniela Angulo <42325731+daniela-angulo@users.noreply.github.com>
Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants