Please read through the jupyter notebook named grover_scheduling.ipynb .

Insert Quantum Pun Here: Should Master Planner go quantum? Inspiration Our client, Master Planner, builds staff schedules for other businesses. A competitor started advertising “quantum-powered scheduling,” and they wanted to know whether to get on board.

What it does We took one day of staffing at a care facility (4 staff, Day/Night shifts, 11 real rules like “an RN on every shift,” “no doubles,” and a budget cap) and turned it into a Grover search problem on 8 qubits. Then we checked whether Grover’s speedup survives contact with reality.

How we built it Each yes/no shift decision is one qubit, so 8 qubits = 256 possible schedules, and only 3 pass every rule. Every rule becomes a quantum gate. A counter of broken rules flips the sign of a schedule only when that count is zero (that’s the oracle). We ran Grover in Qiskit Aer, with and without noise, and compared it against brute force, backtracking, and Google’s OR-Tools CP-SAT solver on the exact same rules. We also counted gates as we added rules, and ran CP-SAT on full-size facility weeks.

What we found Grover works. It found a valid schedule 99.7% of the time, and the simulation matched theory almost exactly. It needs ~8 queries vs. ~64 for brute force, a √N speedup. But each “query” is about 2,300 two-qubit gates, and it grows with every rule you add. At today’s hardware error rates (~1 in 1,000), the 8-qubit run did no better than random guessing. CP-SAT solved a real 30-person week (2⁶³⁰ possible schedules) in a few milliseconds.

Our recommendation: pass for now and stick with classical solvers.

What we learned How Grover works, why the oracle is the expensive part, and how much a quadratic speedup shrinks once you count gates and noise.

Built with Python, Qiskit, Qiskit Aer, Google OR-Tools (CP-SAT), NumPy, pandas, Matplotlib, pytest. Everything ran on a CPU simulator with no quantum hardware.

Built With

  • qiskit
Share this project:

Updates

Submission history