Changelog
========
Added
-----
- Added DAG visualizer which requires `Graphivz <https://www.graphviz.org/>`_
(1059)
- Added an ASCII art circuit visualizer (909)
- The QuantumCircuit class now returns an ASCII art visualization when treated
as a string (911)
- The QuantumCircuit class now has a `draw()` method which behaves the same
as the `qiskit.tools.visualization.circuit_drawer()` function for visualizing
the quantum circuit (911)
- A new method `hinton` can be used on
`qiskit.tools.visualization.plot_state()` to draw a hinton diagram (1246)
- Two new constructor methods, `from_qasm_str()` and `from_qasm_file()`, to
create a QuantumCircuit object from OpenQASM were added to the
QuantumCircuit class. (1172)
- New methods in QuantumCircuit for common circuit metrics:
`size()`, `depth()`, `width()`, `count_ops()`, `num_tensor_factors()` (1285)
- Added `backend_monitor` and `backend_overview` Jupyter magics,
as well as `plot_coupling_map` (1231)
- Added a `Layout` object (1313)
- New `plot_bloch_multivector()` to plot Bloch vectors from a tensored state
vector or density matrix. (1359)
- Per-shot measurement results are available in simulators and select devices.
Request them by setting ``memory=True`` in ``compile()``/``execute()``,
and retrieve them from ``result.get_memory()`` (1385).
- Added a ``qiskit.converters`` module for translation between commonly used
representations of a circuit: ``dag_to_circuits``, ``circuits_to_dag``,
``qobj_to_circuits``, ``circuits_to_qobj``, ``ast_to_dag``.
- PassManager can schedule passes at __init__ time (1510).
- Added a ``.qobj()`` method for IBMQ and local simulator Jobs (1532).
- New Decompose pass for decomposing a gate according to a rule (1487).
- New Unroller pass in the transpiler for unrolling up to some basis (1455).
- New BarrierBeforeFinalMeasurements pass for preventing final
measure reorder (1538).
- New CommutationAnalysis and CommutationTransformation transpiler
passes for modifying a DAG based on gate commutativity relations (1500).
- New transpiler mapper pass: BasicSwap (1270).
- New transpiler mapper pass: LookaheadSwap (1140).
- New transpiler mapper pass: StochasticSwap (1520).
- New CXDirection pass for fixing the direction of cx gates (1410).
- New CheckMap pass for checking if circuit meets mapping requirements (1433).
- New Optimize1QGate pass for combining chains of 1q rotations (1442).
Changed
-------
- Evolved pass-based transpiler to support advanced functionality (1060)
- `.retrieve_job()` and `.jobs()` no longer returns results by default,
instead the result must be accessed by the `result()` method on the job
objects (1082).
- Make `backend.status()` dictionary conform with schema.
- The different output backends for the circuit_drawer() visualizations
have been moved into separate private modules in
`qiskit.tools.visualizations`. (1105, 1111)
- DAG nodes contain pointers to Register and Instruction objects, rather
than their string names (1189).
- Upgraded some external dependencies to:
- networkx>=2.2 (1267).
- The `qiskit.tools.visualization.circuit_drawer()` method now returns
a matplotlib.Figure object when the `mpl` output is used and a
`TextDrawer` object when `text` output is used. (1224, 1181)
- Speed up the Pauli class and extended its operators (1271 1166).
- `IBMQ.save_account()` now takes an `overwrite` option to replace an existing
account on disk. Default is False (1295).
- Backend and Provider methods defined in the specification use model objects
rather than dicts, along with validation against schemas (1249, 1277,
1350). The updated methods include:
- ``backend.status()`` (1301).
- ``backend.configuration()`` (and ``__init__``) (1323).
- ``backend.properties()``, returning ``None`` for sims (1331, 1401).
- ``qiskit.Result`` (1360).
- ``backend.provider()`` is now a method instead of a property (1312).
- Remove local backend (Aer) fallback (1303)
- The signatures for the plotting functions in
`qiskit.tools.visualization._counts_visualization.py`,
`qiskit.tools.visualization._state_visualization.py`, and
`qiskit.tools.visualization.interactive` have been modified to make them
in-line with standard Matplotlib calling conventions (1359).
- Remove local backend (Aer) fallback (1303).
- DAGCircuits store Instruction and Register objects, instead of name
references. The DAGCircuit class methods are updated accordingly (1210).
- ``transpile()`` now takes QuantumCircuit(s) to QuantumCircuit(s), and DAG
processing is only done internally (1397).
- The different unrollers are deprecated. The only unrolling happens
from DAG to DAG (1210).
- Moved all the circuit modules into a circuit module but for most users it
is still imported in the top level for QuantumCircuit, QuantumRegister,
ClassicalRegister
- ``qiskit.backends`` has been renamed to ``qiskit.providers`` (1531).
- ``qiskit.backends.aer`` has been removed in favor of
``qiskit.providers.builtinsimulators`` (Python simulators) and
``qiskit.providers.legacysimulators`` (C++ simulators) (1484)
- ``Aer`` in ``qiskit`` root module depends on having the
qiskit-aer package installed, by default it is not present. Instead there are
2 new provider instances in the root module ``BasicAer`` which provides the
Python simulators and ``LegacySimulators`` which provides the old C++
simulators in qiskit-terra. (1484)
Deprecated
----------
- ``plot_circuit()``, ``latex_circuit_drawer()``, ``generate_latex_source()``,
and ``matplotlib_circuit_drawer()`` from qiskit.tools.visualization are
deprecated. Instead the ``circuit_drawer()`` function from the same module
should be used. (1055)
- The current default output of ``circuit_drawer()`` (using latex and falling
back on python) is deprecated and will be changed in the future. (1055)
- The `qiskit.wrapper.load_qasm_string()` and `qiskit.wrapper.load_qasm_file()`
functions are deprecated and the `QuantumCircuit.from_qasm_str()` and
`QuantumCircuit.from_qasm_file()` contstructor methods should be used instead
(1172)
- The ``plot_barriers`` and ``reverse_bits`` keys in the ``style`` kwarg dict
are deprecated, instead the `qiskit.tools.visualization.circuit_drawer()`
kwargs ``plot_barriers`` and ``reverse_bits`` should be used instead. (1180)
- The ``transpile_dag()`` function ``format`` kwarg for emitting different
output formats is deprecated (1319).
- Several methods of ``qiskit.Result`` have been deprecated (1360).
- The functions `plot_state()` and `iplot_state()` have been depreciated.
Instead the functions `plot_state_*()` and `iplot_state_*()` should be
called. (1359)
- The ``skip_transpiler`` arg has been deprecated from ``compile()`` and
``execute()`` in favor of using the PassManager directly.
Fixed
-----
- Fixed a variety of typos throughout sources (1139)
- Fixed horizontal spacing when drawing barriers before CCNOT gates in latex
circuit plots (1051)
- Use case insensitive matching when comparing premium account URLs. (1102)
- Fixed AerJob status when the submitted Job is in a PENDING state. (1215)
- Add fallback for when CPU count can't be determined (1214)
- Fix `random_state` from returning nan (1258)
- The Clifford simulator `run()` method now works correctly with the updated
AerJob usage (1125)
- Fixed an edge case when connection checks would raise an unhandled exception
(1226)
- Fixed a bug where the transpiler moved middle-of-circuit measurements to the
end (1334)
- The `number_to_keep` kwarg in ``plot_histgram()`` now functions correctly
(1359).
- parallel_map no longer creates a progress bar for a single circuit (1394).
- The `timeout` parameter is now passed into the inner ``_wait_for_submission``
function in ``IBMQJob`` from ``_wait_for_result`` (1542).
Removed
-------
- Remove register, available_backends (1131).
- Remove tools/apps (1184).
- Removed the dependency on ``IBMQuantumExperience``, as it is now included
in ``qiskit.backends.IBMQ`` (1198).
- ``matplotlib`` is no longer in the package requirements and is now an
optional dependency. In order to use any matplotlib based visualizations
(which includes the ``qiskit.tools.visualization.circuit_drawer()``
``mpl`` output,
``qiskit.tools.visualization.plot_state``,
``qiskit.tools.visualization.plot_histogram``, and
``qiskit.tools.visualization.plot_bloch_vector`` you will now need to ensure
you manually install and configure matplotlib independently.
- The ``basis`` kwarg for the ``circuit_drawer()`` function to provide an
alternative list of basis gates has been removed. Instead users should adjust
the basis gates prior to visualizing the circuit. (1151)
- ``backend.parameters()`` and ``backend.calibration()`` have been fully
deprecated, in favour of ``backend.properties()`` (1305).
- The ``qiskit.tools.file_io`` module has been removed. Conversion between
``qiskit.Result`` and json can be achieved using ``.to_dict()`` and
``.from_dict()`` directly (1360).
- The ``qiskit.Result`` class method for ``len()`` and indexing have been
removed, along with the functions that perform post-processing (1351).
- The ``get_snapshot()`` and ``get_snapshots()`` method from the ``Result``
class has been removed. Instead you can access the snapshots in a Result
using ``Result.data()['snapshots']``.
- Completed the deprecation of ``job.backend_name()``, ``job.id()``, and the
``backend_name`` parameter in its constructor.
- The ``qiskit.Result`` class now does post-processing of results returned
from backends if they are called via the ``Result.get_xxx()`` methods
(i.e. ``get_counts()``, ``get_memory()``, ``get_statevector()``,
``get_unitary()``). The raw data is accessible through ``Result.data()``
(1404).
- The ``transpile()`` function kwarg ``format`` has been removed and will
always return a circuit object. Instead you'll need to manually convert the
output with the functions provided in ``qiskit.converters``.