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

Prepare 0.17.0 release #6075

Merged
merged 73 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
079127f
Prepare 0.17.0 release
mtreinish Mar 24, 2021
05ac512
Add feature note for aqua migrated modules
mtreinish Mar 24, 2021
161166e
Update release notes abd add piecewise chebyshev to docs and library …
mtreinish Mar 24, 2021
f5f7ccc
Update more release notes and add abstract pass classes to docs
mtreinish Mar 24, 2021
2199e33
More release note updates
mtreinish Mar 24, 2021
5d6a3d3
Update more release notes and add clifford_decompose to api docs
mtreinish Mar 24, 2021
4473c03
Add RZXCalibration pass and templates to docs and update release notes
mtreinish Mar 24, 2021
aededb0
Update more release notes
mtreinish Mar 24, 2021
4078d2d
Fix typo in decompose_clifford imports and release notes
mtreinish Mar 24, 2021
143efd9
Fix docs build
mtreinish Mar 25, 2021
5b1a6a6
Add hellinger_distance to docs
mtreinish Mar 25, 2021
246e11c
Add RZXCalibrationBuilder to the docs
mtreinish Mar 25, 2021
51a6509
More release note updates
mtreinish Mar 25, 2021
8c95ab4
Fix import error
mtreinish Mar 25, 2021
d6764ba
Merge branch 'master' into prepare-0.17
mtreinish Mar 25, 2021
652d4b2
Fix RZXCalibrationBuilder docstring
mtreinish Mar 25, 2021
2a42037
Finish updating the new feature release notes
mtreinish Mar 25, 2021
d4077ce
Fix lint
mtreinish Mar 26, 2021
adb5a43
Apply suggestions from code review
mtreinish Mar 26, 2021
1ddd51f
Merge branch 'master' into prepare-0.17
mtreinish Mar 26, 2021
d1af313
Move new release notes to 0.17 dir and update
mtreinish Mar 26, 2021
a3effda
Fix RVGate docs and start updating upgrade notes
mtreinish Mar 26, 2021
b911640
Fix PauliGate example circuit visualization
mtreinish Mar 26, 2021
7b79393
Fix typo
mtreinish Mar 26, 2021
0c12fbc
More release note updates
mtreinish Mar 26, 2021
b90bc26
Update meas_map release note again
lcapelluto Mar 26, 2021
0c25fcb
Fix whitespace in meas_map release note
mtreinish Mar 26, 2021
ead73ad
Fix docs build
mtreinish Mar 27, 2021
afe2ec4
Update almost all of the upgrade notes
mtreinish Mar 27, 2021
8080cb5
Add latex to docs job env
mtreinish Mar 28, 2021
c5dab7c
Revert "Add latex to docs job env"
mtreinish Mar 29, 2021
b01407d
Remove latex drawing from the release notes
mtreinish Mar 29, 2021
3f9aa6d
Merge branch 'master' into prepare-0.17
mtreinish Mar 29, 2021
ea29d21
Remove fix note for unreleased feature
mtreinish Mar 29, 2021
6a77e76
Move and update new release notes
mtreinish Mar 29, 2021
b099c5e
Remove unnecessary upgrade note about internal API changes
mtreinish Mar 29, 2021
e23f219
More release note updates
mtreinish Mar 29, 2021
ed4099f
More release note updates
mtreinish Mar 29, 2021
04a15c3
Even more release note updates
mtreinish Mar 29, 2021
534aa18
Merge branch 'master' into prepare-0.17
mtreinish Mar 29, 2021
6a1089b
Fix syntax error
mtreinish Mar 29, 2021
3ea36d0
Fix docs build
mtreinish Mar 29, 2021
70e6453
Merge branch 'master' into prepare-0.17
mtreinish Mar 29, 2021
b3de877
Merge branch 'master' into prepare-0.17
mtreinish Mar 30, 2021
b547456
Move new release notes and fix docs issues from #5609
mtreinish Mar 30, 2021
fb926c6
Update more release notes
mtreinish Mar 30, 2021
fd408f7
Merge remote-tracking branch 'origin/master' into prepare-0.17
mtreinish Mar 30, 2021
f655d11
Move new release notes
mtreinish Mar 30, 2021
664d5bb
More release note updates
mtreinish Mar 30, 2021
413b79b
Finish fixes notes
mtreinish Mar 30, 2021
4d2968a
Fix docs build
mtreinish Mar 30, 2021
c982bed
Merge branch 'master' into prepare-0.17
mtreinish Mar 30, 2021
8057aa7
Update more relaese notes
mtreinish Mar 30, 2021
cf8e234
Apply suggestions from code review
mtreinish Mar 30, 2021
509fcfe
More note fixes
mtreinish Mar 30, 2021
1d0633c
Merge remote-tracking branch 'origin/master' into prepare-0.17
mtreinish Mar 31, 2021
3b53838
Update new release notes
mtreinish Mar 31, 2021
3ec86ec
Apply suggestions from code review
mtreinish Mar 31, 2021
90d17ec
Merge remote-tracking branch 'origin/master' into prepare-0.17
mtreinish Mar 31, 2021
1c920e2
Move and update new release notes
mtreinish Mar 31, 2021
fcddd25
Apply suggestions from code review
mtreinish Mar 31, 2021
8874681
cleaning up docs for vqe
jaygambetta Apr 1, 2021
07aa18e
clean up extend
jaygambetta Apr 1, 2021
786b86a
Merge branch 'master' into master
Cryoris Apr 1, 2021
c4b39d3
Merge remote-tracking branch 'origin/master' into prepare-0.17
mtreinish Apr 1, 2021
682791b
Fix reno merge commit error
mtreinish Apr 1, 2021
dedfa6d
Merge branch 'jaygambetta-master' into prepare-0.17
mtreinish Apr 1, 2021
fa9cd68
Revert accidental tox.ini change
mtreinish Apr 1, 2021
89d69a7
Tweak release note wording
mtreinish Apr 1, 2021
5b744ed
Merge remote-tracking branch 'origin/master' into prepare-0.17
mtreinish Apr 1, 2021
6d682ec
Move and update new release notes
mtreinish Apr 1, 2021
ddf20c8
Merge branch 'master' into prepare-0.17
mtreinish Apr 1, 2021
50531f3
Attempt to retrigger azure
mtreinish Apr 1, 2021
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
41 changes: 41 additions & 0 deletions qiskit/circuit/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
RCCXGate
RC3XGate
Reset
RGate
RXGate
RXXGate
RYGate
Expand Down Expand Up @@ -135,6 +136,7 @@
PolynomialPauliRotations
PiecewiseLinearPauliRotations
PiecewisePolynomialPauliRotations
PiecewiseChebyshev

