Qiskit Fall Fest 2026 · Healthcare

One home visit.
Four test kits.
Which relatives do we test?

A planning tool for beta-thalassaemia cascade screening in Pakistan. It picks the relatives whose tests are expected to reveal the most at-risk couples, using a QAOA circuit in Qiskit that cannot break the kit limit, and it checks every answer against the exact optimum.

1The problem in Pakistan

Thalassaemia runs in families. Test kits and field visits do not stretch that far.

Thalassaemia major appears when both parents are carriers. Screening teams start from a family that already has an affected child and test the relatives. This is cascade screening. Kits, laboratory capacity and home visits are limited, so on every visit someone has to choose who gets tested.

0%
of people in Pakistan carry beta-thalassaemia1
0
children born with thalassaemia major each year, an estimate1
0%
of tested relatives in families with an affected child were carriers, against 0 of 397 in control families1
0%
of ever-married women are married to a first cousin3

Cascade screening finds couples

In the study that introduced it in Pakistan, 17 of 214 married couples in families with an affected child were both carriers, which is 8%. Among 350 randomly chosen pregnant women there was no at-risk couple at all.1

Field capacity is limited

The Punjab Thalassaemia Prevention Project covers all 36 districts of Punjab from nine regional centres with 48 field officers, and reports that uptake of cascade testing among relatives is low.2

The law is moving

In 2026 the National Assembly and the Senate passed a compulsory thalassaemia screening bill for the Islamabad Capital Territory. It asks for premarital screening reports and for screening and counselling of patients' blood relatives.4

Who it serves. Field officers planning one home visit, and programme managers spreading kits across families. Every family in this project is synthetic and seeded. No patient data is used anywhere.

2Why it is an optimisation problem

The value sits on couples, not on individuals.

An at-risk couple can only be confirmed when both partners are tested. One test can rule a couple out, but it can never confirm one. So the best choice depends on pairs of people, and the obvious rule, test whoever is most likely to be a carrier, spends kits on people whose partners go untested.

One kit used. No at-risk couple can be confirmed.
Two kits used. At-risk couple found with probability w.

Pair risk is not a product of single risks

The father of an affected child is a carrier, so almost surely exactly one of his own parents is. Each grandparent alone is a carrier with probability 51%, yet both together only with probability 2.6%.

2.6%
exact joint probability from the pedigree engine
26%
what multiplying the two single probabilities would give

The simple rule misses the best plan

On 50 seeded families with 10 relatives and 4 kits, "test the highest carrier probabilities" missed the best plan in of them.

of the best plan's value, on average, with 10 relatives
with 16 relatives and 5 kits
3Formulation

Choose exactly k relatives to maximise the expected number of at-risk couples found.

maxx ∈ {0,1}n   ∑(i,j) ∈ C cij wij xi xj  +  λ ∑i ri pi xi subject to   ∑i xi = k

expected at-risk couples found, exact and not an approximation    a small reward for single carriers found

Variables, objective, constraint

ElementDefinition
xi1 if relative i is tested in this visit, otherwise 0
wijprobability that i and j are both carriers, computed from the family tree
cijprobability that the couple link is real: 1 for married or engaged, lower for a possible future match between cousins
piprobability that i is a carrier
rirelevance of knowing: 1.0 unmarried or engaged adult, 0.7 married, 0.5 child, 0.1 elder
λweight of the single-carrier term, 0.05 by default
Constraintexactly k people are tested; people who are absent or decline are fixed to 0

Where the weights come from

A pedigree engine applies Mendel's rules to the family tree, given the affected child and a 5% population carrier rate, and computes every probability exactly, loops from cousin marriages included. It is checked against textbook values before any optimisation runs.

Relative of the affected childTextbookEngine

Test instances

SizeRelatives (qubits)Kits kValid plansUsed for
S104210brute force, noise study, the live plan below
M1654,368main simulator results, trade-off curve
L48 in 4 linked families12about 7 × 1010exact integer programme, decomposition
4Live plan

One synthetic family, five ways to spend the kits.

Instance : relatives can be tested and there are kits. Switch between the plans. Hover a person to see the carrier probability the engine computed.

man woman affected child married engaged possible match number = carrier probability
5Quantum method

A circuit that can only output plans with exactly k kits.

