Delayed discharge, stated as a QUBO
A patient who is medically fit to leave but has nowhere safe to go occupies a bed that an admission needs. It is the clearest place where the third shift — hospital to community — is not rhetoric but arithmetic: the bed is either released or it is not.
A persistent shortage of beds has helped make corridor care — treating patients in temporary escalation spaces such as corridors and waiting rooms — an everyday occurrence. The BMA, the Royal College of Nursing and others have co-signed a call for urgent action to eliminate it.
The service picture
Against an OECD EU average of 4.6 and 7.8 in Germany. The UK sits near the bottom of the comparator table.
NHS hospital beds data analysis (BMA, last updated January 2025)Average daily available beds fell from 153,725 to 140,978. Overnight beds fell 10%; day-only beds rose 13.4%.
NHS hospital beds data analysis (BMA, last updated January 2025)Average occupancy has exceeded 85% every year since 2010. 85% is the level generally taken as the point beyond which safety and efficiency are at risk; many trusts exceed 95% in winter.
NHS hospital beds data analysis (BMA, last updated January 2025)Patients who are medically fit to leave but remain in hospital because there is no social-care capacity to receive them. This is the delay the third shift has to solve.
BMA analysis, citing The Guardian (13 November 2022) on hospital beds occupied by patients fit for dischargeWhich is why prevention (shift 2) and discharge (shift 3) are the same problem observed at two different times.
NHS hospital beds data analysis (BMA, last updated January 2025)An ageing population arriving acutely, into a system whose discharge route depends on social care that is not sized for it.
NHS hospital beds data analysis (BMA, last updated January 2025)Why the delay happens
The reason codes matter for the formulation, because most of them are capacity constraints on the community side rather than anything the hospital can reschedule. Only the placement decision itself is a choice.
- Awaiting a social-care package at home — Domiciliary care capacity, not hospital capacity, is the binding constraint. Commonly the largest single category.
- Awaiting a care-home or nursing-home placement — Placement availability is geographically lumpy: the right bed may exist twenty miles from the patient's family.
- Awaiting rehabilitation or an intermediate-care bed — Discharge-to-assess models depend on step-down capacity that competes with the same community workforce.
- Awaiting assessment or funding decision — Continuing healthcare and social-care assessments add process latency independent of physical capacity.
- Housing, safeguarding, or no fixed abode — A small number of patients with very long delays, disproportionately from the most deprived quintile.
The formulation
Patients waiting for discharge are matched to community placements. Each patient takes at most one placement; each placement has a capacity; a placement only accepts a patient whose care level and locality it can serve. The objective rewards released bed-days, weighted by an equity term that up-weights patients in the most deprived quintile, in the spirit of Core20PLUS5. Constraints enter as quadratic penalties, giving a QUBO on 12 binary variables (4 patients × 3 placements).
| Patient | Care level | IMD quintile | Days delayed | Locality | Equity weight |
|---|---|---|---|---|---|
| P0 | home support | 1 | 20 | 0 | 1.00 |
| P1 | home support | 3 | 11 | 0 | 0.35 |
| P2 | nursing | 1 | 2 | 3 | 1.00 |
| P3 | reablement | 1 | 17 | 3 | 1.00 |
Instance seed 7; penalty weights A=12, B=12, equity E=2. The data is synthetic. No patient record, real or derived, is used anywhere in this project.
Results
- Exhaustive search (optimum)
- 0.100
- Greedy
- 0.100 (gap 0.000)
- Simulated annealing
- 0.100 (gap 0.000)
- Uniform random, mean
- 173.69
The optimum places 3 of 4 patients, including 2 of 3 in the most deprived quintile. Greedy and annealing both find it instantly.
- Depth
- p = 1
- Grid
- 6 × 6 (γ, β), 512 shots each
- Backend
- selene_sim Quest, ideal
- Best cell, mean energy
- 168.91
- Random mean
- 173.69
- Highest P(optimal)
- 0.39%
- Circuit
- 60 CX, 42 RZ
Verdict recorded in the payload: qaoa_p1_beats_random_not_classical. A depth-1 QAOA shifts the sampled mean below uniform random and does find the optimum in a handful of shots, but it is nowhere near a solver that returns it deterministically.
The (γ, β) landscape
Each square is one Selene cell: darker is a lower mean energy, i.e. better. The structure is shallow, which is what a depth-1 ansatz on a heavily penalty-dominated QUBO should look like.
Dot = the optimum appeared in that cell's shots. γ increases down, β across.
Reproducing it
Model, kernel and sweep live in quantum/discharge/. The sweep writes one JSON file per cell into a resumable cache, then emits the committed payload this page reads. Nothing is computed at request time.
python3 -m quantum.discharge.smoke # one 12-qubit cell python3 -m quantum.discharge.sweep # 36 cells -> src/data/demos/nhs_discharge_qubo.json
Sources
- NHS hospital beds data analysis (BMA, last updated January 2025)
- NHS England — UEC daily situation reportsno-criteria-to-reside series; re-check the live release before quoting a figure
- NHS England — bed availability and occupancy
- Bagust, Place & Posnett, BMJ 1999 — Dynamics of bed useorigin of the 85% occupancy threshold
- NHS England — Core20PLUS5 (adults)basis for the equity weighting in the objective