Home

Awesome

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:

Design principle

TenCirChem is designed to be:

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).