Adders
++++++
Expand Down Expand Up @@ -273,6 +275,44 @@
templates.nct.template_nct_9d_9
templates.nct.template_nct_9d_10

Clifford template circuits
==========================

.. autosummary::
:toctree: ../stubs/

clifford_2_1
clifford_2_2
clifford_2_3
clifford_2_4
clifford_3_1
clifford_4_1
clifford_4_2
clifford_4_3
clifford_4_4
clifford_5_1
clifford_6_1
clifford_6_2
clifford_6_3
clifford_6_4
clifford_6_5
clifford_8_1
clifford_8_2
clifford_8_3

RZXGate template circuits
=========================

.. autosummary::
:toctree: ../stubs/

rzx_yz
rzx_xz
rzx_cy
rzx_zz1
rzx_zz2
rzx_zz3

"""

from .standard_gates import *
Expand Down Expand Up @@ -311,6 +351,7 @@
WeightedAdder,
QuadraticForm,
LinearAmplitudeFunction,
PiecewiseChebyshev,
)
from .n_local import (
NLocal,
Expand Down
1 change: 1 addition & 0 deletions qiskit/circuit/library/arithmetic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
from .weighted_adder import WeightedAdder
from .quadratic_form import QuadraticForm
from .linear_amplitude_function import LinearAmplitudeFunction
from .piecewise_chebyshev import PiecewiseChebyshev
2 changes: 1 addition & 1 deletion qiskit/circuit/library/arithmetic/piecewise_chebyshev.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PiecewiseChebyshev(BlueprintCircuit):
qc = QuantumCircuit(pw_approximation.num_qubits)
qc.h(list(range(num_state_qubits)))
qc.append(pw_approximation.to_instruction(), qc.qubits)
print(qc.draw(output='mpl'))
qc.draw(output='mpl')

References:

Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/templates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@
from .clifford.clifford_2_1 import clifford_2_1
from .clifford.clifford_2_2 import clifford_2_2
from .clifford.clifford_2_3 import clifford_2_3
from .clifford.clifford_2_4 import clifford_2_4
from .clifford.clifford_3_1 import clifford_3_1
from .clifford.clifford_4_1 import clifford_4_1
from .clifford.clifford_4_2 import clifford_4_2
from .clifford.clifford_4_3 import clifford_4_3
from .clifford.clifford_4_4 import clifford_4_4
from .clifford.clifford_5_1 import clifford_5_1
from .clifford.clifford_6_1 import clifford_6_1
from .clifford.clifford_6_2 import clifford_6_2
Expand All @@ -86,3 +89,4 @@
from .clifford.clifford_6_5 import clifford_6_5
from .clifford.clifford_8_1 import clifford_8_1
from .clifford.clifford_8_2 import clifford_8_2
from .clifford.clifford_8_3 import clifford_8_3
7 changes: 5 additions & 2 deletions qiskit/quantum_info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
.. autosummary::
:toctree: ../stubs/

hellinger_distance
hellinger_fidelity

Synthesis
Expand All @@ -115,6 +116,7 @@
TwoQubitBasisDecomposer
two_qubit_cnot_decompose
Quaternion
decompose_clifford
"""

