Skip to content

Commit

Permalink
Merge branch 'feature-Propagatable-ErrorGens' of https://github.com/p…
Browse files Browse the repository at this point in the history
…yGSTio/pyGSTi into feature-Propagatable-ErrorGens
  • Loading branch information
ashenmill committed Jun 7, 2024
2 parents b4a1b66 + f8d8d19 commit 2508fef
Show file tree
Hide file tree
Showing 146 changed files with 15,462 additions and 5,778 deletions.
96 changes: 92 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,93 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.
## Global owners (default to pyGSTi maintainers) ##
# These will also be owners for everything below
# so they can approve minor PRs without adding
# undue burden on volunteer code owners
* @sandialabs/pygsti-maintainers @sandialabs/pygsti-gatekeepers


## Drift analysis ##
pygsti/protocols/stability.py @tjproct @sandialabs/pygsti-gatekeepers
pygsti/report/section/drift.py @tjproct @sandialabs/pygsti-gatekeepers
pygsti/report/templates/drift_html_report/ @tjproct @sandialabs/pygsti-gatekeepers

## Forward simulators ##
pygsti/forwardsims @rileyjmurray @sandialabs/pygsti-gatekeepers
pygsti/forwardsims/termforwardsim* @adhumu @sandialabs/pygsti-gatekeepers

## IBMQ interface ##
pygsti/extras/devices @sandialabs/pygsti-ibmq @sandialabs/pygsti-gatekeepers
pygsti/extras/ibmq @sandialabs/pygsti-ibmq @sandialabs/pygsti-gatekeepers

## Interpygate ##
pygsti/extras/interpygate/ @kevincyoung @sandialabs/pygsti-gatekeepers

## Modelmembers ##
pygsti/modelmembers/ @rileyjmurray @sandialabs/pygsti-gatekeepers
pygsti/modelmembers/instruments/ @sandialabs/pygsti-mcm @sandialabs/pygsti-gatekeepers

## Modelpack owners ##
pygsti/modelpacks/ @kmrudin @sandialabs/pygsti-gatekeepers

## Optimizer owners ##
pygsti/objectivefns @rileyjmurray @sandialabs/pygsti-gatekeepers
pygsti/optimize @rileyjmurray @sandialabs/pygsti-gatekeepers

## RB owners ##
pygsti/algorithms/compilers.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/algorithms/mirroring.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/algorithms/randomcircuit.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/algorithms/rbfit.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/extras/rb.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers # Should this just be deprecated and removed?
pygsti/protocols/rb.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/tools/rbtheory.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/tools/rbtools.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
pygsti/tools/symplectic.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers

## RPE owners ##
pygsti/extras/rpe @kmrudin @sandialabs/pygsti-gatekeepers
pygsti/models/rpemodel.py @kmrudin @sandialabs/pygsti-gatekeepers
pygsti/protocols/rpe.py @kmrudin @sandialabs/pygsti-gatekeepers

## Reporting owners ##
# Specifically just for workspace plots/tables
pygsti/report/workspace*.py @pcwysoc @sandialabs/pygsti-gatekeepers



## Tutorial owners ##
# In addition to general tutorial owners,
# we will also have specific tutorials be owned
# by topics owners are responsible for above
jupyter_notebooks/ @sandialabs/pygsti-tutorials @sandialabs/pygsti-gatekeepers
jupyter_notebooks/**/*RB-*.ipynb @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Examples/1QGST-InterpolatedOps.ipynb @kevincyoung @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/algorithms/DriftCharacterization.ipynb @tjproct @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/algorithms/MirrorCircuitBenchmarks.ipynb @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/algorithms/RobustPhaseEstimation.ipynb @kmrudin @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/objects/advanced/IBMQExperiment.ipynb @sandialabs/pygsti-ibmq @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/objects/advanced/Instruments.ipynb @sandialabs/pygsti-mcm @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/objects/advanced/InterpolatedOperators.ipynb @kevincyoung @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/objects/advanced/ModelPacks.ipynb @kmrudin @sandialabs/pygsti-gatekeepers
jupyter_notebooks/Tutorials/reporting/ @pcwysoc @sandialabs/pygsti-gatekeepers

## Test owners ##
test/ @rileyjmurray @sandialabs/pygsti-gatekeepers
test/test_packages/extras/test_drift.py @tjproct @sandialabs/pygsti-gatekeepers
test/test_packages/extras/test_interpygate.py @kevincyoung @sandialabs/pygsti-gatekeepers
test/test_packages/extras/test_rb.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
test/test_packages/extras/test_rpe.py @kmrudin @sandialabs/pygsti-gatekeepers
test/test_packages/extras/test_rpeobjects.py @kmrudin @sandialabs/pygsti-gatekeepers
test/test_packages/objects/test_instruments.py @sandialabs/pygsti-mcm @sandialabs/pygsti-gatekeepers
test/test_packages/report/ @pcwysoc @sandialabs/pygsti-gatekeepers
test/test_packages/reportb/ @pcwysoc @sandialabs/pygsti-gatekeepers
test/unit/algorithms/test_randomcircuit.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
test/unit/extras/interpygate @kevincyoung @sandialabs/pygsti-gatekeepers
test/unit/extras/rb/ @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
test/unit/extras/rpe/ @kmrudin @sandialabs/pygsti-gatekeepers
test/unit/modelpacks/ @kmrudin @sandialabs/pygsti-gatekeepers
test/unit/objects/test_instrument.py @sandialabs/pygsti-mcm @sandialabs/pygsti-gatekeepers
test/unit/protocols/test_rb.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers
test/unit/report/ @pcwysoc @sandialabs/pygsti-gatekeepers
test/unit/tools/test_symplectic.py @sandialabs/pygsti-rb @sandialabs/pygsti-gatekeepers


