Efficient quantum computational chemistry based on TensorCircuit
Project description
TenCirChem
English | 简体中文
TenCirChem is an efficient and versatile quantum computation package for molecular properties. TenCirChem is based on TensorCircuit and is optimized for chemistry applications.
TenCirChem-NG is fully compatible with TenCirChem with more new features and bug fixes.
Easy Installation
Getting started with TenCirChem-NG by installing the package via pip:
pip install tencirchem-ng
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
- UCC speed is 10000x faster than other packages
- Easy to hack
- Avoid defining new classes and wrappers when possible
- Example: Excitation operators are represented as
tuple
ofint
. An operator pool is simply alist
oftuple
- Example: Excitation operators are represented as
- Minimal class inheritance hierarchy: at most two levels
- Expose internal variables through class attributes
- Avoid defining new classes and wrappers when possible
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tencirchem_ng-2024.10.tar.gz
.
File metadata
- Download URL: tencirchem_ng-2024.10.tar.gz
- Upload date:
- Size: 117.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 825f1a128ac37b6565788ba1e8652fb44682196ac257d4d532a9e57371305184 |
|
MD5 | 64d61f1a0b96f69756a9230ebb5edad3 |
|
BLAKE2b-256 | 17eff9d5337cc6b4fd5049d2e898368329be7b7f00280fd22c9724d497ce9999 |
File details
Details for the file tencirchem_ng-2024.10-py3-none-any.whl
.
File metadata
- Download URL: tencirchem_ng-2024.10-py3-none-any.whl
- Upload date:
- Size: 193.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6687380cf11ebc47a7ba71a82ad4deb86c0096e54e9350c96e90b069b0c72ed1 |
|
MD5 | a5f34e9a51c103f8be44a41c50ee26a1 |
|
BLAKE2b-256 | 2d6ba89bb5cde88292894fca32dfca22326d2bd70c97015b59b18e8b298c4cb4 |