Commit Graph

112 Commits

Author SHA1 Message Date
Kevin Krsulich 39df70cd8b
Tag benchmark failures in travis (#2776)
* Add label to issues reported by CI for benchmark failures.

* On merges to master, run benchmarks between master and master~1.
2019-08-09 11:06:37 -04:00
Matthew Treinish 481832dc21 Fix return code and lint in subunit_to_junit script (#2937)
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.
2019-08-08 12:26:53 -04:00
Matthew Treinish a8f5ba0061 Stage azure pipelines jobs and add test result aggregation (#2927)
* 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
2019-08-07 11:28:24 -04:00
Kevin Krsulich 60c8bba11f Add randomized testing stage to travis (#2620)
* 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.
2019-06-17 10:36:20 -04:00
Paul Nation 97cf677137
Copyrights (#2249)
* 2017 cps

* 2018 cps

* 2019 cps
2019-04-30 10:36:47 -04:00
Salvador de la Puente González 5f4102a806 Fixing reporting URL for Travis (#1824) 2019-02-19 11:57:34 +01:00
Salvador de la Puente González 9cb0ef28f4 Utility for reporting a CI failure as a GitHub issue. (#1071)
* 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
2019-02-11 17:34:20 -05:00
Diego M. Rodríguez a967fcd8e2 Remove travis documentation deploy, other fixes (#1678)
* 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.
2019-01-14 07:03:54 -05:00
Jay Gambetta f38d392c05 Renaming QISKit to Qiskit (#1382)
* 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
2018-12-01 21:44:46 -05:00
Jay Gambetta ccfdb89b21
removing old code (#1207) 2018-11-04 11:52:24 -05:00
Diego M. Rodríguez 8350635744 Fix documentation deployment bug with paths (#1029) 2018-10-04 16:48:46 -04:00
Diego M. Rodriguez b6a850332c Update cmake and doc deployment scripts 2018-07-17 13:45:31 +02:00
alfrisch d2683cb743 Adding german translation of doc files (#592)
* 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
2018-06-28 18:22:36 -04:00
Abdón Rodríguez Davila 6bbc764534 Consistent license across all the project (#550)
* Consistent license across all the project

* Update license

* Update LICENSE.txt

* Update licenses

* Fix linter
2018-06-08 15:00:58 +02:00
Diego M. Rodríguez 77e33308a4
Rename camel_case_to_snake_case, uuids (#490)
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.
2018-05-24 13:31:07 +02:00
ewinston cc2546b434 Resolves #262: add qiskit.backend methods... (#363)
* 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.
2018-03-27 13:05:55 +02:00
Diego M. Rodriguez bad5e631a0 Remove comment and static flag on travis osx 2018-02-22 14:56:21 +01:00
Diego M. Rodriguez de5a9415e8 Revise travis configuration, using cmake
* 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`.
2018-02-22 14:56:20 +01:00
Diego M. Rodríguez 8c80d2db49
Minor Japanese documentation fixes (#141)
* 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
2017-11-09 10:34:35 +01:00
Rudy Raymond 00ae38c1f8 Added japanese doc for installation of QISKit (#140)
* 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
2017-11-08 18:13:43 +01:00
Diego M. Rodriguez 9577982361 Move deploy script to "tools/" 2017-10-02 17:34:34 +02:00
Juan Gomez 45d71d2f00 Add a new tool to generate random QASM circuits (#87)
We can specify an arbitrary number of Qubits, number of operations (depth), seed number, and
whether we want to include final measurements or not.
2017-09-28 11:25:41 +02:00
Albert Frisch b325047a57 recreating tools symlink 2017-09-01 10:25:50 +02:00
alfrisch 20819fefef fixing tools import by using full path to qiskit.tools (#52) 2017-08-31 10:35:45 +02:00
Jay M. Gambetta 075dc16941 moving tools under qiskit 2017-08-25 15:21:56 -04:00
Jay M. Gambetta 7e9c947d62 pep8 optimization tools 2017-08-23 10:21:37 -04:00
ANTONIO MEZZACAPO 4d3cb852eb Energy eval without writing H 2017-08-16 12:50:31 -04:00
cjwood e49d132e30 fixed error in qi.concurrence and qi.state_fidelity, added tests
- 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
2017-08-08 15:57:02 -04:00
Jay M. Gambetta c05219dce5 adding qft to qi tool and fixing coupling map 2017-08-04 00:28:28 -04:00
cjwood 495cd19700 Merge branch 'IBMQuantum/Dev' into feature-process-tomography
Merge.
Removed authors from tomography.py file
2017-08-03 13:17:50 -04:00
Jay M. Gambetta 23b2bbcb16 cleaning up the naming convention 2017-08-02 19:03:21 -04:00
Jay M. Gambetta 1d9a3161e3 removing names and adding codeowners 2017-08-02 18:51:04 -04:00
cjwood 69448755dc Merge branch 'IBMQuantum/Dev' into feature-process-tomography
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.
2017-08-02 15:05:26 -04:00
cjwood 338cfcd5eb pre merge commit 2017-08-02 13:19:51 -04:00
cjwood 89cce4d0e7 Added documentation to tomography.py 2017-08-02 12:33:05 -04:00
Jay M. Gambetta af01c5f745 error in tomography with new result class 2017-08-02 09:23:11 -04:00
Jay M. Gambetta b7f77ea812 fixing all the tutorials 2017-08-01 23:07:37 -04:00
Jay M. Gambetta d09fdb90d5 fixing headers in tools 2017-07-30 11:02:08 -04:00
cjwood e503758feb Merge branch 'IBMQuantum/Dev' into feature-process-tomography 2017-07-29 15:08:09 -04:00
cjwood 9018100147 fixed problems with two-qubit process tomography, added draft notebook for process tomography 2017-07-29 15:07:35 -04:00
Jay M. Gambetta cfdb308b7a adding more to the tutorials 2017-07-29 02:40:33 -04:00
Jay M. Gambetta 13e26b2599 tutorials 2017-07-28 17:26:46 -04:00
cjwood d06bc1b3a7 Merge branch 'IBMQuantum/Dev' into feature-process-tomography 2017-07-28 16:13:55 -04:00
cjwood 9036cec4f3 added functions for generating, running and fitting process tomography experiments 2017-07-28 16:13:34 -04:00
cjwood f4df4f8527 additions to tools.qi
- changed ‘basis’ keyword to ‘method’ in vectorise, devectorize
- fixed bug in pauli devectorize
- added choi_to_rauli function
2017-07-28 16:12:39 -04:00
ANDREW W. CROSS d8fcaa9864 Change filename. (#129) 2017-07-28 15:44:15 -04:00
Jay M. Gambetta f74d95c263 adding tomography 2017-07-28 15:38:54 -04:00
Jay M. Gambetta 7677c723f6 more tutorials
fixing tutorials
moving basic plotters to visualizations
adding fitters
2017-07-28 14:40:21 -04:00
cjwood 44d3349fc3 fixing tomography for new quatumprogram structure 2017-07-28 12:32:21 -04:00
cjwood dd146c7924 updated state tomography, added visualizations library, added qi library
- 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
2017-07-28 12:18:59 -04:00