Skip to content

Commit 2796151

Browse files
eliarbelbeckykdmtreinishjakelishman
authored
Prepare 2.1.0 release (#14565)
* Version update and first pass at the release notes * Update releasenotes/notes/2.1/Added-random-circuit-from-graph-95c22eeabdea89d0.yaml Co-authored-by: Rebecca Dimock <[email protected]> * Apply comments from Becky's review * Fix broken links and other formatting issues * Apply fixes after proofreading * Update feature notes This commit goes through the new feature release notes and updates and expands on them for clarity. * Update other notes * Update deprecation notes * Update upgrade notes * Update C API target note * Add prelude * Refine circuit library release note Remove the mention of a migration guide * Address review comments * Remove duplicate sphinx directives * Reword PauliLindbladMap note * Fixup PauliLindbladMap wording * Update releasenotes/notes/2.1/prepare-2.1.0-409d24ecbe277062.yaml Co-authored-by: Matthew Treinish <[email protected]> * Remove duplicate release notes from 2.0.x * Resolve Pauli cross-reference in a release note * Update fix notes --------- Co-authored-by: Rebecca Dimock <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Jake Lishman <[email protected]>
1 parent ae0a334 commit 2796151

File tree

75 files changed

+377
-415
lines changed

Some content is hidden

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

75 files changed

+377
-415
lines changed

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "2.1.0-rc1"
6+
version = "2.1.0"
77
edition = "2021"
88
rust-version = "1.79" # Keep in sync with README.md, rust-toolchain.toml, and tools/install_rust_msrv.sh
99
license = "Apache-2.0"

docs/cdoc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _C_API:
2+
13
===========================
24
Qiskit C API (``qiskit.h``)
35
===========================

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# The short X.Y version
3333
version = "2.1"
3434
# The full version, including alpha/beta/rc tags
35-
release = "2.1.0rc1"
35+
release = "2.1.0"
3636

3737
language = "en"
3838

docs/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Qiskit |version| release notes
1010
`:earliest-version:` should be set to the rc1 release for the current minor release series. For example, the stable/1.1 branch should set it to 1.1.0rc1. If on `main`, set to the prior minor version's rc1, like `1.0.0rc1`.
1111

1212
.. release-notes::
13-
:earliest-version: 1.1.0rc1
13+
:earliest-version: 2.1.0rc1

qiskit/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0rc1
1+
2.1.0

qiskit/circuit/library/arithmetic/piecewise_chebyshev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class PiecewiseChebyshevGate(Gate):
377377
from qiskit import QuantumCircuit
378378
from qiskit.circuit.library.arithmetic import PiecewiseChebyshevGate
379379
380-
f_x, num_state_qubits, degree, breakpoints = lambda x: np.arcsin(1 / x), 2, 2, [2, 4]
380+
f_x, num_state_qubits, degree, breakpoints = lambda x: np.sin(1 / x), 2, 2, [2, 4]
381381
pw_approximation = PiecewiseChebyshevGate(f_x, num_state_qubits, degree, breakpoints)
382382
383383
qc = QuantumCircuit(pw_approximation.num_qubits)

qiskit/transpiler/passes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
Split2QUnitaries
9292
RemoveIdentityEquivalent
9393
ContractIdleWiresInControlFlow
94+
OptimizeCliffordT
9495
9596
Scheduling
9697
=============

qiskit/transpiler/passes/synthesis/plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **
361361
:no-inherited-members:
362362
:no-special-members:
363363
364+
.. automodule:: qiskit.transpiler.passes.synthesis.clifford_unitary_synth_plugin
365+
:no-inherited-members:
366+
:no-special-members:
367+
364368
365369
High Level Synthesis
366370
--------------------

releasenotes/notes/2.1/Added-random-circuit-from-graph-95c22eeabdea89d0.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
---
22
features_circuits:
33
- |
4-
Added a function :func:`~qiskit.circuit.random.utils.random_circuit_from_graph` that generates a random circuit that
5-
induces the same interaction graph as the interaction graph specified by `interaction_graph`.
4+
Added a function :func:`~qiskit.circuit.random.random_circuit_from_graph` that generates a random circuit that
5+
induces the same interaction graph as the one specified by `interaction_graph`.
66
7-
The probability of randomly drawing an edge from the interaction graph as a two-qubit gate can be set by the
8-
user in the weight attribute of an edge in the input interaction graph. If the user does not set the probability,
9-
each edge is drawn uniformly, i.e. each two-qubit gate represented by an edge in the interaction graph has the
10-
same probability of getting added to the random circuit. If only a subset of edge probabilities are set,
11-
`ValueError` will be raised.
7+
The probability of randomly drawing an edge from the interaction graph as a two-qubit gate can be set by the
8+
user in an edge's weight attribute in the input interaction graph. If the user does not set the probability,
9+
each edge is drawn uniformly. That is, each two-qubit gate represented by an edge in the interaction graph has the
10+
same probability of getting added to the random circuit. If only a subset of edge probabilities are set,
11+
``ValueError`` will be raised.
1212
13-
This is an example where 'cp_map' is a list of edges with some arbitrary weights.
13+
In this example, ``cp_map`` is a list of edges with arbitrary weights.
1414
1515
.. plot::
1616
:include-source:
17-
17+
1818
from qiskit.circuit.random.utils import random_circuit_from_graph
1919
import rustworkx as rx
2020
pydi_graph = rx.PyDiGraph()
2121
n_q = 5
2222
cp_map = [(0, 1, 0.18), (1, 2, 0.15), (2, 3, 0.15), (3, 4, 0.22)]
23-
pydi_graph.add_nodes_from(range(n_q))
24-
pydi_graph.add_edges_from(cp_map)
23+
pydi_graph.extend_from_weighted_edge_list(cp_map)
2524
# cp_map can be passed in directly as interaction_graph
2625
qc = random_circuit_from_graph(interaction_graph = pydi_graph,
27-
min_2q_gate_per_edge = 1,
28-
max_operands = 2,
29-
measure = True,
30-
conditional = True,
31-
reset = True,
32-
seed = 0,
33-
insert_1q_oper = True,
26+
min_2q_gate_per_edge = 1,
27+
max_operands = 2,
28+
measure = True,
29+
conditional = True,
30+
reset = True,
31+
seed = 0,
32+
insert_1q_oper = True,
3433
prob_conditional = 0.21,
3534
prob_reset = 0.1)
3635
qc.draw(output='mpl')

releasenotes/notes/2.1/add-clifford-t-transpiler-pipeline-e640b5ba64eab13a.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
features_transpiler:
33
- |
44
The function :func:`.generate_preset_pass_manager` now generates a special
5-
pass manager when the basis set consists of Clifford+T gates only.
6-
Formally, a Clifford+T basis set must contain either a :class:`.TGate` or
7-
:class:`.TdgGate` (or both), and only Clifford gates in addition.
8-
The full list of supported Clifford gates can be obtained using
9-
:func:`.get_clifford_gate_names`.
5+
pass manager when the basis set consists only of Clifford+T gates.
6+
Formally, a Clifford+T basis set must contain only Clifford gates, along
7+
with either :class:`.TGate`, :class:`.TdgGate`, or both. The full list of supported
8+
Clifford gates can be obtained by using :func:`.get_clifford_gate_names`.
109
1110
For example::
12-
11+
1312
from qiskit.circuit import QuantumCircuit
1413
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
1514
from qiskit.quantum_info import get_clifford_gate_names
@@ -22,25 +21,32 @@ features_transpiler:
2221
qct = pm.run(qc)
2322
print(qct.count_ops())
2423
25-
Previously, the generated pass manager was not able to handle the example above,
26-
as it was not able to decompose single-qubit rotation gates of type
27-
:class:`.UGate` into Clifford+T gates. Instead, the new pass manager uses the
28-
the Solovay-Kitaev decomposition to approximate single-qubit rotation gates
24+
Would result with:
25+
26+
.. code-block:: text
27+
28+
OrderedDict([('h', 10210), ('t', 4508), ('tdg', 4503), ('sdg', 943), ('s', 941)])
29+
30+
31+
Previously, the generated pass manager could not handle the example above
32+
because it couldn't decompose single-qubit :class:`.UGate` rotation gates into
33+
Clifford+T gates. However, the new pass manager uses the
34+
Solovay-Kitaev decomposition to approximate single-qubit rotation gates
2935
using ``H``, ``T`` and ``Tdg`` gates, and calls the :class:`~.BasisTranslator`
3036
transpiler pass to further translate the gates into the target basis set.
3137
The new pass manager also has other changes as to enable a more efficient
3238
translation into Clifford+T gates.
3339
3440
It is important to note that the specified Clifford+T basis gate set should be
35-
universal, or else transpilation might not succeed. While the gate set
36-
``["h", "t", "tdg"]``or even ``["h", "t"]`` is sufficient for universality,
41+
universal, or else transpilation might not succeed. While the gate set
42+
``["h", "t", "tdg"]`` or even ``["h", "t"]`` is sufficient for universality,
3743
it is recommended to add more Clifford gates to the set if possible, as
38-
otherwise the translation might be less efficient. For example, not including
39-
S-gate might trigger decomposing S-gates into pairs of T-gates (that is,
40-
decomposing Clifford gates into non-Clifford gates, which might not be the
44+
otherwise the translation might be less efficient. For example, if S-gate is not included,
45+
S-gates might be decomposed into pairs of T-gates (that is,
46+
Clifford gates might be decomposed into non-Clifford gates, which might not be the
4147
desired behavior).
4248
43-
Here is an additional slightly larger example::
49+
Following is a slightly larger example::
4450
4551
from qiskit.circuit import QuantumCircuit
4652
from qiskit.circuit.library import QFTGate
@@ -57,3 +63,9 @@ features_transpiler:
5763
5864
qct = pm.run(qc)
5965
print(qct.count_ops())
66+
67+
Would result with:
68+
69+
.. code-block:: text
70+
71+
OrderedDict([('h', 96510), ('tdg', 42396), ('t', 42389), ('s', 8240), ('sdg', 8235), ('cx', 12)])
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
---
22
features_synthesis:
33
- |
4-
Added new synthesis algorithm for :class:`.HalfAdderGate` that requires no ancillary qubits
4+
Added a new synthesis algorithm for :class:`.HalfAdderGate` that requires no ancillary qubits
55
and has better CX count compared to :func:`.adder_qft_d00`:
66
77
* :func:`.adder_ripple_r25`
88
99
features_transpiler:
1010
- |
11-
Added new high-level-synthesis plugin for synthesizing a :class:`.HalfAdderGate`:
12-
13-
* :class:`.HalfAdderSynthesisR25`, based on :func:`.adder_ripple_rv_25`.
11+
Added a new high-level-synthesis plugin :class:`.HalfAdderSynthesisR25` for synthesizing a
12+
:class:`.HalfAdderGate`. The new plugin is based on :func:`.adder_ripple_r25`.
1413
1514
The :class:`.HalfAdderSynthesisDefault` has also been updated to follow the following sequence
16-
of half adder synthesizers: ``"HalfAdder.ripple_r25"`` when the number of qubits is
17-
:math:`\leq 3`, ``"HalfAdder.ripple_c04"`` when 1 ancillary qubit is available,
15+
of half adder synthesizers: ``"HalfAdder.ripple_r25"`` when there are
16+
:math:`\leq 3` qubits, ``"HalfAdder.ripple_c04"`` when one ancillary qubit is available, and
1817
``"HalfAdder.ripple_r25"`` in all remaining cases.
1918
2019
upgrade_circuits:
2120
- |
22-
The circuit definition of :class:`.HalfAdderGate` has been upgraded to use
23-
:func:`.adder_ripple_r25`. To obtain the old behaviour, use the definition of
24-
:func:`.adder_qft_d00` instead.
21+
The :attr:`~.HalfAdderGate.definition` attribute of the :class:`.HalfAdderGate`
22+
has been changed to internally use :func:`.adder_ripple_r25` to generate the definition
23+
of the gate for a more efficient circuit with no ancillary qubits. If the old definition
24+
is desired for some reason you can directly use the :func:`.adder_qft_d00` function instead which
25+
will generate a circuit equivalent to what :attr:`~.HalfAdderGate.definition` would return
26+
in previous releases.

releasenotes/notes/2.1/add-new-mcx-plugins-2177db9195e2b680.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ features_transpiler:
88
* :class:`.MCXSynthesis2CleanKG24`, based on :func:`.synth_mcx_2_clean_kg24`.
99
* :class:`.MCXSynthesis2DirtyKG24`, based on :func:`.synth_mcx_2_dirty_kg24`.
1010
11-
The :class:`.MCXSynthesisDefault` has also been updated to follow the following sequence of
12-
MCX synthesizers: "mcx.2_clean_kg24", "mcx.1_clean_kg24", "mcx.n_clean_m15", "mcx.n_dirty_i15",
13-
"mcx.2_dirty_kg24", "mcx.1_dirty_kg24" "mcx.1_clean_b95", "mcx.noaux_v24".
11+
The :class:`.MCXSynthesisDefault` class has also been updated to run the following
12+
sequence of MCX synthesize methods until the first one succeeds:
13+
: ``"mcx.2_clean_kg24"``, ``"mcx.1_clean_kg24"``, ``"mcx.n_clean_m15"``, ``"mcx.n_dirty_i15"`,
14+
``"mcx.2_dirty_kg24"``, ``"mcx.1_dirty_kg24"``, ``"mcx.1_clean_b95"``, ``"mcx.noaux_v24"``. The methods
15+
are ordered in a way that the better-quality ones are applied first.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
features_circuits:
22
- |
3-
Added :meth:`.QuantumCircuit.has_control_flow` to check if a circuit
4-
contains any control flow operations.
3+
Added a new :class:`.QuantumCircuit` method: :meth:`.QuantumCircuit.has_control_flow_op` to
4+
check if a :class:`.QuantumCircuit` object contains any control flow operations.

releasenotes/notes/2.1/annotation-frameworkd-d9f86b90720359b5.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
features_circuits:
33
- |
4-
A new module :mod:`qiskit.circuit.annotation` and principle object :class:`.Annotation` have
5-
been added.
4+
A new module :mod:`qiskit.circuit.annotation` and principle object :class:`.Annotation`
5+
have been added.
66
7-
Annotations are a way of tagging instructions (currently only :class:`.BoxOp`, in the initial
8-
implementation) with local, user-custom data. This data is intended to be consumed by custom
7+
Annotations are a way of tagging instructions (currently only :class:`.BoxOp`)
8+
with local, user-custom data. This data is intended to be consumed by custom
99
transpiler passes. Annotations provide a way to attach data to specific instructions, rather
1010
than using the global-context object :class:`.PropertySet` during compilation.
1111
12-
All :class:`.Annotation` objects have a :attr:`~.Annotation.namespace`. This string key is used
12+
All :class:`.Annotation` objects have a ``namespace`` field. This string key is used
1313
for lookups, so consumers can tell if they handle a particular annotation or not. There are
1414
currently no methods for querying any abstract semantics of an :class:`.Annotation` subclass,
1515
but these are expected to expand in the future.
@@ -37,7 +37,7 @@ features_circuits:
3737
3838
features_qpy:
3939
- |
40-
QPY version 15 is released, including support for the new :class:`.Annotation` objects, with
40+
Added a new QPY format version 15 which includes support for the new :class:`.Annotation` objects, with
4141
support from external serializers and deserializers. The format allows such serializers to be
4242
stateful, and safe places in the binary format are allocated for the custom state objects and
4343
custom annotation representations.
@@ -47,6 +47,11 @@ features_qpy:
4747
handle :class:`.Annotation` subclasses. These must be supplied by the user, similar to
4848
``metadata_serializer``, as in general, Qiskit cannot know about all possible externally-defined
4949
:class:`.Annotation` objects.
50+
upgrade_qpy:
51+
- |
52+
The default QPY version emitted by :func:`.qpy.dump` has been changed to the latest QPY version 15.
53+
If you need to generate an older format version for some reason you can use the ``version`` keyword
54+
argument on :func:`.qpy.dump` to specify an older version to generate.
5055
5156
features_qasm:
5257
- |

0 commit comments

Comments
 (0)