Giter Club home page Giter Club logo

vqe_downfold's Introduction

Basis Downfolding

In quantum chemistry calculation, choosing cut-off dimension is important. To make use of limited computation resource, we desire to efficiently represent larger Hilbert space with a small set of basis, which is called downfolding. Here we implement several downfolding strategy. We also test VQE with the downfolded Hamiltonians. The codes are stored in downfolding_methods.py.

genHam.py and solveHam.py are wrappers to make it user friendly.

Usage

1. Prepare a configuration file of molecule in .xyz format. e.g. H2.xyz:

2

H 0 0 0
H 0 0 0.75

2. Generate downfolded Fermionic Hamiltonian. Downfolding strategy can be set by --strategy. The result is stored in fermionic_ham.tmp.json. e.g.:

python3 genHam.py --config H2.xyz --strategy HF ccpVDZ sto-3G

where --strategy in the example means using Hatree Fock to downfold ccpVDZ basis into a smaller basis with the same size of sto-3G basis. Here HF can be replaced by B3LYP or EGNN. If we set two same basis like --strategy HF sto-3G sto-3G, the programe will do no downfolding and generate a Hamiltonian on sto-3G molecular orbital (MO) basis. The downfolding strategy is explained in /documents.

We can also use a self defined fock matrix TBD, we provide a EGNN method TBD.

We also provide Quasi Orbital(QO) strategy TBD. (Reference Here, TBD)

3. Do Jordan Wigner transformation. The result is stored in qubit_ham.tmp.json.

python3 genHam.py -JW

4. Solve the Hamiltonian. Solve fermionic Hamiltonian with FCI:

python3 solveHam.py --particle fermion --method FCI 

Alternatively, we can set --method ED to solve qubit Hamiltonian with ED; or set --method FCI or --method CCSD to solve fermionic Hamiltonian.

Examples

simple_example

A simple example following this readme file.

H2 dissociation

In this example, we directly use functions in downfolding_methods.py. WHere we benchmark the energy results of different downfolding strategies, we also benchmark the 1-norm of Pauli coefficient of the Hamiltonian.

vqe_downfold's People

Contributors

he-wenhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.