Skip to main content

Numerical and symbolic implementation of quasi-degenerate perturbation theory

Project description

Pymablock: quasi-degenerate perturbation theory in Python

Pymablock (Python matrix block-diagonalization) is a Python package that constructs effective models using quasi-degenerate perturbation theory. It handles both numerical and symbolic inputs, and it efficiently block-diagonalizes Hamiltonians with multivariate perturbations to arbitrary order.

Building an effective model using Pymablock is a three step process:

  • Define a Hamiltonian
  • Call pymablock.block_diagonalize
  • Request the desired order of the effective Hamiltonian
from pymablock import block_diagonalize

# Define perturbation theory
H_tilde, *_ = block_diagonalize([h_0, h_p], subspace_eigenvectors=[vecs_A, vecs_B])

# Request correction to the effective Hamiltonian
H_AA_4 = H_tilde[0, 0, 4]

Here is why you should use Pymablock:

  • Do not reinvent the wheel

    Pymablock provides a tested reference implementation

  • Apply to any problem

    Pymablock supports numpy arrays, scipy sparse arrays, sympy matrices and quantum operators

  • Speed up your code

    Due to several optimizations, Pymablock can reliably handle both higher orders and large Hamiltonians

For more details see the Pymablock documentation.

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

pymablock-2.2.1.tar.gz (80.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymablock-2.2.1-py3-none-any.whl (87.2 kB view details)

Uploaded Python 3

File details

Details for the file pymablock-2.2.1.tar.gz.

File metadata

  • Download URL: pymablock-2.2.1.tar.gz
  • Upload date:
  • Size: 80.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pymablock-2.2.1.tar.gz
Algorithm Hash digest
SHA256 3c78c8021db23adea657ccd69dc7e52cd8643f077885ad0c265fe37a49288dd5
MD5 cfe055626f67d4adff39d99988338462
BLAKE2b-256 65806ab4d6f94d1ca39c37225722a9c7f9c5f836fe54287291e6b2cc5fc38cdb

See more details on using hashes here.

File details

Details for the file pymablock-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: pymablock-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 87.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pymablock-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc19dc6f47cc3ad8794fd21f1915927a38b3c1fbaacd880ad776a7650e2e00a
MD5 8db2bd60ce641c88f966384cda860eba
BLAKE2b-256 1780ef1e55eec87dcf0cb295f304f2445e4e9d95ca1673d2211e8882b31ef3f7

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