Inspiration
I wanted to see what actually happens to textbook quantum algorithms once noise, finite shots and a fixed resource budget are taken seriously. The three challenges cover that from three angles: security (E91), speed-up (Grover) and chemistry (VQE).
What it does
- E91 quantum key distribution: prepares Bell pairs, measures along random directions, sifts a key, runs the CHSH test and detects an intercept-resend eavesdropper. A weighted least-squares fit over all nine setting pairs separates an eavesdropper from ordinary depolarizing noise, and answers "inconclusive" when the data cannot tell.
- Grover search under noise: finds a hidden key of 2 to 8 bits, then measures how depolarizing and bit-flip noise lower the success probability and shift the best number of iterations, compared against a classical attacker given the same number of queries.
- VQE for LiH: builds the qubit Hamiltonian from molecular integrals with the Jordan-Wigner mapping, tapers it from 6 to 4 qubits using the two number-parity symmetries, and optimises a 5-CNOT ansatz on a noisy, shot-limited simulator within the official budget.
How we built it
Python with Qiskit 2.6 and Qiskit Aer 0.18, plus NumPy, SciPy and Matplotlib. Each function was tested outside the notebook against independent reference calculations, with several random seeds and five-standard-error tolerances, and every notebook was re-run in a fresh kernel with seeds other than the default.
Challenges we ran into
- Telling an eavesdropper from noise. Both lower the CHSH value and raise the error rate. Only the pattern across all nine correlations differs, and for a weak eavesdropper under heavy noise it cannot be resolved with 30,000 rounds.
- Circuit depth in Grover. The two-qubit gate count per iteration grows quickly after transpilation (2, 12, 28, 72, 164 for 2 to 6 qubits), so noise overtakes the speed-up within a few qubits.
- Noise versus expressivity in VQE. Each two-qubit gate costs about 1 mHa of energy under the given noise model, so the ansatz had to be as short as possible while still able to represent the ground state.
- Noisy optimisation. Every energy is a finite-shot estimate, so gradient-based optimisers were unsuitable; I used sequential one-parameter minimisation that exploits the trigonometric shape of the energy.
Accomplishments that we're proud of
- A VQE ansatz with 5 two-qubit gates against a limit of 40, reaching chemical accuracy for the ideal state at all nine public bond lengths in my tests.
- A shot-budget strategy for Grover that never exceeded its budget in any test, including very small and non-divisible budgets.
- Results that hold across seeds rather than once: every statistical claim was checked on multiple fresh seeds.
What we learned
- A Bell violation certifies entanglement, not a secure key; the security proof needs more.
- Grover's quadratic speed-up is fragile: under realistic gate noise the advantage over a fair classical baseline disappears at small sizes.
- In VQE, the ideal energy, the noisy energy and the finite-shot estimate are three different quantities, and a good result needs all three under control.
What's next for Qiskit challenge
- Error mitigation for the VQE, such as zero-noise extrapolation, to recover the noise-induced energy shift.
- An additional Y-basis measurement in E91, which would expose an eavesdropper who measures in the x-z plane.
- Running the three workflows on real IBM Quantum hardware.
Built With
- qiskit
