Skip to content

Commit 98c7e0d

Browse files
authored
Merge branch 'main' into feature/stark_p1_frequency_scan
2 parents fda5774 + bb2b5e1 commit 98c7e0d

File tree

152 files changed

+3592
-1147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+3592
-1147
lines changed

.github/workflows/cron-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: [3.8, 3.9, "3.10", "3.11"]
13+
python-version: [3.8, "3.11"]
1414
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
1515
steps:
1616
- name: Print Concurrency Group

.github/workflows/main.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
python-version: [3.8, 3.9, "3.10", "3.11"]
18+
python-version: [3.8, "3.11"]
1919
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
2020
steps:
2121
- name: Print Concurrency Group
@@ -39,25 +39,20 @@ jobs:
3939
${{ runner.os }}-${{ matrix.python-version }}-pip-tests-
4040
${{ runner.os }}-${{ matrix.python-version }}-pip-
4141
${{ runner.os }}-${{ matrix.python-version }}
42+
- name: Stestr cache
43+
uses: actions/cache@v3
44+
with:
45+
path: .stestr
46+
key: stestr-${{ runner.os }}-${{ matrix.python-version }}
47+
restore-keys: |
48+
stestr-${{ runner.os }}-
49+
stestr-
4250
- name: Install Deps
43-
run: python -m pip install -U "tox==3.27.1" setuptools virtualenv wheel
44-
- name: Install and Run Tests (Windows and Linux)
51+
run: python -m pip install -U tox setuptools virtualenv wheel stestr
52+
- name: Install and Run Tests
4553
run: tox -e py
46-
if: runner.os != 'macOS'
47-
- name: Install and Run Tests (Macs only)
48-
run: tox -e cover
49-
if: runner.os == 'macOS'
50-
env:
51-
OMP_NUM_THREADS: 1
52-
- name: Report coverage to coveralls.io (Macs only)
53-
if: runner.os == 'macOS'
54-
uses: coverallsapp/github-action@v2
55-
env:
56-
ACTIONS_RUNNER_DEBUG: 1
57-
with:
58-
github-token: ${{ secrets.GITHUB_TOKEN }}
59-
flag-name: unit-tests_python${{ matrix.python-version }}-${{ matrix.os }}
60-
path-to-lcov: coverage.lcov
54+
- name: Clean up stestr cache
55+
run: stestr history remove all
6156

6257
lint:
6358
name: lint
@@ -98,7 +93,7 @@ jobs:
9893
python -m pip install -U tox
9994
sudo apt-get install -y pandoc graphviz
10095
- name: Build Docs
101-
run: tox -edocs
96+
run: tox -edocs-parallel
10297
- name: Compress Artifacts
10398
run: |
10499
mkdir artifacts

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ jobs:
77
wheel-build:
88
name: Build and Publish Release Artifacts
99
runs-on: ubuntu-latest
10+
environment: release
11+
permissions:
12+
id-token: write
1013
steps:
1114
- uses: actions/checkout@v3
1215
- uses: actions/setup-python@v4
1316
name: Install Python
1417
with:
1518
python-version: '3.8'
1619
- name: Install Deps
17-
run: pip install -U twine wheel
20+
run: pip install -U wheel
1821
- name: Build Artifacts
1922
run: |
2023
python setup.py sdist
@@ -24,7 +27,4 @@ jobs:
2427
with:
2528
path: ./dist/qiskit*
2629
- name: Publish to PyPi
27-
env:
28-
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
29-
TWINE_USERNAME: qiskit
30-
run: twine upload dist/qiskit*
30+
uses: pypa/gh-action-pypi-publish@release/v1

.stestr.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[DEFAULT]
22
test_path=./test
3+
parallel_class=True

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Copyright Contributors to the Qiskit project. -->
22

