Angle
One feature per qubit. Each qubit is rotated by RY(xᵢ).
± 0.037 over 3 folds
Can a quantum model learn to tell a stable power grid from an unstable one, and when is it worth using? We built quantum-kernel and variational classifiers on at most 8 qubits, scored them against classical models on identical rows, and report what held up.
Q//Horizon 2026 is a quantum computing competition at The American University in Cairo with the Afretec Network. QEUI is the Quantum Computing Club at Egypt University of Informatics.
Each wire carries one grid feature as a rotation. Slide the RY gates to move point z away from point x and watch how similar the kernel says they are.
Macro-F1 on the same 100 holdout rows, after training on the same 400 rows. The classical model wins. The competition did not ask us to beat it; it asked us to find out where the quantum models work, where they struggle, and why.
A comparison is only fair if both sides see the same data in the same way. Every model on this page passed through this one pipeline, and no choice was made by looking at holdout scores.
UCI Electrical Grid Stability: 10,000 simulated operating points of a four-node grid, labelled stable (3,620) or unstable (6,380).
Reaction times τ1–τ4 and price coefficients g1–g4, picked by an ANOVA F-test fitted on training rows only.
400 training rows and 100 holdout rows. Classical and quantum models use exactly these rows.
Three stratified folds of the 400. Feature selection and scaling are refitted inside each fold.
The model, encoding and circuit are chosen by mean validation macro-F1 and nothing else.
Each selected model is retrained on all 400 rows and scored on the 100 holdout rows once.
Every quantum circuit here uses at most 8 qubits; the competition limit is 10. All quantum results are exact, noiseless statevector simulations, so they describe ideal circuits and not hardware.
Before a quantum model can classify a row, the row has to become a quantum state. Fewer qubits is not automatically cheaper or better: the encoding that uses the fewest qubits needs the deepest circuit and scores the worst.
One feature per qubit. Each qubit is rotated by RY(xᵢ).
Two features per qubit. RY for the first, then RZ for the second.
The row, scaled to length 1, becomes the 8 amplitudes of 3 qubits.
Depth and gate counts are measured after transpiling each 8-feature circuit to the gate set rz, sx, x, cx. Scores are from a fidelity-kernel SVM with C = 1 on the three training folds.
Six classical families, three quantum kernels and nine variational circuits, all trained on the same 400 rows and folds. Hover or tab through the rows for details.
Macro-F1 runs from 0 to 1. A model that always answers "unstable" scores about 0.39 here because the classes are unbalanced.
Quantum models have a diamond only if cross-validation selected them, because the holdout was used once per selected model. All six classical families were tuned and scored on the holdout for transparency.
The scores say who won. These five results say why. Every number in this section comes from the training folds, so the holdout stayed untouched.
None of the three encodings applies a gate between two data qubits. Without entanglement, each kernel collapses to a short formula that any laptop evaluates exactly. We checked the formulas against the statevector simulation on 9,600 kernel entries each: they agree to within 2.4e-13.
So the angle-kernel SVM is a valid quantum model and a fair baseline, but its score cannot show a quantum effect. The live circuit at the top of this page is that formula.
Validation macro-F1 on the same angle-scaled inputs. Giving the kernel the same C values as the classical SVM narrows the gap to 0.016.
The amplitude kernel is the squared overlap (x · z)². Squaring throws away the sign, so a row and its mirror image look identical. Our features are standardized around zero, which means half of the geometry folds onto the other half.
The evidence: on the very same unit-length inputs, a plain linear kernel x · z scores 0.783 and the quantum amplitude kernel scores 0.584. Normalization costs a little; the squaring costs about 0.2.
Validation macro-F1, each at its better C, all on the amplitude-normalized inputs. The dashed vector −z always gets the same kernel value as z.
If product states give classical kernels, the natural next step is entanglement. The repository implements three feature maps with RZZ gates and data re-uploading, including one wired like the grid itself, pairing each node's reaction time with its own price coefficient.
On the training folds all three scored below the unentangled angle encoding, and that holds even with the bandwidth α tuned over the grid the encoding's designer recommended (0.1, 0.25, 0.5, 1.0). Tuning helps: the grid-coupled map rises from 0.783 at α = 0.5 to 0.839 at α = 0.1, the custom map peaks at 0.793 and the ultra-dense map at 0.668. Plain angle encoding scores 0.864, and 0.871 at half scale.
The entangled maps improve as α shrinks, which is also as their entangling term fades. This is an exploratory cross-validation result on one dataset, not a verdict on entanglement in general.
Validation macro-F1, mean of three folds, each entangled map at its best bandwidth α and better C (1 or 10). At the default α = 0.5 they score 0.783, 0.732 and 0.629.
Our variational classifier uses 4 qubits, one per grid node, and re-uploads each node's two features in every layer. We changed one design decision at a time across nine variants trained with the same optimizer, folds and restarts.
Letting the circuit learn a scale and shift for each input lifted validation macro-F1 from 0.560 to 0.836 on the same circuit (variant B to variant C). The original fixed-encoding design, variant A, scored 0.650. No other single change came close: flipping the CNOT direction, widening the readout, adding depth or switching to a chain each moved the score by far less, or made it worse. The selected variant, at 0.852, is within fold-to-fold noise of variant C. A standard 8-qubit EfficientSU2 circuit trained the same way stayed near 0.559, so the gain comes from the encoding, not the optimizer.
Validation macro-F1, mean of three folds. The highlighted row was selected and scored on the holdout.
One quantity explains more of our scores than any circuit choice: how far each feature rotates its qubit. The team's first kernel used a Z feature map, a Hadamard followed by a phase of 2x. That is the same separable kernel as angle encoding, rotated twice as far, and the factor of two alone takes validation macro-F1 from 0.864 to 0.698.
The variational circuit ran into the same quantity. Making the input scale trainable is what lifted it from 0.560 to 0.836. Before asking what a circuit entangles, ask how far it rotates.
Validation macro-F1 of the same product kernel at five rotation scales s, better of C = 1 and C = 10, mean of three folds.
All three final models answered the same 100 holdout rows, so we can compare them row by row. Each dot is one row. Only the rows where exactly one model is right carry evidence about which model is better.
One more look at the holdout happened before the encoding comparison: an earlier kernel with a Z feature map was scored on it once (macro-F1 0.644, accuracy 0.71) and then replaced. It chose no model reported here.
Team QEUI, from the Quantum Computing Club at Egypt University of Informatics.
Data engineering and classical baselines.
Quantum encodings and circuit resources.
Quantum kernels and variational classifier.
Research, integration, analysis, report and presentation.
horizon.qeui.gabr.online/report.pdf
The team repositoryNotebooks, source, saved predictions and a validator that recomputes the reported metrics.github.com/SEIF-HAYTHAM/QHorizon-2026
The slidesThe five-minute talk for the closing event on 30 November.horizon.qeui.gabr.online/slides.pdf
The interactive talkThe same nine slides, live: the encodings load real rows and the kernel dial recomputes on our training data. Arrow keys to step through.horizon.qeui.gabr.online/talk