PyTeNet

PyTeNet: A concise Python implementation of quantum tensor network algorithms - Published in JOSS (2018)

https://github.com/cmendl/pytenet

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 15 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Physics Physical Sciences - 80% confidence
Mathematics Computer Science - 63% confidence
Materials Science Physical Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Python implementation of quantum tensor network operations and simulations: matrix product states and operators, TDVP time evolution, support for quantum numbers, ...

Basic Info
  • Host: GitHub
  • Owner: cmendl
  • License: bsd-2-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 414 KB
Statistics
  • Stars: 65
  • Watchers: 6
  • Forks: 12
  • Open Issues: 0
  • Releases: 0
Created over 7 years ago · Last pushed 5 months ago
Metadata Files
Readme License

README.rst

.. image:: https://github.com/cmendl/pytenet/actions/workflows/ci.yml/badge.svg
  :target: https://github.com/cmendl/pytenet/actions/workflows/ci.yml
.. image:: http://joss.theoj.org/papers/10.21105/joss.00948/status.svg
  :target: https://doi.org/10.21105/joss.00948


PyTeNet
=======

.. doc-inclusion-marker1-start

`PyTeNet `_ is a Python implementation of quantum
tensor network operations and simulations within the matrix product state framework,
using NumPy to handle tensors.

Example usage for TDVP time evolution:

.. code-block:: python

    import pytenet as ptn

    # number of lattice sites (1D with open boundary conditions)
    L = 10

    # construct matrix product operator representation of
    # Heisenberg XXZ Hamiltonian (arguments are L, J, \Delta, h)
    mpoH = ptn.heisenberg_xxz_mpo(L, 1.0, 0.8, -0.1)
    mpoH.zero_qnumbers()

    # initial wavefunction as MPS with random entries
    # maximally allowed virtual bond dimensions
    D = [1, 2, 4, 8, 16, 28, 16, 8, 4, 2, 1]
    psi = ptn.MPS(mpoH.qd, [Di*[0] for Di in D], fill='random')
    # effectively clamp virtual bond dimension of initial state
    Dinit = 8
    for i in range(L):
        psi.A[i][:, Dinit:, :] = 0
        psi.A[i][:, :, Dinit:] = 0
    psi.orthonormalize(mode='left')

    # time step can have both real and imaginary parts;
    # for real time evolution use purely imaginary dt!
    dt = 0.01 - 0.05j
    numsteps = 100

    # run TDVP time evolution
    ptn.tdvp_singlesite(mpoH, psi, dt, numsteps, numiter_lanczos=5)
    # psi now stores the (approximated) time-evolved state exp(-dt*numsteps H) psi


Features
--------
- matrix product state and operator classes
- construct common Hamiltonians as MPOs, straightforward to adapt to custom Hamiltonians
- convert arbitrary operator chains to MPOs
- TDVP time evolution (single- and two-site, both real and imaginary time)
- generate vector / matrix representations of matrix product states / operators
- Krylov subspace methods for local operations, like local energy minimization
- single- and two-site DMRG algorithm
- built-in support for additive quantum numbers


Installation
------------
To install PyTeNet from PyPI, call

.. code-block:: python

    python3 -m pip install pytenet

Alternatively, you can clone the `repository `_ and install it in development mode via

.. code-block:: python

    python3 -m pip install -e 

.. doc-inclusion-marker1-end


Documentation
-------------
The full documentation is available at `pytenet.readthedocs.io `_.


Directory structure
-------------------
- **pytenet**: source code of the actual PyTeNet package
- **doc**: documentation and tutorials
- **test**: unit tests (might serve as detailed documentation, too)
- **experiments**: numerical experiments on more advanced, in-depth topics
- **paper**: JOSS manuscript


.. doc-inclusion-marker2-start

Contributing
------------
Feature requests, discussions and code contributions to PyTeNet in the form of
`pull requests `_ are of course welcome.
Creating an `issue `_ might be a good starting point.
New code should be well documented (`Google style docstrings `_)
and unit-tested (see the `test/` subfolder).
For questions and additional support, fell free to contact christian.b.mendl@gmail.com


Citing
------
PyTeNet is `published `_ in the Journal of Open Source Software -
if it's ever useful for a research project please consider citing it:

.. code-block:: latex

    @Article{pytenet,
      author  = {Mendl, Christian B.},
      title   = {{PyTeNet}: A concise {P}ython implementation of quantum tensor network algorithms},
      journal = {Journal of Open Source Software},
      year    = {2018},
      volume  = {3},
      number  = {30},
      pages   = {948},
      doi     = {10.21105/joss.00948},
    }


License
-------
PyTeNet is licensed under the BSD 2-Clause license.


References
----------
1. | U. Schollwöck
   | The density-matrix renormalization group in the age of matrix product states
   | `Ann. Phys. 326, 96-192 (2011) `_ (`arXiv:1008.3477 `_)
2. | J. Haegeman, C. Lubich, I. Oseledets, B. Vandereycken, F. Verstraete
   | Unifying time evolution and optimization with matrix product states
   | `Phys. Rev. B 94, 165116 (2016) `_ (`arXiv:1408.5056 `_)
3. | I. P. McCulloch
   | From density-matrix renormalization group to matrix product states
   | `J. Stat. Mech. (2007) P10014 `_ (`arXiv:cond-mat/0701428 `_)
4. | T. Barthel
   | Precise evaluation of thermal response functions by optimized density matrix renormalization group schemes
   | `New J. Phys. 15, 073010 (2013) `_ (`arXiv:1301.2246 `_)

.. doc-inclusion-marker2-end

Owner

  • Name: Christian B. Mendl
  • Login: cmendl
  • Kind: user
  • Location: Munich, Germany
  • Company: Technische Universität München

JOSS Publication

PyTeNet: A concise Python implementation of quantum tensor network algorithms
Published
October 16, 2018
Volume 3, Issue 30, Page 948
Authors
Christian B. Mendl ORCID
Technische Universität Dresden, Institute of Scientific Computing, Zellescher Weg 12-14, 01069 Dresden, Germany
Editor
Jed Brown ORCID
Tags
quantum mechanics and simulation DMRG / matrix product state framework quantum tensor networks TDVP time evolution computational physics

GitHub Events

Total
  • Watch event: 10
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 12
  • Pull request event: 2
  • Fork event: 1
Last Year
  • Watch event: 10
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 13
  • Pull request event: 2
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 146
  • Total Committers: 2
  • Avg Commits per committer: 73.0
  • Development Distribution Score (DDS): 0.007
Past Year
  • Commits: 21
  • Committers: 2
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.048
Top Committers
Name Email Commits
Christian B. Mendl c****l@g****m 145
Drachier r****t@t****e 1
Committer Domains (Top 20 + Academic)
tum.de: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 3
  • Total pull requests: 1
  • Average time to close issues: 2 days
  • Average time to close pull requests: 9 days
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 9 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jcmgray (2)
  • mlxd (1)
Pull Request Authors
  • Drachier (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 51 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: pytenet

Tensor network library for quantum simulations

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 51 Last month
Rankings
Stargazers count: 9.7%
Dependent packages count: 10.1%
Forks count: 10.5%
Average: 18.4%
Dependent repos count: 21.6%
Downloads: 40.2%
Maintainers (1)
Last synced: 4 months ago

Dependencies

setup.py pypi
  • numpy >=1.9
  • scipy >=1.0.0
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
doc/requirements.txt pypi
  • ipython *
  • nbsphinx *
  • sphinx >=5.0.0
pyproject.toml pypi
  • numpy *
  • scipy *