-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new branch with changes to the qibochem/README.md
- Loading branch information
1 parent
ad1277b
commit 2fe5efd
Showing
43 changed files
with
6,284 additions
and
6,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,61 @@ | ||
# Qibochem | ||
|
||
![Tests](https://github.com/qiboteam/qibochem/workflows/Tests/badge.svg) | ||
[![codecov](https://codecov.io/gh/qiboteam/qibochem/graph/badge.svg?token=2CMDZP1GU2)](https://codecov.io/gh/qiboteam/qibochem) | ||
|
||
Qibochem is a plugin to [Qibo](https://github.com/qiboteam/qibo) for quantum chemistry simulations. | ||
|
||
Some of the features of Qibochem are: | ||
|
||
* General purpose `Molecule` class | ||
* PySCF for calculating the molecular 1- and 2-electron integrals | ||
* User defined orbital active space | ||
* Unitary Coupled Cluster Ansatz | ||
* Various Qibo backends (numpy, JIT, TN) for efficient simulation | ||
|
||
## Documentation | ||
|
||
The Qibochem documentation can be found [here](https://qibo.science/qibochem/stable) | ||
|
||
## Minimum working example: | ||
|
||
An example of building the UCCD ansatz with a H2 molecule | ||
|
||
``` | ||
import numpy as np | ||
from qibo.models import VQE | ||
from qibochem.driver.molecule import Molecule | ||
from qibochem.ansatz.hf_reference import hf_circuit | ||
from qibochem.ansatz.ucc import ucc_circuit | ||
# Define the H2 molecule and obtain its 1-/2- electron integrals with PySCF | ||
h2 = Molecule([('H', (0.0, 0.0, 0.0)), ('H', (0.0, 0.0, 0.7))]) | ||
h2.run_pyscf() | ||
# Generate the molecular Hamiltonian | ||
hamiltonian = h2.hamiltonian() | ||
# Build a UCC circuit ansatz for running VQE | ||
circuit = hf_circuit(h2.nso, sum(h2.nelec)) | ||
circuit += ucc_circuit(h2.nso, [0, 1, 2, 3]) | ||
# Create and run the VQE, starting with random initial parameters | ||
vqe = VQE(circuit, hamiltonian) | ||
initial_parameters = np.random.uniform(0.0, 2*np.pi, 8) | ||
best, params, extra = vqe.minimize(initial_parameters) | ||
``` | ||
|
||
## Contributing | ||
|
||
Contributions, issues and feature requests are welcome. | ||
# Qibochem | ||
|
||
![Tests](https://github.com/qiboteam/qibochem/workflows/Tests/badge.svg) | ||
[![codecov](https://codecov.io/gh/qiboteam/qibochem/graph/badge.svg?token=2CMDZP1GU2)](https://codecov.io/gh/qiboteam/qibochem) | ||
|
||
Qibochem is a plugin to [Qibo](https://github.com/qiboteam/qibo) for quantum chemistry simulations. | ||
|
||
Some of the features of Qibochem are: | ||
|
||
* General purpose `Molecule` class | ||
* PySCF for calculating the molecular 1- and 2-electron integrals | ||
* User defined orbital active space | ||
* Unitary Coupled Cluster Ansatz | ||
* Various Qibo backends (numpy, JIT, TN) for efficient simulation | ||
|
||
## Documentation | ||
|
||
The Qibochem documentation can be found [here](https://qibo.science/qibochem/stable) | ||
|
||
## Minimum working example: | ||
|
||
An example of building the UCCD ansatz with a H2 molecule | ||
|
||
``` | ||
import numpy as np | ||
from qibo.models import VQE | ||
from qibochem.driver.molecule import Molecule | ||
from qibochem.ansatz.hf_reference import hf_circuit | ||
from qibochem.ansatz.ucc import ucc_circuit | ||
# Define the H2 molecule and obtain its 1-/2- electron integrals with PySCF | ||
h2 = Molecule([('H', (0.0, 0.0, 0.0)), ('H', (0.0, 0.0, 0.7))]) | ||
h2.run_pyscf() | ||
# Generate the molecular Hamiltonian | ||
hamiltonian = h2.hamiltonian() | ||
# Build a UCC circuit ansatz for running VQE | ||
circuit = hf_circuit(h2.nso, sum(h2.nelec)) | ||
circuit += ucc_circuit(h2.nso, [0, 1, 2, 3]) | ||
# Create and run the VQE, starting with random initial parameters | ||
vqe = VQE(circuit, hamiltonian) | ||
initial_parameters = np.random.uniform(0.0, 2*np.pi, 8) | ||
best, params, extra = vqe.minimize(initial_parameters) | ||
``` | ||
|
||
## Citation policy | ||
|
||
If you use Qibochem in your research, please cite the following Zenodo DOI: | ||
|
||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10473173.svg)](https://doi.org/10.5281/zenodo.10473173) | ||
|
||
## Contact | ||
|
||
For questions, comments and suggestions please contact us at [https://matrix.to/#/#qibo:matrix.org](url) | ||
|
||
## Contributing | ||
|
||
Contributions, issues and feature requests are welcome. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.wy-side-nav-search { | ||
background-color: #6400FF; | ||
} | ||
|
||
.wy-nav-top { | ||
background-color: #6400FF; | ||
} | ||
.wy-side-nav-search { | ||
background-color: #6400FF; | ||
} | ||
|
||
.wy-nav-top { | ||
background-color: #6400FF; | ||
} |
Oops, something went wrong.