from .operators import (Operator, ScalarOp, Pauli, Clifford, SparsePauliOp)
Expand All @@ -139,6 +141,7 @@
random_cnotdihedral)

from .synthesis import (OneQubitEulerDecomposer, TwoQubitBasisDecomposer,
two_qubit_cnot_decompose, Quaternion)
two_qubit_cnot_decompose, Quaternion,
decompose_clifford)

from .analysis import hellinger_fidelity
from .analysis import hellinger_distance, hellinger_fidelity
2 changes: 1 addition & 1 deletion qiskit/quantum_info/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

"""Module for functions for post processing results."""
from .average import average_data
from.distance import hellinger_fidelity
from .distance import hellinger_fidelity, hellinger_distance
1 change: 1 addition & 0 deletions qiskit/quantum_info/synthesis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
from .two_qubit_decompose import TwoQubitBasisDecomposer, two_qubit_cnot_decompose
from .one_qubit_decompose import OneQubitEulerDecomposer
from .quaternion import Quaternion
from .clifford_decompose import decompose_clifford
9 changes: 9 additions & 0 deletions qiskit/transpiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,15 @@
FencedDAGCircuit
FencedPropertySet

Abstract Passes
---------------

.. autosummary::
:toctree: ../stubs/

TransformationPass
AnalysisPass

Exceptions
----------

Expand Down
2 changes: 2 additions & 0 deletions qiskit/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

ALAPSchedule
ASAPSchedule
RZXCalibrationBuilder

Circuit Analysis
================
Expand Down Expand Up @@ -180,6 +181,7 @@
from .scheduling import ALAPSchedule
from .scheduling import ASAPSchedule
from .scheduling import TimeUnitAnalysis
from .scheduling import RZXCalibrationBuilder

# additional utility passes
from .utils import CheckMap
Expand Down
3 changes: 2 additions & 1 deletion qiskit/transpiler/passes/scheduling/calibration_creators.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def rescale_cr_inst(instruction: Play, theta: float, sample_mult: int = 16) -> P
sample_mult: All pulses must be a multiple of sample_mult.

Returns:
Play: The play instruction with the stretched compressed GaussianSquare pulse.
qiskit.pulse.Play: The play instruction with the stretched compressed
GaussianSquare pulse.

Raises:
QiskitError: if the pulses are not GaussianSquare.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fixes:
- |
Fixed issue where circuit.execute would raise exception when
ParameterVectors were passed in the parameter_bind parameter.
Refer to `#5467 <https://github.com/Qiskit/qiskit-terra/issues/5467>` for more
Refer to `#5467 <https://github.com/Qiskit/qiskit-terra/issues/5467>`__ for more
details.
It is now possible to call:
execute(circuit, backend, parameter_binds=[{pv1: [...], pv2: [...]}])
execute(circuit, backend, parameter_binds=[{pv1: [...], pv2: [...]}])
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,6 @@ deprecations:
Please use :py:func:`~qiskit.pulse.transforms.flatten` instead.

