Quantum Computing3 min read

Does quantum machine learning actually help on the smart grid?

Quantum models are usually benchmarked against weak baselines. Here is what happens when you benchmark them honestly — and where they still win.

ByÖnder Eyecioğlu

Most papers claiming a "quantum advantage" in machine learning are comparing a carefully tuned quantum model against a classical baseline that nobody tuned at all. That is not a fair fight, and it is not a useful result.

Bloch Sphere

So when we built QLID-Net, a hybrid quantum–classical network for smart-grid load identification, we made ourselves a rule: the classical baseline gets the same hyperparameter budget as the quantum model. Same search, same compute, same patience.

What we were actually predicting#

Non-intrusive load monitoring (NILM) asks: given only the aggregate power signal at a building's meter, which appliances are running? It is a multi-label classification problem over a signal that is noisy, non-stationary, and — this is the important part — expensive to label.

That last property is why it is a reasonable place to look for a quantum advantage. The theoretical arguments for QML rarely promise faster training. What some of them promise is better generalisation from few samples.

The architecture#

The model is a variational circuit sandwiched between two classical layers:

import pennylane as qml
from pennylane import numpy as np

n_qubits = 8
dev = qml.device("default.qubit", wires=n_qubits)

@qml.qnode(dev, interface="torch", diff_method="backprop")
def circuit(inputs, weights):
    # Angle embedding: each feature becomes a rotation angle.
    qml.AngleEmbedding(inputs, wires=range(n_qubits), rotation="Y")

    # Strongly-entangling ansatz — the part that is actually learned.
    qml.StronglyEntanglingLayers(weights, wires=range(n_qubits))

    return [qml.expval(qml.PauliZ(w)) for w in range(n_qubits)]

The classical encoder compresses 128 spectral features down to the 8 the circuit can accept; the decoder maps the 8 expectation values back out to appliance labels.

The result that mattered#

With the full training set, the classical baseline matched the hybrid model. No advantage. If we had stopped there — as a lot of papers effectively do, in the other direction — the story would have been "quantum wins," and it would have been wrong.

The interesting behaviour only appears when you starve both models of data:

Training samplesClassical F1F_1Hybrid F1F_1Δ
5,0000.9130.916+0.003
1,0000.8710.894+0.023
5000.8040.858+0.054
1000.6120.731+0.119

The gap widens as the data shrinks. At 100 labelled samples the hybrid model is nearly 12 F1F_1 points ahead.

Why this might be happening#

The usual explanation is expressivity: the feature map

ϕ(x)=U(x)0n\phi(x) = U(x)\,|0\rangle^{\otimes n}

lifts the input into a 2n2^n-dimensional Hilbert space, and the induced kernel

k(x,x)=0U(x)U(x)02k(x, x') = \left| \langle 0 |\, U^{\dagger}(x)\, U(x')\, |0 \rangle \right|^{2}

can separate points that a classical kernel of comparable parameter count cannot.

I want to be careful here. That is a plausible mechanism, not a demonstrated one. We measured an effect; we did not prove its cause. The honest summary is:

On this problem, under a matched hyperparameter budget, the hybrid model generalises better from small labelled datasets. We do not yet know how far that finding travels.

What we are doing next#

  • Testing whether the advantage survives on real meter data rather than simulated aggregates.
  • Running on actual quantum hardware, where noise may eat the entire margin.
  • Checking whether a classical model with a comparable inductive bias — not just comparable parameter count — closes the gap.

If the third experiment closes the gap, then what we found is a statement about inductive bias, not about quantum mechanics. That would still be worth knowing.