Skip to content

Commit

Permalink
Merge branch 'develop' into feature-cloudnoise-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
sserita committed May 7, 2024
2 parents 5cdc35c + ad0c1a5 commit a1d9cb9
Show file tree
Hide file tree
Showing 864 changed files with 471,174 additions and 12,534 deletions.
93 changes: 93 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## 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


2 changes: 1 addition & 1 deletion .github/ci-scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
sudo apt-get update -qq -y && \
sudo apt-get install -qq -y \
gfortran libblas-dev liblapack-dev openmpi-bin openmpi-common openssh-client \
openssh-server libopenmpi2 libopenmpi-dev libsuitesparse-dev
openssh-server libopenmpi3 libopenmpi-dev libsuitesparse-dev
cmake --version
gcc --version
8 changes: 8 additions & 0 deletions .github/ci-scripts/before_install_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

brew update && \
brew install \
gfortran openblas lapack openmpi \
openssh suite-sparse
cmake --version
gcc --version
46 changes: 23 additions & 23 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:
- '*' # 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,30 +17,30 @@ 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.8'
python-version: '3.10'

- name: Build wheels
uses: pypa/cibuildwheel@v2.1.2
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
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.8'
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
70 changes: 26 additions & 44 deletions .github/workflows/extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ on:

env:
SKIP_DEAP: 1
NOSE_VERBOSE: 2
NOSE_WITH_TIMER: 1
NOSE_WITH_ID: 1
NOSE_REDNOSE: 1
NOSE_WITH_COVERAGE: 1
NOSE_COVER_PACKAGE: "pygsti"
#NOSE_PROCESSES: -1
NOSE_NOPATH: ""
NOSE_PROCESS_TIMEOUT: 2400
NOSE_WHERE: "test/test_packages/"

jobs:
test_extras: # On stable branches, run extended tests
Expand All @@ -31,59 +21,51 @@ jobs:
strategy:
fail-fast: false # Finish all tests even if one fails
matrix:
os: [ubuntu-18.04, windows-2019]
python-version: [3.6, 3.7, 3.8, 3.9]
nose-tests:
- "algorithms"
- "algorithmsb"
- "report"
- "reportb"
- "report"
- "objects"
- "tools"
- "iotest"
- "drivers"
- "optimize"
- "construction"
- "extras"
# - "mpi" # Fails in GitHub Actions, passes locally but doesn't terminate threads properly

os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- name: Set up installation environment
- 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 installation environment (MacOS)
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') }}
- name: Install package
run: |
python -m pip install --upgrade pip
# Installing with -e to keep installation local (for NOSE_NOPATH)
# Installing with -e to keep installation local
# but still compile Cython extensions
python -m pip install -e .[testing]
- name: Run test_packages Ubuntu ${{ matrix.nose-tests }}
if: ${{matrix.os == 'ubuntu-18.04'}}
env:
NOSETESTS: ${{ matrix.nose-tests }}
python setup.py build_ext --inplace
- name: Run test_packages Ubuntu
if: ${{matrix.os == 'ubuntu-latest'}}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
echo "nosetests: $NOSETESTS"
nosetests $NOSETESTS
- name: Run test_packages Windows ${{ matrix.nose-tests }}
if: ${{matrix.os == 'windows-2019'}}
env:
NOSETESTS: ${{ matrix.nose-tests }}
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-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-latest'}}

run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
echo "nosetests: $Env:NOSETESTS"
nosetests --traverse-namespace $Env:NOSETESTS
python -m pytest -v -n auto --dist loadscope --ignore=test/test_packages/mpi --ignore=test/test_packages/notebooks test/test_packages
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
Loading

0 comments on commit a1d9cb9

Please sign in to comment.