Skip to main content

Leymosun Science: Quantum Research Toolkit

Leymosun Science (Lemesos Science): Quantum information, statistics, dynamics and closely related computational tools.

Static Badge PyPI version Downloads Downloads

Papers and datasets using the package

Static Badge Empirical deviations of semicircle law in mixed-matrix ensembles
arXiv:2512.22169 Wigner Cat Phases: A finely tunable system for exploring the transition to quantum chaos
arXiv:2604.14224 Scrambling of Entanglement from Integrability to Chaos: Bootstrapped Time-Integrated Spread Complexity
DOI Supplement and Dataset for Bootstrapped Time-Integrated Spread Complexity (Zenodo Repository)
DOI Wigner Cat Phases: A finely tunable system for exploring the transition to quantum chaos (Zenodo Repository)

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.

Features

We provide full functionality and capabilities in the lectures section. Here we summarize them by topic.

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.

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.
  • Installing:
    • In clean environment run pip install . for dependencies.
    • pip install ".[dev]" for the dev dependencies.
  • 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 Science: Quantum Research Toolkit},
  year         = {2026},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.17578756},
  url          = {https://doi.org/10.5281/zenodo.17578756},
}

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.

Metadata

Release files for leymosun 0.4.45

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leymosun 0.4.45
File Size Uploaded Provenance Actions
leymosun-0.4.45.tar.gz 33.1 kB Without provenance Details for leymosun-0.4.45.tar.gz

Release files / leymosun-0.4.45.tar.gz

Download URL leymosun-0.4.45.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0f131d104f6adc06257afb8dcef4d61a61dc61b8aaa5e6f01a865949691f669d
BLAKE2b-256 checksum
How to use checksums
9f3b1c12a7e7bb8efaef75ef1e112f1602ce6ea0fe42b2103732236b7fff1dee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for leymosun 0.4.45

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page