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.23.0 release #9438

Merged
merged 24 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
29aefa8
Prepare 0.23.0 release
mtreinish Jan 23, 2023
0520411
Remove backported PRs
mtreinish Jan 23, 2023
9baca70
Start editting release note
mtreinish Jan 23, 2023
e286d23
More updates
mtreinish Jan 24, 2023
da88b2b
Apply suggestions from code review
mtreinish Jan 24, 2023
6f882db
Fix docs build errors
mtreinish Jan 24, 2023
1441cf0
More udpates
mtreinish Jan 24, 2023
7b29d73
Update more release notes
mtreinish Jan 24, 2023
962fa8b
More updates
mtreinish Jan 24, 2023
52eade0
Finish feature note first pass
mtreinish Jan 25, 2023
c3d4adc
Start upgrade notes
mtreinish Jan 25, 2023
98bc907
Merge branch 'stable/0.23' into prep-0230
mtreinish Jan 25, 2023
e9ed92e
Move and update new release notes
mtreinish Jan 25, 2023
ef024bc
Fix docs build error
mtreinish Jan 25, 2023
768e329
Finish first pass at upgrade notes
mtreinish Jan 25, 2023
6af9ca0
Finish first pass at deprecation notes
mtreinish Jan 25, 2023
34ed802
Finish first pass over release notes
mtreinish Jan 25, 2023
678216e
Fix import cycle from dagcircuit
mtreinish Jan 25, 2023
fc545be
Apply suggestions from code review
mtreinish Jan 25, 2023
6e6883e
Merge branch 'stable/0.23' into prep-0230
mtreinish Jan 25, 2023
73df298
Apply suggestions from code review
mtreinish Jan 26, 2023
f5e61d1
Merge branch 'stable/0.23' into prep-0230
mtreinish Jan 26, 2023
ebddc68
Update releasenotes/notes/0.23/prepare-0.23.0-release-0d954c91143cf9a…
mtreinish Jan 26, 2023
6ad8b31
Fix analysis class definition in vf2 release note
mtreinish Jan 26, 2023
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
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.23.0rc1
0.23.0
1 change: 1 addition & 0 deletions qiskit/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
Grover
GroverResult

.. _amplitude_estimators:

Amplitude Estimators
--------------------
Expand Down
10 changes: 10 additions & 0 deletions qiskit/dagcircuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
DAGDepNode
DAGDependency

Block Collection
================

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

BlockCollector
BlockCollapser

Exceptions
==========

