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 all 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
4 changes: 2 additions & 2 deletions qiskit/algorithms/minimum_eigen_solvers/qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class QAOA(VQE):

`QAOA <https://arxiv.org/abs/1411.4028>`__ is a well-known algorithm for finding approximate
solutions to combinatorial-optimization problems.
The QAOA implementation directly extends :class:`VQE` and inherits VQE's
general hybrid optimization structure.

The QAOA implementation directly extends :class:`VQE` and inherits VQE's optimization structure.
However, unlike VQE, which can be configured with arbitrary ansatzes,
QAOA uses its own fine-tuned ansatz, which comprises :math:`p` parameterized global
:math:`x` rotations and :math:`p` different parameterizations of the problem hamiltonian.
Expand Down
4 changes: 2 additions & 2 deletions qiskit/algorithms/minimum_eigen_solvers/vqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
class VQE(VariationalAlgorithm, MinimumEigensolver):
r"""The Variational Quantum Eigensolver algorithm.

`VQE <https://arxiv.org/abs/1304.3061>`__ is a hybrid algorithm that uses a
variational technique and interleaves quantum and classical computations in order to find
`VQE <https://arxiv.org/abs/1304.3061>`__ is a quantum algorithm that uses a
variational technique to find
the minimum eigenvalue of the Hamiltonian :math:`H` of a given system.

An instance of VQE requires defining two algorithmic sub-components:
Expand Down
42 changes: 42 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 @@ -94,6 +95,7 @@
GRX
GRY
GRZ
RVGate

Boolean Logic Circuits
======================
Expand Down Expand Up @@ -136,6 +138,7 @@
PolynomialPauliRotations
PiecewiseLinearPauliRotations
PiecewisePolynomialPauliRotations
PiecewiseChebyshev

Adders
++++++
Expand Down Expand Up @@ -275,6 +278,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 @@ -313,6 +354,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
16 changes: 8 additions & 8 deletions qiskit/circuit/library/generalized_gates/rv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class RVGate(Gate):
r"""Rotation around arbitrary rotation axis v where |v| is
r"""Rotation around arbitrary rotation axis :math:`v` where :math:`|v|` is
angle of rotation in radians.

**Circuit symbol:**
Expand All @@ -33,13 +33,13 @@ class RVGate(Gate):

.. math::

\newcommand{\th}{|\vec{v}|}
\newcommand{\sinc}{\text{sinc}}
R(\vec{v}) = e^{-i \vec{v}\cdot\vec{\sigma}} =
\begin{pmatrix}
\cos{\th} -i v_z \sinc(\th) & -(i v_x + v_y) \sinc(\th) \\
-(i v_x - v_y) \sinc(\th) & \cos(\th) + i v_z \sinc(\th)
\end{pmatrix}
\newcommand{\th}{|\vec{v}|}
\newcommand{\sinc}{\text{sinc}}
R(\vec{v}) = e^{-i \vec{v}\cdot\vec{\sigma}} =
\begin{pmatrix}
\cos{\th} -i v_z \sinc(\th) & -(i v_x + v_y) \sinc(\th) \\
-(i v_x - v_y) \sinc(\th) & \cos(\th) + i v_z \sinc(\th)
\end{pmatrix}
"""

def __init__(self, v_x, v_y, v_z, basis='U'):
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
4 changes: 4 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 @@ -114,6 +115,8 @@

CheckMap
CheckCXDirection
CheckGateDirection
CXDirection
GateDirection
MergeAdjacentBarriers
BarrierBeforeFinalMeasurements
Expand Down Expand Up @@ -179,6 +182,7 @@
# circuit scheduling
from .scheduling import ALAPSchedule
from .scheduling import ASAPSchedule
from .scheduling import RZXCalibrationBuilder
from .scheduling import TimeUnitConversion

# additional utility passes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ def __init__(self, basis_gates=None):
CommutativeCancellation initializer.

