Metadata-Version: 2.1
Name: SU2xSU2
Version: 1.1.2
Summary: Hybrid Monte Carlo with Fourier Acceleration simulation package for the N=2 Principal Chiral model.
Download-URL: https://pypi.org/project/SU2xSU2/
Author: Julian Wack
Author-email: julianfriedrichwack@gmail.com
License: MIT
Project-URL: Source, https://github.com/JulianWack/SU2xSU2
Project-URL: Documentation, https://su2xsu2.readthedocs.io/
Keywords: Hybrid Monte Carlo,Fourier Acceleration,Principal Chiral model
Platform: any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11.4
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scipy

# SU(2) x SU(2)

This python package offers efficient simulation and data analysis routines for the SU(2) x SU(2) Principal Chiral model. The key feature offered is the integration of Fourier Acceleration into the Hybrid Monte Carlo algorithm which leads to a significant reduction in the degree of critical slowing down.

Currently the simulation is only supported for a two dimensional cubic lattice.

## Installation 
To install ``SU2xSU2`` using ``pip`` run:

```bash
pip install SU2xSU2
```
Its is recommended to work in a virtual environment.


## Documentation
Read the docs [here](https://su2xsu2.readthedocs.io/).


## Example
A basic example showing how to set up a simulation using Fourier accelerated HMC to measure the wall-to-wall correlation function.
Further examples can be found [here](https://su2xsu2.readthedocs.io/en/stable/usage.html#examples).
```python
from SU2xSU2.SU2xSU2 import SU2xSU2

# define model and lattice parameters 
model_paras = {'L':40, 'a':1, 'ell':5, 'eps':1/5, 'beta':0.6}
model = SU2xSU2(**model_paras)
# define simulation parameters and measurements
sim_paras = {'M':500, 'thin_freq':1, 'burnin_frac':0.5, 'accel':True, 'measurements':[model.ww_correlation_func], 'chain_paths':['corfunc_chain.npy']}
model.run_HMC(**sim_paras) 
```

<!--
## Attribution

Please cite the following paper if you found this code useful in your research:
```bash
    @article{}
```
-->

## Licence

``SU2xSU2`` is free software made available under the MIT License. For details see the `LICENSE` file.

## To DO
make new distribution. install again an check if division by 0 bug solved, cor func showing and saving in mass_lambda, non-integer M, accel_mass file names


- test mass_lambda and slowdown and make first stable distribution 
- commit changes to build backend and making distribution

commit: small bug fixes and additional import fix (SU2xSU2, examples, analysis, correlations, usage.rst)
commit: change build backend to setuptools and make distribution 

- add stylesheet to distribution and uncomment its use in files
- change name of function that integrates the beta function (state that 1/beta expansion of integrand is used) and use numerical integration instead of  expanding the integrand
- add tests
- plotting
    - get latex error when plotting within analysis.py
    - no apparent option to add errorbar format '.' in style sheet 
    - include mplstyle file in stylelib/ to be used globally. Currently, the file needs to be copied manually into the directory. Possible approaches:
        - https://github.com/garrettj403/SciencePlots/blob/master/scienceplots/__init__.py
        using https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/style/core.py
        - https://matplotlib.org/stable/tutorials/introductory/customizing.html#distributing-styles
        - https://stackoverflow.com/a/52997575
        - https://stackoverflow.com/questions/35851201/how-can-i-share-matplotlib-style
- generalize simulation and data analysis to d-dimensional cubic lattice 