features:
- |
Pulse :py:class:`~qiskit.pulse.instructions.Call` instruction is added.
This instruction represents calling a schedule as a subroutine from within another schedule.
This is not exposed to end users, but internally used for compiling purpose.

This instruction is implicitly used in the pulse builder call function.
This defines a reference to another program, and no further optimization is performed
between call instructions.

For example,

.. code-block:: python

qc_x = QuantumCircuit(1)
qc_x.x(0)

with pulse.build(backend) as sched:
pulse.call(qc_x)
pulse.call(qc_x)

Because two call instructions are viewed as references to the external program,
two ``qc_x`` are not merged though they are consecutive x gates which form an identity.

upgrade:
- |
Pulse :py:func:`~qiskit.pulse.call` function can take parameter object with
a parameterized subrotuine. We can assign different parameters for each subroutine call.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
features:
- |
The :class:`qiskit.providers.models.QasmBackendConfiguration` has a new
field ``processor_type`` which can optionally be used to provide
information about a backend's processor in the form:
``{"family": <str>, "revision": <str>, segment: <str>}``. For example:
``{"family": "Canary", "revision": "1.0", segment: "A"}``.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
features:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed if #5854 is merged? The parameter framework of pulse module will be updated by this PR (it is centralized in manager class, rather than attaching parameter table to each piece of the program).

In #5854 there is also deprecation statement regarding this reno. That statement can be removed along with this. @lcapelluto ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought .parameters and is_parameterized was still supported on these objects?

- |
The :py:class:`qiskit.pulse.Schedule`,
:py:class:`qiskit.pulse.Instruction`, and :py:class:`qiskit.pulse.Channel`
classes now have a :attr:`~qiiskit.pulse.Schedule.parameter` property
which will return any :class:`~qiskit.circuit.Parameter` objects used
in the object and a :meth:`~qiskit.pulse.Schedule.is_parameterized()`
method which will return ``True`` if any parameters are used in the
object.

For example:

.. jupyter-execute::

from qiskit.circuit import Parameter
from qiskit import pulse

shift = Parameter('alpha')

schedule = pulse.Schedule()
schedule += pulse.SetFrequency(shift, pulse.DriveChannel(0))

assert schedule.is_parameterized() == True
print(schedule.parameters)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
features:
- |
Added a :class:`~qiskit.circuit.library.PiecewiseChebyshev` to the
:mod:`qiskit.circuit.library` for implementing a piecewise Chebyshev
approximation of an input function. For a given function :math:`f(x)`
and degree :math:`d`, this class class implements
a piecewise polynomial Chebyshev approximation on :math:`n` qubits
to :math:`f(x)` on the given intervals. All the polynomials in the
approximation are of degree :math:`d`.

For example:

.. jupyter-execute::

import numpy as np
from qiskit import QuantumCircuit
from qiskit.circuit.library.arithmetic.piecewise_chebyshev import PiecewiseChebyshev
f_x, degree, breakpoints, num_state_qubits = lambda x: np.arcsin(1 / x), 2, [2, 4], 2
pw_approximation = PiecewiseChebyshev(f_x, degree, breakpoints, num_state_qubits)
pw_approximation._build()
qc = QuantumCircuit(pw_approximation.num_qubits)
qc.h(list(range(num_state_qubits)))
qc.append(pw_approximation.to_instruction(), qc.qubits)
qc.draw(output='mpl')
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
features:
- |
Can now use :func:`array_to_latex()` to represent vectors and matrices as
human-friendly LaTeX.
Added a new function :func:`~qiskit.visualization.array_to_latex` to
the :mod:`qiskit.visualization` module that can be used to represent
and visualize vectors and matrices with LaTeX.

.. jupyter-execute::

