Quantum robotics: computing, sensing and cognition, each against its classical baseline.
Quantum robotics has three threads, and Quantum Mind is an open-source Python library that covers all of them: quantum computing for robot algorithms (robot problems as optimisation, classical baselines and a Qiskit QAOA adapter), quantum sensing (quantum-limited sensor models fused with classical sensors) and quantum-probability cognition (how people judge, decide and trust, and how a robot should read them, ending in a cost-aware decision: hand over, wait, or ask). It runs on ordinary computers, makes no claim of quantum computational advantage, and reports where the quantum version does no better.
pip install quantum-mind # or "quantum-mind[all]" for Qiskit, plots and RL
1 · Quantum computing for robots
Allocation, grasp selection and scheduling as QUBOs; classical baselines, random sampling as the null, and a Qiskit QAOA adapter.
2 · Quantum sensing for robots
Quantum limits, atom-interferometer and MEMS accelerometer models, and a Kalman filter that fuses them in simulation.
3 · Quantum-probability cognition
COBRA, a context-rotated belief filter, quantum-like models of people and the ask-or-act decision layer, with a ROS 2 node.
Version 3.0.0 · Apache-2.0 · Python 3.10–3.12 · 135 tests in CI · Qiskit, IBM Quantum, Amazon Braket
New in 3.0
Version 3.0 covers all three threads of quantum robotics. General-purpose quantum algorithms (VQE, Grover, quantum
kernels) and quantum-inspired optimisers are left to Qiskit, PennyLane and dedicated optimisation libraries; thread 1 connects to
Qiskit's QAOA instead of re-implementing it. New: quantum_mind.computing, quantum_mind.sensing and COBRA.
Quantum computing for robots
Robot problems as QUBOs, classical baselines and QAOA. On the problems tested, QAOA does no better than random sampling.
Quantum sensing for robots
A quantum accelerometer fused with a MEMS sensor in simulation: large gains without fixes, and none once its bias is as large.
COBRA belief filter
A density-matrix belief whose measurement basis is rotated by the previous frame, with an online mode for robots and two built-in classical limits for ablation.
Robot decision layer
Ask or act with hazard levels, calibration and conformal sets, an orchestration gate, a value-of-information question planner and trust-aware hand-over.
Perception
Detector, speech and gaze adapters; Bayesian, Dempster-Shafer and quantum-like fusion; a quantum Zeno model of bistable perception.
Model atlas and maths
A block diagram for every model and the equations as the code computes them, tested against the code.
Honest validation
Paired tests, ablations and a control task where the new idea is not expected to help. Synthetic data is labelled as such.
16 tutorials
From the introduction to an end-to-end robot loop, ROS 2 and a packaged robot use case, executed on every build.
COBRA: context-rotated belief
The same hand cue means hand over after a look at the robot and retrieve after a look away. A Bayes filter adds the same evidence either way. COBRA keeps the belief as a density matrix and lets the previous frame rotate the basis in which the next reading is measured.
from quantum_mind.belief import COBRA, min_cost_action
model = COBRA(n_hyp=3, n_features=3).fit(frames, intent)
belief = model.start() # online, one frame at a time
for frame in sensor_stream:
p = belief.update(frame) # P(handover, retrieve, withdraw)
action = min_cost_action(p, cost) # hand over, wait or askWhat the benchmark says
On a synthetic task built to contain this kind of context effect, COBRA lowers decision cost by about 0.02 against a Bayes filter with enough training data (significant in 2 of 5 seeds) and is the best calibrated model under noise. With little data it is worse, on a control task with no context effect it is slightly worse than the Bayes filter, and training sometimes misses the mechanism. Full results and figures.
Two-qubit playground
An exact two-qubit simulation running in this page. Apply gates and watch both Bloch vectors move. After a CNOT on a superposition the qubits become entangled: each vector shrinks into the ball and the concurrence rises. Drag a sphere to rotate it.
● qubit 0
● qubit 1
Entanglement (concurrence): 0.000
Tip: H on qubit 0, then CNOT q0 → q1, entangles the pair; a second CNOT undoes it.
The same views in Python, for any Qiskit circuit: circuit_trajectory(qc), animate_bloch,
LiveBloch, plot_entanglement. Checked against Qiskit in the test suite.
Three threads, each tested against its classical limit
Every thread reports a classical baseline and says where the classical method wins. Read the concepts page.
1 · Quantum computing for robots
Robot problems as binary optimisation, with the baselines a quantum result must beat.
- multi-robot allocation, grasp selection, slot scheduling
- QUBO encodings, true objectives, decoders
- greedy, annealing and random-sampling baselines
- Qiskit QAOA adapter (exact simulation)
- solver comparison in robot terms
quantum_mind.computing
2 · Quantum sensing for robots
Quantum-limited sensors and their fusion with classical sensors, in simulation.
- standard quantum limit, Heisenberg limit
- atom-interferometer sensitivity
- MEMS and quantum accelerometer models
- multi-rate Kalman dead reckoning
- where the quantum sensor stops helping
quantum_mind.sensing
3 · Quantum-probability cognition
How people answer, trust and perceive, and how a robot reads them and decides.
- COBRA: context-rotated density-matrix belief
- question order, trust, Bayesian inference, perception
- ask or act, question planning, hand-over
- calibration, conformal sets, fusion, ROS 2
- environments with simulated people
quantum_mind.belief · families · applications · envs
Interactive animations
Generated by the package itself (animate_bloch). Press play, drag the slider, rotate with the mouse.
plot_entanglement).For robots that ask people questions
A robot's questions can change people's answers, and asking about trust can change trust. The robotics layer gives a robot a predicted answer, its uncertainty, and a rule for when to ask instead of act.
from quantum_mind.applications.robotics import HumanModelService
svc = HumanModelService()
svc.add_answer({'order': 'AB', 'answers': [1, 0]})
svc.query({'order': 'AB', 'ask_cost': 1.0, 'error_cost': 3.0})
# prediction, uncertainty (bits), model weights,
# {'action': 'ask' | 'act', 'reason': ...}ROS 2 node
The same service as a ROS 2 package with standard std_msgs/String JSON topics:
answers in, decisions out. integrations/ros2
Its callbacks are tested with stand-in ROS modules; it has not yet been run inside a ROS 2 installation.
Results, reported as measured
Simulated data, small problems; they illustrate the methods and are not a benchmark. Where a classical model wins, the table says so.
| Task | Result |
|---|---|
| Robot allocation, grasp selection and scheduling, QAOA against classical solvers (simulated, 10 instances each) | instances solved to the optimum, out of 30: greedy descent 29 · QAOA depth 2 and 3: 26 · QAOA depth 1: 24 · random sampling with the same 1000 shots 24 · simulated annealing 16 (QAOA is within noise of random sampling; exact simulation, no hardware) |
| Quantum accelerometer fused with a MEMS accelerometer, position RMSE over 300 s (simulated, illustrative sensor values) | no position fixes: fused 10.0 m · MEMS only 339.7 m · quantum only 229.1 m; with a fix every 10 s: fused 0.144 m · MEMS only 0.173 m; the benefit vanishes when the quantum sensor is as unstable as the MEMS sensor (297 m) |
| COBRA vs Bayes filter on a context-dependent intent task (simulated, 5 seeds) | context: cost 0.221 (COBRA) · 0.239 (Bayes filter) · 0.233 (MLP) · oracle 0.147 at 1000 training sequences; paired test significant in 2 of 5 seeds; with 60 sequences COBRA 0.347 against Bayes 0.280; under 1.5x test noise COBRA is best calibrated (cost 0.481 against 0.608) |
| Control task with no context effect (simulated) | expected cost 0.204 (COBRA) · 0.189 (Bayes filter) at 1000 training sequences: COBRA is slightly worse where context does not matter |
| Individual differences (example 11) | a pooled fit selects the quantum-like model for a population that is half anchoring; per-person fits recover all 12 people at about 3,000 answers each |
| Trust as a qubit | P(trust) read from the Bloch vector equals the model's prediction (0.7247) |
| Trust-aware hand-over, 40 simulated sessions of 20 hand-overs (example 16) | mean session cost: order-aware 42.1 · Markov-based 60.9 · always hand over 96.2 (the simulated people follow the open-system model, which favours the order-aware policy by construction) |
| Detector calibration, 5 classes (simulated, example 13) | ECE raw 0.192 · Platt 0.020 · temperature 0.017 · isotonic 0.009; conformal sets reach 0.911 coverage at a 0.90 target |
| Multimodal fusion, held-out log loss (simulated, example 14) | quantum-like 0.759 · Bayes 0.793 · Dempster-Shafer 0.818 (the simulated people follow the quantum-like rule) |
| Bistable perception, dwell times at two check intervals (simulated, example 15) | BIC: quantum Zeno 2796.6 · gamma renewal 3031.8 · Markov switching 3073.8 |
What is and is not claimed
- No quantum advantage is claimed. COBRA is a classical simulation of the quantum-probability formalism; its gain over classical filters is shown only on synthetic data built to contain a context effect.
- No hardware results are included yet. IBM and Braket submission code is tested against local stand-ins (a fake IBM device, the Braket local simulator).
- All data in the examples are simulated or published aggregates, and labelled as such. No study with real people and a robot has been run yet; the validation page lists what is checked and gives a protocol for a pilot.
- In several robotics comparisons the simulated people follow the same model the robot uses, which favours the order-aware method by construction; the tutorials say where.
Get started
pip install "quantum-mind[all]"
# quantum-like: is there an order effect?
from quantum_mind.core import compare
from quantum_mind.families.order_effects import (
QuantumOrderModel4D, BayesOrderModel, AnchoringOrderModel, qq_test)
print(qq_test(counts))
compare([QuantumOrderModel4D, BayesOrderModel,
AnchoringOrderModel], counts)# a robot's belief about what a person wants
import numpy as np
from quantum_mind.belief import COBRA, GaussianBayesFilter
model = COBRA(3, 3).fit(frames, intent) # frames: (N, T, 3)
classical = GaussianBayesFilter(3).fit(frames, intent)
model.predict_proba(new) # context-aware belief
classical.predict_proba(new)
# watch a circuit on Bloch spheres
from quantum_mind.viz import circuit_trajectory, animate_bloch
animate_bloch(circuit_trajectory(qc))Getting started
Install, then fit, compare and simulate in a few lines.
Tutorials
14 step-by-step tutorials with real outputs and figures.
Quantum-like cognition
The background: quantum probability applied to human judgement.
Model atlas
A block diagram for every model, with baselines and references.
Mathematics
The equations of every model, as the code computes them.
19 examples
Robot questioning, trust, hand-over, fusion, perception, calibration and the Bloch viewer.
Which model?
From your problem to the right module, plus a glossary and FAQ.
API reference
Every public class and function with parameters and examples.
Changelog and citing
What changed in each release, and how to cite the library.