Skip to content

Commit

Permalink
Merge branch 'main' into qvplotter
Browse files Browse the repository at this point in the history
  • Loading branch information
conradhaupt authored Jan 31, 2024
2 parents 79404db + 46e7eec commit 3c8ffb3
Show file tree
Hide file tree
Showing 118 changed files with 3,876 additions and 2,510 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Check for updates to GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
17 changes: 8 additions & 9 deletions .github/workflows/cron-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, "3.11"]
python-version: [3.8, "3.12"]
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
steps:
- name: Print Concurrency Group
Expand All @@ -21,13 +21,13 @@ jobs:
echo -e "\033[31;1;4mConcurrency Group\033[0m"
echo -e "$CONCURRENCY_GROUP\n"
shell: bash
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements.txt','requirements-extras.txt','requirements-dev.txt','constraints.txt') }}
Expand All @@ -45,21 +45,20 @@ jobs:
if: runner.os == 'macOS'
env:
TEST_TIMEOUT: 120
OMP_NUM_THREADS: 1
docs:
if: github.repository_owner == 'Qiskit-Extensions'
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('setup.py','requirements.txt','requirements-extras.txt','requirements-dev.txt','constraints.txt') }}
Expand All @@ -74,7 +73,7 @@ jobs:
mkdir artifacts
tar -Jcvf html_docs.tar.xz docs/_build/html
mv html_docs.tar.xz artifacts/.
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: html_docs
path: artifacts
19 changes: 11 additions & 8 deletions .github/workflows/docs_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ jobs:
if: github.repository_owner == 'Qiskit-Extensions'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U virtualenv setuptools wheel tox
sudo apt-get install graphviz pandoc
- name: Build and publish
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
run: |
tools/deploy_documentation_dev.sh
- name: Build docs dev
run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 RELEASE_STRING=`git describe` tox -edocs
- name: Bypass Jekyll Processing # Necessary for setting the correct css path
run: touch docs/_build/html/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html/
target-folder: dev/
20 changes: 13 additions & 7 deletions .github/workflows/docs.yml → .github/workflows/docs_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,28 @@ jobs:
if: github.repository_owner == 'Qiskit-Extensions'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U virtualenv setuptools wheel tox
sudo apt-get install graphviz pandoc
- name: Build and publish
- name: Build docs
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: |
tools/deploy_documentation.sh
run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 tox -edocs
- name: Bypass Jekyll Processing # Necessary for setting the correct css path
run: touch docs/_build/html/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html/
clean-exclude: |
stable/*
dev/*
38 changes: 38 additions & 0 deletions .github/workflows/docs_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Stable Docs Publish
on:
workflow_dispatch:
push:
tags:
- "*"

jobs:
deploy:
if: github.repository_owner == 'Qiskit-Extensions'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U virtualenv setuptools wheel tox
sudo apt-get install graphviz pandoc
- name: Build docs stable
env:
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: EXPERIMENTS_DEV_DOCS=1 PROD_BUILD=1 tox -e docs
- name: Bypass Jekyll Processing # Necessary for setting the correct css path
run: touch docs/_build/html/.nojekyll
- name: Set current version
run: |
echo "version=$(git describe --abbrev=0 | cut -d'.' -f1,2)" >> "$GITHUB_ENV"
- name: Deploy stable
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html
target-folder: stable/${{ env.version }}
25 changes: 12 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, "3.11"]
python-version: [3.8, "3.12"]
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
steps:
- name: Print Concurrency Group
Expand All @@ -26,13 +26,13 @@ jobs:
echo -e "\033[31;1;4mConcurrency Group\033[0m"
echo -e "$CONCURRENCY_GROUP\n"
shell: bash
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements.txt','requirements-extras.txt','requirements-dev.txt','constraints.txt') }}
Expand All @@ -41,7 +41,7 @@ jobs:
${{ runner.os }}-${{ matrix.python-version }}-pip-
${{ runner.os }}-${{ matrix.python-version }}
- name: Stestr cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .stestr
key: stestr-${{ runner.os }}-${{ matrix.python-version }}
Expand All @@ -58,7 +58,6 @@ jobs:
if: runner.os == 'macOS'
env:
TEST_TIMEOUT: 120
OMP_NUM_THREADS: 1
- name: Clean up stestr cache
run: stestr history remove all

Expand All @@ -67,13 +66,13 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-lint-${{ hashFiles('setup.py','requirements.txt','requirements-extras.txt','requirements-dev.txt','constraints.txt') }}
Expand All @@ -86,15 +85,15 @@ jobs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('setup.py','requirements.txt','requirements-extras.txt','requirements-dev.txt','constraints.txt') }}
Expand All @@ -109,7 +108,7 @@ jobs:
mkdir artifacts
tar -Jcvf html_docs.tar.xz docs/_build/html
mv html_docs.tar.xz artifacts/.
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: html_docs
path: artifacts
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
Expand All @@ -23,7 +23,7 @@ jobs:
python setup.py sdist
python setup.py bdist_wheel
shell: bash
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/qiskit*
- name: Publish to PyPi
Expand Down
3 changes: 2 additions & 1 deletion docs/_ext/custom_styles/option_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
from typing import Type, Optional

import numpy as np
from sphinx.ext.autodoc import Sphinx, Options as SphinxOptions
from sphinx.application import Sphinx
from sphinx.ext.autodoc import Options as SphinxOptions
from sphinx.ext.napoleon import Config as NapoleonConfig
from sphinx.ext.napoleon import GoogleDocstring

Expand Down
1 change: 1 addition & 0 deletions docs/apidocs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Experiment Modules

mod_calibration
mod_characterization
mod_driven_freq_tuning
mod_randomized_benchmarking
mod_tomography
mod_quantum_volume
6 changes: 6 additions & 0 deletions docs/apidocs/mod_driven_freq_tuning.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _qiskit-experiments-driven-freq-tuning:

.. automodule:: qiskit_experiments.library.driven_freq_tuning
:no-members:
:no-inherited-members:
:no-special-members:
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

html_title = f"{project} {release}"

docs_url_prefix = "ecosystem/experiments"
docs_url_prefix = "qiskit-experiments"

html_last_updated_fmt = "%Y/%m/%d"

Expand All @@ -171,7 +171,6 @@
"matplotlib": ("https://matplotlib.org/stable/", None),
"qiskit": ("https://qiskit.org/documentation/", None),
"uncertainties": ("https://pythonhosted.org/uncertainties", None),
"qiskit_ibm_provider": ("https://qiskit.org/ecosystem/ibm-provider/", None),
"qiskit_aer": ("https://qiskit.org/ecosystem/aer", None),
"qiskit_dynamics": ("https://qiskit.org/documentation/dynamics", None),
"qiskit_ibm_runtime": ("https://qiskit.org/ecosystem/ibm-runtime/", None),
Expand Down
19 changes: 9 additions & 10 deletions docs/howtos/cloud_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ Saving
~~~~~~

.. note::
This guide requires :mod:`qiskit-ibm-provider`. For how to migrate from the deprecated :mod:`qiskit-ibmq-provider` to :mod:`qiskit-ibm-provider`,
consult the `migration guide <https://qiskit.org/ecosystem/ibm-provider/tutorials/Migration_Guide_from_qiskit-ibmq-provider.html>`_.\
This guide requires :mod:`qiskit-ibm-runtime` version 0.15 and up, which can be installed with ``python -m pip install qiskit-ibm-runtime``.
For how to migrate from the older :mod:`qiskit-ibm-provider` to :mod:`qiskit-ibm-runtime`,
consult the `migration guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime-from-provider>`_.\

You must run the experiment on a real IBM
backend and not a simulator to be able to save the experiment data. This is done by calling
:meth:`~.ExperimentData.save`:

.. jupyter-input::

from qiskit_ibm_provider import IBMProvider
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_experiments.library.characterization import T1
import numpy as np

provider = IBMProvider()
backend = provider.get_backend("ibmq_lima")
service = QiskitRuntimeService(channel="ibm_quantum")
backend = service.backend("ibm_osaka")

t1_delays = np.arange(1e-6, 600e-6, 50e-6)

Expand All @@ -59,13 +60,11 @@ experiment <https://quantum.ibm.com/experiments/9640736e-d797-4321-b063-d503f8e9
service = ExperimentData.get_service_from_backend(backend)
load_expdata = ExperimentData.load("9640736e-d797-4321-b063-d503f8e98571", service)

To display the figure, which is serialized into a string, we need the
``SVG`` library:
Now we can display the figure from the loaded experiment data:

.. jupyter-input::

from IPython.display import SVG
SVG(load_expdata.figure(0).figure)
load_expdata.figure(0)

.. image:: ./experiment_cloud_service/t1_loaded.png

Expand Down Expand Up @@ -144,7 +143,7 @@ The :meth:`~.ExperimentData.auto_save` feature automatically saves changes to th
.. jupyter-output::

You can view the experiment online at https://quantum.ibm.com/experiments/cdaff3fa-f621-4915-a4d8-812d05d9a9ca
<ExperimentData[T1], backend: ibmq_lima, status: ExperimentStatus.DONE, experiment_id: cdaff3fa-f621-4915-a4d8-812d05d9a9ca>
<ExperimentData[T1], backend: ibm_osaka, status: ExperimentStatus.DONE, experiment_id: cdaff3fa-f621-4915-a4d8-812d05d9a9ca>

Setting ``auto_save = True`` works by triggering :meth:`.ExperimentData.save`.

Expand Down
2 changes: 1 addition & 1 deletion docs/howtos/figure_generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ overhead.
See Also
--------

* The `Visualization tutorial <visualization.html>`_ discusses how to customize figures
* The :doc:`Visualization tutorial </tutorials/visualization>` discusses how to customize figures
6 changes: 3 additions & 3 deletions docs/howtos/rerun_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Solution
--------

.. note::
Some of this guide uses the :mod:`qiskit-ibm-provider` package. For how to migrate from
the deprecated ``qiskit-ibmq-provider`` to ``qiskit-ibm-provider``, consult the
`migration guide <https://qiskit.org/ecosystem/ibm-provider/tutorials/Migration_Guide_from_qiskit-ibmq-provider.html>`_.\
This guide requires :mod:`qiskit-ibm-runtime` version 0.15 and up, which can be installed with ``python -m pip install qiskit-ibm-runtime``.
For how to migrate from the older :mod:`qiskit-ibm-provider` to :mod:`qiskit-ibm-runtime`,
consult the `migration guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime-from-provider>`_.\

Once you recreate the exact experiment you ran and all of its parameters and options,
you can call the :meth:`.add_jobs` method with a list of :class:`Job
Expand Down
Loading

0 comments on commit 3c8ffb3

Please sign in to comment.