Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface to execute(), transpile() and assemble() #2166

Merged
merged 14 commits into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Added
- Builtin library of continuous pulses and builtin library of discrete pulses which are obtained
by sampling continuous pulses with default sampling strategy.
- Sampler decorator and standard sampler library for conversion of continuous pulses
to discrete `SamplePulse`s (#2042).
to discrete ``SamplePulse`` (#2042).
- Core StochasticSwap routine implimented in Cython (#1789).
- Added QuantumChannel classes SuperOp, Choi, Kraus, Stinespring, PTM, Chi to
quantum_info for manipulating quantum channels and CPTP maps.
Expand All @@ -54,13 +54,12 @@ Added
circuits (e.g. basis_gates, coupling_map, initial_layout) (#1856)
- Added a ``qiskit.compiler`` namespace for all functions that transpile, schedule
and assemble circuits and pulses (#1856)
- Added support for passing a list of ``basis_gates``, ``coupling_map`` etc. to the
``qiskit.compiler.transpile()`` function, each corresponding to one of the circuits (#2163)
- Added a ``qiskit.compiler.assemble_circuits()`` function to generate qobj from some
circuits and a RunConfig (#1856)
- Added an ``execute_circuits()`` function that takes a list of circuits along with a
TranspileConfig and RunConfig. The ``execute()`` function remains as a wrapper of this,
and later as a wrapper of ``execute_pulses()``.
- ``execute_circuits()`` and ``assemble_circuits()`` allow setting a qobj_header of type
QobjHeader to add extra information to the qobj (and thus result).
- ``execute()`` and ``assemble()`` allow setting a qobj_header, of type
QobjHeader or dict, to add extra information to the qobj (and thus result).
- Register indexing supports negative indices (#1875)
- Added new resource estimation passes: ``Depth``, ``Width``, ``Size``, ``CountOps``, and
``NumTensorFactors``, all grouped in the ``ResourceEstimation`` analysis pass.
Expand Down Expand Up @@ -158,6 +157,9 @@ Changed
(#1878)
- Layout object can now only be constructed from a dictionary, and must be bijective (#2157).
- ``transpile()`` accepts ``initial_layout`` in the form of dict, list or Layout (#2157).
- Not specifying a basis in ``execute()`` or ``transpile()`` no longer defaults to unrolling
to the ['u1', 'u2', 'u3', 'cx'] basis. Instead the default behavior is to not unroll,
unless specifically requested (#2166).

Deprecated
----------
Expand All @@ -171,12 +173,18 @@ Deprecated
- The ``qiskit.tools.qcvv`` package is deprecated in favor of Qiskit Ignis (#1884).
- The ``qiskit.compile()`` function is now deprecated in favor of explicitly
using the ``qiskit.compiler.transpile()`` function to transform a circuit followed
by ``qiskit.compiler.assemble_circuits()`` to make a qobj out of it.
by ``qiskit.compiler.assemble()`` to make a qobj out of it.
- ``qiskit.converters.qobj_to_circuits()`` has been deprecated and will be
removed in a future release. Instead
``qiskit.compiler.disassemble_circuits()`` should be used to extract
``QuantumCircuit`` objects from a compiled qobj. (#2137)

- The ``qiskit.transpiler.transpile()`` function is deprecated in favor of
``qiskit.compiler.transpile()`` (#2166).
- The ``seed_mapper`` argument in ``transpile()`` and ``execute()`` is deprecated in favor of
``seed_transpile()``, which sets the seed for all stochastic stages of the transpiler (#2166).
- The ``seed`` argument is ``execute()`` is deprecated in favor of ``seed_simulator`` (#2166).
- The ``pass_manager`` argument in ``transpile()`` is deprecated. Instead, the
``pass_manager.run()`` methdod can be used directly to transform the circuit (#2166).

Fixed
-----
Expand Down
5 changes: 3 additions & 2 deletions qiskit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
from qiskit.circuit import QuantumCircuit
# pylint: disable=redefined-builtin
from qiskit.tools.compiler import compile # TODO remove after 0.8
from qiskit.execute import (execute_circuits, execute_schedules, execute)
from qiskit.compiler.assembler import (assemble_circuits, assemble_schedules)
from qiskit.execute import execute
from qiskit.compiler.transpiler import transpile
from qiskit.compiler.assembler import assemble

# The qiskit.extensions.x imports needs to be placed here due to the
# mechanism for adding gates dynamically.
Expand Down
4 changes: 1 addition & 3 deletions qiskit/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

"""

from .run_config import RunConfig
from .transpile_config import TranspileConfig
from .assembler import assemble_circuits, assemble_schedules
from .assembler import assemble
from .disassembler import disassemble
from .transpiler import transpile
Loading