Args:
basis_gates (list[str]): Basis gates to consider, e.g. `['u3', 'cx']`. For the effects
of this pass, the basis is the set intersection between the `basis` parameter
basis_gates (list[str]): Basis gates to consider, e.g.
``['u3', 'cx']``. For the effects of this pass, the basis is
the set intersection between the ``basis_gates`` parameter
and the gates in the dag.
"""
super().__init__()
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
2 changes: 1 addition & 1 deletion qiskit/transpiler/passes/utils/check_cx_direction.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


class CheckCXDirection(CheckGateDirection):
"""Deprecated: use CheckGateDirection pass."""
"""Deprecated: use :class:`qiskit.transpiler.passes.CheckGateDirection` pass instead."""

def __init__(self, coupling_map):
super().__init__(coupling_map)
Expand Down
2 changes: 1 addition & 1 deletion qiskit/transpiler/passes/utils/cx_direction.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


class CXDirection(GateDirection):
"""Deprecated: use GateDirection pass."""
"""Deprecated: use :class:`qiskit.transpiler.passes.GateDirection` pass instead."""

def __init__(self, coupling_map):
super().__init__(coupling_map)
Expand Down
8 changes: 8 additions & 0 deletions qiskit/visualization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@

visualize_transition

Array/Matrix Visualizations
===========================

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

array_to_latex

Exceptions
==========

Expand Down
18 changes: 9 additions & 9 deletions qiskit/visualization/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,17 @@ def array_to_latex(array, precision=5, prefix="", source=False, max_size=8):
source (bool): If ``False``, will return IPython.display.Latex object. If display is
``True``, will instead return the LaTeX source string.
max_size (list(int) or int): The maximum size of the output Latex array.
* If list(```int```), then the 0th element of the list specifies the maximum
width (including dots characters) and the 1st specifies the maximum height
(also inc. dots characters).
* If a single ```int``` then this value sets the maximum width _and_ maximum
height.

* If list(``int``), then the 0th element of the list specifies the maximum
width (including dots characters) and the 1st specifies the maximum height
(also inc. dots characters).
* If a single ``int`` then this value sets the maximum width _and_ maximum
height.

Returns:
if ``source`` is ``True``:
``str``: LaTeX string representation of the array.
else:
``IPython.display.Latex``: LaTeX representation of the array.
str or IPython.display.Latex: If ``source`` is ``True``, a ``str`` of the LaTeX
representation of the array, else an ``IPython.display.Latex`` representation of
the array.

Raises:
TypeError: If array can not be interpreted as a numerical numpy array.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
upgrade:
- |
The preset pass managers
:class:`~qiskit.transpiler.preset_passmanagers.level_1_pass_manager`,
:class:`~qiskit.transpiler.preset_passmanagers.level_2_pass_manager`,
and :class:`~qiskit.transpiler.preset_passmanagers.level_3_pass_manager`
(which are used for ``optimization_level`` 1, 2, and 3 in the
:func:`~qiskit.compiler.transpile` and
:func:`~qiskit.execute_function.execute` functions) now unconditionally
use the :class:`~qiskit.transpiler.passes.Optimize1qGatesDecomposition`
pass for 1 qubit gate optimization. Previously, these pass managers would
use the :class:`~qiskit.transpiler.passes.Optimize1qGates` pass if the basis
gates contained ``u1``, ``u2``, or ``u3``. If you want to still use
the old :class:`~qiskit.transpiler.passes.Optimize1qGates` you will need
to construct a custom :class:`~qiskit.transpiler.PassManager` with the
pass.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
upgrade:
- |
Following transpilation of a parameterized
:class:`~qiskit.circuit.QuantumCircuit`, the
:attr:`~qiskit.circuit.QuantumCircuit.global_phase` attribute of output
circuit may no longer be returned in a simplified form, if the global phase
is a :class:`~qiskit.circuit.ParameterExpression`.

For example::

qc = QuantumCircuit(1)
theta = Parameter('theta')

qc.rz(theta, 0)
qc.rz(-theta, 0)

print(transpile(qc, basis_gates=['p']).global_phase)

previously returned ``0``, but will now return ``-0.5*theta + 0.5*theta``.
This change was necessary was to avoid a large runtime performance
penalty as simplifying symbolic expressions can be quite slow, especially
if there are many :class:`~qiskit.circuit.ParameterExpression` objects
in a circuit.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
deprecations:
- |
Two new arguments have been added to
:meth:`qiskit.dagcircuit.DAGNode.semantic_eq`, ``bit_indices1`` and
``bit_indices2``, which are expected to map the
:class:`~qiskit.circuit.Bit` instances in each
:class:`~qiskit.dagcircuit.DAGNode` to their index in ``qubits`` or
``clbits`` list of their respective
:class:`~qiskit.dagcircuit.DAGCircuit`. During the deprecation period,
these arguments are optional and when **not** specified the mappings will
be automatically constructed based on the ``register`` and ``index``
properties of each :class:`~qiskit.circuit.Bit` instance. However, in a
future release, they will be required arguments and the mapping will need
to be supplied by the user.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
fixes:
- |
Fixed an issue where the :func:`~qiskit.execute_function.execute` function
would raise :class:`~qiskit.exceptions.QiskitError` exception when a
:class:`~qiskit.circuit.ParameterVector` object was passed in for the
``parameter_bind`` kwarg. parameter. For example, it is now possible to
call something like::

execute(circuit, backend, parameter_binds=[{pv1: [...], pv2: [...]}])

where ``pv1`` and ``pv2`` are :class:`~qiskit.circuit.ParameterVector`
objects.
Fixed `#5467 <https://github.com/Qiskit/qiskit-terra/issues/5467>`__

Loading