Skip to main content

TenCirChem

TenCirChem

ci codecov pypi doc Binder

English | 简体中文

TenCirChem is an efficient and versatile quantum computation package for molecular properties. TenCirChem is based on TensorCircuit and is optimized for chemistry applications.

Easy Installation

Getting started with TenCirChem by installing the package via pip:

pip install tencirchem

Simple to Use

TenCirChem is written in pure Python, and its use is straightforward. Here's an example of calculating UCCSD:

from tencirchem import UCCSD, M

d = 0.8
# distance unit is angstrom
h4 = M(atom=[["H", 0, 0, d * i] for i in range(4)])

# configuration
uccsd = UCCSD(h4)
# calculate and returns energy
uccsd.kernel()
# analyze result
uccsd.print_summary(include_circuit=True)

Running uccsd.kernel() in the above code determines the optimized circuit ansatz parameters and VQE energy.
TenCirChem also allows the user to supply custom parameters. Here's an example:

import numpy as np

from tencirchem import UCCSD
from tencirchem.molecule import h4

uccsd = UCCSD(h4)
# evaluate various properties based on custom parameters
params = np.zeros(uccsd.n_params)
print(uccsd.statevector(params))
print(uccsd.energy(params))
print(uccsd.energy_and_grad(params))

For more examples and customization, please refer to the documentation

Exciting Features

TenCirChem's features include:

  • Statics module
    • UCC calculation with UCCSD, kUpCCGSD, pUCCD at an extremely fast speed
    • Noisy circuit simulation via TensorCircuit
    • Custom integrals, active space approximation, RDMs, GPU support, etc.
  • Dynamics module
    • Transformation from renormalizer models to qubit representation
    • VQA algorithm based on JAX
    • Built-in models: spin-boson model, pyrazine S1/S2 internal conversion dynamics

Design principle

TenCirChem is designed to be:

  • Fast
    • UCC speed is 10000x faster than other packages
      • Example: H8 with 16 qubits in 2s (CPU). H10 with 20 qubits in 14s (GPU)
      • Achieved by analytical expansion of UCC factors and exploitation of symmetry
  • Easy to hack
    • Avoid defining new classes and wrappers when possible
      • Example: Excitation operators are represented as tuple of int. An operator pool is simply a list of tuple
    • Minimal class inheritance hierarchy: at most two levels
    • Expose internal variables through class attributes

License

TenCirChem is released under Academic Public License. See the LICENSE file for details. In short, you can use TenCirChem freely for non-commercial/academic purpose and commercial use requires a commercial license.

Citing TenCirChem

If this project helps in your research, please cite our software whitepaper:

TenCirChem: An Efficient Quantum Computational Chemistry Package for the NISQ Era

which is also a good introduction to the software.

Research and Applications

Variational basis state encoder

An efficient algorithm to encode phonon states in electron-phonon systems for quantum computation. See examples and the tutorial. Reference paper: https://arxiv.org/pdf/2301.01442.pdf (published in PRR).

Metadata

Release files for tencirchem 2024.11

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

Source distribution (sdist)

Source distribution for tencirchem 2024.11
File Size Uploaded Provenance
tencirchem-2024.11.tar.gz 63.9 kB With provenance Details

Release files / tencirchem-2024.11.tar.gz

Download URL tencirchem-2024.11.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5625f459e185019ad2d0e343e03af02fbdb6a477e67c67694d379d7e09eb9b1a
BLAKE2b-256 checksum
How to use checksums
2324cefd4e8cd91eed8f7720c12611fe2dc5c998d058f934c2624052076ccd85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2024.

Transparency log

Security for tencirchem 2024.11

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.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for tencirchem-2024.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2024.

Transparency log

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.

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