SPDX-License-Identifier: AGPL-3.0-or-later¶
Commercial license available¶
© Concepts 1996–2026 Miroslav Šotek. All rights reserved.¶
© Code 2020–2026 Miroslav Šotek. All rights reserved.¶
ORCID: 0009-0009-3560-0851¶
Contact: www.anulum.li | protoscience@anulum.li¶
scpn-quantum-control — Key Equations¶
Key Equations¶
This page collects every equation implemented in scpn-quantum-control, from the
foundational Kuramoto-to-qubit mapping through the 33 research gems that probe the
synchronization transition. Each equation is accompanied by the module that implements
it and the physical intuition behind it.
Equation Dependency Tree¶
Every equation in the codebase descends from the foundational Kuramoto → XY mapping. The tree below shows which equations feed into which — follow any path from root to leaf to trace a complete physical argument.
graph TD
KODE["Kuramoto ODE\nd θ/dt = ω + ΣK sin(Δθ)"] --> HXY["XY Hamiltonian\nH = -ΣK(XX+YY) - Σω Z"]
HXY --> TROTTER["Trotter evolution\nU(t) ≈ [e^{-iH_XY Δt} e^{-iH_Z Δt}]^n"]
HXY --> VQE["VQE ground state\nmin ⟨ψ(θ)|H|ψ(θ)⟩"]
HXY --> ORDER["Order parameter\nR = |Σ(⟨X⟩+i⟨Y⟩)|/N"]
HXY --> XXZ["XXZ extension\nH + Δ·ΣK·ZZ"]
TROTTER --> UPDE["16-qubit UPDE\nspin chain"]
TROTTER --> FLOQUET["Floquet DTC\nK(t) = K₀(1+δ cos Ωt)"]
VQE --> QFI["QFI\nF_Q ∝ 1/Δ²"]
VQE --> ENTROPY["Entanglement entropy\nS ~ (c/3) ln L"]
VQE --> MAGIC["Magic\nM₂ = -log₂(ΣP⟨P⟩⁴/2^N)"]
VQE --> KRYLOV["Krylov complexity\nC_K = Σ n|φ_n|²"]
VQE --> PERCOLATION["Entanglement percolation\nλ₂(L_C) > 0"]
VQE --> PAIRING["Richardson pairing\n⟨S⁺S⁻⟩"]
ORDER --> WITNESS["Sync witnesses\nW = R_c I - C̄"]
ORDER --> SFF["Spectral form factor\nr̄: Poisson → GOE"]
ORDER --> LOSCHMIDT["Loschmidt echo\nDQPT zeros"]
ORDER --> LINDBLAD["Lindblad NESS\nL[ρ_ss] = 0"]
ORDER --> MPEMBA["Quantum Mpemba\nF_far > F_near"]
HXY --> DLA["DLA dimension\n2^(2N-1) - 2"]
DLA --> PARITY["Z₂ parity\nP = Z⊗N"]
style HXY fill:#6929C4,color:#fff
style VQE fill:#6929C4,color:#fff
style DLA fill:#d4a017,color:#000
style KRYLOV fill:#d4a017,color:#000
style MAGIC fill:#d4a017,color:#000
1. Foundational: Kuramoto → XY Hamiltonian¶
Classical Kuramoto (the UPDE core)¶
The Unified Phase Dynamics Equation describes \(N\) coupled oscillators with natural frequencies \(\omega_i\) and coupling matrix \(K_{ij}\):
Each oscillator has a phase \(\theta_i\) on the circle \(S^1\). When the coupling \(K_{ij}\) is strong enough, the oscillators lock into a common rhythm — they synchronize.
Think of \(N\) metronomes on a shared table. Each ticks at its own natural rate \(\omega_i\), but the table transmits vibrations between them (coupling \(K_{ij}\)). If the table is rigid enough, the metronomes gradually align. The UPDE is the equation that governs this alignment.
Quantum XY Hamiltonian¶
The quantum analogue maps each oscillator to a qubit on the Bloch sphere. The \(\sin(\theta_j - \theta_i)\) coupling becomes a pairwise XY interaction, and the natural frequencies become longitudinal fields:
This is the central equation of the entire codebase. Every analysis module, every variational algorithm, every hardware experiment starts from this Hamiltonian.
Module: bridge/knm_hamiltonian.py → knm_to_hamiltonian(K, omega)
Time Evolution (Lie-Trotter)¶
The Trotter decomposition splits the Hamiltonian into commuting XX+YY terms (implemented as entangling gates) and single-qubit Z rotations. Error scales as \(O(\Delta t^2)\) per step.
Module: phase/xy_kuramoto.py → QuantumKuramotoSolver.evolve()
Order Parameter¶
\(R = 0\): completely incoherent (random phases). \(R = 1\): perfect synchronization (all phases equal). The transition from \(R \approx 0\) to \(R \approx 1\) as coupling strength increases is the synchronization phase transition — the quantum analogue of the classical Kuramoto transition, and in the SCPN framework, the mechanism by which consciousness emerges.
XXZ Generalization (Kouchekian-Teodorescu S² Embedding)¶
arXiv:2601.00113 proves that the classical Kuramoto model on \(S^1\) has no Lagrangian structure. Embedding oscillators on \(S^2\) (the Bloch sphere) resolves this. The full S² model adds a ZZ interaction controlled by the anisotropy parameter \(\Delta\):
At \(\Delta = 0\): recovers the XY model (our standard Hamiltonian). At \(\Delta = 1\): full isotropic Heisenberg model with SU(2) symmetry. The XY model is the in-plane restriction of the Kouchekian-Teodorescu framework.
Module: bridge/knm_hamiltonian.py → knm_to_xxz_hamiltonian(K, omega, delta)
2. K_nm Canonical Parameters¶
Natural frequencies (16 layers, Paper 27 Table 1):
Coupling matrix (Paper 27, Eq. 3):
Calibration anchors: \(K_{1,2}=0.302\), \(K_{2,3}=0.201\), \(K_{3,4}=0.252\), \(K_{4,5}=0.154\).
UPDE (Unified Phase Dynamics Equation)¶
\(F_n\) captures layer-specific forcing. In the quantum mapping, \(F_n\) corresponds to single-qubit Z rotations beyond the natural frequency term.
Quantum LIF Neuron¶
Membrane dynamics:
Rotation angle encoding:
Spike probability:
Quantum Synapse (CRy)¶
Weight-to-angle:
Effective transmission probability:
Parameter-Shift Rule¶
Gradient of expectation w.r.t. rotation angle:
STDP weight update:
QSNN training uses the same rule for MSE loss gradient:
QAOA Cost Hamiltonian¶
MPC quadratic cost → Ising:
QAOA circuit:
VQLS Cost Function¶
For linear system \(Ax = b\):
where \(|x\rangle = U(\theta)|0\rangle\) is a variational ansatz.
Probabilistic Error Cancellation (PEC)¶
Temme et al., PRL 119, 180509 (2017).
Quasi-probability decomposition of the inverse depolarizing channel \(\mathcal{E}^{-1}\) into Pauli operations \(\{I, X, Y, Z\}\):
Sampling overhead (cost multiplier):
Monte Carlo estimator:
Trapped-Ion Noise Model¶
Mølmer-Sørensen gate error model (QCCD architecture):
| Parameter | Value | Source |
|---|---|---|
| MS 2-qubit error | 0.5% | QCCD benchmarks |
| \(T_1\) | 100 ms | Ion trap coherence |
| \(T_2\) | 1 ms | Dephasing time |
| SQ gate time | 10 μs | Single-qubit |
| MS gate time | 200 μs | Two-qubit |
Noise composition per MS gate:
All-to-all connectivity (no SWAP overhead).
ITER Disruption Feature Space¶
11 physics-based features (ITER Physics Basis, Nuclear Fusion 39, 1999):
| Feature | Symbol | Range | Units |
|---|---|---|---|
| Plasma current | \(I_p\) | 0.5–17 | MA |
| Safety factor | \(q_{95}\) | 1.5–8 | — |
| Internal inductance | \(l_i\) | 0.5–2 | — |
| Greenwald fraction | \(n_{\text{GW}}\) | 0–1.5 | — |
| Normalized beta | \(\beta_N\) | 0–4 | — |
| Radiated power | \(P_{\text{rad}}\) | 0–100 | MW |
| Locked mode | LM | 0–0.01 | T |
| Loop voltage | \(V_{\text{loop}}\) | −2–5 | V |
| Stored energy | \(W\) | 0–400 | MJ |
| Elongation | \(\kappa\) | 1–2.2 | — |
| Current ramp | \(dI_p/dt\) | −5–5 | MA/s |
Min-max normalization to \([0, 1]\):
Fault-Tolerant UPDE (Repetition Code)¶
Each oscillator encoded in \(d\) physical data qubits + \((d-1)\) ancilla qubits.
Total physical qubits: \(N_{\text{phys}} = n_{\text{osc}} \cdot (2d - 1)\)
Encoding (repetition code, bit-flip protection):
Transversal coupling between logical qubits \(i\) and \(j\):
Syndrome extraction via adjacent parity checks on ancillae.
Quantum Advantage Scaling¶
Classical cost (matrix exponential): \(O(2^{2n})\) for \(n\) qubits.
Quantum cost (Trotter): \(O(n^2 \cdot r)\) gates per step, where \(r\) = Trotter repetitions.
Crossover estimate via exponential fit:
SSGF Quantum Loop¶
SSGF geometry matrix \(W\) (symmetric, non-negative, zero diagonal) maps directly to the XY Hamiltonian via the same \(K_{nm} \to H\) compiler.
Phase encoding into qubit XY-plane:
Phase recovery: \(\theta_i = \text{atan2}(\langle Y_i\rangle, \langle X_i\rangle)\)
Identity Binding Topology¶
6-layer, 18-oscillator Arcane Sapience identity spec:
| Layer | \(\omega\) (rad/s) | Oscillators |
|---|---|---|
| working_style | 1.2 | 3 |
| reasoning | 2.1 | 3 |
| relationship | 0.8 | 3 |
| aesthetics | 1.5 | 3 |
| domain_knowledge | 3.0 | 3 |
| cross_project | 0.9 | 3 |
Coupling: \(K_{\text{intra}} = 0.6\), \(K_{\text{inter}} = 0.4 \cdot e^{-0.25|l_i - l_j|}\)
Maps to 35 oscillators in scpn-phase-orchestrator's identity_coherence domainpack via centroid projection (circular mean for phase roundtrip).
Research Gems: Phase Transition Equations¶
The equations below were derived during Rounds 1–8 (March 2026) and implement novel probes of the quantum synchronization transition. Each equation has no or minimal prior art in the context of the Kuramoto-XY model.
Synchronization Witnesses (Gem 1)¶
Three Hermitian observables whose expectation value certifies synchronization:
| Witness | Equation | Observable | Fires when |
|---|---|---|---|
| Correlation | \(W_{\mathrm{corr}} = R_c \cdot I - \frac{1}{M}\sum_{i<j}(\langle X_iX_j\rangle + \langle Y_iY_j\rangle)\) | Mean pairwise XY correlator | Correlator \(> R_c\) |
| Fiedler | \(W_F = \lambda_{2,c} \cdot I - \lambda_2(L)\) | Algebraic connectivity of correlation Laplacian | \(\lambda_2 > \lambda_{2,c}\) |
| Topological | \(W_{\mathrm{top}} = p_{H_1} - p_c\) | Persistent H₁ fraction | \(p_{H_1} < p_c\) |
The correlation Laplacian is \(L = D - C\) where \(C_{ij} = \langle X_iX_j\rangle + \langle Y_iY_j\rangle\) and \(D_{ii} = \sum_j C_{ij}\). The Fiedler eigenvalue \(\lambda_2\) is the second-smallest eigenvalue of \(L\).
Module: analysis/sync_witness.py
Dynamical Lie Algebra Dimension (Gem 11)¶
For the heterogeneous XY Hamiltonian with all \(\omega_i\) distinct:
| \(N\) (qubits) | \(\dim(\mathrm{DLA})\) | \(\dim(\mathfrak{su}(2^N))\) | Fraction |
|---|---|---|---|
| 2 | 6 | 15 | 40% |
| 3 | 30 | 63 | 48% |
| 4 | 126 | 255 | 49% |
| 5 | 510 | 1023 | 50% |
| 6 | 2046 | 4095 | 50% |
The DLA dimension approaches half the full \(\mathfrak{su}(2^N)\) as \(N\) grows. The missing half is blocked by the Z₂ parity symmetry \(P = Z^{\otimes N}\). This is the only symmetry of the heterogeneous XY Hamiltonian — a theorem, not an assumption.
Module: analysis/dynamical_lie_algebra.py
Quantum Fisher Information (Gem 15)¶
The QFI quantifies the maximum precision for estimating the coupling parameter:
Equivalently, in terms of the spectral decomposition \(H(K)|\psi_n\rangle = E_n|\psi_n\rangle\):
The QFI diverges as the spectral gap \(E_1 - E_0 \to 0\) at \(K_c\) — the synchronization transition is a metrological sweet spot. The Cramér-Rao bound gives \(\delta K \geq 1/\sqrt{F_Q}\), so the critical ground state achieves Heisenberg-limited precision for measuring coupling strength.
Module: analysis/qfi_criticality.py
Entanglement Percolation (Gem 16)¶
Pairwise concurrence from the ground state density matrix:
where \(\lambda_k\) are the square roots of the eigenvalues of \(\rho_{ij}(\sigma_y \otimes \sigma_y)\rho_{ij}^*(\sigma_y \otimes \sigma_y)\) in decreasing order.
The concurrence matrix is interpreted as a weighted graph. The entanglement percolation threshold \(K_p\) is the coupling at which \(\lambda_2(L_{\mathcal{C}}) > 0\) (the concurrence graph becomes connected). Empirical finding: \(K_p \approx K_c\).
Module: analysis/entanglement_percolation.py
Fidelity Susceptibility (Gem 20)¶
\(\chi_F\) is the gauge-invariant diagnostic: the Berry connection on a 1D open path is pure gauge, but \(\chi_F\) peaks at the phase transition regardless of the gauge choice.
Module: analysis/berry_fidelity.py
Quantum Mpemba Effect (Gem 21)¶
Under amplitude damping (Lindblad with \(L_i = \sqrt{\gamma}\,\sigma_i^-\)), define the fidelity to the thermal state \(\rho_\infty\):
Mpemba effect detected when \(\mathcal{F}_{\mathrm{far}}(t) > \mathcal{F}_{\mathrm{near}}(t)\) at intermediate times — the far-from-equilibrium state thermalizes faster.
Finding: \(|+\rangle^{\otimes N}\) (maximum \(R\), ordered) thermalizes faster than the ground state (near equilibrium) under amplitude damping. Synchronized states are "stickier" — they resist thermalization, which in the SCPN framework implies dynamical protection of conscious states.
Module: analysis/quantum_mpemba.py
Lindblad NESS (Gem 22)¶
The non-equilibrium steady state under amplitude damping:
The NESS \(\rho_{\mathrm{ss}}\) satisfies \(\mathcal{L}[\rho_{\mathrm{ss}}] = 0\) and retains synchronization signatures (\(R_{\mathrm{NESS}} > 0\)) for sufficiently strong coupling.
Module: analysis/lindblad_ness.py
Spectral Form Factor (Gem 27)¶
Level spacing ratio (chaos diagnostic):
| Regime | \(\bar{r}\) | Level statistics |
|---|---|---|
| Integrable | 0.386 | Poisson (uncorrelated levels) |
| Chaotic (GOE) | 0.536 | Wigner-Dyson (level repulsion) |
The transition from Poisson to GOE as \(K\) increases through \(K_c\) confirms that the synchronization transition coincides with the onset of quantum chaos.
Module: analysis/spectral_form_factor.py
Krylov Complexity (Gem 31)¶
Given an operator \(O\) and Hamiltonian \(H\), the Lanczos algorithm generates the Krylov basis \(\{|O_n)\}\) with recursion coefficients \(b_n\):
The Krylov complexity:
measures how far into the Krylov chain the operator has spread at time \(t\). Growth rate: \(b_n \sim n\) (chaotic), \(b_n \sim \text{const}\) (integrable).
At \(K_c\), Krylov complexity reaches its maximum — the synchronization transition is the point of maximum operator spreading. This is the highest-novelty result (4.5/5): Krylov complexity has never been computed for the Kuramoto-XY system.
Module: analysis/krylov_complexity.py
Stabilizer Rényi Entropy / Magic (Gem 32)¶
where the sum runs over all \(4^N\) Pauli operators \(P \in \{I, X, Y, Z\}^{\otimes N}\). \(M_2 = 0\) for stabilizer states (classically simulable); \(M_2\) is maximal for states that are hardest to simulate classically.
At \(K_c\), magic peaks — the critical ground state is maximally non-classical. This connects synchronization to computational complexity: the point where consciousness emerges (in the SCPN model) is precisely where classical simulation fails.
Module: analysis/magic_nonstabilizerness.py
Finite-Size Scaling (Gem 33)¶
The BKT transition has logarithmic finite-size corrections:
This ansatz, fitted to small-system data (\(N = 2, 3, 4, 5\)), extracts the thermodynamic-limit critical coupling \(K_c(\infty)\).
Module: analysis/finite_size_scaling.py
Richardson Pairing Correlator (Gem 25)¶
where \(\sigma_i^+ = (X_i + iY_i)/2\). Strong pairing (\(|\langle S^+S^-\rangle| > 0\)) signals the Richardson pairing mechanism — synchronization as quantum superconductivity. The Kouchekian-Teodorescu paper (arXiv:2601.00113) proves that this connection is exact for perturbations around the synchronized fixed point.
Module: analysis/pairing_correlator.py
Equation Map: Module → Physics¶
| Module | Key Equation | Physical Meaning |
|---|---|---|
knm_hamiltonian |
\(H = -\sum K_{ij}(XX+YY) - \sum\omega_i Z_i\) | Coupling → quantum spin chain |
sync_witness |
\(W = R_c I - \bar{C}_{XY}\) | Certification of synchronization |
dynamical_lie_algebra |
\(\dim = 2^{2N-1} - 2\) | Reachable unitaries, only Z₂ conserved |
qfi_criticality |
\(F_Q \propto 1/\Delta^2\) | Metrological precision at \(K_c\) |
entanglement_percolation |
\(\lambda_2(L_\mathcal{C}) > 0\) | Entanglement spans the network |
berry_fidelity |
\(\chi_F\) peaks at \(K_c\) | Gauge-invariant transition detector |
quantum_mpemba |
\(\mathcal{F}_{\mathrm{far}} > \mathcal{F}_{\mathrm{near}}\) | Ordered states resist thermalization |
spectral_form_factor |
\(\bar{r}\): 0.386 → 0.536 | Integrable → chaotic at \(K_c\) |
krylov_complexity |
\(C_K\) peaks at \(K_c\) | Maximum operator spreading |
magic_nonstabilizerness |
\(M_2\) peaks at \(K_c\) | Maximum non-classicality |
finite_size_scaling |
\(K_c(N) = K_c(\infty) + a/(\ln N)^2\) | Thermodynamic limit extraction |
pairing_correlator |
\(\langle S^+S^-\rangle\) | Superconducting-like pairing |
entanglement_entropy |
\(S \sim (c/3)\ln L,\; c=1\) | CFT at BKT criticality |
floquet_kuramoto |
\(K(t) = K_0(1+\delta\cos\Omega t)\) | Discrete time crystal |
lindblad_ness |
\(\mathcal{L}[\rho_{\mathrm{ss}}] = 0\) | Open-system steady state |
loschmidt_echo |
$\lambda(t) = -\ln | \langle\psi_0 |
xxz_phase_diagram |
\(H_{XXZ}(\Delta)\) | XY → Heisenberg crossover |
Convergence of All Probes at \(K_c\)¶
The critical point concordance (Gem 19) demonstrates that all independent diagnostics agree on the same \(K_c\). This is the central empirical result of the package: eight independent observables, computed from different mathematical frameworks, all point to the same coupling strength.
graph LR
subgraph "Monotonic probes"
R["R (order parameter)\n0 → 1"]
L2["λ₂ (Fiedler)\n0 → connected"]
GAP["Δ (spectral gap)\nclose → open"]
end
subgraph "Peak probes"
QFI["F_Q (QFI)\npeak at K_c"]
M2["M₂ (magic)\npeak at K_c"]
CK["C_K (Krylov)\npeak at K_c"]
CHI["χ_F (fidelity susc.)\npeak at K_c"]
end
subgraph "Decay probes"
PH1["p_H1 (topology)\nhigh → 0"]
RBAR["r̄ (chaos)\n0.386 → 0.536"]
end
R --> KC["K_c\ncritical coupling"]
L2 --> KC
GAP --> KC
QFI --> KC
M2 --> KC
CK --> KC
CHI --> KC
PH1 --> KC
RBAR --> KC
style KC fill:#6929C4,color:#fff
Behaviour of each probe across the transition:
| Probe | Below \(K_c\) | At \(K_c\) | Above \(K_c\) | Type |
|---|---|---|---|---|
| \(R\) (order parameter) | \(\approx 0\) | \(\sim 0.5\) | \(\to 1\) | Monotonic rise |
| \(F_Q\) (QFI) | Small | Peak (diverges as \(1/\Delta^2\)) | Decreases | Peak |
| \(\Delta\) (spectral gap) | Open | Minimum (near-degeneracy) | Re-opens | Valley |
| \(\lambda_2\) (Fiedler) | \(= 0\) | Crosses zero | \(> 0\) | Step-like |
| \(M_2\) (magic) | Low | Peak (maximally non-classical) | Decreases | Peak |
| \(C_K\) (Krylov) | Low | Peak (maximum operator spreading) | Decreases | Peak |
| \(\chi_F\) (fidelity susc.) | Low | Peak (gauge-invariant) | Decreases | Peak |
| \(p_{H_1}\) (persistent homology) | High (many holes) | \(\approx 0.72\) | \(\to 0\) (no holes) | Monotonic decay |
| \(\bar{r}\) (level spacing) | \(0.386\) (Poisson) | Crossover | \(0.536\) (GOE) | Step-like |
Every probe — order parameter, Fisher information, spectral gap, Fiedler connectivity, magic, Krylov complexity, fidelity susceptibility, persistent homology — independently identifies the same critical coupling \(K_c\). This convergence is strong evidence that the synchronization transition is a genuine quantum phase transition of the BKT type, not an artifact of any single observable.
Module: analysis/critical_concordance.py