← Back to list

Day-19 of My 21-Day Quantum Challenge with QuCode

Day 19 of my QuCode 21‑Day Quantum Computing Challenge was an immersive introduction to the world of Quantum Neural Networks (QNNs) and…

abdulrahman Ebrahim · 2025-09-19 17:52 · 0 claps · 3.4 min read
#qucode #quantum-computing
Open on Medium ↗
Wiki topics: ML · Machine Learning ⚛️ · Physics

Day-19 of My 21-Day Quantum Challenge with QuCode

Day 19 of my QuCode 21‑Day Quantum Computing Challenge was an immersive introduction to the world of Quantum Neural Networks (QNNs) and Quantum Machine Learning (QML). Today’s lineup of videos spanned intuitive animations, theoretical foundations, hands-on implementation, and real-world insights:

  • “Quantum Neural Networks explained in 3Blue1Brown style animation | Episode 1” by Quantum Research Lab (QRL)
  • “An Introduction to Quantum Neural Network | How it Actually Works” by DevTrail
  • “Quantum Machine Learning using QISKIT QML Library” by Kathiresan Sundarappan
  • “Exploring Quantum Machine Learning with Meltem Tolunay” from Qiskit Summer School 2024

Together, these videos provided a comprehensive view of how quantum circuits can mimic the structure and behavior of classical neural networks, and how we can begin to train them using today’s hybrid quantum-classical tools.

Quantum Neural Networks: What Are They?

The QRL video used a highly visual, animation-driven style to break down the structure of QNNs. Much like classical neural networks are built from layers of linear transformations followed by non-linear activations, QNNs use parameterized quantum gates in carefully designed circuits.

But unlike classical networks, quantum circuits must remain unitary, so we don’t get activation functions in the traditional sense. Instead, non-linearity comes from the measurement process and from the classical feedback loop used during training.

Key takeaway: QNNs are not just classical neural networks “running on a quantum computer.” They’re fundamentally different structures that use quantum states and operations to represent and learn from data.

Under the Hood: How QNNs Actually Work

DevTrail’s video gave a step-by-step breakdown of QNN architecture and training mechanics:

  • Input Encoding: Classical data must be embedded into quantum states. Techniques include angle encoding, basis encoding, and amplitude encoding.
  • Parameterized Quantum Circuit (Ansatz): This is the heart of the QNN — a tunable sequence of gates that transforms input states.
  • Measurement: The circuit is measured to produce classical data, typically via expectation values or bitstring probabilities.
  • Training Loop: A classical optimizer updates the parameters to minimize a loss function, based on the difference between predicted and true outputs.

This hybrid loop — quantum circuit evaluation combined with classical parameter updates — is a hallmark of variational quantum algorithms and places QNNs in the broader category of hybrid quantum-classical models.

Key takeaway: While conceptually similar to classical neural nets, QNNs bring unique challenges in encoding, circuit design, and training due to the constraints and quirks of quantum mechanics.

Practical QNNs with Qiskit’s Machine Learning Library

Kathiresan Sundarappan’s walkthrough demonstrated how to implement QNNs using Qiskit’s qml module. The workflow mirrored classical machine learning pipelines in structure, but with quantum elements:

  • Import classical datasets (like Iris or MNIST)
  • Encode data using quantum feature maps
  • Build QNNs using classes like TwoLayerQNN or EstimatorQNN
  • Train using NeuralNetworkClassifier from Qiskit Machine Learning

One particularly useful abstraction was the TwoLayerQNN, which sandwiches a parameterized quantum ansatz between a feature map and a measurement step — capturing the essence of QNN training in a compact format.

Key takeaway: If you’re familiar with Scikit-learn, Qiskit’s QML interface feels intuitive. But beneath the surface, you’re training on quantum circuits, with all the noise, structure, and potential that comes with them.

Quantum ML in the Real World: Insights from Qiskit Summer School

Meltem Tolunay’s lecture brought a broader perspective: where QML stands today and where it might be going. Her talk discussed both the potential applications — in chemistry, finance, cybersecurity — and the current challenges:

  • Data encoding remains a bottleneck. Mapping classical data to quantum states isn’t always efficient or even feasible for large-scale problems.
  • Noise and barren plateaus make training difficult and unstable.
  • Most current use cases are classical datasets on quantum models, which raises open questions about real quantum advantage.
  • Hardware limits remain a core challenge, especially for deeper circuits or high-dimensional data.

Key takeaway: QML is not yet outperforming classical models, but it opens up new algorithmic landscapes. The most promising use cases may emerge only when we have better quantum data or stronger quantum hardware.

Summary: Strengths and Limitations of QNNs

Where QNNs Excel:

  • Leverage superposition and entanglement to explore complex feature spaces
  • Compatible with NISQ devices through hybrid training methods
  • Integration with classical tools like Scikit-learn makes experimentation approachable

Where QNNs Struggle:

  • Encoding classical data into quantum states can be inefficient and resource-heavy
  • Circuit depth is limited by noise on current hardware
  • Training can hit barren plateaus or yield noisy gradients
  • Measuring quantum outputs requires many repeated shots, increasing runtime

Final Thoughts

Day 19 gave me a clearer picture of what QNNs are — and, just as importantly, what they’re not. They’re not plug-and-play replacements for classical neural networks. They’re not yet producing breakthrough results. But they are pushing the boundaries of what’s possible in the NISQ era.

The most valuable insight for me was that building effective QNNs means thinking quantum-first — not just in terms of circuits, but in terms of data representation, optimization, and system constraints. With better hardware and continued algorithmic innovation, QML could eventually become a powerful paradigm in its own right.

Looking forward to Day 20


메타데이터
post_id
4a4a591df25b
slug
day-19-of-my-21-day-quantum-challenge-with-qucode-4a4a591df25b
url
https://medium.com/@abdo2811t/day-19-of-my-21-day-quantum-challenge-with-qucode-4a4a591df25b
canonical_url
https://medium.com/@abdo2811t/day-19-of-my-21-day-quantum-challenge-with-qucode-4a4a591df25b
author_url
https://medium.com/@abdo2811t
status
ok
fetched_at
2026-07-17 10:16:35