Expand All @@ -44,3 +53,4 @@
from .dagdepnode import DAGDepNode
from .exceptions import DAGCircuitError
from .dagdependency import DAGDependency
from .collect_blocks import BlockCollector, BlockCollapser
24 changes: 17 additions & 7 deletions qiskit/dagcircuit/collect_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
into smaller sub-blocks, and to consolidate blocks."""

from qiskit.circuit import QuantumCircuit, CircuitInstruction
from . import DAGOpNode, DAGCircuit, DAGDependency
from .exceptions import DAGCircuitError
from qiskit.dagcircuit.dagcircuit import DAGCircuit
from qiskit.dagcircuit.dagnode import DAGOpNode
from qiskit.dagcircuit.dagdependency import DAGDependency
from qiskit.dagcircuit.exceptions import DAGCircuitError


class BlockCollector:
"""This class implements various strategies of dividing a DAG (direct acyclic graph)
"""Class for implementing block collection on a DAG.

This class implements various strategies of dividing a DAG (direct acyclic graph)
into blocks of nodes that satisfy certain criteria. It works both with the
:class:`~qiskit.dagcircuit.DAGCircuit` and
:class:`~qiskit.dagcircuit.DAGDependency` representations of a DAG, where
Expand Down Expand Up @@ -107,8 +111,11 @@ def _have_uncollected_nodes(self):
return len(self._pending_nodes) > 0

def collect_matching_block(self, filter_fn):
"""Iteratively collects the largest block of input nodes (that is, nodes with
"""Iteratively collects the largest block of input nodes

The largest block is the block that contains nodes with
``_in_degree`` equal to 0) that match a given filtering function.

Examples of this include collecting blocks of swap gates,
blocks of linear gates (CXs and SWAPs), blocks of Clifford gates, blocks of single-qubit gates,
blocks of two-qubit gates, etc. Here 'iteratively' means that once a node is collected,
Expand Down Expand Up @@ -143,13 +150,14 @@ def collect_matching_block(self, filter_fn):

def collect_all_matching_blocks(self, filter_fn, split_blocks=True, min_block_size=2):
"""Collects all blocks that match a given filtering function filter_fn.

This iteratively finds the largest block that does not match filter_fn,
then the largest block that matches filter_fn, and so on, until no more uncollected
nodes remain. Intuitively, finding larger blocks of non-matching nodes helps to
find larger blocks of matching nodes later on.

The option ``split_blocks`` allows to collected blocks into sub-blocks over
disjoint qubit subsets. The option ``min_block_size``specifies the minimum number
disjoint qubit subsets. The option ``min_block_size`` specifies the minimum number
of gates in the block for the block to be collected.

Returns the list of matching blocks only.
Expand Down Expand Up @@ -235,8 +243,10 @@ def run(self, block):


class BlockCollapser:
"""This class implements various strategies of consolidating blocks of nodes
in a DAG (direct acyclic graph). It works both with the
"""Class to consolidate a given block from the dag into a single node

This class implements various strategies of consolidating blocks of nodes
in a DAG (direct acyclic graph). It works both with the
:class:`~qiskit.dagcircuit.DAGCircuit` and
:class:`~qiskit.dagcircuit.DAGDependency` DAG representations.
"""
Expand Down
1 change: 1 addition & 0 deletions qiskit/pulse/calibration_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Internal format of calibration data in target."""

import inspect
from abc import ABCMeta, abstractmethod
from enum import IntEnum
Expand Down
1 change: 1 addition & 0 deletions qiskit/pulse/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

Waveform
SymbolicPulse
ScalableSymbolicPulse
ParametricPulse


Expand Down
16 changes: 16 additions & 0 deletions qiskit/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
CollectMultiQBlocks
CollectLinearFunctions
CollectCliffords
CollectAndCollapse
ConsolidateBlocks
CXCancellation
InverseCancellation
Expand Down Expand Up @@ -147,6 +148,17 @@
SolovayKitaev
SolovayKitaevSynthesis

Synthesis Plugins
=================

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

SolovayKitaevSynthesis
BasicSynthesisPermutation
ACGSynthesisPermutation
KMSSynthesisPermutation

Post Layout (Post transpile qubit selection)
============================================

Expand Down Expand Up @@ -232,6 +244,7 @@
from .optimization import CollectCliffords
from .optimization import ResetAfterMeasureSimplification
from .optimization import OptimizeCliffords
from .optimization import CollectAndCollapse

# circuit analysis
from .analysis import ResourceEstimation
Expand All @@ -251,6 +264,9 @@
from .synthesis import HighLevelSynthesis
from .synthesis import SolovayKitaev
from .synthesis import SolovayKitaevSynthesis
from .synthesis import BasicSynthesisPermutation
from .synthesis import ACGSynthesisPermutation
from .synthesis import KMSSynthesisPermutation

# calibration
from .calibration import PulseGates
Expand Down
1 change: 1 addition & 0 deletions qiskit/transpiler/passes/optimization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
from .reset_after_measure_simplification import ResetAfterMeasureSimplification
from .optimize_cliffords import OptimizeCliffords
from .collect_cliffords import CollectCliffords
from .collect_and_collapse import CollectAndCollapse
8 changes: 7 additions & 1 deletion qiskit/transpiler/passes/synthesis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@
from .unitary_synthesis import UnitarySynthesis
from .plugin import unitary_synthesis_plugin_names
from .linear_functions_synthesis import LinearFunctionsSynthesis, LinearFunctionsToPermutations
from .high_level_synthesis import HighLevelSynthesis, HLSConfig
from .high_level_synthesis import (
HighLevelSynthesis,
HLSConfig,
BasicSynthesisPermutation,
ACGSynthesisPermutation,
KMSSynthesisPermutation,
)
from .solovay_kitaev_synthesis import SolovayKitaev, SolovayKitaevSynthesis
68 changes: 65 additions & 3 deletions qiskit/transpiler/passes/synthesis/high_level_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,29 @@ def run(self, high_level_object, **options):


class KMSSynthesisPermutation(HighLevelSynthesisPlugin):
"""The permutation synthesis plugin based on the Kutin, Moulton, Smithline method."""
"""The permutation synthesis plugin based on the Kutin, Moulton, Smithline method.


This plugin can be accessed by the ``kms`` method name in the
``HLSConfig`` for ``permutation``. For example::

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import PermutationGate
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager

# Create a permutation and add it to a quantum circuit
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
qc = QuantumCircuit(8)
qc.append(perm, range(8))

# KMSSynthesisPermutation plugin for permutations
# Returns a quantum circuit with size 18 and depth 6
# but adhering to the linear nearest-neighbor architecture.
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("kms", {})]))).run(qc)
print(f"kms: {qct.size() = }, {qct.depth() = }")
"""

def run(self, high_level_object, **options):
"""Run synthesis for the given Permutation."""
Expand All @@ -183,7 +205,27 @@ def run(self, high_level_object, **options):


class BasicSynthesisPermutation(HighLevelSynthesisPlugin):
"""The permutation synthesis plugin based on sorting."""
"""The permutation synthesis plugin based on sorting.

This plugin can be accessed by the ``basic`` method name in the
``HLSConfig`` for ``permutation``. For example::

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import PermutationGate
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager

# Create a permutation and add it to a quantum circuit
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
qc = QuantumCircuit(8)
qc.append(perm, range(8))

# BasicSynthesisPermutation plugin for permutations
# Returns a quantum circuit with size 6 and depth 3
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("basic", {})]))).run(qc)
print(f"basic: {qct.size() = }, {qct.depth() = }")
"""

def run(self, high_level_object, **options):
"""Run synthesis for the given Permutation."""
Expand All @@ -192,7 +234,27 @@ def run(self, high_level_object, **options):


class ACGSynthesisPermutation(HighLevelSynthesisPlugin):
"""The permutation synthesis plugin based on the Alon, Chung, Graham method."""
"""The permutation synthesis plugin based on the Alon, Chung, Graham method.

This plugin can be accessed by the ``acg`` method name in the
``HLSConfig`` for ``permutation``. For example::

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import PermutationGate
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager

# Create a permutation and add it to a quantum circuit
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
qc = QuantumCircuit(8)
qc.append(perm, range(8))

# ACGSynthesisPermutation plugin for permutations
# Returns a quantum circuit with size 6 and depth 2
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("acg", {})]))).run(qc)
print(f"acg: {qct.size() = }, {qct.depth() = }")
"""

def run(self, high_level_object, **options):
"""Run synthesis for the given Permutation."""
Expand Down
27 changes: 0 additions & 27 deletions releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml

This file was deleted.

This file was deleted.

This file was deleted.

Loading