Skip to content

Commit

Permalink
Testing feedback (#329)
Browse files Browse the repository at this point in the history
* WIP: async compatability

* fix save error

* removed double import

* including testing feedback

* including testing feedback

* Update README.md

Co-authored-by: kbarkhqs <[email protected]>
  • Loading branch information
nfwvogt and kbarkhqs authored Aug 16, 2022
1 parent 8a7973a commit b0cd297
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 156 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: documentation

on:
release:
types: [created]

jobs:

publish_documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
default: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip maturin
pip install ./qoqo
python -m pip install -r ./qoqo/docs/requirements.txt
- name: build
run: |
cd ./qoqo/docs
python -m sphinx -T -E -b html . _build/html
cd ../../
- name: publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./qoqo/docs/_build/html/
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

This changelog track changes to the qoqo project starting at version v0.5.0

## v1.0.0-alpha.4
## v1.0.0-beta.2

* Fixed superoperator construction for general noise pragma

## v1.0.0-alpha.5

* Updated dependencies

Expand Down
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ This software is still in the beta stage. Functions and documentation are not ye
To use roqoqo in a Rust project simply add

```TOML
roqoqo = {version="0.8"}
roqoqo = {version="1.0"}
```

to the `[dependencies]` section of the project Cargo.toml.

## qoqo

[![Documentation Status](https://readthedocs.org/projects/qoqo/badge/?version=latest)](https://qoqo.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://img.shields.io/badge/docs-read-blue)](https://hqsquantumsimulations.github.io/qoqo/)
[![GitHub Workflow Status](https://github.com/HQSquantumsimulations/qoqo/workflows/ci_tests/badge.svg)](https://github.com/HQSquantumsimulations/qoqo/actions)
[![PyPI](https://img.shields.io/pypi/v/qoqo)](https://pypi.org/project/qoqo/)
[![PyPI - Format](https://img.shields.io/pypi/format/qoqo)](https://pypi.org/project/qoqo/)
Expand All @@ -78,25 +78,21 @@ qoqo provides a full python interface to the underlying roqoqo library, includin

### Installation

On Linux and macOS on x86 precompiled packages can be found on PyPi and installed via
On Linux, macOS and Windows on x86 precompiled packages can be found on PyPi and installed via

```shell
pip install qoqo
```

For other platforms we recommend using the source distribution from PyPi to build a python package for qoqo locally via pip. The install requires the [maturin](https://github.com/PyO3/maturin) tool (also available via pip) and a working rust toolchain.
Alternatively, installing from the source distribution is possible. For this, a rust toolchain and the maturin Python package need to be already installed. A Rust toolchain can be installed using rustup.
With this Rust toolchain installed, qoqo can be installed using a pip command:

```shell
```bash
# After installing the Rust toolchain, execute the following:
pip install maturin
pip install qoqo
```

Alternatively one can check out the latest tagged version from github and use the [maturin](https://github.com/PyO3/maturin) tool to build a python package for qoqo locally and install it via pip.
Please note that the package should be built from the top level directory of the workspace selecting the qoqo package with the `-m qoqo/Cargo.toml` option.
```shell
maturin build -m qoqo/Cargo.toml --release
pip install target/wheels/$NAME_OF_WHEEL
```

When using qoqo in a rust project providing a python interface add

```TOML
Expand All @@ -107,17 +103,15 @@ to the `[dependencies]` section of the project Cargo.toml.

A source distribution now exists but requires a Rust install with a rust version > 1.47 and a maturin version { >= 0.12, <0.13 } in order to be built.


### Examples

Since qoqo provides a full python interface to the underlying roqoqo library, there are examples for python users and for Rust users.

For an expanded collection of examples please see the jupyter notebooks in the extra repository [qoqo_examples](https://github.com/HQSquantumsimulations/qoqo_examples). The qoqo examples require the qoqo_quest and qoqo_mock interfaces.

* **qoqo examples**: For jupyter notebooks in **python**, please refer to [qoqo_examples/qoqo/](https://github.com/HQSquantumsimulations/qoqo_examples/tree/main/qoqo).
* **qoqo examples**: For jupyter notebooks in **python**, please refer to [qoqo_examples/qoqo/](https://github.com/HQSquantumsimulations/qoqo_examples/tree/main/qoqo).
* **roqoqo examples**: The jupyter notebooks in **Rust** can be found in [qoqo_examples/roqoqo/notebooks/](https://github.com/HQSquantumsimulations/qoqo_examples/tree/main/roqoqo/notebooks). Alternatively, you can also find pure **Rust** versions of the examples in [qoqo_examples/roqoqo/standalone/](https://github.com/HQSquantumsimulations/qoqo_examples/tree/main/roqoqo/standalone)


## Contributing

We welcome contributions to the project. If you want to contribute code, please have a look at CONTRIBUTE.md for our code contribution guidelines.
2 changes: 1 addition & 1 deletion qoqo-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qoqo-macros"
version = "1.0.0-beta.1"
version = "1.0.0-beta.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
readme = "../README.md"
Expand Down
6 changes: 3 additions & 3 deletions qoqo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qoqo"
version = "1.0.0-beta.1"
version = "1.0.0-beta.2"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
homepage = "https://github.com/HQSquantumsimulations/qoqo"
Expand Down Expand Up @@ -32,8 +32,8 @@ num-complex = "0.4"
thiserror = "1.0"
qoqo_calculator = { version="1.0.0" }
qoqo_calculator_pyo3 = {version="1.0.0", default-features=false}
qoqo-macros = {version="1.0.0-beta.1", path="../qoqo-macros"}
roqoqo = {version="1.0.0-beta.1", path="../roqoqo", features=["serialize", "overrotate"]}
qoqo-macros = {version="1.0.0-beta.2", path="../qoqo-macros"}
roqoqo = {version="1.0.0-beta.2", path="../roqoqo", features=["serialize", "overrotate"]}
numpy = "0.16"
bincode = "1.3"
serde_json = "1.0"
Expand Down
20 changes: 7 additions & 13 deletions qoqo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ What roqoqo/qoqo is **not**:
* A collection of quantum algorithms


[![Documentation Status](https://readthedocs.org/projects/qoqo/badge/?version=latest)](https://qoqo.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://img.shields.io/badge/docs-read-blue)](https://hqsquantumsimulations.github.io/qoqo/)
[![GitHub Workflow Status](https://github.com/HQSquantumsimulations/qoqo/workflows/ci_tests/badge.svg)](https://github.com/HQSquantumsimulations/qoqo/actions)
[![PyPI](https://img.shields.io/pypi/v/qoqo)](https://pypi.org/project/qoqo/)
[![PyPI - Format](https://img.shields.io/pypi/format/qoqo)](https://pypi.org/project/qoqo/)
Expand All @@ -40,27 +40,21 @@ qoqo provides a full python interface to the underlying roqoqo library, includin

### Installation

On Linux and macOS on x86 precompiled packages can be found on PyPi and installed via
On Linux, macOS and Windows on x86 precompiled packages can be found on PyPi and installed via

```shell
pip install qoqo
```

For other platforms we recommend using the source distribution from PyPi to build a python package for qoqo locally via pip. The install requires the [maturin](https://github.com/PyO3/maturin) tool (also available via pip) and a working rust toolchain.
Alternatively, installing from the source distribution is possible. For this, a rust toolchain and the maturin Python package need to be already installed. A Rust toolchain can be installed using rustup.
With this Rust toolchain installed, qoqo can be installed using a pip command:

```shell
```bash
# After installing the Rust toolchain, execute the following:
pip install maturin
pip install qoqo
```

Alternatively one can check out the latest tagged version from github and use the [maturin](https://github.com/PyO3/maturin) tool to build a python package for qoqo locally and install it via pip.
Please note that the package should be built from the top level directory of the workspace selecting the qoqo package with the `-m qoqo/Cargo.toml` option.
Specifically for macOS on Apple Silicon the following build command should be used.

```shell
maturin build -m qoqo/Cargo.toml --release
pip install target/wheels/$NAME_OF_WHEEL
```

When using qoqo in a rust project providing a python interface add

```TOML
Expand Down
2 changes: 1 addition & 1 deletion qoqo/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qoqo>=0.9.0
qoqo>=1.0.0-beta.2
numpy
sphinx >= 2.1
nbsphinx
Expand Down
Loading

0 comments on commit b0cd297

Please sign in to comment.