Week 1: Building the Quantum and Classical Models
February 26, 2026
Welcome back to my senior project blog! If you read my Week 0 post, you know the mission: pit a quantum brain against a classical one and see which handles noisy data better. This week, the theoretical planning phase ended and the real construction began. I spent the bulk of my time in Google Colab building the three neural network models that will eventually go head-to-head, and I quickly learned that designing an experiment on paper is a very different beast from wiring it up in code.
The first model I tackled was the full-resolution CNN, which is the heavyweight of this experiment. This is a LeNet-style Convolutional Neural Network that takes in the full 28×28 pixel MNIST images, meaning it gets to see every detail of each handwritten digit. I built it with two convolutional layers, pooling layers to compress the spatial information, and dropout layers to prevent overfitting, which is essentially when a model memorizes the training data instead of actually learning patterns. Getting this one up and running was the smoothest part of the week because classical CNNs are extremely well-documented and the TensorFlow library makes the architecture almost plug-and-play. Think of this model as the student who gets to read the textbook with perfect lighting and a magnifying glass; it has every advantage in terms of input quality, and it will serve as my performance ceiling.
The second model, the fair CNN, was where things got more conceptually interesting. This is a much simpler Multi-Layer Perceptron with just one hidden layer, and the critical twist is that it only receives 4×4 pixel binarized images, the exact same degraded input that the quantum model will see. I talked in my last post about how previous studies comparing QNNs and CNNs often gave the classical model a full high-definition image while the quantum model worked with a pixelated thumbnail, which is hardly a fair fight. This fair CNN is my solution to that problem. By stripping the classical model down to the same resolution, I am isolating the variable of architecture itself. If the quantum model outperforms this one, it won’t be because of an unfair data advantage; it will be because the quantum design is genuinely better at extracting meaning from limited information.
The third and most challenging model is the QNN, the hybrid quantum-classical network that sits at the heart of this entire experiment. Building it required me to dive into TensorFlow Quantum, which is a framework that lets you design quantum circuits and integrate them into a standard machine learning pipeline. The idea is to take each 4×4 binarized image and encode it onto 16 qubits, where each pixel maps to one qubit. From there, a Parameterized Quantum Circuit uses XX and ZZ entangling gates to create correlations between the qubits, theoretically allowing the model to capture global patterns in the data that a classical network might miss. If superposition lets each qubit exist in multiple states at once and entanglement links those states together, then in theory this circuit should be able to see relationships across the entire image simultaneously rather than scanning it piece by piece. In practice, however, setting up the circuit encoding and making sure the data pipeline correctly binarizes and maps each image to the quantum layer took a significant chunk of my week and a lot of debugging.
The biggest challenge I ran into this week was honestly just the sheer difference in workflow between classical and quantum model building. With the classical CNNs, errors were usually straightforward: a mismatched tensor shape here, a wrong activation function there. With the QNN, debugging felt like navigating in the dark because the abstraction layer between the quantum circuit and the classical optimizer made it harder to pinpoint where things were going wrong. I also had a minor scare when I realized how long even a simple quantum simulation takes on a classical machine, which is a reminder that I am not running on an actual quantum computer but rather simulating one, and that simulation cost grows fast. This is why the 4×4 input size is non-negotiable; scaling up to 28×28 would require 784 qubits and an astronomical runtime that my laptop and Google Colab would simply refuse to handle.
Looking ahead to next week, my goal is to finalize the architecture of all three models and begin the training phase on the clean MNIST dataset. I plan to train each model for 10 epochs and start logging the baseline accuracy and loss metrics before any noise is introduced. If all goes well, by the end of next week I will have three trained models sitting in my notebook, ready to be thrown into the noisy gauntlet. Stay tuned for the results, and wish my qubits luck.
Patrick Zhou, signing off.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.

This is an incredible start! I love how clearly you explained the differences between the three models and why you designed a “fair CNN” to make the comparison with the quantum model meaningful. Your breakdown of the QNN and the challenges of working with quantum simulations was really engaging. I am really excited to see how the training phase goes next week!