Core: states, fitting and comparison#

The building blocks every model uses: linear algebra for states and projectors, the model base class, maximum-likelihood fitting, model comparison and recovery studies. The equations are on the mathematics page.

Legend: blue inputs, violet internal steps, green outputs, coral people, dashed grey classical baselines. Each entry is labelled by origin: Unique to Quantum Mind designed in this library; it builds on the methods cited with it, Published model, extended implements the cited model as published; Quantum Mind adds the capabilities listed, Published method implements the cited method as published, Software tool infrastructure rather than a model; and by category: Quantum-like quantum probability used to model people; runs on an ordinary computer, Quantum computing quantum circuits; run on the simulator or sent to quantum hardware, Classical classical statistics, decision theory or baselines, Mixed combines parts from more than one of these categories.

Lüders rule and answer sequences#

Published method Quantum-like

The probability of a sequence of yes/no answers when each answer projects the belief.

        flowchart LR
    accTitle: Block diagram of Lüders rule and answer sequences
    accDescr: The probability of a sequence of yes/no answers when each answer projects the belief.
    psi["belief ψ"]:::hum --> P1["project on answer 1<br/>P₁ψ"]:::op --> N1["renormalise"]:::op --> P2["project on answer 2"]:::op --> pr["‖P₂P₁ψ‖²<br/>sequence probability"]:::out
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: luders(), sequence_probabilities()

  • Origin: Published method: implements the cited method as published.

  • Category: Quantum-like: quantum probability used to model people; runs on an ordinary computer.

  • Reference: Lüders, G. (1951). Annalen der Physik, 443, 322-328.

Open-system evolution#

Published method Quantum-like

Density matrices that rotate and lose coherence over time (Lindblad equation).

        flowchart LR
    accTitle: Block diagram of Open-system evolution
    accDescr: Density matrices that rotate and lose coherence over time (Lindblad equation).
    rho["density matrix ρ"]:::in --> H["Hamiltonian H<br/>coherent rotation"]:::op
    rho --> L["Lindblad operators<br/>dephasing γ"]:::op
    H & L --> E["exp(t·𝓛) ρ"]:::op --> out["ρ(t)"]:::out
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: lindblad_superoperator(), evolve_density()

  • Origin: Published method: implements the cited method as published.

  • Category: Quantum-like: quantum probability used to model people; runs on an ordinary computer.

  • Reference: Breuer, H.-P., & Petruccione, F. (2002). The Theory of Open Quantum Systems. Oxford University Press.

Model and parameters#

Software tool Classical

Base class: declares parameters with ranges, predicts answer distributions, simulates data and computes the log-likelihood.

        flowchart LR
    accTitle: Block diagram of Model and parameters
    accDescr: Base class: declares parameters with ranges, predicts answer distributions, simulates data and computes the log-likelihood.
    th["free parameters<br/>(unbounded vector)"]:::in --> map["Param transforms<br/>prob · angle · bounded"]:::op --> m["model.predict(design)"]:::op
    m --> ll["loglik(data)"]:::out
    m --> s["sample(design, n)"]:::out
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: Model, Param

  • Origin: Software tool: infrastructure rather than a model.

  • Category: Classical: classical statistics, decision theory or baselines.

Fit, compare and recover#

Published method Classical

Multi-start maximum likelihood; AIC/BIC comparison; parameter and model recovery studies.

        flowchart LR
    accTitle: Block diagram of Fit, compare and recover
    accDescr: Multi-start maximum likelihood; AIC/BIC comparison; parameter and model recovery studies.
    D[("counts per condition")]:::in --> F["multi-start optimiser<br/>Nelder-Mead"]:::op --> R["FitResult<br/>params · loglik · AIC · BIC"]:::out
    R --> C{"compare<br/>lowest BIC wins"}:::op
    G["simulate from each model"]:::in --> F
    C --> REC["recovery matrix"]:::out
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: fit(), compare(), recovery()

  • Compared with: every model is compared with its classical baselines this way

  • Tutorial: Introduction to Quantum Mind

  • Origin: Published method: implements the cited method as published.

  • Category: Classical: classical statistics, decision theory or baselines.

  • Reference: Burnham, K. P., & Anderson, D. R. (2002). Model Selection and Multimodel Inference (2nd ed.). Springer.

Individual differences#

Published method Classical

Fit each person separately and compare pooled with per-person models.

        flowchart LR
    accTitle: Block diagram of Individual differences
    accDescr: Fit each person separately and compare pooled with per-person models.
    P[("data per person")]:::hum --> I["fit each person"]:::op --> S["sum of BICs"]:::out
    P --> Po["pooled fit"]:::base --> S2["pooled BIC"]:::out
    S & S2 --> V{"which explains people better?"}:::op
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: fit_individuals(), compare_individuals()

  • Compared with: pooled model

  • Origin: Published method: implements the cited method as published.

  • Category: Classical: classical statistics, decision theory or baselines.

Uncertainty, online updating and informative questions#

Unique to Quantum Mind Classical

Three tools that work with every model: bootstrap intervals for parameters and predictions, a per-person posterior updated after every answer, and the choice of the condition (question, order or display) that best tells competing models apart.

        flowchart LR
    accTitle: Block diagram of Uncertainty, online updating and informative questions
    accDescr: Three tools that work with every model: bootstrap intervals for parameters and predictions, a per-person posterior updated after every answer, and the choice of the condition (question, order or display) that best tells competing models apart.
    F["fitted model<br/>(population)"]:::in --> B["bootstrap<br/>simulate · refit"]:::op --> CI["parameter and<br/>predictive intervals"]:::out
    F --> O["particles around the estimate"]:::op
    A["one answer from this person"]:::hum --> O --> PP["per-person posterior<br/>predictive"]:::out
    PP & M2["competing models"]:::base --> IG["information gain per condition<br/>H(mix) − Σ w H(p)"]:::op --> Q["ask the most<br/>informative question"]:::out
    A --> MP["model posterior"]:::out
    classDef in fill:#0b2a4a,stroke:#79c0ff,color:#e6edf3
    classDef op fill:#2a1b3d,stroke:#d2a8ff,color:#e6edf3
    classDef out fill:#0f2e1a,stroke:#7ee787,color:#e6edf3
    classDef hum fill:#3d1414,stroke:#ff7b72,color:#e6edf3
    classDef base fill:#262626,stroke:#8b949e,color:#e6edf3,stroke-dasharray:4 3
    
  • API: bootstrap(), OnlinePersonModel, information_gain(), rank_conditions(), model_posterior()

  • Compared with: point estimates of one pooled fit (how the source papers report the models)

  • Origin: Unique to Quantum Mind: designed in this library; it builds on the methods cited with it.

  • Category: Classical: classical statistics, decision theory or baselines.

  • Reference: Myung, J. I., & Pitt, M. A. (2009). Psychological Review, 116(3), 499-518; Chopin, N. (2002). Biometrika, 89(3), 539-551; Efron, B., & Tibshirani, R. J. (1993). An Introduction to the Bootstrap.