The subunit_to_junit script was added in #2927 to leverage the test
results aggregation features in azure pipelines. It converts the subunit
stream result format that stestr natively generates and converts it to
a junitxml format that azure pipelines can understand. This script was
heavily based on the version of subunit2junitxml filter script included
in the upstream python-subunit script. However, the use case for the
filter script is different so some undesired behavior was ported over.
Mainly that the return code mirrors that of the test suite in the
result stream (ie if the test run fails the converter returns non-zero
too). The python-subunit script did this mainly because it was designed
to be run in a pipeline off the test runner as opposed to a separate
stage post-run. However, since our use case for the subunit_to_junit
script is different having this behavior causes result generation task
failures in azure pipelines UI after the test run failed. This is
undesireable because the junitxml generation task was actually
successful it just included failed tests. This commit corrects this by
making the script always return 0 unless there is an internal failure.
At the same time this commit also fixes several code lint issues. Which
includes dropping support for the subunit v1 protocol. The subunit v1
protocol won't ever come up in our use case so there was no reason to
include compat code for that here.
* Stage azure pipelines jobs
This commit reworks our azure pipelines CI flow to use resources more
responsibly. Previously we ran all the CI jobs at once which means we
took 9 jobs from are capacity all at once for each commit. This is
particularly wasteful if we end up running 9 jobs when one can tell us
it won't work. To improve this situation this commit makes the jobs run
in 2 stages. The first stage runs the python 3.5 tests on linux and
macOS first. These jobs also include the lint checker. If these jobs
both succeed then it will continue on to run tests on windows and python
3.6 and 3.7 for macOS and Linux.
* Add test results data to azure ui
* Tweak results generation
* Only run second stage if the first works
* Fix typo
* Create custom script for junit
* Tweak condition for second stage
* Adjust windows result generation and update result names
* Add randomized testing stage to travis.
* Update report_ci_failure to create an issue for failed random tests.
* Remove randomized tests from unit test and coverage.
* Add hypothesis example database to travis cache.
* Utility for reporting a CI failure as a GitHub issue.
This PR adds a new tool for creating an issue on GitHub when the
CI fails. The utility identifies the report with the name of the
branch and commit hash an avoids to open two reports for the same
subject.
* Fixing the master is failing label
* Add automatization in CI
* Remove documentation deploy
Remove documentation script and travis job.
* Remove deploy stage from travis
Remove the "deploy doc and pypi" stage entirely, and revise the
"subclassing" of the osx jobs.
* Fix travis script make invocation
* Fix extra lint script commands
* Pin numpy version to <1.16
Pin the numpy version to <1.16 until the potential incompatibilities
are fixed.
* Remove numpy from whitelist, ignore random instead
Remove `numpy` from the `extension-pkg-whitelist`, and instead manually
ignore the check for the members of `numpy.random`, as it was the
only place where the check was significant.
* Renaming QISKit to Qiskit
* Update qiskit/_qiskiterror.py
Co-Authored-By: jaygambetta <jay.gambetta@us.ibm.com>
* Add backwards compat exception class to __init__
This adds the backwards compatible exception class back to __init__ which is likely the point people are importing from.
* Update _instruction.py
* Update _dagcircuit.py
* Update _dagcircuit.py
* creating conf.py for German language
* initial German translation
* minor fixes and typos
* fixing typos and cleaning
* adding DE version
* fixing formatting issues
* fixing formatting issues
* formatting issues
* first DE version of index.rst
* fixing typos
* adding German translation de
* adding German translation
* adding German intro translation
* fixing minor typo
* adding German translation of real backend example
* minor typo
* adding German translation of getting started
* adding German translation of dev_introduction.rst
* fixing minor typos and beautification
* fixing title underline
* fixing image ref
* fixing broken links
* fixing broken reference
* fixing formatting issue
* add line in changelog
* remove note on downgrade requirements according to main doc
* Update CHANGELOG.rst
* minor fixes
Rename `_snake_case_to_camel_case()` to `_camel_case_to_snake_case()`
in order to match its functionality.
Unify the way random identifiers are generated, using `uuid4()` instead
of manually generated random strings.
* Resolves#262: add qiskit.backend methods...
for getting parameter, calibration, and status.
* linting quantumprogram
* Update _backendutils.py
* Update _backendutils.py
* Update _basebackend.py
* Update _qeremote.py
* Update _basebackend.py
* Update _quantumprogram.py
* Update _qeremote.py
* Warning, updates to test, and backencs
1. Added to the quantum program warnings — may of done this incorrect
2. Removed old versions
3. In the configuration we lost the rewrite of the mapping. I agree we
want to update the API but first we need the backend configuration to
work
4. Made the test use quantum program
Still to be done — check why failing some test
— add some test to backend that test the test_basebackends that test
new methods
* Fixing some spelling and linting
* Spelling fixes
* Lint and spelling
* Linter fixes and some spelling in backendutils
* Cleaning up the coupling_map
@ewinston we decided that all new code should use the new map and all
old code the older one. I have remove the complicated identity map we
inserted :-)
* Renaming configuration as config to fix scope error
* Linting in test
* Linting more
* Fixing the vqe
* More linting
* Update test_quantumprogram.py
* lint errors I found trying to debug the error
* Removing backend from quantum_program test
* Making the backend object based
* Adding tests for the backend object
* Linting tests
* Spelling and linting
* Removing some set_api that are not needed
* set log level to debug
* Removing the api from the tests and needed by the program
* Cleaning up and adding a discover
* correct travis.yml env variable specification
* Removing more old code
* Updated lengths with rename of q_name and c_name
* Lint errors found from travis fixed
* Moving import order to help travis linter
* Revise DeprecationWarnings, add note to docstrings
Add a context manager for ensuring the DeprecationWarnings are shown
regardless of the user configuration, as by default they are hidden for
end users (ie. when not on an interpreter).
Revise the strings for the warnings and add entries to the docstrings
for visually showing them on the online docs.
* Enable deprecation warnings during __init__
Enable the display of deprecation warnings during qiskit.__init__
instead of via a context manager, for simplifying the deprecated calls
and help providing visual aids for the editors.
* fix cyclic import and scope of configuration
These were pylint warnings. The configuration one was due to having a function of
of the same name as a parameter in _backendutils.py.
* fix linter
* remove converting coupling_map to dict
* minor lint fix
* Small fix to the backends.
* Fix LookupErrors, style, comments
Fix several backendutils methods raising ConnectionError instead of
LookupError when the entities were not found.
Update the structure of those methods for simplicity and consistency.
Fix commented out code on tests.
* Revise the travis configuration for using `cmake` for the several
targets, and use "stages" instead of parallel jobs:
* define three stages that are executed if the previous one suceeds:
1. "linter and pure python test": executes the linter and a test
without compiling the binaries, with the idea of providing quick
feedback for PRs.
2. "test": launch the test, including the compilation of binaries,
under GNU/Linux Python 3.6 and 3.6; and osx Python 3.6.
3. "deploy doc and pypi": for the stable branch, deploy the docs
to the landing page, and when using a specific commit message,
build the GNU/Linux and osx wheels, uploading them to test.pypi.
* use yaml anchors and definitions to avoid repeating code (and
working around travis limitations).
* Modify the `cmake``configuration to accomodate the stages flow:
* allow conditional creation of compilation and QA targets, mainly
for saving some time in some jobs.
* move the tests to `cmake/tests.cmake`.
* Update the tests:
* add a `requires_qe_access` decorator that retrieves QE_TOKEN and
QE_URL and appends them to the parameters in an unified manner.
* add an environment variable `SKIP_ONLINE_TESTS` that allows to
skip the tests that need network access.
* replace `TRAVIS_FORK_PULL_REQUEST` with the previous two
mechanisms, adding support for AppVeyor as well.
* fix a problem with matplotlib under osx headless, effectively
skipping `test_visualization.py` during the travis osx jobs.
* Move Sphinx to `requirements-dev.txt`.
* Fix sphinx doc deploy script for Japanese
* Fix sphinx Japanese image links
* Fix sphinx Japanese warnings
Fix warnings during the compilation of the Sphinx documents for the
Japanese language.
* Add link to switch language on Sphinx docs header
* Added japanese doc
* Update Make and structure to allow multiple langs
Update the Makefile "doc" target to build both the English and the
Japanese versions, in separate directories, and the "clean" target to
cleanup the autodoc documentation.
Add a "conf.py" file to the "doc/ja" folder that modifies the relevant
variables, as Sphinx uses that folder as the root document folder when
building the Japanese version.
* Fix missing "install" reference on ja sphinx docs
* Update sphinx doc deploy script for Japanese
Add the Japanese sphinx produced directory to the Github pages deploy
script.
* Fix typo and extra line in Makefile
- concurrence was returning negative values for some state with zero
concurrence
- state_fidelity was returning NaN for pure state density matrices.
Fixed by adding function funm_svd which applies as scalar function to
singular values of a matrix, and implementing sort this way.
- fixed concurrence and purity to work for array_like inputs (i.e.
lists)
- added unit tests for qi functions
Updates:
- Fixed state and process tomography notebooks for new quantum program
structure.
- Added option for Pauli ordering by weight in vectorise, devectorize.
- Changed partial_trace to default qubit-0 to right of tensor product,
with option to reverse to ‘normal’ ordering.
- state tomography supports least squares fitting, and wizard method
- qi contains partial trace, state_fidelity, and in future will contain
other common quantum info functions