# Global owners
* @sserita @coreyostrove @rileyjmurray
40 changes: 20 additions & 20 deletions .github/workflows/autodeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ name: Deploy new version on pypi.org
on:
push:
branches: [ "master" ]
# Pattern matched against refs/tags
tags:
- 'v*' # Push events to every tag not containing '/' (use '**' for hierarchical tags)
release:
types:
- published

# Dont allow running manually from Actions tab -- use manualdeploy for this
#workflow_dispatch:
Expand All @@ -17,17 +17,16 @@ jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # doesn't work -- try using tags: above

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # to fetch all branches and *tags* (needed to get version number correctly)

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'
Expand All @@ -39,8 +38,9 @@ jobs:
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: ./.github/ci-scripts/before_install.sh

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -49,38 +49,38 @@ jobs:
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # doesn't work -- try using tags: above

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # to fetch all branches and *tags* (needed to get version number correctly)

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'

- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v' -- doesn't work -> try using tags: above
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: cibw-*
path: dist
merge-multiple: true

- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
# With the use of OIDC, API tokens are no longer needed
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/ for more info
18 changes: 9 additions & 9 deletions .github/workflows/extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ jobs:
strategy:
fail-fast: false # Finish all tests even if one fails
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up installation environment (Ubuntu or Windows)
if: ${{matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019'}}
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'}}
run: |
./.github/ci-scripts/before_install.sh
- name: Set up installation environment (MacOS)
if: ${{matrix.os == 'macos-11'}}
if: ${{matrix.os == 'macos-latest'}}
run: |
./.github/ci-scripts/before_install_macos.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('**/*requirements.txt') }}
Expand All @@ -51,17 +51,17 @@ jobs:
python -m pip install -e .[testing]
python setup.py build_ext --inplace
- name: Run test_packages Ubuntu
if: ${{matrix.os == 'ubuntu-20.04'}}
if: ${{matrix.os == 'ubuntu-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
python -m pytest -v -n auto --dist loadscope --ignore=test/test_packages/mpi --ignore=test/test_packages/notebooks test/test_packages
- name: Run test_packages Windows
if: ${{matrix.os == 'windows-2019'}}
if: ${{matrix.os == 'windows-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
python -m pytest -v -n auto --dist loadscope --ignore=test/test_packages/mpi --ignore=test/test_packages/notebooks test/test_packages
- name: Run test_packages MacOS
if: ${{matrix.os == 'macos-11'}}
if: ${{matrix.os == 'macos-latest'}}

run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/main-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Build and run tests (MacOS only, all Python versions)

on:
push:
# Mac runners are expensive and oversubscribed. Only run on beta and master
branches: [ "beta", "master" ]
# Allow running manually from Actions tab
workflow_dispatch:

env:
SKIP_DEAP: 1

jobs:
build: # Main build + unit test check

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python-version: [3.8, 3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v4
- name: Set up installation environment (MacOS)
run: |
./.github/ci-scripts/before_install_macos.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('**/*requirements.txt') }}
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install flake8
python -m pip install -e .[testing]
python setup.py build_ext --inplace
# python -m pip freeze # this isn't relevant anymore since pip install builds a wheel separately
- name: Lint with flake8
run: |
# Critical errors, exit on failure
flake8 . --count --show-source --statistics --config=.flake8-critical
# Standard PEP8, allowed to fail since exit-zero treats all errors as warnings
flake8 . --exit-zero --statistics
- name: Run unit tests MacOS
if: ${{matrix.os == 'macos-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
python -m pytest -n auto --dist loadscope --cov=pygsti test/unit
72 changes: 72 additions & 0 deletions .github/workflows/main-minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Build and run tests (no MacOS, low/high Python versions only)

on:
push:
# Intended to be fast checks on non-main branches
branches-ignore: [ "beta", "develop", "master" ]
# Hacky way to only run pull requests from forked repositories (assumes : is not used in branch names unless forked)
# https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/10
pull_request:
branches: [ "**:**" ]
# Allow running manually from Actions tab
workflow_dispatch:

env:
SKIP_DEAP: 1

jobs:
build: # Main build + unit test check

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8,'3.11']

steps:
- uses: actions/checkout@v4
- name: Set up installation environment (Ubuntu or Windows)
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'}}
run: |
./.github/ci-scripts/before_install.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('**/*requirements.txt') }}
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install flake8
python -m pip install -e .[testing]
python setup.py build_ext --inplace
# python -m pip freeze # this isn't relevant anymore since pip install builds a wheel separately
- name: Lint with flake8
if: ${{matrix.os != 'windows-latest'}}
run: |
# Critical errors, exit on failure
flake8 . --count --show-source --statistics --config=.flake8-critical
# Standard PEP8, allowed to fail since exit-zero treats all errors as warnings
flake8 . --exit-zero --statistics
- name: Run unit tests ubuntu
if: ${{matrix.os == 'ubuntu-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
python -m pytest -n auto --dist loadscope --cov=pygsti test/unit
- name: Run unit tests windows
if: ${{matrix.os == 'windows-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
python -m pytest -n auto --dist loadscope --cov=pygsti test/unit
Loading

0 comments on commit 2508fef

Please sign in to comment.