Skip to main content

Quantum information, statistics, dynamics and closely related computational tools. Quantum core, random matrix tools, spectral analysis tool, advanced linear algebra. Randomness tools.

Project description

Leymosun Science: Quantum Research Toolkit

Quantum information, statistics, dynamics and closely related computational tools.

PyPI version Downloads Downloads Static Badge Static Badge DOI
arXiv:2512.22169 arXiv:2604.14224 DOI

Approach and features

Quantum information, statistics, dynamics and closely related computational tools.

Quantum Core

  • Basic two states.
  • Prepare maximally entangled.
  • Pure state fidelity and spread complexity unitary evolution.
  • Spread complexity Krylov unitary evolution.

Random Matrices

  • Generation of Gaussian ensembles (Orthogonal).
  • Generation of Mixed Gaussian ensembles (Orthogonal) via Mixed Matrix Ensemble Sampling (MMES) algoritm
  • Extract offdiagonal elements.
  • Spectra generation given ensemble.
  • Robust Spectral unfolding.
  • Nearest-Neigbour Spacing Densities (NNSD).
  • Adjacent gap ratio.
  • Analytic distributions: Wigner semi-circle law, nearest-neigbour spacing.
  • Generation of Rosenzweig-Porter ensemble.

Linear Algebra

  • Gram-Schmidt procedure.
  • Krylov bases and Lanczos algorithm.

Statistics

  • Centered PDF computation.
  • Bootstrapped uncertainty quantification given observation matrix.

High-entropy random number utilities

The core package is providing strong randomness improving the simulation quality. We use NumPy grammar and as a backend.

  • HE-RNG random states.
  • Distributions:
    • Bionomial
    • Uniform integer on the given range
    • Uniform float on the given range
    • Normal distribution (Gaussian)
    • Random sampling from a set, choice.

Installation

It is recommended that latest stable package is released on the Python Package Index (PyPI). PyPI version should be installed via pip.

pip install leymosun

It is recommended that package shouldn't be installed via github version control, unless it is a specific release.

Lectures

Lectures notes that introduce randomization concepts with the usage of Leymosun. They also serve as functional tests.

  • : Title. Short.

  • Lecture 1: wigner_semicircle.ipynb: Lecture on the Wigner's semicircle law. The Wigner Semicircle law for the Gaussian Orthogonal Ensemble (GOE), comparison with the analytical case.

  • Lecture 2: wigner_dyson_spacing.ipynb: Lecture on the Wigner-Dyson nearest-neighbour distribution. The Wigner-Dyson spacing law for the Gaussian Orthogonal Ensemble (GOE), comparison with the analytical case.

  • Lecture 3: spectral_unfolding.ipynb: Self-consistent spectral unfolding understanding what is a spectral unfolding.

  • Lecture 4: mixed_construction.ipynb.ipynb: Construction of a mixed random matrix ensemble understanding the inner details of constructing mixed ensemble.

  • Lecture 5: wigner_cats.ipynb: On the Wigner's cats. Phenomenon of wigner cats.

  • Lecture 6: freezing_mgoe.ipynb: Frozen states and selective observation equivalence to mixed ensemble. This is the physical setting for the wigner cats, frozen qubit and chaotic system.

  • Lecture 7: rosenzweig_porter_gap_ratio.ipynb: Rosenzweig-Porter Ensemble and Gap ratio: Regular to chaotic quantum system. A random matrix ensemble that can exhibit different phases.

  • Lecture 8: krylov_fidelity_entangled.ipynb: Spread Complexity and fidelity for entangled states. Demonstration of computing fidelity and spread complexity.

  • Lecture 9: wigner_cats_standalone.ipynb: Standalone Wigner Cat Phases: Inverse Participation Ratios This lecture demonstrates Wigner Cat phases in a vanilla case: Permutation and IPR distribution.

Additional lecture:

  • he_rng_nist.ipynb: Lecture on Understanding High-Entropy RNGs with NIST benchmark. This lecture provides a way to test different RNGs or usage of RNGs via standard quality tests.

Development notes

  • Philosophy
    There is a common misconception in computational sciences that speed is the ultimate goal, however primary objective is scientific correctness first. For this reasons, scientific correctness is taken precedence over speed in the development of the package. For proven methods being a baseline, we might implement faster versions.
  • Testing
    • tests and nbconvert should be present as recommended dependency.
    • Test script should pass before any release. Unit tests runtests.sh and lectures runlectures.sh. (lecturePy directory is needed but this is ignored in the repo via .gitignore).
    • Add unit tests for each new method and features.
    • Add run portion for the new lecture in runlecture.sh.
  • Release:
    • Build python setup.py sdist
    • Release to PyPI twine upload dist/your_got.tar.gz
    • Make sure that github repo release versions are matching.

Citation

Please cite this package as follows

@misc{suzen25,
  author       = {Suzen, Mehmet},
  title        = {Leymosun: High-Entropy Randomness Research Toolkit},
  month        = dec,
  year         = 2025,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.17937440},
  url          = {https://doi.org/10.5281/zenodo.17937440},
}

Publications

Papers, manuscripts, datasets and other material that used leymosun.

  • Scrambling of Entanglement from Integrability to Chaos: Bootstrapped Time-Integrated Spread Complexity, M. Suzen, arXiv, arXiv:2604.14224 (2026)
  • Wigner Cat Phases: A finely tunable system for exploring the transition to quantum chaos, M. Suzen, arXiv, arXiv:2512.22169 (2025).
  • Empirical deviations of semicircle law in mixed-matrix ensembles, M. Suzen, HAL-Science, hal-03464130 (2021). 2025 improvements with the leymosun package.

We would be grateful for a citation of our paper(s) if you use leymosun or ideas from the package in your research. Initial introduction of mixed matrix ensembles and MMES algorithm with M-shaped (Wigner's Cat) density [suzen21, suzen25], integrated spread complexity [suzen26a]. The following is the bibtex entries:

@article{suzen26a,
  title={Scrambling of Entanglement from Integrability to Chaos: Bootstrapped Time-Integrated Spread Complexity}, 
  author={S{\"u}zen, M.},
  year={2026},
  eprint={2604.14224},
  archivePrefix={arXiv},
  primaryClass={quant-ph},
  url={https://arxiv.org/abs/2604.14224}, 
}

@article{suzen25,
  title={Wigner Cat Phases: A finely tunable system for exploring the transition to quantum chaos}, 
  author={S{\"u}zen, M.},
  year={2025},
  eprint={2512.22169},
  archivePrefix={arXiv},
  primaryClass={quant-ph},
  url={https://arxiv.org/abs/2512.22169}, 
}

@article{suzen21,
  title={Empirical deviations of semicircle law in mixed-matrix ensembles},
  author={S{\"u}zen, Mehmet},
  year={2021},
  journal={HAL-Science},
  url={https://hal.science/hal-03464130/}
}

License

License: GPL v3 License: CC BY 4.0

(c) 2026 M. Süzen

All codes are released under GPLv3.
Documentations are released under CC BY 4.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leymosun-0.4.21.tar.gz (31.6 kB view details)

Uploaded Source

File details

Details for the file leymosun-0.4.21.tar.gz.

File metadata

  • Download URL: leymosun-0.4.21.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for leymosun-0.4.21.tar.gz
Algorithm Hash digest
SHA256 e1d10917978c33a47c4d2a967a9c21491a177e999d4189ee58b54b1930d9f048
MD5 b534eccf1e8b9c68eb998dd1efa8c6c7
BLAKE2b-256 41ecb5ebdf13ed23d5b082c67bf411ea0a70aea89de0c4a732ee0c9246141863

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page