The finite-imaginary-time measure

Ordered trace

Split the binary Hamiltonian into commuting-within-family parts H_z containing the B projectors and hZ source, and H_x containing the A projectors and gX source. With \(\delta=\beta/M=1/(TM)\), define

\[Q=e^{-\delta H_z}e^{-\delta H_x},\qquad Z_M=\operatorname{Tr}Q^M.\]

The package’s ordered_v1 refers to this ordering. At fixed H,T and finite Hilbert space the Trotter limit recovers \(e^{-\beta H}\) as M grows. At finite M, \(Z_M\) is generally different from the exact Gibbs trace. The package does not attach a universal M-error bound or automatic extrapolation.

The spacetime lattice is \(\Lambda\times S^1_M\), with time axis d. A spacetime cell is temporal precisely when its orientation contains that axis. A binary p-cochain \(\phi\) assigns a bit to every spacetime p-cell; write \(\sigma_e=(-1)^{\phi_e}\) and \(P_f=(-1)^{(d\phi)_f}\). Temporal p-cell bits are auxiliary variables arising in the transfer expansion, not additional physical qudits.

Unreduced local weights

For bit b in {0,1}, the positive local factors are

\[\begin{split}W_s(b)=\begin{cases}e^{\delta K}&b=0,\\1&b=1,\end{cases}\qquad W_t(b)=\begin{cases}\cosh(\delta g)&b=0,\\\sinh(\delta g)&b=1,\end{cases}\end{split}\]
\[V_s(b)=e^{\delta h(-1)^b},\qquad V_t(b)=\frac{e^{\delta J}+(-1)^b}{2}.\]

The exact finite-M partition sum is

\[Z_M=\sum_{\phi} \prod_{f_s}W_s((d\phi)_{f_s}) \prod_{f_t}W_t((d\phi)_{f_t}) \prod_{e_s}V_s(\phi_{e_s}) \prod_{e_t}V_t(\phi_{e_t}).\]

The factor 1/2 in V_t and the constant part of W_s retain the projector normalization. They cannot be discarded when computing partition functions, free energies or derivatives. State-independent factors do cancel in normalized expectations for the same model.

Reduced action

For g>0,J>0, define

\[\kappa_s=\frac{\delta K}{2},\qquad \kappa_t=\frac12\log\coth(\delta g),\qquad h_s=\delta h,\qquad h_t=\frac12\log\coth(\delta J/2).\]

Then the unnormalized weight is \(w(\phi)=C\exp S(\phi)\), with

\[S(\phi)=\kappa_s\sum_{f_s}P_f+\kappa_t\sum_{f_t}P_f +h_s\sum_{e_s}\sigma_e+h_t\sum_{e_t}\sigma_e.\]

The implementation uses S as a log weight. A favorable move increases S; its Metropolis acceptance is min(1,exp(S_new-S_old)). If using a statistical mechanics convention \(e^{-S_E}\), its Euclidean action is \(S_E=-S\).

Let

\[n_s=MV\binom{d}{p+1},\quad n_t=MV\binom dp,\quad m_s=MV\binom dp,\quad m_t=MV\binom{d}{p-1}.\]

The constant prefactor is

\[C=C_s^{n_s}C_t^{n_t}C_v^{m_t},\qquad C_s=e^{\delta K/2},\quad C_t=\sqrt{\cosh(\delta g)\sinh(\delta g)},\quad C_v=\frac{\sqrt{e^{2\delta J}-1}}{2}.\]

The spacetime spin and face counts are \(MV\binom{d+1}p\) and \(MV\binom{d+1}{p+1}\). The p=0 vertex specialization has no temporal p-cells and no C_v factor.

Constraints and numerical arithmetic

At g=0, W_t(1)=0. This defines an exact constrained measure; the reduced coupling kappa_t is infinite. Replacing g=0 by a small positive value relaxes that constraint and changes the model. Public Z-family sampling therefore requires g>0. The same issue applies to the X-family dual transverse source h.

Stable log-weight formulas use log1p/expm1 and avoid subtracting large nearly equal values. Positive derived quantities that underflow to zero, nonfinite actions and unsupported numerical ranges are refused where detected. Finite floating arithmetic is still an approximation to the algebraic measure.

Partition functions and energy

Ordinary normalized-observable sampling does not itself produce Z_M or its absolute normalization. The public API supplies expectations, histories and diagnostics, not a general free-energy integration method. A quantum energy response requires differentiating the represented trace, including the prefactor and all parameter-dependent reduced couplings. The reduced action of one sampled configuration is not a quantum energy eigenvalue.