Expand Down
29 changes: 29 additions & 0 deletions releasenotes/notes/0.17/add_state_ipython-6fd6305f3db04a23.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
features:
- |
The :class:`~qiskit.quantum_info.Statevector` and
:class:`~qiskit.quantum_info.DensityMatrix` classes now have
:meth:`~qiskit.quantum_info.StateVector.draw` methods which allow objects
to be drawn as either text matrices, IPython Latex objects, Latex source,
Q-spheres, Bloch spheres and Hinton plots. By default the output type
is the equivalent output from ``__repr__`` but this default can be changed
in a user config file by setting the ``state_drawer`` option. For example:

.. jupyter-execute::

from qiskit.quantum_info import DensityMatrix
dm = DensityMatrix.from_label('r0')
dm.draw('latex')

.. jupyter-execute::

from qiskit.quantum_info import Statevector
sv = Statevector.from_label('+r')
sv.draw('qsphere')

Additionally, the :meth:`~qiskit.quantum_info.DensityMatrix.draw` method
is now used for the ipython display of these classes, so if you change the
default output type in a user config file then when a
:class:`~qiskit.quantum_info.Statevector` or a
:class:`~qiskit.quantum_info.DensityMatrix` object are displayed in
a jupyter notebook that output type will be used for the object.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ features:
The constructors of the :class:`~qiskit.circuit.Bit` class and subclasses,
:class:`~qiskit.circuit.Qubit`, :class:`~qiskit.circuit.Clbit`, and
:class:`~qiskit.circuit.AncillaQubit`, have been updated such that their
two parameters, ``register`` and ``index`` are now optional.
two parameters, ``register`` and ``index`` are now optional. This enables
the creation of bit objects that are independent of a register.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
features:
- |
A new quick way to call a pass is being introduced for convenience. Now it is possible to direcly call a
:class:`~qiskit.transpiler.BasePass` instance with a :class:`~qiskit.circuit.quantumcircuit.QuantumCircuit`
instance as a parameter to run the pass on the given circuit.
All transpiler passes (ie any instances of
:class:`~qiskit.transpiler.BasePasss`) are now directly callable.
Calling a pass provides a convenient interface for running the pass
on a :class:`~qiskit.circuit.QuantumCircuit` object.

For example, in case a transformation pass such as :class:`~qiskit.transpiler.passes.BasisTranslator`:
For example, running a single transformation pass, such as
:class:`~qiskit.transpiler.passes.BasisTranslator`, can be done with:

.. code-block::
.. jupyter-execute::

from qiskit import QuantumCircuit
from qiskit.transpiler.passes import BasisTranslator
Expand All @@ -18,11 +20,14 @@ features:

pass_instance = BasisTranslator(sel, ['rx', 'rz', 'cx'])
result = pass_instance(circuit)
result.draw(output='mpl')

For the case of an analysis pass, a property set (as `dict` or as :class:`~qiskit.transpiler.propertyset.PropertySet`)
needs to be added as a parameter and it might be modified "in-place":
When running an analysis pass, a property set (as ``dict`` or as
:class:`~qiskit.transpiler.PropertySet`)
needs to be added as a parameter and it might be modified "in-place".
For example:

.. code-block::
.. jupyter-execute::

from qiskit import QuantumCircuit
from qiskit.transpiler.passes import Depth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fixes:
The :meth:`~qiskit.circuit.Register.name` setter method of class
:class:`~qiskit.circuit.Register` previously did not check the assigned
string to be a valid register name as per the
`OpenQASM specification <https://arxiv.org/pdf/1707.03429v2.pdf>`_.
`OpenQASM specification <https://arxiv.org/pdf/1707.03429v2.pdf>`__.
This check is performed when the name is specified in the constructor.
With this update, this check is also now performed in the setter method

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
features:
- |
The :class:`~qiskit.circuit.QasmQobjConfig` class now has an optional
kwarg for ``meas_level`` and ``meas_return``. These fields can be used
to enable generating :class:`~qiskit.circuit.QasmQobj` job payloads that
support ``meas_level=1`` (kerneled data) for circuit jobs (previously
this was only exposed for :class:`~qiskit.circuit.PulseQobj` objects).
The :func:`~qiskit.compiler.assemble` function has been updated
to set this field for :class:`~qiskit.circuit.QasmQobj` objects it
generates.
Loading