Dropout in Quantum Neural Networks
Overview
Dropout in Quantum Neural Networks
This PennyLane demo adapts dropout, the classical regularization technique, to quantum neural networks in order to combat overfitting, following the paper 'A General Approach to Dropout in Quantum Neural Networks' by Scala and collaborators. It explains that overparametrized QNNs enjoy a friendlier optimization landscape with fewer local minima, which speeds training but also makes them prone to fitting noise rather than the underlying signal, especially when classical data is re-encoded many times to introduce nonlinearity. The quantum analogue of dropout randomly disables parametrized rotation gates during training only, temporarily setting selected angles to zero to block information flow, while the fully trained model is later run in its complete form. The demo demonstrates this on a noisy sine-regression task, randomly dropping single-qubit rotations according to a generated mask, and leverages JAX just-in-time compilation with its conditional primitives to keep training fast despite the added branching. Comparing runs with and without dropout, it shows the technique reduces overfitting and improves generalization. It matters because it transfers a simple, well-understood classical remedy into the quantum setting, offering a practical knob for training expressive quantum models that would otherwise memorize their data.
Run it
pip install -r requirements.txt
python demo.py
Source and license
Imported from demonstrations_v2/tutorial_quantum_dropout/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.1002/qute.202300220Francesco Scala, Andrea Ceschini, Massimo Panella, Dario Gerace
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!