PronyAC
This is a Python program for performing Prony Analytic Continuation.
The input of our simulations is an odd number of Matsubara points $G(i \omega_n)$ sampled on a uniform grid $\lbrace i\omega_{n_0}, i\omega_{n_0 + \Delta n}, \cdots, i\omega_{n_0 + (N_{\omega}-1) \Delta n} \rbrace$, where $\omega_n=\frac{(2n+1)\pi}{\beta}$ for fermions and $\frac{2n\pi}{\beta}$ for bosons, $n_0 \geq 0$ is an integer controlling the number of the first few points we decide to discard (if any), $\Delta n \geq 1$ is an integer controlling the distance of successive sampling points, $N_{\omega}$ is the total number of sampling points and should be an odd number.
To achieve best performance, please obey the following criteria: $n_0$ should be chosen as the smallest value so that $\min|i\omega_{n_0} - \xi_l|$ and $\max|i\omega_{n_0} - \xi_l|$ are of the same order and function values between first two sampling points, i.e., $G(i\omega_{n_0})$ and $G(i\omega_{n_0 + \Delta n})$, do not change dramatically; $N_\omega$ should be chosen to the value making mapped pole locations $\lbrace\tilde{\xi_l}\rbrace$ separated as far as possible; it is sufficient to set $\Delta n = \max\lbrace 1, \frac{\beta}{200} \rbrace$ for the 64-bit machine precision. Practically, our method is robust to variations in $N_\omega$ and relatively large $n_0$. So you may use a tentative $n_0$ and $N_\omega$, e.g., $n_0 = \frac{\beta}{10}$ and $N_\omega = 2001$, at the beginning to get an estimation of pole information, then use this information to choose optimal values of $n_0$ and $N_\omega$.
The Prony Analytic Continuation is performed using the following command:
PronyAC(G_w, w, optimize = True, n_k = 1001, x_min = -10, x_max = 10, y_min = -10, y_max = 10, err = None)
- G_w is a 1-d array containing the Matsubara data.
- w is the corresponding sampling grid.
- n_k is the maximum number of contour integrals. Our method is not sensitive to this parameter, so you may leave it untouched.
- Only poles located within the rectangle x_min < x < x_max, y_min < y < y_max are recovered. Our method is not sensitive to these four paramters. So the range can be set to be relatively large.
- If the error tolerance err is given, the continuation will be carried out in this tolerance; else if optimize is True, the tolerance will be chosen to be the optimal one; else the tolerance will be chosen to be the last singular value in the exponentially decaying range.
- For noisy data, it is highly suggested to set optimize to be True (and please do not provide err). Although the simulation speed will slow down (will take about several minutes), this will highly improve the noise resistance and the accuracy of final results. And to make this method as robust as possible, please use $N_\omega$ which makes the mapped poles as separate as possible.
- For noiseless data, setting optimize to be True will still give best results. However, setting err=1.e-12 will be much faster and usually give nearly optimal results.
Other classes and functions are also provided to facilitate testings of toy models. The "examples" folder contains all original data of https://doi.org/10.48550/arXiv.2312.10576 and corresponding scripts to generate them. It might be a good start from there to get familiar with this program.
Disclaimer: This method is primarily for data without systematic bias. Its performance over systematically biased data is under testing, and modifications to the code may be made in the future to further improve performance in this case.
Metadata
Release files for pronyac 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pronyac-0.1.0.tar.gz | 9.9 kB | Without provenance | Details for pronyac-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pronyac-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pronyac-0.1.0-py3-none-any.whl |
Total release size: 22.6 kB
Release files / pronyac-0.1.0.tar.gz
| Download URL | pronyac-0.1.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9be0c0a506aadefc61c162906d319622822a24e9bb987c20f34a2da4e2376f7f
|
|
BLAKE2b-256 checksum How to use checksums |
320ff4c46d2dd7aa0f5b40f4f6ff9deb36ef2aa71c32c5d0ec58d2314c57b858
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|
Release files / pronyac-0.1.0-py3-none-any.whl
| Download URL | pronyac-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f433229e4ddb2abf25fce8c6c281f84b6469b8dea3fd0c927ab158c1c820d90
|
|
BLAKE2b-256 checksum How to use checksums |
08edc319c41b3b1f07effb95c6e503b504c9c678031dc2ffbaa4ff7173879525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|
Security for pronyac 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.