Computational Implementation
A simulator implements a specified dynamical model [D]. It does not infer that model, reconstruct a physical state, or establish consciousness merely by producing a positive matrix. The mathematical kernel, evolution, and identifiability protocol specify these separate obligations.
State and configuration
Use a Hermitian positive semidefinite matrix with . Store the frame, Hamiltonian, dissipator, feedback target, rates, physical time calibration, experiential extension, and measurement model alongside it. The seven-axis model has 48 real state coordinates; a joint state of such factors has dimension and coordinates. Seven coordinates for an aggregate require an explicit reduction map and discard joint information.
A Cholesky parametrisation is useful for estimation when . It does not make the measurement model identifiable. Confidence sets belong to the measurement likelihood, with subject and intervention structure retained.
A state-preserving step
For the selected Fano dephasing family and a density-valued target consider
where . The following first-order scheme freezes and at the initial state of each step. The array index of is explicitly set to 4 in the convention .
import numpy as np
from scipy.linalg import expm
def diagnostics(rho, e=4):
p = float(np.trace(rho @ rho).real)
d = float(np.sum(np.real(np.diag(rho)) ** 2))
q_e = rho[e, e].real ** 2 + 2 * (
np.sum(np.abs(rho[e, :]) ** 2) - abs(rho[e, e]) ** 2)
return p, p / d - 1, float(q_e / p)
def step(rho, h, gamma, dt, rate, target):
# rate and target are frozen at the beginning of this step.
a = float(rate(rho))
sigma = np.asarray(target(rho), dtype=complex)
if dt < 0 or gamma < 0 or a < 0:
raise ValueError("Rates and dt must be nonnegative")
assert np.allclose(h, h.conj().T)
assert np.allclose(sigma, sigma.conj().T)
assert np.isclose(np.trace(sigma), 1)
assert np.linalg.eigvalsh(sigma).min() >= -1e-12
u = expm(-1j * h * dt)
x = u @ rho @ u.conj().T
diag = np.diag(np.diag(x))
x = diag + np.exp(-2 * gamma * dt / 3) * (x - diag)
w = np.exp(-a * dt)
return w * x + (1 - w) * sigma
Why positivity holds [T]. The first map is unitary conjugation. The second is the convex combination , . The third is a convex combination with a valid density matrix. Their composition preserves positivity and trace for every nonnegative step size in exact arithmetic. With frozen coefficients each map is CPTP. The full algorithm can be nonlinear because its coefficients depend on the initial state; calling it one CPTP map is incorrect.
Accuracy is a separate question. For bounded smooth coefficients on the region traversed, freezing and splitting give a local error and a first-order global error over fixed finite time. A Lipschitz drift with constant and a local defect bound gives a global bound of the form , interpreted continuously at . The constants depend on the model and region. Step doubling estimates error; a fixed rule such as cannot guarantee accuracy across physical scales. Nonsmooth gates require the corresponding weaker error analysis or event handling.
Numerical checks
At every reported step check Hermiticity, trace, the smallest eigenvalue, and . A small tolerance is a statement about floating point error. A substantial violation indicates a defective input or algorithm; clipping a reported scalar does not repair the state. A projection onto the density cone changes the numerical trajectory and must be included in the error budget. Generic explicit Euler and Runge–Kutta methods do not guarantee positivity.
For a valid density matrix, the E mask can have zero weight. An implementation claiming a positive E floor must specify the source and rate conditions in its balance equation.
Meaningful verification includes an analytic diagonal example, a noncommuting Hamiltonian, a boundary state, finite-step positivity, convergence under step refinement, and an independently computed counterexample to any universal claim used by the model. The executable kernel checks cover these mathematical properties without certifying the entire theory.
Environmental coupling
A nonnegative sum of GKSL generators gives an admissible generator. A signed difference requires a separate generator check. A proposed action additionally needs an observation law and a loss.
For joint systems use the tensor state and explicitly defined local channels or a joint Hamiltonian. A nonlinear single-state feedback has no automatic tensor extension: specify how its coefficients are evaluated from local marginals and use a linear local channel with those frozen coefficients. Feature-to-state reconstruction is an estimator, not an environmental quantum channel.
Bootstrap and closed gates
The selected baseline is a model convention [D]. A positive rate alone cannot generate coherence. If the feedback gate vanishes at , then at ; unitary and unital dissipative terms leave fixed. A start from this state requires a specified preparation, a nonunital input, or a revised gate, each with its own energetic and physical model. It cannot be proved by adding a positive scalar called bootstrap.
The bounded kinetic approximation for has stated timescale assumptions; it is not a norm of a categorical natural transformation. Use the regularised rate family in septicity when boundary continuity is needed.
Monitoring and control
Report the four margins , , , and . Only the first cut is strict; the other three include equality. The full verdict requires the specified experiential extension and readout. A scalar , a stress score, or matrix purity alone is insufficient. With a reconstruction confidence set , certify a criterion only if it holds for every admissible record in ; otherwise report it as unresolved. A proxy based on the E-row must be named as a proxy.
The cut is an exact consequence of a chosen majority convention for Hilbert–Schmidt differentiation, not a universal survival or detection threshold. The self-observation and differentiation cuts are selected conventions; the operational interpretation requires calibration. Dynamic viability requires a specified domain, disturbances, admissible controls, and an invariant or viability-kernel argument.
For a finite action set, evaluate the specified loss for each action. For compact controls and a continuous loss a minimiser exists. Uniqueness, convexity, and efficient global optimisation each require additional assumptions. Do not infer any of them from compactness.
Cost and reproducibility
Dense multiplication and diagonalisation cost and memory ; a fixed Hamiltonian permits precomputing its unitary step. A joint tensor state incurs the corresponding exponential growth in the number of factors. Sparse approximations and aggregate models require an error bound for the observables of interest.
Publish the chosen frame, model parameters, target and gate, step rule and tolerance, random seed, preparation, measurement likelihood, and uncertainty set. Distinguish a simulated mathematical example from a calibrated physical prediction. Numerical success verifies the implemented instance; physical identification and the phenomenal interpretation remain separate inputs.