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]) float[source]

Worker function to simulate a single temperature and measure average vortex density.

Parameters:

params (Tuple of (T, L, eq_probe_steps, eq_max_steps, meas_steps).)

Return type:

Average vortex density n_v.

scripts.xy.compare_correlations 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.compare_correlations.main() None[source]

Run the correlation comparison analysis for the XY model.

scripts.xy.compare_correlations.simulate_correlation(*, T: float, L: int, steps: int, eq_probe: int, eq_max: int, sample_interval: int, seed: int, logger: Logger) tuple[ndarray, ndarray][source]

Equilibrate and measure the averaged correlation function at temperature T.

Uses two-start convergence equilibration to avoid initialization bias.

Parameters:
  • T (float) – Temperature for the measurement.

  • L (int) – Linear lattice size.

  • steps (int) – Measurement steps after equilibration.

  • eq_probe (int) – Chunk size for convergence equilibration probes.

  • eq_max (int) – Maximum equilibration steps.

  • sample_interval (int) – Spacing between correlation samples during measurement.

  • seed (int) – Random seed for reproducibility.

  • logger (logging.Logger) – Logger instance.

Returns:

Radial distances r and averaged correlations G(r).

Return type:

tuple[np.ndarray, np.ndarray]

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]) float[source]

Run simulation for a single temperature and compute the helicity modulus.

Parameters:

params (Tuple of (T, L, eq_probe_steps, eq_max_steps, meas_steps).)

Return type:

Helicity modulus (Upsilon) for this temperature.

Raises:

ValueError – If T is 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_evolution.main() None[source]

Run the simulation and generate a multi-row phase ordering figure.

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.ordering_kinetics.main() None[source]

Run the XY ordering kinetics simulation.

scripts.xy.temperature_sweep module

Standardized temperature sweep for the 2D XY model. Calculates and plots magnetization, energy, susceptibility, and specific heat.

scripts.xy.temperature_sweep.main() None[source]

Execute the temperature sweep and generate standardized 4-panel plots.

Module contents