Commit Graph

2357 Commits

Author SHA1 Message Date
Matthew Treinish fe5f712c92 Clean up unused code in setup.py (#1670)
Since #1644 we've removed all the C++ code from the terra repository.
That commit updated the setup.py and build process to not assume we're
compiling code to build the simulators. However we missed a lot of
parameters imports and other code in the setup.py which are not needed
or don't apply anymore now that terra is just python code. This commit
cleans that all up so we minimize what we include in the setup.py.
2019-01-12 17:09:04 -05:00
Luciano 26525b2d43 Trivial layout as staticmethod (#1579)
* default layout method

* cx_direction

* check_map

* basic swap

* lookahead

* style

* default_layout -> generate_trivial_layout

* style

* typ0 in lookahead_swap.py

* lint

* add typechecking to get bugs sooner than later

* testing the typecheck

* style

* Update qiskit/mapper/_layout.py

Co-Authored-By: 1ucian0 <luciano@debian.org>

* long line

* checktype -> _checktype

* checktype -> _checktype
2019-01-11 20:14:18 -05:00
Max Reuter 5a7d426833 Remove `transpile_dag()`'s `format` kwarg (#1664)
* Remove 'format' kwarg from transpile_dag()

* Remove unused import warnings

* Update changelog
2019-01-11 16:46:58 -05:00
Maddy Tod a63c03e222 Change param to params throughout the code (#1665)
* Changed param to params everywhere

* Found and fixed 2 more param

* Updated the CHANGELOG to include these changes

* Adding accidentally removed comment

* Update CHANGELOG.rst
2019-01-11 16:17:06 -05:00
ewinston 5d3b3e3f02 implement register slices. (#1643)
* remove typo in hadamard gate

* enable register slicing

This allows statements like qc.x(qr[0:2]).

* linting

* more linting

* add doc strings

* minor linting change

* lint

* use decorators for common gate extensions

* linting

* generate more useful error message for 3q gates

When cswap or ccx incorrectly use unequal register sizes this generates a more useful error message.

* minor commit

* seperate gate decorators into it's own module.

allow single qubit target with multiple qubit control.

* linting

* remove f-format strings for python 3.5

* fix minor bugs

* linting

* changelog
2019-01-11 09:56:27 -05:00
Matthew Treinish 588d9a3f02 Fix histogram ylimit for multiple executions (#1661)
In the plot_histogram function there was a bug when there were multiple
executions passed into the function with the y axes bounds. We were
previously setting the ylimit for each iteration of loop which goes over
each execution. However we should look at the max probability across all
executions when determining the upper limit for the yaxis. This commit
fixes this change by saving all the probabilities in a list outside the
loop and then moving the ax.ylim() to the end of that loop.

Fixes: #1660
2019-01-10 19:33:10 -05:00
Max Reuter 136dd046f3 Remove deprecated result methods (#1659)
* Remove deprecated result methods

* Update PR number in changelog
2019-01-10 18:27:58 -05:00
Matthew Treinish e2b11516c6 Remove vqe performance test (#1656)
* Remove vqe performance test

The infrastructure in terra needed to run vqe was removed in #1184 in
favor of just using aqua. However the performance test that depending on
this to benchmark running vqe was not removed at the same time. This
commit corrects the oversight and just removes the test since it doesn't
work anymore. We should just rely on aqua to run vqe (and aqua to do the
benchmarking).

* Remove H2 and LiH files too
2019-01-10 17:24:49 -05:00
Matthew Treinish 4b7f96fb4a
Switch to travis addon for homebrew on osx jobs (#1657)
Currently the osx jobs are failing trying upgrade the pyenv version to the latest (which is needed to install the python versions we test in CI). According to the travis docs the best way to use homebrew on osx jobs is to rely on the travis addon instead of doing it manually in the install scripts. This commit makes this change so we install the latest version of pyenv (and the python 3.7 dependencies) via the addon instead of out of band. This fixes the failure and makes sure we have the latest versions of the homebrew package installed as needed.

* Find working pyenv versions on osx homebrew

* Switch to travis addon for brew

* Rework travis osx config a bit more
2019-01-09 18:00:29 -05:00
Diego M. Rodríguez a3b08ad164
Update marshmallow version in setup.py (#1654) 2019-01-09 10:59:20 +01:00
Christopher J. Wood 4bf0db919f Remove legacy C++ simulator code (#1644)
* Remove legacy cpp code

* remove legacy cpp sim from make and travis

* Rename decorator and folder for aer provider tests

* remove Cpp simulator for setup.py

* fixup

* Remove all cmake and cleanup travis config

Since we're no longer building any C++ code there is no need to keep
cmake usage around anymore. This commit removes the last cmake remnants
and also cleans up the travis config to simply run make && make test to
install everything and then just invoke the test runner. It also
deduplicates jobs now that there is no distinction between no_compile
and compile jobs.

* Fix some small oversights

* Remove legacysimulator contributing doc section
2019-01-08 17:22:18 -05:00
ewinston 02f3b1f917 bump marshmallow version requirement to 2.17.0 (#1652)
marshmallow.warnings used in qiskit/_util.py was introduced after 2.16.3.
2019-01-07 23:54:21 -05:00
Matthew Treinish 11156e3f5c Update _matplolib code to be more consistent (#1651)
This commit updates some internal variable names and removes out of date
comments. When we refactored the visualizers to use the dag/circuit
directly instad of unrolling into json these were leftover. While the
code worked it didn't reflect how things were actually working anymore.
To minimize code churn before the release these cleanups were left until
after the 0.7 release.

Fixes #1452
2019-01-07 21:33:10 -05:00
Matthew Treinish 91717f6537 Remove deprecated functions, options, and behavior from circuit_drawer (#1567)
* Remove deprecated functions, options, and behavior from circuit_drawer

In the 0.7 release we deprecated several functions, options, and
behaviors in the circuit drawers. Now that we've got that release out
the door we can stage the removal of those things. This commit does that
and removes all the things we deprecated to stage for removal in the
circuit drawers.

* Fix test imports

* Fix whitespace

* Fix lint
2019-01-04 23:04:23 -05:00
Diego M. Rodríguez 11b69e4e62 Silence ChangedInMarshmallow3Warning warnings (#1642)
* Silence ChangedInMarshmallow3Warning warnings

Add a warnings filter for ignoring "ChangedInMarshmallow3Warning",
renaming the util function in the process.

* Style fixes for _util
2019-01-04 14:52:45 -05:00
Jay Gambetta 2ea7d176ea Circuits to qobj (#1629)
* Removing qobj dependencies in qobjconfig

* Adding to rebase

* Removing unrolls

* Linting

* Fixing last test

* Updating the schema

* Linting that makes no sense

* Diego updates

* Linting

* Update qiskit/tools/compiler.py

Co-Authored-By: jaygambetta <jay.gambetta@us.ibm.com>

* Update qiskit/qobj/run_config.py

Co-Authored-By: jaygambetta <jay.gambetta@us.ibm.com>

* update warning messages. remove init from RunConfig as all optional

* only put optional shots, max_credits, memory in qobj if they are set
2019-01-03 08:54:25 -05:00
ewinston 95fbde842d remove typo in hadamard gate (#1640) 2019-01-02 15:15:07 -05:00
Paul Nation 3866401125 fix plot_histogram with number_to_keep (#1638) 2019-01-02 12:53:34 -05:00
Ali Javadi-Abhari a39236bcfe remove test.python.common (#1628)
* remove test.python.common

* lint
2018-12-30 00:19:21 -05:00
Jay Gambetta c3ec3f2ad6 Test conditional dag and circuit (#1626)
* Adding conditional converter test

* Linting

* Linting

* Linting

* Linting
2018-12-29 23:20:41 -05:00
Jay Gambetta ecd77b13ad Removed circuit.add (#1627)
* Removed circuit.add

* Update changeling
2018-12-29 23:03:03 -05:00
Jay Gambetta 9076b8c662 Tests (#1625)
* Reorganizing the test

* Updating limit

* Linting

* Adding the changlog

* Rename

* Better name

* edits after discussing with jay
2018-12-29 20:00:50 -05:00
Ali Javadi-Abhari 5f7b2e7fc6 fix BasicAer sampling bug (#1624)
* fix BasicAer sampling bug

* changelog

* remove legacysimulator from test_compile
2018-12-29 12:10:54 -05:00
Marco Pistoia 3a4495cb76 Fixed typos and made consistent with the other elements (#1622)
* Fixed typos and made consistent with the other elements

* Update README.md
2018-12-29 11:01:03 -05:00
Jay Gambetta b2bbb3f059 Remove legacy simulators (#1615)
* Removing simulators

* Fixing some test

* Fixing test

* Test

* Email

* Fixing test

* Passing locally

* Hack to get aer

* Diego fix

* Trying to fix windows errors

* Aer to basicaer

* Adding lint

* Removing test around and making aer only on one folder.

* Adding HACK FROM THE DEPTHS OF DESPAIR AS AER DOES NOT WORK ON MAC

* Oops Diego hack I did not implement correctly

* Linting

* do not import Aer at the top of tests

* lint

* two more CHANGELOG lines
2018-12-28 17:32:27 -05:00
Diego M. Rodríguez 8245a11be4 Move QiskitTestCase to qiskit.test (#1616)
* Move JobTestCase to test.python.ibmq

* Move common testing functionality to qiskit.test

Temporary commit for moving the files to qiskit.test.

* Split qiskit.test.common into separate modules

* Style and docstring adjustments

* Add new Path.QASMS, revise existing ones

* Update CHANGELOG
2018-12-28 09:09:14 -05:00
Jay Gambetta eea013d14b Removing qiskit.wrapper (#1613)
* Removing qiskit.wrapper

* Adding a section removed.
2018-12-27 15:57:13 -05:00
Diego M. Rodríguez fcfbeec029
Merge pull request #1609 from diego-plan9/fix/resync-stable-0.7
Resync documentation changes into master
2018-12-27 16:35:24 +01:00
Diego M. Rodriguez 6a82fe89a8 Merge remote-tracking branch 'qiskit/stable' into fix/resync-stable-0.7 2018-12-27 16:30:05 +01:00
Luciano 5d73c595cc Handling Swap gates in CheckMap pass (#1604)
* broken tests in checkmap

* handeling swap

* TestCheckMapCZ

* style
2018-12-27 12:06:35 +01:00
yaelbh 7fe5e20bb7 A minor fix in a comment (#1608) 2018-12-27 11:20:25 +01:00
Jay Gambetta 7352d89b79 Broken link (#1606) 2018-12-27 10:40:17 +01:00
Jay Gambetta 6ee792f63f Adding links to readme (#1607) 2018-12-27 02:48:58 -05:00
Diego M. Rodríguez 4d94311c73 Restore qiskit.qiskiterror (#1602) 2018-12-26 17:13:27 -05:00
Jay Gambetta 2e7c4e36ca
Updating the readme badges to be like Qiskit and Qiskit aer (#1601) 2018-12-26 12:19:22 -05:00
Diego M. Rodríguez 65ba65d0f8 Update pylint to recent version, solve cyclic dependencies (#1600)
* Bump pylint version

* Disable pylint unnecessary-pass, no-else-return

Disable pylint checks:
* unnecessary-pass: allow for methods with just "pass", for clarity
* no-else-return: relax "elif" after a clause with a return

* Fix linter: useless-object-inheritance

* Fix new linting errors

* Move version to its own file

Move the reading of Terra version to its own file, avoiding cyclic
import during at `qiskit/providers/basebackend.py`.

* Prefer importing QiskitError from submodule

Revise the imports of `QiskitError` in order to break cyclic
dependencies.

* Break more cyclic imports

* Break more cyclic imports, redux

* Update cyclic import in QuantumCircuit

Move the pylint disable to an inner-most level for QuantumCircuit. There
is still an import cycle (qiskit.circuit.quantumcircuit ->
qiskit.converters.ast_to_dag) due to circuit.Measure and circuit.Reset
being part of the module and the dynamic extension mechanism.

* Unify extension handling in own modules

Revise the Exceptions throughout the codebase, containing them into
specific `.exceptions` modules.

* Update passes imports after rebasing

Update the `qiskit.transpiler` module imports to avoid cyclic import,
after rebasing against master.

* Update .pylintrc
2018-12-26 10:46:30 -05:00
Jay Gambetta 50e54469b0 development cycle (#1595)
* Redoing again

* Editing
2018-12-26 16:11:40 +01:00
Jay Gambetta 454005abe2 Making clear difference between slack and stack (#1596)
* Making clear difference between stack and slack

* Update
2018-12-24 11:49:38 +01:00
Luciano a1d934f063 third party import "import matplotlib" should be placed before "import ipywidgets" (wrong-import-order) (#1569) 2018-12-24 11:05:32 +01:00
Ali Javadi-Abhari 285128ecdc DenseLayout and TrivialLayout pass (#1499)
* adding an embedder pass

* improve error messages in dagcircuit

* get_cnot_nodes -> get_2q_nodes and get_named_nodes return node not node_id

* TranspilerError is fine grained enough

* rebase

* add test

* transpiler only calls DenseLayout if TrivialLayout does not work

* add tests
2018-12-23 22:14:50 -05:00
Jay Gambetta 38cfe156d3 Revert "Merge branch 'master' into stable"
This reverts commit 30d37f7ba0, reversing
changes made to 7ba55c1169.
2018-12-23 21:06:42 -05:00
Jay Gambetta 30d37f7ba0
Merge branch 'master' into stable 2018-12-23 20:28:00 -05:00
Jay Gambetta 7ba55c1169
update doc in stable (#1593)
* Cleaning up docs

* Reorder

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

* Small updates
2018-12-23 20:23:58 -05:00
Jay Gambetta 11e9a31f1c
Cleaning up doc (#1585) (#1592)
* Cleaning up docs

* Reorder

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst
2018-12-23 20:22:42 -05:00
Jay Gambetta a1e9350912 Cleaning up doc (#1585)
* Cleaning up docs

* Reorder

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst
2018-12-23 14:45:20 -05:00
Jay Gambetta efe53c0dcb
Update README.md (#1584) 2018-12-23 00:25:20 -05:00
Jay Gambetta f81adf5ac8
Update README.md 2018-12-22 22:24:04 -05:00
Paul Nation 2fa18d2bcb adaptive job status check interval (#1581) 2018-12-22 09:53:00 -05:00
Ali Javadi-Abhari c43e154203 update pypi shield address (#1577) 2018-12-20 23:37:55 -05:00
Paul Nation 7aff06a442 job_monitor uses text in notebook (#1568) 2018-12-20 18:41:35 -05:00