cd /news/machine-learning/show-hn-live-quantum-circuits-visual… · home › topics › machine-learning › article
[ARTICLE · art-139374] src=github.com ↗ pub= topic=machine-learning verified=true sentiment=· neutral

Show HN: Live Quantum Circuits Visualizator for Reinforcement Learning

A developer released vqc-rl, a Tk-based GUI that visualizes variational quantum circuits (VQC) used as the action-value function in deep Q-learning on a stochastic 4×3 grid world, built from a 2024 internship at Porto University supervised by Prof. Duarte Magano and Ariel Guerreiro. The tool displays live circuit structure, parameter trajectories, gradients, policy, state utilities, rewards, loss and Bellman-reference error across a 10,000-episode run, with structurally zero gradients excluded from aggregate statistics. The release fixes a bug in the original VQC implementation that used Q(s_f,a) instead of Q(s_i,a) in the predicted value during training, while the classical training loop was unaffected; notebook-compatibility mode is verified bit-for-bit against the original code.

read1 min views1 publishedSep 25, 2026
Show HN: Live Quantum Circuits Visualizator for Reinforcement Learning
Image: Michielbdejong (auto-discovered)

This project studies variational quantum circuits (VQC) as the action-value function in deep Q-learning on a stochastic 4×3 grid world. You can run the gui, setup easily and run the simulation. Look at live performance and live parameters across your circuit. Exact Bellman value iteration provides a reference for learned values and policies. It is part of an internship done in 2024 in Porto University, under the supervision of Prof. Duarte Magano and Ariel Guerreiro.

The first animation replays real checkpoints while the GUI rotates through Circuit, Gradients, and Policy. The second follows MSE, TD loss, discounted reward, learning rate, and epsilon during the same 10,000-episode run. Structurally zero gradients are excluded from aggregate statistics.

cd vqc-rl
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
./gui.py

Tk is required by the GUI. For command-line training, run .venv/bin/python -m quantum_rl --help.

The GUI visualizes the circuit, parameter trajectories, gradients, policy, state utilities, rewards, loss, and Bellman-reference error. Each run stores its configuration and reference values alongside progress, policies, plots, parameter history, and gradient statistics.

Notebook-compatibility mode is verified bit-for-bit against the original implementation. The original code had a bug: only for the VQC implementation used Q(s_f,a) instead of Q(s_i,a) in the predicted value in the training loop (the classical training loop was not affected by this bug). In this GUI, this bug is fixed. The original notebooks are retained in original/. for historical attribution to the original internship implementation.

── more in #machine-learning 4 stories · sorted by recency
── more on @vqc-rl 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-live-quantum…] indexed:0 read:1min 2026-09-25 · —