-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Backendbuddy (#60) - agnostic_simulator source code now moved under qsdk submodule "backendbuddy" - qsdk installation changed to reflect better these changes (simulators are now optional dependencies) - Simulator class uses now a default simulator: qulacs if found, Cirq otherwise (Cirq always installed as a dependency with openfermion). This enables Mac users to be able to run tests properly, despite qulacs not installing for them. * Backendbuddy qsdk examples moved (#62) * agnostic simulator removed, top level of repo cleared (#65) * qsdk reorg (helpers and "algorithms" folders), updated install (#69) * Simplified the readme, added placeholder for citations and other upcoming things (#71) * License: adding blob to all python files (#73) * Forcing DMET energy to be real. * Fixing verbose output for DMET and ONIOM get_resources method. * minor-test-improvements (#70) Co-authored-by: Valentin Senicourt <valentinsenicourt@Valentins-MacBook-Pro.local> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: JamesB-1qbit <84878946+JamesB-1qbit@users.noreply.github.com>
- Loading branch information
1 parent
85d84d1
commit 8768b8e
Showing
252 changed files
with
5,396 additions
and
1,813 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
Empty file.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM fedora:30 | ||
|
||
RUN dnf -y update | ||
RUN dnf -y install wget libgomp openblas-devel pandoc | ||
RUN dnf clean all | ||
|
||
# Python, C/C++ compilers, git | ||
RUN dnf -y install gcc redhat-rpm-config gcc-c++ python3-devel make cmake git | ||
|
||
# Set up a virtual environment, set all calls to pip3 and python3 to use it | ||
RUN pip3 install virtualenv | ||
ENV VIRTUAL_ENV=/root/env | ||
RUN virtualenv -p python3 $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
RUN ls -al /root/.bashrc | ||
RUN more /root/.bashrc | ||
RUN echo "export PATH=$PATH" >> /root/.bashrc | ||
|
||
# Python packages for documentation, Jupyter notebook support and visualization | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install h5py==2.9.0 ipython jupyter setuptools wheel sphinx py3Dmol sphinx_rtd_theme nbsphinx scikit-build | ||
|
||
# Copy and set root directory, | ||
ENV PYTHONPATH=/root/qsdk:$PYTHONPATH | ||
WORKDIR /root/ | ||
COPY . /root | ||
|
||
# Install qSDK and its immediate dependencies (pyscf, openfermion, ...) | ||
RUN python3 /root/setup.py install | ||
|
||
# Install Microsoft QDK qsharp package | ||
WORKDIR /tmp/ | ||
RUN dnf clean all | ||
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc | ||
RUN wget -q -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/30/prod.repo | ||
RUN dnf install -y dotnet-sdk-3.1 | ||
RUN dotnet tool install -g Microsoft.Quantum.IQSharp | ||
RUN /root/.dotnet/tools/dotnet-iqsharp install --user | ||
RUN pip3 install qsharp | ||
|
||
# Install other simulators | ||
RUN pip install amazon-braket-sdk qiskit qulacs projectq |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2021 1QB Information Technologies Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
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,19 +1,92 @@ | ||
# QEMIST_qSDK contents | ||
|
||
This repository contains two separate packages, called `qSDK` and `agnostic_simulator`. | ||
Despite living in the same repository, these two packages are different entities. Their respective code, documentation, | ||
tutorials, and installation instructions are contained in their own dedicated folder. Please refer to them. | ||
|
||
- `qSDK` provides access to the tools developed for quantum chemistry simulation on quantum computers and emulators. | ||
The package provides access to some problem decomposition techniques, electronic structure solvers, as well as the | ||
various toolboxes containing the functionalities necessary to build these workflows, or your own. | ||
It was developed to be compatible with QEMIST Cloud, to seamlessly enable the use of large scale problem decomposition | ||
combined with both classical and quantum electronic structure solvers in the cloud. The package also provides local | ||
problem decomposition techniques, and is designed to support the output of a problem decomposition method performed | ||
through QEMIST Cloud as well. | ||
|
||
- `agnostic_simulator` can be thought to be a quantum circuit simulation engine, allowing users to target a variety | ||
of compute backends (QPUs and simulators) available on their local machine or through cloud services. In itself, | ||
it has nothing to do with quantum chemistry, and thus has a wide range of applicability. `qSDK` relies on `agnostic_simulator` | ||
for quantum circuit simulation, and requires that this package is installed. | ||
|
||
# QEMIST_qSDK | ||
|
||
Welcome ! | ||
This open-source quantum SDK provides tools developed for exploring quantum chemistry simulation end-to-end workflows on | ||
both gate-model quantum computers and quantum circuit emulators. | ||
|
||
It was designed to support the development of quantum algorithms and workflows running by providing building-blocks from various toolboxes. | ||
It attempts to cover all steps of the process, such as quantum execution, pre- and post-processing techniques, including problem decomposition. | ||
It provides users with features such as resource estimation, access to various compute backends (noiseless and noisy simulators, | ||
quantum devices) and some classical solvers in order to keep track of both accuracy and resource requirements of our workflows, | ||
and facilitate the design of successful hardware experiments. | ||
|
||
## Install | ||
|
||
This package requires a Python 3 environment. | ||
|
||
We recommend: | ||
- using [Python virtual environments](https://docs.python.org/3/tutorial/venv.html) in order to set up your environment safely and cleanly | ||
- installing the "dev" version of Python3 if you encounter missing header errors such as `python.h file not found`. | ||
- having good C/C++ compilers and BLAS library to ensure the quantum circuit simulators you choose to install have good performance. | ||
|
||
### Using pip | ||
|
||
TODO: once this package is available on pypi, give the command. | ||
|
||
### From source, using setuptools | ||
|
||
This package can be installed by first cloning this repository with `git clone`, and typing the following command in the | ||
root directory: | ||
``` | ||
python setup.py install | ||
``` | ||
|
||
If the installation of a dependency fails and the reason is not obvious, we suggest installing that dependency | ||
separately with `pip`, before trying again. | ||
|
||
If you would like to modify or develop code in `qSDK`, you can add the path to this folder to your `PYTHONPATH` | ||
environment variable instead of installing it with pip: | ||
``` | ||
export PYTHONPATH=<path_to_this_folder>:$PYTHONPATH | ||
``` | ||
|
||
### Optional dependencies | ||
|
||
qSDK enables users to target various backends. In particular, it integrates quantum circuit simulators such as | ||
`qulacs`, `qiskit`, `cirq` or `qdk`. We leave it to you to install the packages of your choice. | ||
Backends such as `qulacs` and `cirq` show good overall performance. Most packages can be installed through pip in a straightforward way: | ||
``` | ||
pip install qulacs | ||
pip install qiskit | ||
pip install cirq | ||
... | ||
``` | ||
|
||
Depending on your OS and environment, some of these packages may be more challenging to install. For installing Microsoft's QDK | ||
or any issue regarding the above packages, please check their respective documentation. | ||
|
||
### Optional: environment variables | ||
|
||
Some environment variables can impact performance (ex: using GPU for quantum circuit simulation, or changing | ||
the number of CPU threads used) or are used to connect to web services providing access to some compute backends. | ||
|
||
See the list of relevant environment variables and their use in `env_var.sh`. In order for these variables to be set to | ||
the desired values in your environment, you can run this shell script in Linux with the following command line: | ||
`source env_var.sh` (you may need to set execution permissions with `chmod +x set_env_var.sh` first), or you can set | ||
them in whatever way your OS supports it, or even inside your python script using the `os` package. | ||
|
||
## Docs | ||
|
||
TODO: insert sentence and link to sphinx documentation when its online. | ||
|
||
## Tutorials | ||
|
||
Please check the `examples` folder jupyter notebook tutorials and other examples. | ||
TODO: recommend here the one we are doing about the DMET paper once its ready and merged | ||
|
||
## Tests | ||
|
||
Unit tests can be found in the `tests` folders, located in the various toolboxes they are related to. To automatically | ||
find and run all tests (assuming you are in the `qsdk` subfolder that contains the code of the package): | ||
|
||
``` | ||
python -m unittest | ||
``` | ||
|
||
## Citations | ||
|
||
If you use qSDK in your research, please cite | ||
|
||
[TODO: this is a placeholder for our qSDK paper, to be written and put on arxiv in October] | ||
|
||
Copyright 1QBit 2021. This software is released under the Apache Software License version 2.0. |
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 +1 @@ | ||
theme: jekyll-theme-cayman | ||
theme: jekyll-theme-cayman |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
agnostic_simulator/agnostic_simulator/helpers/circuits/__init__.py
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
agnostic_simulator/agnostic_simulator/helpers/measurements/__init__.py
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
agnostic_simulator/agnostic_simulator/helpers/operators/__init__.py
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
agnostic_simulator/agnostic_simulator/noisy_simulation/__init__.py
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
agnostic_simulator/agnostic_simulator/qpu_connection/__init__.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.