The objective is a sum over pairs of yes-or-no decisions, which is the native form of the Quantum Approximate Optimization Algorithm.7 The kit limit is enforced by the structure of the circuit, as in the quantum alternating operator ansatz, so it needs no penalty term.8, 5

Problem pieceQuantum pieceQiskit building block
Is relative i tested?Qubit i, state |1⟩ means testedQuantumCircuit
Couple weight cijwijZZ rotation on qubits i and jrzz, SparsePauliOp
Single weight λripiZ rotation on qubit irz
Exactly k testsDicke start state and XY ring mixercx, cry, ry, XXPlusYYGate
Tuning the anglesClassical optimiser loopAer EstimatorV2 + SciPy COBYLA
Reading out plansSampling the circuitAer SamplerV2
Step 1

One qubit per relative

Measuring a qubit as 1 means "test this person". A measured bitstring is a complete screening plan. Ten relatives need ten qubits.

Step 2

Start in a Dicke state

The start state is an equal superposition of every plan that uses exactly k kits and nothing else. Qiskit has no built-in Dicke state, so the circuit is built from gates with the deterministic scheme of Bärtschi and Eidenbenz: order k·n gates and no helper qubits.6

Step 3

Cost layer on the couple graph

One ZZ rotation per couple link and one Z rotation per relative. Each plan picks up a phase proportional to its objective value. A test confirms that the circuit energy equals the objective for every one of the 2n inputs.

Step 4

XY ring mixer

Each XX+YY rotation swaps a tested and an untested neighbour. The number of ones never changes, so the circuit moves amplitude between valid plans only.9 Cost and mixer are repeated p times.

Step 5

Tune, then measure

The Estimator primitive returns the expected objective, COBYLA tunes the 2p angles, and the Sampler primitive reads out plans. Deeper circuits start from the tuned angles of the previous depth.10 The best measured plan goes to the field officer.

q0q1q2q3q4q5 repeated p times, angles γ and β tuned by COBYLA Dickestate exactly k ones RZRZRZRZRZRZ cost: ZZ on couples mixer: XX+YY swaps 101001 a valid plan

Baseline: penalty QAOA

Standard QAOA starts from all 2n bitstrings and subtracts a penalty A·(∑xi − k)2 for using the wrong number of kits. That needs a ZZ rotation on every pair of qubits, and the optimiser spends its effort on the penalty. At depth 3 with 16 qubits only of its shots are valid plans.

How hard is the problem?

With equal weights it is the densest-k-subgraph problem, which is NP-hard, and the best known efficient algorithm only guarantees a factor of about n1/4.12 That is a worst-case statement about general graphs. Family graphs are sparse, and section 8 says plainly what that means for the instances here.

Our one-sentence answer to "why quantum"We do not claim a speedup. We show a problem QAOA represents directly, a circuit that cannot break the kit limit, and an honest comparison against exact answers.
6Architecture

Classical code prepares and checks. The quantum circuit proposes the plans.

1  Family generatorpedigree.pyseeded synthetic familiescousin and exchange marriages 2  Genetics enginegenetics.pyMendel's rules, exact inferencecarrier p and couple w 3  Problem builderproblem.pyobjective and exactly-k ruleQUBO and Ising coefficients 4  Classical referencesclassical.pybrute force, integer programmefield rule, greedy, annealing 5  Quantum module in Qiskit Circuitcircuits.pyDicke state, RZZcost, XY mixer Estimatorqaoa.pyexpected value,COBYLA tunes angles Samplerqaoa.py, noise.pymeasured plans,noise model 6  Decompositiondecompose.pysplit along couple linksone circuit per componentdynamic programme sharesout the kits 7  Evaluationevaluate.py, plots.pyquality, chance of best planvalid shots, noise sweeptrade-off curvefixed seeds, saved results 8  Outputsscreening plan on the family tree  |  results and figures  |  report and this website

Parts 1 to 4 and 6 to 7 are classical Python. Part 5 is the quantum component: the circuit is built, tuned and sampled through Qiskit primitives on the Aer simulator. The plan that reaches the field officer is a measured bitstring from that circuit.

7Results

Measured against the exact answer, every time.

All runs are noise-free statevector simulations unless stated, with fixed seeds. Quality is the expected value of a measured valid plan, scaled so that the worst valid plan is 0 and the best is 1; shots that break the kit limit are discarded first.

