|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +# OpenFermion |
| 4 | + |
| 5 | +Electronic structure package for quantum computers. |
| 6 | + |
| 7 | +[](https://www.python.org/downloads/) |
| 8 | +[](https://github.com/quantumlib/OpenFermion/blob/main/LICENSE) |
| 9 | +[](https://pypi.org/project/OpenFermion) |
| 10 | +[](https://img.shields.io/pypi/dm/OpenFermion) |
| 11 | + |
| 12 | +[Features](#features) – |
| 13 | +[Installation](#installation) – |
| 14 | +[Plugins](#plugins) – |
| 15 | +[Documentation](#documentation) – |
| 16 | +[Contributing](#contributing-to-openfermion) – |
| 17 | +[Citing](#citing-openfermion) – |
| 18 | +[Authors](#authors) – |
| 19 | +[Contact](#contact) |
| 20 | + |
| 21 | +</div> |
| 22 | + |
| 23 | +## Features |
| 24 | + |
| 25 | +OpenFermion is an open-source Python package for compiling and analyzing quantum algorithms to |
| 26 | +simulate fermionic systems, including quantum chemistry. Among other features, it includes data |
| 27 | +structures and tools for obtaining and manipulating representations of fermionic and qubit |
| 28 | +Hamiltonians. More information can be found in the [release |
| 29 | +paper](https://arxiv.org/abs/1710.07629). |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +Installing the latest **stable** OpenFermion requires the Python package installer |
| 34 | +[pip](https://pip.pypa.io). (Make sure that you are using an up-to-date version of it.) |
| 35 | + |
| 36 | +Currently, OpenFermion is tested on Mac, Windows, and Linux. We recommend using Mac or Linux because |
| 37 | +the electronic structure plugins are only compatible on these platforms. However, for those who |
| 38 | +would like to use Windows, or for anyone having other difficulties with installing OpenFermion or |
| 39 | +its plugins, we provide instructions for creating and using a Docker image – see the |
| 40 | +[`docker/`](https://github.com/quantumlib/OpenFermion/tree/main/docker) subdirectory. The Docker |
| 41 | +image provides a virtual environment with OpenFermion and select plugins pre-installed. The Docker |
| 42 | +installation should run on any operating system where Docker can be used. |
| 43 | + |
| 44 | +### User installation |
| 45 | + |
| 46 | +To install the latest PyPI release of OpenFermion as a Python package for the current user (which |
| 47 | +avoids modifying system Python packages), run the following command: |
| 48 | + |
| 49 | +```shell |
| 50 | +python -m pip install --user openfermion |
| 51 | +``` |
| 52 | + |
| 53 | +### Developer installation |
| 54 | + |
| 55 | +To install the latest version of OpenFermion in development mode, run the following commands: |
| 56 | + |
| 57 | +```shell |
| 58 | +git clone https://github.com/quantumlib/OpenFermion |
| 59 | +cd OpenFermion |
| 60 | +python -m pip install -e . |
| 61 | +``` |
| 62 | + |
| 63 | +## Plugins |
| 64 | + |
| 65 | +OpenFermion relies on modular plugin packages for significant functionality. Specifically, plugins |
| 66 | +are used to simulate and compile quantum circuits and to perform classical electronic structure |
| 67 | +calculations. Follow the links below to learn more! |
| 68 | + |
| 69 | +### High-performance simulators |
| 70 | + |
| 71 | +* [OpenFermion-FQE](https://github.com/quantumlib/OpenFermion-FQE) is a high-performance emulator |
| 72 | + of fermionic quantum evolutions specified by a sequence of fermion operators, which can exploit |
| 73 | + fermionic symmetries such as spin and particle number. |
| 74 | + |
| 75 | +### Circuit compilation plugins |
| 76 | + |
| 77 | +* [Forest-OpenFermion](https://github.com/rigetticomputing/forestopenfermion) to support |
| 78 | + integration with [Forest](https://www.rigetti.com/forest). |
| 79 | +* [SFOpenBoson](https://github.com/XanaduAI/SFOpenBoson) to support integration with [Strawberry |
| 80 | + Fields](https://github.com/XanaduAI/strawberryfields). |
| 81 | + |
| 82 | +### Electronic structure package plugins |
| 83 | + |
| 84 | +* [OpenFermion-Psi4](http://github.com/quantumlib/OpenFermion-Psi4) to support integration with |
| 85 | + [Psi4](http://psicode.org). |
| 86 | +* [OpenFermion-PySCF](http://github.com/quantumlib/OpenFermion-PySCF) to support integration with |
| 87 | + [PySCF](https://github.com/sunqm/pyscf). |
| 88 | +* [OpenFermion-Dirac](https://github.com/bsenjean/Openfermion-Dirac) to support integration with |
| 89 | + [DIRAC](http://diracprogram.org/doku.php). |
| 90 | +* [OpenFermion-QChem](https://github.com/qchemsoftware/OpenFermion-QChem) to support integration |
| 91 | + with [Q-Chem](https://www.q-chem.com). |
| 92 | + |
| 93 | +## Documentation |
| 94 | + |
| 95 | +Documentation for OpenFermion can be found at |
| 96 | +[quantumai.google/openfermion](https://quantumai.google/openfermion) and the following links: |
| 97 | + |
| 98 | +* [Installation](https://quantumai.google/openfermion/install) |
| 99 | +* [API Docs](https://quantumai.google/reference/python/openfermion/all_symbols) |
| 100 | +* [Tutorials](https://quantumai.google/openfermion/tutorials/intro_to_openfermion) |
| 101 | + |
| 102 | +You can run OpenFermion's interactive Jupyter Notebooks, such as the introductory tutorial, in |
| 103 | +[Colab](https://colab.research.google.com/github/quantumlib/OpenFermion/blob/main/examples/intro_to_openfermion.ipynb) |
| 104 | +or |
| 105 | +[MyBinder](https://mybinder.org/v2/gh/quantumlib/OpenFermion/main?filepath=examples%2Fintro_to_openfermion.ipynb). |
| 106 | + |
| 107 | +## Contributing to OpenFermion |
| 108 | + |
| 109 | +We'd love to accept your contributions and patches to OpenFermion. There are a few small guidelines |
| 110 | +you need to follow. |
| 111 | + |
| 112 | +* Contributions to OpenFermion must be accompanied by a Contributor License Agreement (CLA). You |
| 113 | + (or your employer) retain the copyright to your contribution; the CLA simply gives us permission |
| 114 | + to use and redistribute your contributions as part of the OpenFermion project. Please visit |
| 115 | + https://cla.developers.google.com/ to see your current agreements on file or to sign a new one. |
| 116 | +* All submissions, including submissions by project members, require review. We use GitHub pull |
| 117 | + requests for this purpose. Consult the appropriate [GitHub Help |
| 118 | + documentation](https://help.github.com/articles/about-pull-requests/) for more information on |
| 119 | + using pull requests. |
| 120 | +* Please make sure your new code comes with extensive tests! We use automatic testing to make sure |
| 121 | + all pull requests pass tests and do not decrease overall test coverage by too much. |
| 122 | +* Please also make sure to follow the OpenFermion source code style. We mostly follow Python's |
| 123 | + [PEP 8](https://www.python.org/dev/peps/pep-0008/) guidelines and use the corresponding |
| 124 | + [linter](https://pypi.python.org/pypi/pep8) to check for it. |
| 125 | +* Code should always be accompanied by documentation. Formatted OpenFermion documentation is |
| 126 | + generated automatically and can be found [on the Quantum AI web |
| 127 | + site](https://quantumai.google/openfermion). |
| 128 | +* We use [GitHub issues](https://github.com/quantumlib/OpenFermion/issues) for tracking requests |
| 129 | + and bugs. Please post questions to the [Quantum Computing Stack |
| 130 | + Exchange](https://quantumcomputing.stackexchange.com/) with an `openfermion` tag. |
| 131 | + |
| 132 | +## Citing OpenFermion<a name="how-to-cite-openfermion"></a><a name="how-to-cite"></a> |
| 133 | + |
| 134 | +OpenFermion is the work of many people. When using OpenFermion for research projects, please cite |
| 135 | +the [published paper](https://doi.org/10.1088/2058-9565/ab8ebc): |
| 136 | + |
| 137 | +> Jarrod R McClean, Nicholas C Rubin, Kevin J Sung, Ian D Kivlichan, Xavier Bonet-Monroig, Yudong |
| 138 | +> Cao, Chengyu Dai, E Schuyler Fried, Craig Gidney, Brendan Gimby, Pranav Gokhale, Thomas Häner, |
| 139 | +> Tarini Hardikar, Vojtěch Havlíček, Oscar Higgott, Cupjin Huang, Josh Izaac, Zhang Jiang, Xinle |
| 140 | +> Liu, Sam McArdle, Matthew Neeley, Thomas O'Brien, Bryan O'Gorman, Isil Ozfidan, Maxwell D Radin, |
| 141 | +> Jhonathan Romero, Nicolas P D Sawaya, Bruno Senjean, Kanav Setia, Sukin Sim, Damian S Steiger, |
| 142 | +> Mark Steudtner, Qiming Sun, Wei Sun, Daochen Wang, Fang Zhang, and Ryan Babbush. (2020). |
| 143 | +> OpenFermion: The Electronic Structure Package for Quantum Computers. _Quantum Science and |
| 144 | +> Technology_, 5(3), 034014. |
| 145 | +
|
| 146 | +For formatted citations and records in other formats, as well as records for all releases of OpenFermion |
| 147 | +past and present, please visit the [OpenFermion page on Zenodo](https://zenodo.org/records/15604843). |
| 148 | + |
| 149 | +## Authors |
| 150 | + |
| 151 | +[Ryan Babbush](https://ryanbabbush.com) (Google), |
| 152 | +[Jarrod McClean](https://jarrodmcclean.com) (Google), |
| 153 | +[Nicholas Rubin](https://github.com/ncrubin) (Google), |
| 154 | +[Kevin Sung](https://github.com/kevinsung) (University of Michigan), |
| 155 | +[Ian Kivlichan](https://aspuru.chem.harvard.edu/ian-kivlichan/) (Harvard), |
| 156 | +[Dave Bacon](https://github.com/dabacon) (Google), |
| 157 | +[Xavier Bonet-Monroig](https://github.com/xabomon) (Leiden University), |
| 158 | +[Yudong Cao](https://github.com/yudongcao) (Harvard), |
| 159 | +[Chengyu Dai](https://github.com/jdaaph) (University of Michigan), |
| 160 | +[E. Schuyler Fried](https://github.com/schuylerfried) (Harvard), |
| 161 | +[Craig Gidney](https://github.com/Strilanc) (Google), |
| 162 | +[Brendan Gimby](https://github.com/bgimby) (University of Michigan), |
| 163 | +[Pranav Gokhale](https://github.com/singular-value) (University of Chicago), |
| 164 | +[Thomas Häner](https://github.com/thomashaener) (ETH Zurich), |
| 165 | +[Tarini Hardikar](https://github.com/TariniHardikar) (Dartmouth), |
| 166 | +[Vojtĕch Havlíček](https://github.com/VojtaHavlicek) (Oxford), |
| 167 | +[Oscar Higgott](https://github.com/oscarhiggott) (University College London), |
| 168 | +[Cupjin Huang](https://github.com/pertoX4726) (University of Michigan), |
| 169 | +[Josh Izaac](https://github.com/josh146) (Xanadu), |
| 170 | +[Zhang Jiang](https://ti.arc.nasa.gov/profile/zjiang3) (NASA), |
| 171 | +[William Kirby](https://williammkirby.com) (Tufts University), |
| 172 | +[Xinle Liu](https://github.com/sheilaliuxl) (Google), |
| 173 | +[Sam McArdle](https://github.com/sammcardle30) (Oxford), |
| 174 | +[Matthew Neeley](https://github.com/maffoo) (Google), |
| 175 | +[Thomas O'Brien](https://github.com/obriente) (Leiden University), |
| 176 | +[Bryan O'Gorman](https://ti.arc.nasa.gov/profile/bogorman) (UC Berkeley, NASA), |
| 177 | +[Isil Ozfidan](https://github.com/conta877) (D-Wave Systems), |
| 178 | +[Max Radin](https://github.com/max-radin) (UC Santa Barbara), |
| 179 | +[Jhonathan Romero](https://github.com/jromerofontalvo) (Harvard), |
| 180 | +[Daniel Sank](https://github.com/DanielSank) (Google), |
| 181 | +[Nicolas Sawaya](https://github.com/nicolassawaya) (Harvard), |
| 182 | +[Bruno Senjean](https://github.com/bsenjean) (Leiden University), |
| 183 | +[Kanav Setia](https://github.com/kanavsetia) (Dartmouth), |
| 184 | +[Hannah Sim](https://github.com/hsim13372) (Harvard), |
| 185 | +[Damian Steiger](https://github.com/damiansteiger) (ETH Zurich), |
| 186 | +[Mark Steudtner](https://github.com/msteudtner) (Leiden University), |
| 187 | +[Qiming Sun](https://github.com/sunqm) (Caltech), |
| 188 | +[Wei Sun](https://github.com/Spaceenter) (Google), |
| 189 | +[Daochen Wang](https://github.com/daochenw) (River Lane Research), |
| 190 | +[Chris Winkler](https://github.com/quid256) (University of Chicago), |
| 191 | +[Fang Zhang](https://github.com/fangzh-umich) (University of Michigan), |
| 192 | +and [Emiel Koridon](https://github.com/Emieeel) (Leiden University). |
| 193 | + |
| 194 | +We are happy to include future contributors as authors on later releases. |
| 195 | + |
| 196 | +## Contact |
| 197 | + |
| 198 | +For any questions or concerns not addressed here, please email [email protected]. |
| 199 | + |
| 200 | +## Disclaimer |
| 201 | + |
| 202 | +This is not an officially-supported Google product. This project is not eligible for the [Google |
| 203 | +Open Source Software Vulnerability Rewards |
| 204 | +Program](https://bughunters.google.com/open-source-security). |
| 205 | + |
| 206 | +Copyright 2017 The OpenFermion Developers. |
| 207 | + |
| 208 | +<div align="center"> |
| 209 | + <a href="https://quantumai.google"> |
| 210 | + <img width="15%" alt="Google Quantum AI" |
| 211 | + src="https://raw.githubusercontent.com/quantumlib/OpenFermion/refs/heads/main/docs/images/quantum-ai-vertical.svg"> |
| 212 | + </a> |
| 213 | +</div> |
0 commit comments