* make compatible with pylint and pycodestyle
* black config
* flake8 compatible config
* Missing newline
* Add black check to CI and dev requirements
This commit updates the CI configuration and local tox configuration to
leverage black instead of pycodestyle. It adds a check job to ci and the
tox lint job so we can quickly check if black has been run. A tox job
named 'black' is added to run black on all the code in the repo.
* Run black on everything
This commit reformats all the code in the qiskit-terra repository to use
black. It changes no functionality in the project and just adjusts the
code formatting to be consistent and automated. If you are looking at
this commit in the git log you can likely safely ignore any diff from
this commit as it is just the result of running '`black' on the repo
and instead you should look at any commits before or after this for
functional changes.
Co-authored-by: Lev S. Bishop <18673315+levbishop@users.noreply.github.com>
* Add fake backends for Bogota, Montreal, and Toronto
IBM Quantum has added 3 new backends recently: Bogota, Montreal, and
Toronto. This commit creates new fake backends FakeBogota, FakeMontreal,
and FakeToronto from snapshots of the real devices.
* Refactor QobjConfiguration transformations to happen in to_dict and from_dict
* Refactor PulseDefaults transformations to happen in to_dict and from_dict
* Remove conversions from update fake backends scripts.
* Update mock backends. Added ibmq_toronto and ibmq_montreal.
* fix bug in the parametric pulse code.
* Undo from_dict/init changes.
* Do conversion of complex number better.
* Update mock backend files.
* Linting.
* Add conversion tests.
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Update fake backend snapshots
This commit goes through and updates the snapshots for all the fake
backends. This should fix inconsistencies between the current state of
the backends and what is represented by the fakes prior to this commit.
The json files were generated using the script being added in #4327.
* Fix obvious test failures
* Revert updates to fake melbourne backend
The melbourne device has undergone significant changes since the current
snapshot used for the fake device. This includes the restoration of
previously disabled qubits, which changes the coupling map. This had the
unexpected side effect of breaking several test cases that were
dependent on it having 14 qubits instead of 15. To just simplify things
and not have to update numerous test cases this commit just reverts
melbourne to the previous snapshot.
* Adjust dt units in script and update pulse backends
The auto-update script was incorrectly converting the pulse units to
seconds instead of nano-seconds (which is the expected snapshot value).
This commit corrects that in the script and re-updates the json files
for the pulse backends.
* Fix lint and remove dates from docstrings
* Rollback poughkeepsie updates
This adds a new script to the tools/ directory to update the json file
snapshots for the fake backends. This should be used in the future
periodically to go in and update the snapshots from the ibmq devices.
In writing this a couple of edge cases were found in the to_dict()
method of the backendproperties and backendconfiguration classes that
needed to be fixed for the script to function. These errors are
corrected at the same time