What Quantum Mind adds to published models#

Most models in this library were published by other researchers, and each model atlas entry cites its source. The atlas labels every entry by origin: Unique to Quantum Mind, Published model, extended, Published method or Software tool.

The papers report a model as point estimates fitted once to a group of people. A robot works with one person at a time, needs to know how sure it is, and has to choose what to ask next. Three tools in quantum_mind.core give every people model those abilities, quantum-like or classical, which is what the “extended” label refers to. The equations are on the core mathematics page.

Tool

What it gives

Works with

bootstrap()

Intervals for parameters and for predicted answer probabilities

every model

OnlinePersonModel

A per-person posterior, updated after every answer, starting from the population fit

models fitted by likelihood

rank_conditions(), model_posterior()

The question, order or display that best tells competing models apart, and the model probabilities after each answer

models fitted by likelihood

Example: one person, live#

import numpy as np
from quantum_mind import fit, bootstrap, OnlinePersonModel
from quantum_mind.core import rank_conditions, model_posterior
from quantum_mind.families.order_effects import QuantumOrderModel4D, BayesOrderModel

group = {'AB': [40, 10, 20, 30], 'BA': [30, 20, 10, 40]}     # answers from earlier participants
q = fit(QuantumOrderModel4D, group)
b = fit(BayesOrderModel, group)
print(bootstrap(q, group, n_boot=50).predictive_interval()['AB'])   # how sure the robot is

person = OnlinePersonModel(QuantumOrderModel4D, prior=q, prior_scale=0.5)
print(rank_conditions([q.model, b.model], ['AB', 'BA']))      # which order to ask in
person.update('AB', 0)                                        # the person said yes, yes
print(model_posterior([q.model, b.model], {'AB': [1, 0, 0, 0]}))
print(person.predict()['BA'])                                 # this person's predicted answers

The bootstrap needs repeated fits, so it belongs before or between interactions. The online model and the design functions cost a fraction of a second per answer and can run during one.

For robots#

Four published robotics methods are extended in the same spirit, and one method is new to this library.

Published method

Quantum Mind’s extension

Split conformal prediction

AdaptiveConformalSets: sets for a person’s next answer that keep their long-run coverage while the person changes, with a guaranteed bound; the robot asks when the set holds more than one answer

Partial pooling

PersonalisedHumanModel(method='online'): a full per-person posterior from the population prior, with credible intervals

Task allocation QUBO

trust_aware_allocation(): expected failures of robot-assisted steps from each person’s trust in the robot, plus workload; solved exactly or exported as an Ising model

Reinforcement learning against a fixed simulated person

sample_people() and the people= option of the environments: a new simulated person every episode, drawn from a fitted model’s uncertainty

(new) Bayes filtering of sensor frames

COBRA: a density-matrix belief whose measurement basis is rotated by the previous frame, with the Bayes filter and an incoherent filter as built-in limits

What was measured: the adaptive conformal sets keep their coverage while the robot learns a new person, and the trust-aware allocation changes the plan whenever a person’s trust in the robot is low (both on simulated people). COBRA’s gain over a Bayes filter is shown on a synthetic task built to contain a context effect, with a control task, ablations and paired tests (benchmarks/context_intent_benchmark.py); it has not been tested on human data.