-
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.
[Documentation] Add DQC Tutorial (#12)
- Loading branch information
1 parent
491cdb3
commit 0db46bd
Showing
9 changed files
with
382 additions
and
173 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,46 +1,43 @@ | ||
# horqrux | ||
[![Linting / Tests/ Documentation](https://github.com/pasqal-io/horqrux/actions/workflows/run-tests-and-mypy.yml/badge.svg)](https://github.com/pasqal-io/horqrux/actions/workflows/run-tests-and-mypy.yml) | ||
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
[![Pypi](https://badge.fury.io/py/horqrux.svg)](https://pypi.org/project/horqrux/) | ||
|
||
**horqrux** is a [JAX](https://jax.readthedocs.io/en/latest/)-based state vector simulator designed for quantum machine learning. | ||
It acts as a backend for [`Qadence`](https://github.com/pasqal-io/qadence), a digital-analog quantum programming interface. | ||
`horqrux` is a [JAX](https://jax.readthedocs.io/en/latest/)-based state vector simulator designed for quantum machine learning and acts as a backend for [`Qadence`](https://github.com/pasqal-io/qadence), a digital-analog quantum programming interface. | ||
|
||
## Installation | ||
|
||
`horqrux` (CPU-only) can be installed from PyPI with `pip` as follows: | ||
To install the CPU-only version, simply use `pip`: | ||
```bash | ||
pip install horqrux | ||
``` | ||
If you want to install the GPU version, simply do: | ||
If you intend to use GPU: | ||
|
||
```bash | ||
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_releases.html | ||
``` | ||
|
||
[![Linting / Tests/ Documentation](https://github.com/pasqal-io/horqrux/actions/workflows/run-tests-and-mypy.yml/badge.svg)](https://github.com/pasqal-io/horqrux/actions/workflows/run-tests-and-mypy.yml) | ||
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
[![Pypi](https://badge.fury.io/py/horqrux.svg)](https://pypi.org/project/horqrux/) | ||
## Getting started | ||
`horqrux` adopts a minimalistic and functional interface however the [docs](https://pasqal-io.github.io/horqrux/latest/) provide a comprehensive A-Z guide ranging from how to apply simple primitive and parametric gates, to using [adjoint differentiation](https://arxiv.org/abs/2009.02823) to fit a nonlinear function and implementing [DQC](https://arxiv.org/abs/2011.10395) to solve a partial differential equation. | ||
|
||
## Contributing | ||
|
||
## Install from source | ||
To learn how to contribute, please visit the [CONTRIBUTING](docs/CONTRIBUTING.md) page. | ||
|
||
We recommend to use the [`hatch`](https://hatch.pypa.io/latest/) environment manager to install `horqrux` from source: | ||
When developing within `horqrux`, you can either use the python environment manager [`hatch`](https://hatch.pypa.io/latest/): | ||
|
||
```bash | ||
python -m pip install hatch | ||
pip install hatch | ||
|
||
# get into a shell with all the dependencies | ||
python -m hatch shell | ||
# enter a shell with containing all the dependencies | ||
hatch shell | ||
|
||
# run a command within the virtual environment with all the dependencies | ||
python -m hatch run python my_script.py | ||
hatch run python my_script.py | ||
``` | ||
|
||
Please note that `hatch` will not combine nicely with other environment managers such Conda. If you want to use Conda, install `horqrux` from source using `pip`: | ||
When using any other environment manager like `venv` or `conda`, simply do: | ||
|
||
```bash | ||
# within the Conda environment | ||
python -m pip install -e . | ||
# within the virtual environment | ||
pip install -e . | ||
``` | ||
|
||
## Contributing | ||
|
||
Please refer to [CONTRIBUTING](docs/CONTRIBUTING.md) to learn how to contribute to `horqrux`. |
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
Oops, something went wrong.