quality of constrained QAOA at depth 3 on 16 qubits. A random valid plan scores .
×
higher chance, on average over families, that one shot is the best plan than a random valid pick (median ×); 16 qubits, depth 3
100%
of constrained-QAOA shots use exactly k kits. Penalty QAOA: .
people
in linked families solved to the proven optimum with circuits of at most qubits; the pieces are small, so this is a scaling route, not an advantage

Is the problem trivial? No.

10 relatives, 4 kits

Value of each rule's plan divided by the best plan. One dot per seeded family; the bar is the mean.

16 relatives, 5 kits

The field officer's rule never found the best plan. Simulated annealing almost always did.

QAOA against random picks and the field rule

Constrained QAOAPenalty QAOARandom valid planField officer's rule

Quality, 10 qubits

Mean over families; whiskers are one standard deviation.

Quality, 16 qubits

Mean over families. Penalty QAOA stays near the random line.

Chance that one shot is the best plan, 10 qubits

Percent per shot, log scale.

Chance that one shot is the best plan, 16 qubits

Percent per shot, log scale.

Where the shots land

Share of valid shots by plan quality, live-plan instance. QAOA moves weight towards better plans.
Random valid planConstrained QAOA, p = 1Constrained QAOA, p = 3
worst planplan qualitybest plan

Valid shots and circuit cost

Share of shots with exactly k kits (noise-free), then two-qubit CZ gates after transpilation, depth 1.

Basis RZ, SX, X, CZ with all-to-all connectivity, optimisation level 3. The constrained circuit pays for its Dicke start state.

Under noise

Aer noise model on the 10-qubit instances: a depolarising error after every CZ gate (the horizontal axis shows its probability), a tenth of that on single-qubit gates, and a readout error at twice the CZ rate. Shots without exactly k ones are discarded and the surviving share is reported. No real quantum processor was used.

Constrained, p = 1Constrained, p = 2Penalty, p = 1Penalty, p = 2

Valid shots

Percent of shots with exactly k kits.

Quality of valid shots

Dotted line: random valid plan.

Chance of the best plan

Percent per shot, all shots counted.

Couples against carriers

Sweeping λ trades at-risk couples found against single carriers found, an idea borrowed from multi-objective QAOA.11 Instance , shots in total.
Exact trade-off frontBest plans among QAOA shotsField ruleRelevance rule

Linked families: 48 relatives, 12 kits

Value divided by the proven optimum of an integer programme, mean of networks.

Full table

Every number comes from results/benchmark.json, produced by python -m kinship.evaluate all.

Quality is computed over valid shots; "best plan per shot" counts all shots. Shots for 95%: shots needed to see the best plan with 95% probability, median over families. Returns the best plan: for classical rules, the share of families where the rule's plan is optimal; for QAOA, the share where the best of 4,096 measured plans is optimal.

8Limitations and what did not work

What the numbers do not show.

No quantum speedup

Brute force gives the exact answer for the 10- and 16-qubit instances in milliseconds, and simulated annealing found the best plan in of the 16-qubit families. At these sizes a classical solver wins. Tuning the angles for one 16-qubit family alone took about circuit evaluations, to choose among 4,368 plans. This is a method study on a new problem.

Family graphs are sparse

The couple graph splits into small pieces: the largest connected component has people on average in the 16-relative families (at most ). An exact dynamic programme over those pieces solves the problem, so worst-case hardness results do not apply to these instances.

Expected quality is modest

At depth 3 constrained QAOA reaches on 16 qubits. A classical greedy heuristic reaches . QAOA beats the field rule and random picks, not the stronger classical heuristics.

Penalty QAOA barely beats random

Its valid shots score against for a random valid plan on 16 qubits, and of its shots break the kit limit at depth 3.

A cheaper start state failed

Starting from the field officer's plan instead of the Dicke state needs only k X gates, but at depth 3 its chance of the best plan was against for the Dicke start, on small instances.

Noise costs most of the shots

The Dicke start state alone takes CZ gates on 10 qubits. At 1% two-qubit error only of constrained shots still use exactly k kits.

Simulator only

No real quantum processor was used. The noise model is generic and assumes all-to-all connectivity; on a line of qubits the depth-1 circuit grows from to CZ gates.

Sampling flatters small instances

