Code Monkey home page Code Monkey logo

qforte's Introduction

Qforte

Travis Build Status

Qforte is an open-source quantum computer simulator and algorithms library for molecular simulation. It includes implementations of the following algorithms: quantum phase estimation (QPE), multireference selected quantum Krylov (MRSQK), quantum imaginary time evolution (QITE), ADAPT variational quantum eigensolver (VQE), and unitary coupled cluster singles and doubles VQE (UCCSD-VQE).

Install Dependencies (Recommended)

create and activate qforte environment:

conda create -n qforte_env python=3.7
conda activate qforte_env

install psi4 and openfermion:

conda install psi4 openfermion openfermionpsi4 -c psi4

Installation (For Development)

git clone https://github.com/evangelistalab/qforte.git
cd qforte
python setup.py develop

To supply custom arguments to cmake for installation, you can either edit setup.py or CMakeLists.txt.

run tests:

python setup.py test

Getting Started

import qforte

# Construct a Bell state.
computer = qforte.QuantumComputer(2)
computer.apply_gate(qforte.gate('H',0))
computer.apply_gate(qforte.gate('cX',1,0))

# Run quantum phase estimation on H2.
from qforte.qpea.qpe import QPE
from qforte.system import system_factory

H2geom = [('H', (0., 0., 0.)), ('H', (0., 0., 1.50))]
H2ref = [1,1,0,0]

H2mol = system_factory(mol_geometry=H2geom)

alg = QPE(H2mol, H2ref, trotter_number=2)
alg.run(t = 0.4,
        nruns = 100,
        success_prob = 0.5,
        num_precise_bits = 8)

Egs = alg.get_gs_energy()

Copyright

Copyright (c) 2019, The Evangelista Lab

qforte's People

Contributors

nstair avatar fevangelista avatar jonathonmisiewicz avatar henankf223 avatar renkehuang 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.