Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into transpiler-phases
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Sep 10, 2021
2 parents 76ffb74 + 8d5bcca commit c86a7fb
Show file tree
Hide file tree
Showing 980 changed files with 27,632 additions and 15,332 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Wheel Builds
on:
push:
tags:
- '*'
jobs:
build_wheels_aarch64:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.0.1 twine
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,9 @@ docs/stubs/*
test/ipynb/mpl/*.png
test/ipynb/mpl/*.zip
test/ipynb/mpl/result_test.json
test/ipynb/mpl/circuit/*.png
test/ipynb/mpl/circuit/*.zip
test/ipynb/mpl/circuit/result_test.json
test/ipynb/mpl/graph/*.png
test/ipynb/mpl/graph/*.zip
test/ipynb/mpl/graph/result_test.json
72 changes: 64 additions & 8 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,84 @@
#
Abdón Rodríguez Davila <a@abdonrd.com> <a@abdonrd.com>
Abigail J. Cross <across@us.ibm.com>
Adrien Suau <adrien.suau@cerfacs.fr>
Albert Frisch <albert.frisch@de.ibm.com>
Albert Frisch <albert.frisch@de.ibm.com> <alfr@de.ibm.com>
Ali Javadi-Abhari <ali.javadi@ibm.com> <ajavadia@users.noreply.github.com>
Ali Javadi-Abhari <ali.javadi@ibm.com> <ajavadia@princeton.edu>
Alejandro Pozas-Kerstjens <physics@alexpozas.com> <apozas@users.noreply.github.com>
Almudena Carrera Vazquez <acv@zurich.ibm.com> <almudenacarreravazquez@hotmail.com>
Andrew W. Cross <awcross@us.ibm.com>
Andrew W. Cross <awcross@us.ibm.com> Andrew Cross <awcross@Andrews-MacBook-Pro.local>
Andrew W. Cross <awcross@us.ibm.com> Andrew Cross <awcross@andrews-mbp.watson.ibm.com>
Anna Phan <9410731+attp@users.noreply.github.com> <anna.phan@au1.ibm.com>
Annanay Kapila <k.annanay@gmail.com>
Antonio D. Córcoles-Gonzales <adcorcol@us.ibm.com>
Antonio Mezzacapo <30698465+antoniomezzacapo@users.noreply.github.com> <amezzac@us.ibm.com>
Arijit Saha <59946663+Arijit02@users.noreply.github.com>
Atsushi Matsuo <47442626+a-matsuo@users.noreply.github.com>
Aziz Ngoueya <49644465+AzizNgoueya@users.noreply.github.com>
Ben Rosand <brosand@gmail.com>
Bhargav Vishnu <38890773+Bhargavishnu@users.noreply.github.com>
Carmen Recio Valcarce <car_rv@outlook.es> <49230820+carmenrv@users.noreply.github.com>
Chris Culver <chris.cb.culver@gmail.com>
Christa Zoufal <40824883+Zoufalc@users.noreply.github.com>
Christa Zoufal <40824883+Zoufalc@users.noreply.github.com> <ouf@zurich.ibm.com>
Christian Clauss <cclauss@me.com> <cclauss@bluewin.ch>
Christophe Vuillot <c.vuillot@tudelft.nl>
Christopher J. Wood <cjwood@us.ibm.com>
Corey Mendell <corey.mendell@gmail.com>
Daniel Egger <38065505+eggerdj@users.noreply.github.com>
Davide Facoetti <dfacoet@gmail.com>
Davide Ferrari <20130061+DavideFrr@users.noreply.github.com>
Dennis Liu <54714046+dennis-liu-1@users.noreply.github.com>
Dimitar Trenev <64981310+dtrenev@users.noreply.github.com>
Dhruv Bhatnagar <61590679+dhruvbhq@users.noreply.github.com>
Donny Greenberg <dongreenberg2@gmail.com>
Donny Greenberg <dongreenberg2@gmail.com> <donny@ibm.com>
Diego M. Rodríguez <diego.plan9@gmail.com>
Drew Risinger <drewrisinger@users.noreply.github.com>
Dmitri Maslov <34778124+dmitrimaslov@users.noreply.github.com>
Edwin Navarro <enavarro@comcast.net>
Erick Winston <ewinston@us.ibm.com>
Farai Mazhandu <35575882+faraimazh@users.noreply.github.com>
Fran Cabrera <francabrera@users.noreply.github.com> <fcabrera@us.ibm.com>
Fran Cabrera <francabrera@users.noreply.github.com> Fran Cabrera <francabrera@Frans-MacBook-Pro.local>
Franck Chevallier <fchevallier10@gmail.com>
Freya Shah <28627285+fs1132429@users.noreply.github.com>
Gadi Aleksandrowicz <gadial@gmail.com>
Gabriele Agliardi <72732327+gabrieleagl@users.noreply.github.com>
Gawel Kus <gawel.kus@ibm.com>
Gawel Kus <gawel.kus@ibm.com> <gawel@oc7832844175.ibm.com>
Georgios Tsilimigkounakis <45130028+georgios-ts@users.noreply.github.com>
Hiroshi Horii <horii@jp.ibm.com> <HORII@jp.ibm.com>
Hiroshi Horii <horii@jp.ibm.com> <hhorii@users.noreply.github.com>
Ian Gould <iangould@IANs-MacBook.local>
Igor Olegovich Sokolov <iso@zurich.ibm.com> <ISO@zurich.ibm.com>
Ismael Faro Sertage <ismael.faro1@ibm.com> <ismael.faro.sertage@gmail.com>
Ismael Faro Sertage <ismael.faro1@ibm.com> <ismael.faro1@ibm.com>
Ismail Yunus Akhalwaya <ismaila@za.ibm.com>
Ismail Yunus Akhalwaya <ismaila@za.ibm.com> <30803146+ismaila-at-za-ibm@users.noreply.github.com>
Jack J. Woehr <4604036+jwoehr@users.noreply.github.com>
Jake Lishman <jake.lishman@ibm.com> <jake@binhbar.com>
James Seaward <58116376+JamesSeaward@users.noreply.github.com>
Jan Müggenburg <jan.mueggenburg@ibm.com>
Jan Müggenburg <jan.mueggenburg@ibm.com> <jan@oc6058543760.ibm.com>
Jay M. Gambetta <jay.gambetta@us.ibm.com>
Jerry M. Chow <chowmj@us.ibm.com>
Jessica Wilson <jessicalostinspace@gmail.com>
Jesús Pérez <jesusper@us.ibm.com> <jesusprubio@gmail.com>
Johannes Weidenfeller <54772951+Knabberjoe@users.noreply.github.com>
Jonathan A. Wildstrom <34069155+jwildstr-ibm@users.noreply.github.com>
Jonathan A. Wildstrom <34069155+jwildstr-ibm@users.noreply.github.com> <jwildstr@us.ibm.com>
Jonathan Shoemaker <Jonathan-Shoemaker@ibm.com>
Jordan Connor <jordanhconnor@gmail.com>
Jorge Carballo <carballo@us.ibm.com> <jelcaf@gmail.com>
Juan Cruz-Benito <juan.cruz@ibm.com>
Juan Gomez-Mosquera <atilag@gmail.com>
Juan Gomez-Mosquera <atilag@gmail.com> <Juan.Gomez1@ibm.com>
Julien Gacon <jul@zurich.ibm.com>
Julien Gacon <jul@zurich.ibm.com> <jules.gacon@googlemail.com>
Kevin Krsulich <kevin.krsulich@ibm.com> <kevin@krsulich.net>
Lev S. Bishop <18673315+levbishop@users.noreply.github.com>
Luciano Bello <luciano.bello@ibm.com> <lbello@gmail.com>
Expand All @@ -63,12 +106,16 @@ Mathieu Tillet <50137038+mtillet@users.noreply.github.com>
Matthew Treinish <mtreinish@kortar.org>
Matt Stypulkoski <50181769+Matt-Stypulkoski@users.noreply.github.com>
Max Reuter <Max.Reuter@ibm.com>
Max Rossmannek <rmax@ethz.ch>
Mingi Ryu <mingiryu@msn.com>
Naoki Kanazawa <39517270+nkanazawa1989@users.noreply.github.com>
Nathan Shammah <nathan.shammah@gmail.com>
Ninad Sathaye <sathayen@users.noreply.github.com>
Nick Bronn <nick.bronn@gmail.com>
Oluwatobi Ogunbayo <tobyogunbayo@gmail.com>
Paco Martín Fernández <fmartinfdez@gmail.com>
Panagiotis Barkoutsos <bpa@zurich.ibm.com>
Panagiotis Barkoutsos <bpa@zurich.ibm.com> <pbarkoutsos@gmail.com>
Patrick Neuweiler <npatrick@ethz.ch> <56123073+neupat@users.noreply.github.com>
Paul Nation <nonhermitian@gmail.com>
Peng Liu <34400304+liupibm@users.noreply.github.com>
Expand All @@ -84,35 +131,44 @@ Raphaël Lambert <49641842+rfclambert@users.noreply.github.com>
Renier Morales <renier@users.noreply.github.com>
Richard Chen <chunfuchen@users.noreply.github.com>
Raphaël Lambert <49641842+rfclambert@users.noreply.github.com>
Romain Moyard <36766072+rmoyard@users.noreply.github.com>
Rudy Raymond <rudyhar@jp.ibm.com> <rudyhar@jp.ibm.com>
Ryan Wood <ryanwood1193@gmail.com>
Salvador de la Puente González <neo.salvador@gmail.com> <salva@unoyunodiez.com>
Samuel Bosch <BoschSamuel@users.noreply.github.com>
Scott Kelso <scottkelso07@hotmail.com>
Scott Lawrence <bytbox@gmail.com>
Sean Dague <sean@dague.net>
Seif Mostafa <csseifms@gmail.com>
Seyon Sivarajah <seyon.sivarajah@cambridgequantum.com>
Shaohan Hu <shaohan.hu@ibm.com>
Shaohan Hu <shaohan.hu@ibm.com> <Shaohan.Hu@ibm.com>
Soolu Thomas <soolu.thomas@ibm.com> <soolu.elto@gmail.com>
Srujan Meesala <srujanm@gmail.com>
Stefan Woerner <wor@zurich.ibm.com> <stefan@swoerner.de>
Stefan Woerner <wor@zurich.ibm.com> <41292468+stefan-woerner@users.noreply.github.com>
Stephen Wood <40241007+woodsp-ibm@users.noreply.github.com> <woodsp@us.ibm.com>
Sumit Puri <er.sumitpuri@gmail.com>
Takashi Imamichi <31178928+t-imamichi@users.noreply.github.com>
Tharrmashastha SAPV <51048173+TharrmashasthaPV@users.noreply.github.com>
Ninad Sathaye <sathayen@users.noreply.github.com>
Thomas Alexander <talexander@ibm.com> <thomasalexander2718@gmail.com>
Toshinari Itoko <itoko@jp.ibm.com>
Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Vismai Khanderao <59114226+Vismai-Khanderao@users.noreply.github.com>
Vojtech Havlicek <Vojtech.Havlicek@ibm.com>
Wei Hu <weihu@cs.virginia.edu>
Wes Turner <wes.turner@gmail.com>
Will Bang <will.h.bang@gmail.com>
Yael Ben-Haim <yaelbh@il.ibm.com>
Yukio Siraichi <sir.yukio@gmail.com>
Yunho Maeng <yunho.maeng.dc@gmail.com>
Yunong Shi <synisnot@gmail.com>
bcamorrison <54222891+bcamorrison@users.anoreply.github.com>
brandhsn <sebastian.brandhofer@gmail.com>
dime10 <dime10@users.noreply.github.com>
drholmie <animesh.leo@gmail.com>
faisaldebouni <faisal@megoapps.com>
gruu <guruhegde1308@gmail.com>
toural <toural@es.ibm.com>
Sebastian Brandhofer <sebastian.brandhofer@gmail.com>
Animesh N Dangwal <animesh.leo@gmail.com>
Faisal Debouni <faisal@megoapps.com>
Juan Luis Sánchez Toural <toural@es.ibm.com>
yang.luh <34480044+LuhangYang@users.noreply.github.com>
yotamvakninibm <52409900+yotamvakninibm@users.noreply.github.com>
Yotam Vaknin <Yotam.Vaknin@Ibm.com> <52409900+yotamvakninibm@users.noreply.github.com>
Yotam Vaknin <Yotam.Vaknin@Ibm.com> <yotamvak@lnx-quantum.openstack.haifa.ibm.com>
Łukasz Herok <lukasz.herok@gmail.com>
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ pull_request_rules:
actions:
backport:
branches:
- stable/0.17
- stable/0.18
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
extension-pkg-whitelist=retworkx, numpy, tweedledum


[MESSAGES CONTROL]
Expand Down Expand Up @@ -297,7 +297,7 @@ ignore-mixin-members=yes
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=matplotlib.cm,numpy.random,retworkx
ignored-modules=

# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
Expand Down
17 changes: 0 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,3 @@ jobs:
- pip install -U pip
- python setup.py build_ext --inplace
- make test_randomized

- name: Build aarch64 wheels
arch: arm64
services:
- docker
install:
- echo ""
env:
- CIBW_BEFORE_BUILD="pip install -U Cython"
- CIBW_SKIP="cp27-* cp34-* cp35-* pp*"
- TWINE_USERNAME=qiskit
- CIBW_TEST_COMMAND="python {project}/examples/python/stochastic_swap.py"
if: tag IS present
script:
- pip install -U twine importlib-metadata keyring cibuildwheel==1.9.0
- cibuildwheel --output-dir wheelhouse
- twine upload wheelhouse/*
28 changes: 17 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,38 +327,38 @@ we used in our CI systems more closely.

### Snapshot Testing for Visualizations

If you are working on code that makes changes to any matplotlib visualisations
you will need to check that your changes don't break any snapshot tests, and add
If you are working on code that makes changes to any matplotlib visualisations
you will need to check that your changes don't break any snapshot tests, and add
new tests where necessary. You can do this as follows:

1. Make sure you have pushed your latest changes to your remote branch.
2. Go to link: `https://mybinder.org/v2/gh/<github_user>/<repo>/<branch>?urlpath=apps/test/ipynb/mpl_tester.ipynb`. For example, if your GitHub username is `username`, your forked repo has the same name the original, and your branch is `my_awesome_new_feature`, you should visit https://mybinder.org/v2/gh/username/qiskit-terra/my_awesome_new_feature?urlpath=apps/test/ipynb/mpl_tester.ipynb.
This opens a Jupyter Notebook application running in the cloud that automatically runs
This opens a Jupyter Notebook application running in the cloud that automatically runs
the snapshot tests (note this may take some time to finish loading).
3. Each test result provides a set of 3 images (left: reference image, middle: your test result, right: differences). In the list of tests the passed tests are collapsed and failed tests are expanded. If a test fails, you will see a situation like this:

<img width="995" alt="Screenshot_2021-03-26_at_14 13 54" src="https://user-images.githubusercontent.com/23662430/112663508-d363e800-8e50-11eb-9478-6d665d0ff086.png">
4. Fix any broken tests. Working on code for one aspect of the visualisations
can sometimes result in minor changes elsewhere to spacing etc. In these cases
4. Fix any broken tests. Working on code for one aspect of the visualisations
can sometimes result in minor changes elsewhere to spacing etc. In these cases
you just need to update the reference images as follows:
- download the mismatched images (link at top of Jupyter Notebook output)
- unzip the folder
- copy and paste the new images into `qiskit-terra/test/ipynb/mpl/references`,
- copy and paste the new images into `qiskit-terra/test/ipynb/mpl/references`,
replacing the existing reference images
- add, commit and push your changes, then restart the Jupyter Notebook app in your browser. The
- add, commit and push your changes, then restart the Jupyter Notebook app in your browser. The
tests should now pass.
5. Add new snapshot tests covering your new features, extensions, or bugfixes.
- add your new snapshot tests to `test/ipynb/mpl/test_circuit_matplotlib_drawer.py`
, where you can also find existing tests to use as a guide.
- commit and push your changes, restart the Jupyter Notebook app in your browser.
As this is the first time you run your new tests there won't be any reference
images to compare to. Instead you should see an option in the list of tests
- commit and push your changes, restart the Jupyter Notebook app in your browser.
As this is the first time you run your new tests there won't be any reference
images to compare to. Instead you should see an option in the list of tests
to download the new images, like so:

<img width="1002" alt="Screenshot_2021-03-26_at_15 38 31" src="https://user-images.githubusercontent.com/23662430/112665215-b9c3a000-8e52-11eb-89e7-b18550718522.png">

- download the new images, then copy and paste into `qiskit-terra/test/ipynb/mpl/references`
- add, commit and push your changes, restart the Jupyter Notebook app in your browser. The
- add, commit and push your changes, restart the Jupyter Notebook app in your browser. The
new tests should now pass.

Note: If you have run `test/ipynb/mpl_tester.ipynb` locally it is possible some file metadata has changed, **please do not commit and push changes to this file unless they were intentional**.
Expand All @@ -379,6 +379,12 @@ run `tox -eblack` to automatically update the code formatting to conform to
the style. However, if `pylint` returns any error you will have to fix these
issues by manually updating your code.

Because `pylint` analysis can be slow, there is also a `tox -elint-incr` target, which only applies
`pylint` to files which have changed from the source github. On rare occasions this will miss some
issues that would have been caught by checking the complete source tree, but makes up for this by
being much faster (and those rare oversights will still be caught by the CI after you open a pull
request).

## Development Cycle

The development cycle for qiskit-terra is all handled in the open using
Expand Down
70 changes: 0 additions & 70 deletions Make.bat

This file was deleted.

Loading

0 comments on commit c86a7fb

Please sign in to comment.