vibespin.scripts.xy package
Submodules
scripts.xy.bkt_transition module
Analysis of the Berezinskii-Kosterlitz-Thouless (BKT) transition in the 2D XY model. Measures the average vortex density as a function of temperature.
- scripts.xy.bkt_transition.main() None[source]
Run temperature sweep to observe vortex-density growth near T_BKT.
- scripts.xy.bkt_transition.simulate_bkt_point(params: tuple[float, int, int, int, int, int]) dict[str, float][source]
Worker function to simulate a single temperature and measure average vortex density.
- Parameters:
params (tuple[float, int, int, int, int, int]) – Tuple of (T, L, eq_probe_steps, eq_max_steps, meas_steps, seed). The seed belongs to the random start; the ordered start derives its own.
- Returns:
Blocking summary of the vortex density n_v (
value,err,ci_low,ci_high,tau_int,n_eff,samples). All fields are NaN when the two starts did not converge withineq_max_steps.- Return type:
dict[str, float]
scripts.xy.correlation_comparison module
Comparison of spin-spin correlation functions G(r) for the XY model. Contrasts power-law decay (low T) with exponential decay (high T).
scripts.xy.helicity_modulus module
Analysis of the helicity modulus (superfluid stiffness) in the 2D XY model. Used to identify the universal jump at the BKT transition.
- scripts.xy.helicity_modulus.main() None[source]
Run parallel sweep to calculate helicity modulus across the BKT region.
- scripts.xy.helicity_modulus.simulate_helicity(params: tuple[float, int, int, int, int, int]) dict[str, float][source]
Run simulation for a single temperature and compute the helicity modulus.
- Parameters:
params (tuple[float, int, int, int, int, int]) – Tuple of (T, L, eq_probe_steps, eq_max_steps, meas_steps, seed). The seed belongs to the random start; the ordered start derives its own.
- Returns:
Blocking summary of the helicity modulus (
value,err,ci_low,ci_high,tau_int,n_eff,samples). Upsilon is the mean of the per-sweep quantity(Sum cos - (Sum sin)^2 / T) / L^2, so its error follows from blocking that series directly. All fields are NaN when the two starts did not converge withineq_max_steps.- Return type:
dict[str, float]
- Raises:
ValueError – If
Tis less than or equal to 0.
scripts.xy.ordering_evolution module
Phase ordering evolution visualisation for the 2D XY model.
Quenches from a disordered state to T < T_BKT and records the spin configuration at multiple time steps, plotting phase configurations, vorticity maps, and radially averaged correlation functions G(r).
scripts.xy.ordering_kinetics module
Ordering kinetics analysis for the 2D XY model.
Quenches from a disordered state to T < T_BKT and records length scale growth and vortex density decay over time.
scripts.xy.temperature_sweep module
Standardized temperature sweep for the 2D XY model. Calculates magnetization, energy, susceptibility, and specific heat, and produces a thermodynamics figure plus a companion diagnostics figure.
scripts.xy.wolff_efficiency module
Wolff cluster algorithm efficiency demonstration for the 2D XY model.
The XY counterpart of the Ising comparison, using the Wolff-Evertz reflection rather than a Z2 cluster flip. The temperature window brackets the BKT transition, where the correlation length diverges exponentially rather than as a power law, so critical slowing down of the local update sets in more gently than it does at a second-order critical point.
Results are saved to results/xy/wolff_efficiency.npz for notebook re-use
and results/xy/wolff_efficiency.png as a four-panel figure.
- scripts.xy.wolff_efficiency.TBKT_XY: float = 0.893
Accepted BKT transition temperature of the 2D XY model.