Skip to content

Commit 5d6ba50

Browse files
mtreinishCryoriskevinhartmanjakelishman
authored
Prepare 0.23.0 release (#9438)
* Prepare 0.23.0 release This commit prepares the 0.23.0 release, this involves 2 steps first changing all the version numbers to 0.23.0 from 0.23.0rc1 and secondly updating the release notes to prepare them for publishing. One key thing to note is that this PR removes the 0.22.0 release notes. This is because for the 0.22.0rc1 tag we neglected to move the release notes to a separate directory. So when we did that for the 0.22.0 final release we had to forward port this back to main so that any backports to stable/0.22 would be backportable (see #8901). However, this causes reno to detect all the 0.22 release notes are incorrectly as part of the 0.23.0 development series. To fix this the simplest path forward was to remove the 0.22.0 release notes from the 0.23.0 branch (as in this PR). * Remove backported PRs * Start editting release note * More updates * Apply suggestions from code review Co-authored-by: Julien Gacon <gaconju@gmail.com> * Fix docs build errors * More udpates * Update more release notes One release note to call out is the release note for #8568 has been changed significantly. This is based on #9445 which is reverting some breaking changes made as part of #8568. * More updates * Finish feature note first pass * Start upgrade notes * Move and update new release notes * Fix docs build error * Finish first pass at upgrade notes * Finish first pass at deprecation notes * Finish first pass over release notes * Fix import cycle from dagcircuit * Apply suggestions from code review Co-authored-by: Kevin Hartman <kevin@hart.mn> * Apply suggestions from code review Co-authored-by: Jake Lishman <jake@binhbar.com> * Update releasenotes/notes/0.23/prepare-0.23.0-release-0d954c91143cf9a4.yaml * Fix analysis class definition in vf2 release note Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Kevin Hartman <kevin@hart.mn> Co-authored-by: Jake Lishman <jake@binhbar.com>
1 parent 25b5357 commit 5d6ba50

File tree

216 files changed

+933
-2761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+933
-2761
lines changed

qiskit/VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.23.0rc1
1+
0.23.0

qiskit/algorithms/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
Grover
5252
GroverResult
5353
54+
.. _amplitude_estimators:
5455
5556
Amplitude Estimators
5657
--------------------

qiskit/dagcircuit/__init__.py

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
DAGDepNode
3232
DAGDependency
3333
34+
Block Collection
35+
================
36+
37+
.. autosummary::
38+
:toctree: ../stubs/
39+
40+
BlockCollector
41+
BlockCollapser
42+
3443
Exceptions
3544
==========
3645
@@ -44,3 +53,4 @@
4453
from .dagdepnode import DAGDepNode
4554
from .exceptions import DAGCircuitError
4655
from .dagdependency import DAGDependency
56+
from .collect_blocks import BlockCollector, BlockCollapser

qiskit/dagcircuit/collect_blocks.py

+17-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@
1515
into smaller sub-blocks, and to consolidate blocks."""
1616

1717
from qiskit.circuit import QuantumCircuit, CircuitInstruction
18-
from . import DAGOpNode, DAGCircuit, DAGDependency
19-
from .exceptions import DAGCircuitError
18+
from qiskit.dagcircuit.dagcircuit import DAGCircuit
19+
from qiskit.dagcircuit.dagnode import DAGOpNode
20+
from qiskit.dagcircuit.dagdependency import DAGDependency
21+
from qiskit.dagcircuit.exceptions import DAGCircuitError
2022

2123

2224
class BlockCollector:
23-
"""This class implements various strategies of dividing a DAG (direct acyclic graph)
25+
"""Class for implementing block collection on a DAG.
26+
27+
This class implements various strategies of dividing a DAG (direct acyclic graph)
2428
into blocks of nodes that satisfy certain criteria. It works both with the
2529
:class:`~qiskit.dagcircuit.DAGCircuit` and
2630
:class:`~qiskit.dagcircuit.DAGDependency` representations of a DAG, where
@@ -107,8 +111,11 @@ def _have_uncollected_nodes(self):
107111
return len(self._pending_nodes) > 0
108112

109113
def collect_matching_block(self, filter_fn):
110-
"""Iteratively collects the largest block of input nodes (that is, nodes with
114+
"""Iteratively collects the largest block of input nodes
115+
116+
The largest block is the block that contains nodes with
111117
``_in_degree`` equal to 0) that match a given filtering function.
118+
112119
Examples of this include collecting blocks of swap gates,
113120
blocks of linear gates (CXs and SWAPs), blocks of Clifford gates, blocks of single-qubit gates,
114121
blocks of two-qubit gates, etc. Here 'iteratively' means that once a node is collected,
@@ -143,13 +150,14 @@ def collect_matching_block(self, filter_fn):
143150

144151
def collect_all_matching_blocks(self, filter_fn, split_blocks=True, min_block_size=2):
145152
"""Collects all blocks that match a given filtering function filter_fn.
153+
146154
This iteratively finds the largest block that does not match filter_fn,
147155
then the largest block that matches filter_fn, and so on, until no more uncollected
148156
nodes remain. Intuitively, finding larger blocks of non-matching nodes helps to
149157
find larger blocks of matching nodes later on.
150158
151159
The option ``split_blocks`` allows to collected blocks into sub-blocks over
152-
disjoint qubit subsets. The option ``min_block_size``specifies the minimum number
160+
disjoint qubit subsets. The option ``min_block_size`` specifies the minimum number
153161
of gates in the block for the block to be collected.
154162
155163
Returns the list of matching blocks only.
@@ -235,8 +243,10 @@ def run(self, block):
235243

236244

237245
class BlockCollapser:
238-
"""This class implements various strategies of consolidating blocks of nodes
239-
in a DAG (direct acyclic graph). It works both with the
246+
"""Class to consolidate a given block from the dag into a single node
247+
248+
This class implements various strategies of consolidating blocks of nodes
249+
in a DAG (direct acyclic graph). It works both with the
240250
:class:`~qiskit.dagcircuit.DAGCircuit` and
241251
:class:`~qiskit.dagcircuit.DAGDependency` DAG representations.
242252
"""

qiskit/pulse/calibration_entries.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# that they have been altered from the originals.
1212

1313
"""Internal format of calibration data in target."""
14+
1415
import inspect
1516
from abc import ABCMeta, abstractmethod
1617
from enum import IntEnum

qiskit/pulse/library/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
5555
Waveform
5656
SymbolicPulse
57+
ScalableSymbolicPulse
5758
ParametricPulse
5859
5960

qiskit/transpiler/passes/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
CollectMultiQBlocks
7575
CollectLinearFunctions
7676
CollectCliffords
77+
CollectAndCollapse
7778
ConsolidateBlocks
7879
CXCancellation
7980
InverseCancellation
@@ -147,6 +148,17 @@
147148
SolovayKitaev
148149
SolovayKitaevSynthesis
149150
151+
Synthesis Plugins
152+
=================
153+
154+
.. autosummary::
155+
:toctree: ../stubs/
156+
157+
SolovayKitaevSynthesis
158+
BasicSynthesisPermutation
159+
ACGSynthesisPermutation
160+
KMSSynthesisPermutation
161+
150162
Post Layout (Post transpile qubit selection)
151163
============================================
152164
@@ -232,6 +244,7 @@
232244
from .optimization import CollectCliffords
233245
from .optimization import ResetAfterMeasureSimplification
234246
from .optimization import OptimizeCliffords
247+
from .optimization import CollectAndCollapse
235248

236249
# circuit analysis
237250
from .analysis import ResourceEstimation
@@ -251,6 +264,9 @@
251264
from .synthesis import HighLevelSynthesis
252265
from .synthesis import SolovayKitaev
253266
from .synthesis import SolovayKitaevSynthesis
267+
from .synthesis import BasicSynthesisPermutation
268+
from .synthesis import ACGSynthesisPermutation
269+
from .synthesis import KMSSynthesisPermutation
254270

255271
# calibration
256272
from .calibration import PulseGates

qiskit/transpiler/passes/optimization/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
from .reset_after_measure_simplification import ResetAfterMeasureSimplification
3636
from .optimize_cliffords import OptimizeCliffords
3737
from .collect_cliffords import CollectCliffords
38+
from .collect_and_collapse import CollectAndCollapse

qiskit/transpiler/passes/synthesis/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
from .unitary_synthesis import UnitarySynthesis
1616
from .plugin import unitary_synthesis_plugin_names
1717
from .linear_functions_synthesis import LinearFunctionsSynthesis, LinearFunctionsToPermutations
18-
from .high_level_synthesis import HighLevelSynthesis, HLSConfig
18+
from .high_level_synthesis import (
19+
HighLevelSynthesis,
20+
HLSConfig,
21+
BasicSynthesisPermutation,
22+
ACGSynthesisPermutation,
23+
KMSSynthesisPermutation,
24+
)
1925
from .solovay_kitaev_synthesis import SolovayKitaev, SolovayKitaevSynthesis

qiskit/transpiler/passes/synthesis/high_level_synthesis.py

+65-3
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,29 @@ def run(self, high_level_object, **options):
174174

175175

176176
class KMSSynthesisPermutation(HighLevelSynthesisPlugin):
177-
"""The permutation synthesis plugin based on the Kutin, Moulton, Smithline method."""
177+
"""The permutation synthesis plugin based on the Kutin, Moulton, Smithline method.
178+
179+
180+
This plugin can be accessed by the ``kms`` method name in the
181+
``HLSConfig`` for ``permutation``. For example::
182+
183+
from qiskit.circuit import QuantumCircuit
184+
from qiskit.circuit.library import PermutationGate
185+
from qiskit.transpiler import PassManager
186+
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
187+
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager
188+
189+
# Create a permutation and add it to a quantum circuit
190+
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
191+
qc = QuantumCircuit(8)
192+
qc.append(perm, range(8))
193+
194+
# KMSSynthesisPermutation plugin for permutations
195+
# Returns a quantum circuit with size 18 and depth 6
196+
# but adhering to the linear nearest-neighbor architecture.
197+
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("kms", {})]))).run(qc)
198+
print(f"kms: {qct.size() = }, {qct.depth() = }")
199+
"""
178200

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

184206

185207
class BasicSynthesisPermutation(HighLevelSynthesisPlugin):
186-
"""The permutation synthesis plugin based on sorting."""
208+
"""The permutation synthesis plugin based on sorting.
209+
210+
This plugin can be accessed by the ``basic`` method name in the
211+
``HLSConfig`` for ``permutation``. For example::
212+
213+
from qiskit.circuit import QuantumCircuit
214+
from qiskit.circuit.library import PermutationGate
215+
from qiskit.transpiler import PassManager
216+
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
217+
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager
218+
219+
# Create a permutation and add it to a quantum circuit
220+
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
221+
qc = QuantumCircuit(8)
222+
qc.append(perm, range(8))
223+
224+
# BasicSynthesisPermutation plugin for permutations
225+
# Returns a quantum circuit with size 6 and depth 3
226+
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("basic", {})]))).run(qc)
227+
print(f"basic: {qct.size() = }, {qct.depth() = }")
228+
"""
187229

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

193235

194236
class ACGSynthesisPermutation(HighLevelSynthesisPlugin):
195-
"""The permutation synthesis plugin based on the Alon, Chung, Graham method."""
237+
"""The permutation synthesis plugin based on the Alon, Chung, Graham method.
238+
239+
This plugin can be accessed by the ``acg`` method name in the
240+
``HLSConfig`` for ``permutation``. For example::
241+
242+
from qiskit.circuit import QuantumCircuit
243+
from qiskit.circuit.library import PermutationGate
244+
from qiskit.transpiler import PassManager
245+
from qiskit.transpiler.passes.synthesis.high_level_synthesis import HLSConfig, HighLevelSynthesis
246+
from qiskit.transpiler.passes.synthesis.plugin import HighLevelSynthesisPluginManager
247+
248+
# Create a permutation and add it to a quantum circuit
249+
perm = PermutationGate([4, 6, 3, 7, 1, 2, 0, 5])
250+
qc = QuantumCircuit(8)
251+
qc.append(perm, range(8))
252+
253+
# ACGSynthesisPermutation plugin for permutations
254+
# Returns a quantum circuit with size 6 and depth 2
255+
qct = PassManager(HighLevelSynthesis(HLSConfig(permutation=[("acg", {})]))).run(qc)
256+
print(f"acg: {qct.size() = }, {qct.depth() = }")
257+
"""
196258

197259
def run(self, high_level_object, **options):
198260
"""Run synthesis for the given Permutation."""

releasenotes/notes/0.22/adapt-vqe-0f71234cb6ec92f8.yaml

-27
This file was deleted.

releasenotes/notes/0.22/add-backend-custom-passes-cddfd05c8704a4b1.yaml

-20
This file was deleted.

releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml

-19
This file was deleted.

releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml

-6
This file was deleted.

releasenotes/notes/0.22/add-eigensolvers-with-primitives-8b3a9f55f5fd285f.yaml

-50
This file was deleted.

0 commit comments

Comments
 (0)