Gibbs-Lock Frame
Gibbs-locked frame API for the quantum inaccessible game.
A Gibbs-locked frame is a background state K_0 = beta * H that is a fixed point of the linearised reversible dynamics: because [K_0, H] = 0 by construction, the commutator term i[delta_K, K_0] generates pure phase rotation in the eigenbasis of H without displacing K_0.
This module provides: - GibbsLockedFrame: encapsulates K_0 = beta * H with its spectral geometry. - infer_mu0: fits the uniform decay rate mu_0 from an off-diagonal trajectory.
These objects are the primary API for the analysis in:
the-inaccessible-game-hamiltonian.tex
References
Lawrence (2026), “Gibbs-Lock and the Emergence of Hamiltonian Structure in the Inaccessible Game”.
qig.core.loewner_kernel: the divided-difference kernel applied at rho0.
- class qig.gibbs_lock.GibbsLockedFrame(H, beta, dims=None)[source]
Bases:
objectEncapsulate a Gibbs-locked background K_0 = beta * H.
- Parameters:
H (
array,shape (D,D)) – Traceless Hermitian generator. Its eigenbasis defines the preferred spectral decomposition; Bohr gaps are eigenvalue differences of H.beta (
float) – Inverse temperature / coupling strength (real, nonzero).dims (
listofint, optional) – Subsystem dimensions for partial-trace operations (e.g. [3, 3] for a qutrit pair). Required foris_iso_marginal.
- H
- Type:
array
- property rho0: ndarray
Gibbs state rho0 = exp(-beta * H) / tr(exp(-beta * H)).
Computed via eigendecomposition for numerical stability.
- loewner_kernel(tol=1e-12)[source]
Loewner divided-difference kernel at rho0.
Thin wrapper around
qig.core.loewner_kernel(self.rho0).- Return type:
- Returns:
C (
array,shape (D,D)) – Kernel matrix C[i, j] = c(lambda_i, lambda_j) in the eigenbasis of rho0 (= eigenbasis of H for a Gibbs-locked frame).vals (
array,shape (D,)) – Eigenvalues of rho0 (ascending, clipped to >= 1e-14).vecs (
array,shape (D,D)) – Eigenvectors of rho0 as columns.
- Parameters:
tol (float)
- loewner_map(X)[source]
Apply the Loewner map J_{rho0}(X) to a matrix X.
In the eigenbasis of rho0:
(J_{rho0}(X))_{ij} = C[i, j] * X_{ij}
- Parameters:
X (
array,shape (D,D)) – Input matrix (same basis as H and rho0).- Returns:
JX
- Return type:
array,shape (D,D)
- is_iso_marginal(delta_K, tol=1e-10)[source]
True if delta_K is iso-marginal to first order.
A perturbation delta_K is iso-marginal if the induced first-order change in every marginal density matrix vanishes:
tr_{!=k}(J_{rho0}(delta_K)) approx 0 for all k.
Requires
dimsto be set.
- linearised_flow(delta_K, mu0, t)[source]
Analytical element-wise solution of the linearised GENERIC equation.
In the eigenbasis of H the equation decouples element-by-element:
d/dt (delta_K)_{ij} = (i * beta * Delta_eps_{ij} - mu0) * (delta_K)_{ij}
with solution:
(delta_K(t))_{ij} = exp((i * beta * Delta_eps_{ij} - mu0) * t) * (delta_K(0))_{ij}.
- qig.gibbs_lock.infer_mu0(times, rho_trajectory, frame, tol=0.001)[source]
Estimate the uniform decay rate mu_0 from an off-diagonal trajectory.
Fits exp(-mu0 * t) to the phase-stripped magnitude of off-diagonal elements of delta_rho(t) = rho(t) - rho0, averaged over all (i,j) pairs whose magnitude at t=0 exceeds tol.
The Gibbs-lock picture predicts that each off-diagonal coherence decays as:
|delta_rho_{ij}(t)| = |delta_rho_{ij}(0)| * exp(-mu0 * t)
independently of the Bohr gap Delta_eps_{ij}, so a single exponential fit to the mean magnitude extracts mu_0.
- Parameters:
times (
array,shape (T,)) – Time points corresponding to the trajectory.rho_trajectory (
array,shape (T,D,D)) – Density matrices at each time step.frame (
GibbsLockedFrame) – The background Gibbs-locked frame defining rho0 and the eigenbasis.tol (
float) – Minimum |delta_rho_{ij}(0)| for a mode to be included in the fit.
- Returns:
mu0 – Fitted uniform decay rate (>= 0).
- Return type:
- Raises:
ValueError – If no off-diagonal modes have initial magnitude above tol.
RuntimeError – If the exponential fit fails to converge.