With thousands of shots and only 210 or 4,368 valid plans, even uniform sampling usually contains the best plan. That is why the charts report the chance per shot and the expected quality, not the best of all shots.

Synthetic families, simple genetics

Families are generated, not observed. The average carrier share among testable relatives is against 31% in the 2002 study. The model covers one visit, one gene, a perfect test, and no step-by-step testing. The kit budget as the binding limit and the field officer's rule as the baseline are our assumptions, not programme protocol.

Ethics

A tool that ranks relatives by genetic risk can stigmatise people. This one uses synthetic data only, treats consent as an input (anyone who declines is fixed to "not tested"), publishes no individual scores, and is meant to support a counsellor's plan for one visit, not to label people or to decide who may marry.

What we would do next

Ask a thalassaemia centre whether kits, laboratory slots or officer time is the real limit; model step-by-step testing where one result updates the next choice; calibrate families against programme data; and run the smallest instance on a real IBM processor with angles trained on the simulator.

9Reproduce and credits

Run it yourself in four commands.

# Python 3.11 or later
pip install -r requirements.txt
python -m kinship.demo            # one family, one plan, about 20 s
python -m kinship.evaluate all    # every number on this page
pytest                            # 57 checks

Versions used: Qiskit , Qiskit Aer , NumPy , SciPy , Python . Results generated .

Deliverables

Code and resultsgithub.com/AbdulAHAD968/Qiskit-IBM
Report with architecture diagramreport/Kinship_QAOA_Report.docx
Benchmark reportDOCS/BENCHMARKS.md
Limitations and ethicsDOCS/LIMITATIONS.md
SB
Syed Muhammad Saad Bukhari
Team member
AA
Abdul Ahad
Team member
F
Faizan
Team member

References

  1. Ahmed S, Saleem M, Modell B, Petrou M. Screening extended families for genetic hemoglobin disorders in Pakistan. N Engl J Med. 2002;347(15):1162-1168. doi:10.1056/NEJMsa013234
  2. Ahmed S, Jafri H, Faran M, Ahmed WN, Rashid Y, Ehsan Y, Ahmed M. Cascade screening for beta-thalassaemia in Pakistan: relatives' experiences of a decision support intervention in routine practice. Eur J Hum Genet. 2022;30(4):406-412. doi:10.1038/s41431-021-00974-y
  3. National Institute of Population Studies and ICF. Pakistan Demographic and Health Survey 2017-18. 2019. See also Iqbal S et al. BMC Women's Health. 2022;22:118. doi:10.1186/s12905-022-01704-2
  4. Dawn, 11 March 2026, report on the National Assembly passing the Islamabad Capital Territory compulsory thalassaemia screening bill, dawn.com/news/1980653; Associated Press of Pakistan, 11 May 2026, report on its passage by the Senate.
  5. Cook J, Eidenbenz S, Bärtschi A. The Quantum Alternating Operator Ansatz on Maximum k-Vertex Cover. IEEE QCE 2020, 83-92. arXiv:1910.13483
  6. Bärtschi A, Eidenbenz S. Deterministic Preparation of Dicke States. FCT 2019, LNCS, 126-139. arXiv:1904.07358
  7. Farhi E, Goldstone J, Gutmann S. A Quantum Approximate Optimization Algorithm. 2014. arXiv:1411.4028
  8. Hadfield S et al. From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz. Algorithms. 2019;12(2):34. doi:10.3390/a12020034
  9. Wang Z, Rubin NC, Dominy JM, Rieffel EG. XY mixers: analytical and numerical results for the quantum alternating operator ansatz. Phys Rev A. 2020;101:012320. arXiv:1904.09314
  10. Zhou L, Wang S-T, Choi S, Pichler H, Lukin MD. Quantum Approximate Optimization Algorithm: Performance, Mechanism, and Implementation on Near-Term Devices. Phys Rev X. 2020;10:021067. arXiv:1812.01041
  11. Kotil A et al. Quantum approximate multi-objective optimization. Nat Comput Sci. 2025;5:1168-1177. arXiv:2503.22797
  12. Bhaskara A, Charikar M, Chlamtac E, Feige U, Vijayaraghavan A. Detecting high log-densities: an O(n^1/4) approximation for densest k-subgraph. STOC 2010, 201-210. arXiv:1001.2891