33
# Code of Conduct
4-
All members of this project agree to adhere to the Qiskit Code of Conduct listed at [https://github.com/Qiskit/qiskit-metapackage/blob/master/CODE_OF_CONDUCT.md](https://github.com/Qiskit/qiskit-metapackage/blob/master/CODE_OF_CONDUCT.md)
4+
All members of this project agree to adhere to the [Qiskit Code of Conduct](https://github.com/Qiskit/qiskit/blob/main/CODE_OF_CONDUCT.md).
55

66
----
77

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ To run a method:
121121
tox -- -n test.python.test_examples.TestPythonExamples.test_all_examples
122122
```
123123

124+
Note that tests will fail automatically if they do not finish execution within 60 seconds.
125+
124126
#### STDOUT/STDERR and logging capture
125127

126128
When running tests in parallel using `stestr` either via tox, the Makefile (`make

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![License](https://img.shields.io/github/license/Qiskit-Extensions/qiskit-experiments.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![Release](https://img.shields.io/github/release/Qiskit-Extensions/qiskit-experiments.svg)](https://github.com/Qiskit-Extensions/qiskit-experiments/releases)
55
![Python](https://img.shields.io/pypi/pyversions/qiskit-experiments.svg)
6-
[![Coverage Status](https://coveralls.io/repos/github/Qiskit-Extensions/qiskit-experiments/badge.svg?branch=main)](https://coveralls.io/github/Qiskit-Extensions/qiskit-experiments?branch=main)
76
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05329/status.svg)](https://doi.org/10.21105/joss.05329)
87

98
**Qiskit Experiments** is a repository that builds tools for building, running,

docs/conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"sphinx.ext.autodoc",
5454
"sphinx.ext.autosummary",
5555
"sphinx.ext.mathjax",
56-
"sphinx.ext.viewcode",
5756
"sphinx.ext.extlinks",
5857
"sphinx_copybutton",
5958
"jupyter_sphinx",
@@ -69,11 +68,14 @@
6968
"sphinx_remove_toctrees",
7069
]
7170

72-
# Remove stubs from the toctree by default because the full build is slow
73-
# This is turned off for docs deployment
74-
if not os.getenv("FULL_TOCTREE", None):
71+
if os.getenv("PROD_BUILD", None):
72+
# Turn on view code source for production build
73+
extensions.append("sphinx.ext.viewcode")
74+
else:
75+
# Remove stubs from the toctree for non-prod build because the full build is slow
7576
remove_from_toctrees = ["stubs/*"]
7677

78+
7779
html_static_path = ["_static"]
7880
templates_path = ["_templates"]
7981
# Manually add the gallery CSS file for now

docs/howtos/figure_generation.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Control figure generation
2+
=========================
3+
4+
Problem
5+
-------
6+
7+
You want to change the default behavior where figures are generated with every experiment.
8+
9+
Solution
10+
--------
11+
12+
For a single non-composite experiment, figure generation can be switched off by setting the analysis
13+
option ``plot`` to ``False``:
14+
15+
.. jupyter-input::
16+
17+
experiment.analysis.set_options(plot = False)
18+
19+
For composite experiments, there is a ``generate_figures`` analysis option which controls how child figures are
20+
generated. There are three options:
21+
22+
- ``always``: The default behavior, generate figures for each child experiment.
23+
- ``never``: Never generate figures for any child experiment.
24+
- ``selective``: Only generate figures for analysis results where ``quality`` is ``bad``. This is useful
25+
for large composite experiments where you only want to examine qubits with problems.
26+
27+
This parameter should be set on the analysis of a composite experiment before the analysis runs:
28+
29+
.. jupyter-input::
30+
31+
parallel_exp = ParallelExperiment(
32+
[T1(physical_qubits=(i,), delays=delays) for i in range(2)]
33+
)
34+
parallel_exp.analysis.set_options(generate_figures="selective")
35+
36+
Discussion
37+
----------
38+
39+
These options are useful for large composite experiments, where generating all figures incurs a significant
40+
overhead.
41+
42+
See Also
43+
--------
44+
45+
* The `Visualization tutorial <visualization.html>`_ discusses how to customize figures

docs/manuals/characterization/stark_experiment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ By default, the Stark tone is applied to the same channel as the qubit drive
104104
with a frequency shift. This frequency shift might update the channel frame,
105105
which accumulates unwanted phase against the frequency difference between
106106
the qubit drive :math:`f_0` and Stark tone frequencies :math:`f_S` in addition to
107-
the qubit Stark shfit :math:`\delta f_s`.
107+
the qubit Stark shift :math:`\delta f_s`.
108108
You can use a dedicated Stark drive channel if available.
109109
Otherwise, you may want to use a control channel associated with the physical
110110
drive port of the qubit.

0 commit comments

Comments
 (0)