Skip to content

Commit

Permalink
Final QA of documentation before 0.3.0 release (#2)
Browse files Browse the repository at this point in the history
* Update tutorial and docs Action. Add mergify.

* Clean up

* Minor updates

* Add qiskit logos

* Move logo files

* Fix two workflows

* Use 3.11 for min version tests

* Bump down to 3.10

* Bumpy scipy to support py312

* Remove basetest env

* typo

* Remove tests that require scraping project deps

* Final QA

* Add fermion changes

* style

* Add dice-solver how-to

* style
  • Loading branch information
caleb-johnson committed Sep 11, 2024
1 parent 163f70c commit 64c0acf
Show file tree
Hide file tree
Showing 18 changed files with 604 additions and 156 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
branches:
- main
- 'stable/**'

jobs:
build_and_deploy_docs:
build:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -34,21 +34,24 @@ jobs:
shell: bash
run: |
tox -edocs
- name: Prepare docs artifact
if: always()
shell: bash
run: |
mkdir artifact
cp -a docs/_build/html artifact/addon_sqd_html_docs
- name: Upload docs artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-pages-artifact@v3
with:
name: addon_sqd_html_docs
path: ./artifact
- name: Deploy docs
if: ${{ github.ref == 'refs/heads/stable/0.3' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html/
path: docs/_build/html

deploy:
name: Deploy docs
if: ${{ github.ref == 'refs/heads/stable/0.3' }}
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
43 changes: 0 additions & 43 deletions .github/workflows/test_development_versions.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test_minimum_versions.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pull_request_rules:
- name: backport
conditions:
- label=stable backport potential
actions:
backport:
branches:
- stable/0.3
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Qiskit addons are a collection of modular tools for building utility-scale workl

This package contains the Qiskit addon for sample-based quantum diagonalization (SQD) -- a technique for finding eigenvalues and eigenvectors of quantum operators, such as a quantum system Hamiltonian, using quantum and distributed classical computing together.

Classical distributed computing is used to process samples obtained from a quantum processor, and to project and diagonalize a target Hamiltonian in a subspace spanned by them. This allows SQD to be robust to samples corrupted by quantum noise and deal with large Hamiltonians, such as chemistry Hamiltonians with millions of interaction terms, beyond the reach of any exact diagonalization methods.
Classical distributed computing is used to process samples obtained from a quantum processor and to project and diagonalize a target Hamiltonian in a subspace spanned by them. This allows SQD to be robust to samples corrupted by quantum noise and deal with large Hamiltonians, such as chemistry Hamiltonians with millions of interaction terms, beyond the reach of any exact diagonalization methods.

The SQD tool can target Hamiltonians expressed as linear combination of Pauli operators, or second-quantized fermionic operators. The input samples are obtained by quantum circuits defined by the user, which are believed to be good representations of eigenstates (e.g. the ground state) of a target operator. The convergence rate of SQD as a function of the number of samples improves with the sparseness of the target eigenstate.

Expand Down Expand Up @@ -53,11 +53,11 @@ The [`qiskit_addon_sqd.fermion.solve_fermion()`](qiskit_addon_sqd/fermion.py) fu

##### Choosing subspace dimensions

The choice of the subspace dimension affects the accuracy and runtime of the eigenstate solver. The larger the subspace the more accurate the calculation, at the cost of increasing the runtime and memory requirements. It is not known *a priori* the optimal subspace size, thus a convergence study with the subspace dimension may be performed, as described in this [example](docs/how_tos/choose_subspace_dimension.ipynb).
The choice of the subspace dimension affects the accuracy and runtime of the eigenstate solver. The larger the subspace the more accurate the calculation, at the cost of increasing the runtime and memory requirements. The optimal subspace size for a given system is not known, thus a convergence study with the subspace dimension may be performed as described in this [example](docs/how_tos/choose_subspace_dimension.ipynb).

##### The subspace dimension is set indirectly

In this package, the user controls the number of bitstrings (see the `samples_per_batch` argument in [`qiskit_addon_sqd.subsampling.postselect_and_subsample()`](qiskit_addon_sqd/subsampling.py)) contained in each subspace. The value of this argument determines an upper bound to the subspace dimension in the case of quantum chemistry applications. See this [example](docs/how_tos/select_open_closed_shell.ipynb) for more details.
In this package, the user controls the number of bitstrings (see the `samples_per_batch` argument in [`qiskit_addon_sqd.subsampling.postselect_and_subsample()`](qiskit_addon_sqd/subsampling.py)) contained in each subspace. The value of this argument sets an upper bound to the subspace dimension in the case of quantum chemistry applications. See this [example](docs/how_tos/select_open_closed_shell.ipynb) for more details.

----------------------------------------------------------------------------------------------------

Expand Down
178 changes: 178 additions & 0 deletions docs/_static/images/qiskit-dark-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 64c0acf

Please sign in to comment.