diff --git a/docs/conf.py b/docs/conf.py index b6cc9f35f52f..f6bf2faa9a18 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,7 +32,7 @@ # The short X.Y version version = "1.2" # The full version, including alpha/beta/rc tags -release = "1.2.0rc1" +release = "1.2.0" language = "en" diff --git a/docs/release_notes.rst b/docs/release_notes.rst index fddd907195fc..d567e8c7e303 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -10,4 +10,4 @@ Qiskit |version| release notes `: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`. .. release-notes:: - :earliest-version: 1.0.0rc1 + :earliest-version: 1.2.0rc1 diff --git a/qiskit/VERSION.txt b/qiskit/VERSION.txt index ceeac0977fcc..26aaba0e8663 100644 --- a/qiskit/VERSION.txt +++ b/qiskit/VERSION.txt @@ -1 +1 @@ -1.2.0rc1 +1.2.0 diff --git a/qiskit/circuit/__init__.py b/qiskit/circuit/__init__.py index 65a88519a0de..07f4b5e7e871 100644 --- a/qiskit/circuit/__init__.py +++ b/qiskit/circuit/__init__.py @@ -301,9 +301,10 @@ * :data:`SessionEquivalenceLibrary`, a mutable instance of :class:`EquivalenceLibrary` which is used by default by the compiler's :class:`.BasisTranslator`. -There is also a utility for generating random circuits: +There are also utilities for generating random circuits: -* :func:`random.random_circuit` +* :func:`.random_circuit` +* :func:`.random_clifford_circuit` Finally, the circuit module has its own exception class, to indicate when things went wrong in circuit-specific manners: @@ -1004,6 +1005,7 @@ def __array__(self, dtype=None, copy=None): .. currentmodule:: qiskit.circuit.random .. autofunction:: random_circuit +.. autofunction:: random_clifford_circuit .. currentmodule:: qiskit.circuit @@ -1250,3 +1252,4 @@ def __array__(self, dtype=None, copy=None): ) from .annotated_operation import AnnotatedOperation, InverseModifier, ControlModifier, PowerModifier +from .random import random_circuit, random_clifford_circuit diff --git a/releasenotes/notes/1.2/add-qft-gate-fd4e08f6721a9da4.yaml b/releasenotes/notes/1.2/add-qft-gate-fd4e08f6721a9da4.yaml index 46b60c8b7025..c891fe3a0290 100644 --- a/releasenotes/notes/1.2/add-qft-gate-fd4e08f6721a9da4.yaml +++ b/releasenotes/notes/1.2/add-qft-gate-fd4e08f6721a9da4.yaml @@ -17,6 +17,6 @@ features: Added two high-level-synthesis plugins for synthesizing a :class:`~qiskit.circuit.library.QFTGate`. The class :class:`.QFTSynthesisFull` is based on :func:`.synth_qft_full` and synthesizes - a QFT gate assuming all-to-all connectivity. + a QFT gate assuming an all-to-all connectivity. The class :class:`.QFTSynthesisLine` is based on :func:`.synth_qft_line` and synthesizes - a QFT gate assuming linear nearest neighbor connectivity. + a QFT gate assuming a linear-nearest-neighbor connectivity. diff --git a/releasenotes/notes/1.2/add-random-clifford-util-5358041208729988.yaml b/releasenotes/notes/1.2/add-random-clifford-util-5358041208729988.yaml index 7f2e20db6522..ed897fca39b0 100644 --- a/releasenotes/notes/1.2/add-random-clifford-util-5358041208729988.yaml +++ b/releasenotes/notes/1.2/add-random-clifford-util-5358041208729988.yaml @@ -1,8 +1,8 @@ --- features_circuits: - | - Added a new function to ``qiskit.circuit.random`` that allows to generate a pseudo-random - Clifford circuit with gates from the standard library: :func:`.random_clifford_circuit`. + Added a new function :func:`.random_clifford_circuit` to :mod:`qiskit.circuit`, that allows to + generate a pseudo-random Clifford circuit with gates from the standard library. Example usage: .. plot:: diff --git a/releasenotes/notes/1.2/annotated-params-116288d5628f7ee8.yaml b/releasenotes/notes/1.2/annotated-params-116288d5628f7ee8.yaml index 2f316a06ae8d..b890865161ef 100644 --- a/releasenotes/notes/1.2/annotated-params-116288d5628f7ee8.yaml +++ b/releasenotes/notes/1.2/annotated-params-116288d5628f7ee8.yaml @@ -1,7 +1,7 @@ --- features_circuits: - | - Added support for :meth:`.AnnotatedOperation.params` and + Added support for :attr:`.AnnotatedOperation.params` and :meth:`.AnnotatedOperation.validate_parameter`, which enable circuit-level parameter handling (such as binding parameters) for annotated operations. @@ -10,7 +10,7 @@ fixes: Fixed a series of issues when controlling parameterized standard gates. The controlled version of some gates (e.g. :class:`.RXXGate` or :class:`.RYGate` for more than 1 control) cannot be synthesized if - they contain unbound parameters. Previously, calling ``.control()`` but + they contain unbound parameters. Previously, calling ``.control()`` in such a case failed, but now we create an :class:`.AnnotatedOperation` as placeholder. This allows to insert the controlled gate into a circuit, bind the parameters at a later stage, and then synthesize the operation. @@ -24,7 +24,7 @@ fixes: upgrade_circuits: - | The ``annotated`` argument of the :meth:`.Gate.control` method is now - ``None``, which allows Qiskit to choose whether to annotate a controlled operation. + ``None`` by default, which allows Qiskit to choose whether to annotate a controlled operation. If the concrete implementation (``annotated=False``) is available, it will be returned by default. Otherwise, the annotated implementation will be returned (``annotated=True``). This allows, for example, to defer the synthesis of controlled, parameterized gates. diff --git a/releasenotes/notes/avoid-op-creation-804c0bed6c408911.yaml b/releasenotes/notes/1.2/avoid-op-creation-804c0bed6c408911.yaml similarity index 100% rename from releasenotes/notes/avoid-op-creation-804c0bed6c408911.yaml rename to releasenotes/notes/1.2/avoid-op-creation-804c0bed6c408911.yaml diff --git a/releasenotes/notes/1.2/backend-estimator-v2-variance-905c953415ad0e29.yaml b/releasenotes/notes/1.2/backend-estimator-v2-variance-905c953415ad0e29.yaml index ba672a327daa..f3ea1687acff 100644 --- a/releasenotes/notes/1.2/backend-estimator-v2-variance-905c953415ad0e29.yaml +++ b/releasenotes/notes/1.2/backend-estimator-v2-variance-905c953415ad0e29.yaml @@ -1,5 +1,6 @@ --- fixes: - | - Changes the way in which the :class:`.BackendEstimatorV2` class calculates the ``std`` to ensure that - it matches the correct formula. + Fix the calculation of the standard deviation in :class:`.BackendEstimatorV2`, by taking + into account co-variance of non-commuting Paulis. + Fixed `Qiskit/qiskit-ibm-runtime#1751 `__. diff --git a/releasenotes/notes/1.2/backendv1-d0d0642ed38fed3c.yaml b/releasenotes/notes/1.2/backendv1-d0d0642ed38fed3c.yaml new file mode 100644 index 000000000000..81a9ba8c7624 --- /dev/null +++ b/releasenotes/notes/1.2/backendv1-d0d0642ed38fed3c.yaml @@ -0,0 +1,6 @@ +--- +deprecations_providers: + - | + The :class:`.BackendV1` class is deprecated and it will be removed no earlier than the next major release, + 2.0.0. See `the migration guide `__ for details on how to update + to :class:`.BackendV2`. diff --git a/releasenotes/notes/1.2/barebone-backend-option-675c86df4382a443.yaml b/releasenotes/notes/1.2/barebone-backend-option-675c86df4382a443.yaml index 912970845042..fa6147b616ce 100644 --- a/releasenotes/notes/1.2/barebone-backend-option-675c86df4382a443.yaml +++ b/releasenotes/notes/1.2/barebone-backend-option-675c86df4382a443.yaml @@ -1,8 +1,8 @@ --- features: - | - Added two parameters to :class:`.GenericBackendV2` to exclude error (`noise_info`) and - pulse channel information (`pulse_channels`) from the construction of the backend. These parameters - are true by default, replicating the initial default behavior of the constructor. A memory-sensitive - user may set these options to `False` to reduce the memory overhead by 40x when transpiling on large- + Added two parameters to :class:`.GenericBackendV2` to exclude error (``noise_info``) and + pulse channel information (``pulse_channels``) from the construction of the backend. These parameters + are ``True`` by default, replicating the initial default behavior of the constructor. A memory-sensitive + user may set these options to ``False`` to reduce the memory overhead by 40x when transpiling on large- scale :class:`.GenericBackendV2`. diff --git a/releasenotes/notes/1.2/circuit-draw-warn-justify-03434d30cccda452.yaml b/releasenotes/notes/1.2/circuit-draw-warn-justify-03434d30cccda452.yaml index 9ae15212fd56..a42801e4123e 100644 --- a/releasenotes/notes/1.2/circuit-draw-warn-justify-03434d30cccda452.yaml +++ b/releasenotes/notes/1.2/circuit-draw-warn-justify-03434d30cccda452.yaml @@ -1,13 +1,13 @@ --- deprecations_visualization: - | - The ``justify`` argument of :func:`circuit_drawer` or :meth:`QuantumCircuit.draw`, will + The ``justify`` argument of :func:`.circuit_drawer` or :meth:`.QuantumCircuit.draw`, will no longer support invalid values (previously changing them to the default), and in a future release they will error. Valid justify values are ``"left"``, ``"right"`` or ``"none"``. fixes: - | - Fixed an issue where :func:`circuit_drawer` or the :meth:`QuantumCircuit.draw` method would + Fixed an issue where :func:`.circuit_drawer` or the :meth:`.QuantumCircuit.draw` method would not raise a warning when an invalid value was passed to the ``justify`` argument, before changing it to the default. Now, it will raise a warning if an invalid value is passed. Valid justify values are ``"left"``, ``"right"`` or ``"none"``. Refer to - `#12089 ` for more details. + `#12089 `_ for more details. diff --git a/releasenotes/notes/1.2/circuit-gates-rust-5c6ab6c58f7fd2c9.yaml b/releasenotes/notes/1.2/circuit-gates-rust-5c6ab6c58f7fd2c9.yaml index d826bc15e488..ddb792f5285a 100644 --- a/releasenotes/notes/1.2/circuit-gates-rust-5c6ab6c58f7fd2c9.yaml +++ b/releasenotes/notes/1.2/circuit-gates-rust-5c6ab6c58f7fd2c9.yaml @@ -2,36 +2,30 @@ features_circuits: - | A native rust representation of Qiskit's standard gate library has been added. When a standard gate - is added to a :class:`~.QuantumCircuit` or :class:`~.DAGCircuit` it is now represented in a more - efficient manner directly in Rust seamlessly. Accessing that gate object from a circuit or dag will + is added to a :class:`.QuantumCircuit` or :class:`.DAGCircuit` it is now represented in a more + efficient manner directly in Rust. Accessing that gate object from a circuit or DAG will return a new Python object representing the standard gate. This leads to faster and more efficient transpilation and manipulation of circuits for functionality written in Rust. features_misc: - | Added a new build-time environment variable ``QISKIT_NO_CACHE_GATES`` which - when set to a value of ``1`` (i.e. ``QISKIT_NO_CACHE_GATES=1``) which + when set to a value of ``1`` (i.e. ``QISKIT_NO_CACHE_GATES=1``) decreases the memory overhead of a :class:`.CircuitInstruction` and - :class:`.DAGOpNode` object at the cost of decreased runtime on multiple + :class:`.DAGOpNode` object at the cost of increased runtime on multiple accesses to :attr:`.CircuitInstruction.operation` and :attr:`.DAGOpNode.op`. - If this environment variable is set when building the Qiskit python package + If this environment variable is set when building the Qiskit Python package from source the caching of the return of these attributes will be disabled. upgrade_circuits: - | The :class:`.Operation` instances of :attr:`.DAGOpNode.op` being returned will not necessarily share a common reference to the underlying object anymore. This was never guaranteed to be the case and - mutating the :attr:`~.DAGOpNode.op` directly by reference - was unsound and always likely to corrupt the dag's internal state tracking + mutating the :attr:`.DAGOpNode.op` directly by reference + was unsound and always likely to corrupt the DAG's internal state tracking Due to the internal refactor of the :class:`.QuantumCircuit` and - :class:`.DAGCircuit` to store standard gates in rust the output object from + :class:`.DAGCircuit` to store standard gates in Rust, the output object from :attr:`.DAGOpNode.op` will now likely be a copy instead of a shared instance. If you - need to mutate an element should ensure that you either do:: - - op = dag_node.op - op.params[0] = 3.14159 - dag_node.op = op - - or:: + need to mutate an element should ensure that you do:: op = dag_node.op op.params[0] = 3.14159 @@ -41,16 +35,16 @@ upgrade_circuits: dag_node.op.params[0] = 3.14159 - which will not work for any standard gates in this release. It would have + which will **not work** for any standard gate in this release. It would have likely worked by chance in a previous release but was never an API guarantee. - | The :class:`.Operation` instances of :attr:`.CircuitInstruction.operation` being returned will not necessarily share a common reference to the underlying object anymore. This was never guaranteed to be the case and - mutating the :attr:`~.CircuitInstruction.operation` directly by reference + mutating the :attr:`.CircuitInstruction.operation` directly by reference was unsound and always likely to corrupt the circuit, especially when - parameters were in use. Due to the internal refactor of the QuantumCircuit - to store standard gates in rust the output object from + parameters were in use. Due to the internal refactor of the :class:`.QuantumCircuit` + to store standard gates in Rust, the output object from :attr:`.CircuitInstruction.operation` will now likely be a copy instead of a shared instance. If you need to mutate an element in the circuit (which is strongly **not** recommended as it's inefficient and error prone) you @@ -75,5 +69,5 @@ upgrade_circuits: qc.data[0].operation.params[0] = 3.14 - which will not work for any standard gates in this release. It would have + which will **not work** for any standard gates in this release. It would have likely worked by chance in a previous release but was never an API guarantee. diff --git a/releasenotes/notes/1.2/deprecate-circuit-internal-helpers-ee65fbac455de47c.yaml b/releasenotes/notes/1.2/deprecate-circuit-internal-helpers-ee65fbac455de47c.yaml index 809aa11adc9c..71f9e6a78974 100644 --- a/releasenotes/notes/1.2/deprecate-circuit-internal-helpers-ee65fbac455de47c.yaml +++ b/releasenotes/notes/1.2/deprecate-circuit-internal-helpers-ee65fbac455de47c.yaml @@ -4,8 +4,8 @@ deprecations_circuits: The following circuit methods were not intended for public use, but were accidentally left documented in the public API during the 1.0 release. They are now deprecated from Qiskit 1.2 and will be removed in Qiskit 2.0: - * ``QuantumCircuit.cast`` - * ``QuantumCircuit.cls_instances`` - * ``QuantumCircuit.cls_prefix`` - * ``QuantumCircuit.cbit_argument_conversion`` - * ``QuantumCircuit.qbit_argument_conversion`` \ No newline at end of file + * :meth:`.QuantumCircuit.cast` + * :meth:`.QuantumCircuit.cls_instances` + * :meth:`.QuantumCircuit.cls_prefix` + * :meth:`.QuantumCircuit.cbit_argument_conversion` + * :meth:`.QuantumCircuit.qbit_argument_conversion` \ No newline at end of file diff --git a/releasenotes/notes/1.2/deprecate-legacy-circuit-instruction-8a332ab09de73766.yaml b/releasenotes/notes/1.2/deprecate-legacy-circuit-instruction-8a332ab09de73766.yaml index d656ee5cb823..9f2f967be262 100644 --- a/releasenotes/notes/1.2/deprecate-legacy-circuit-instruction-8a332ab09de73766.yaml +++ b/releasenotes/notes/1.2/deprecate-legacy-circuit-instruction-8a332ab09de73766.yaml @@ -3,8 +3,8 @@ deprecations_circuits: - | Treating :class:`.CircuitInstruction` as a tuple-like iterable is deprecated, and this legacy path way will be removed in Qiskit 2.0. You should use the attribute-access fields - :attr:`~.CircuitInstruction.operation`, :attr:`~.CircuitInstruction.qubits`, and - :attr:`~.CircuitInstruction.clbits` instead. For example:: + :attr:`.CircuitInstruction.operation`, :attr:`.CircuitInstruction.qubits`, and + :attr:`.CircuitInstruction.clbits` instead. For example:: from qiskit.circuit import QuantumCircuit diff --git a/releasenotes/notes/1.2/deprecate-primitives-v1.yaml b/releasenotes/notes/1.2/deprecate-primitives-v1.yaml index 3d0335d358cb..f087a59d3552 100644 --- a/releasenotes/notes/1.2/deprecate-primitives-v1.yaml +++ b/releasenotes/notes/1.2/deprecate-primitives-v1.yaml @@ -15,18 +15,5 @@ deprecations_primitives: * :class:`.BaseEstimator`, alias for :class:`.BaseEstimatorV1` * :class:`.BaseSampler`, alias for :class:`.BaseSamplerV1` - This deprecation does NOT affect the explicitly-versioned :class:`BaseEstimatorV1` - and :class:`BaseSamplerV1` abstract - interface definitions or related result and job classes. - - In addition, the following utility functions are deprecated: - - * :func:`.init_circuit`, to initialize a circuit from a :class:`.Statevector`, - use :meth:`.QuantumCircuit.initialize` instead, - * :func:`.init_observable`, use the constructor of :class:`.SparsePauliOp` instead, - * :func:`.final_measurement_mapping`, use :meth:`.QuantumCircuit.layout` and - :meth:`.SparsePauliOp.apply_layout` to adjust an operator for a layout. - Otherwise, use ``mthree.utils.final_measurement_mapping``. - See `Mthree Utility functions `__ - for details. - + This deprecation does **not** affect the explicitly-versioned :class:`.BaseEstimatorV1` + and :class:`.BaseSamplerV1` abstract interface definitions or related result and job classes. diff --git a/releasenotes/notes/1.2/deprecate-visualize_transition-8c1d257b7f37aa58.yaml b/releasenotes/notes/1.2/deprecate-visualize_transition-8c1d257b7f37aa58.yaml index 6900dcbd7676..dc30ab611a6c 100644 --- a/releasenotes/notes/1.2/deprecate-visualize_transition-8c1d257b7f37aa58.yaml +++ b/releasenotes/notes/1.2/deprecate-visualize_transition-8c1d257b7f37aa58.yaml @@ -1,7 +1,7 @@ --- deprecations_visualization: - | - The :func:`.transition_visualization` function has been deprecated and will + The :func:`.visualize_transition` function has been deprecated and will be removed in the 2.0.0 release. This function had a number of limitations - which limited it's utility to only very specific use cases and didn't fit in with + which limited its utility to only very specific use cases and did not fit in with the rest of the Qiskit visualization module. diff --git a/releasenotes/notes/1.2/deprecate_assemble-67486b4d0a8d4f96.yaml b/releasenotes/notes/1.2/deprecate_assemble-67486b4d0a8d4f96.yaml index b7b50d2eb2b2..fdbb34a28e3f 100644 --- a/releasenotes/notes/1.2/deprecate_assemble-67486b4d0a8d4f96.yaml +++ b/releasenotes/notes/1.2/deprecate_assemble-67486b4d0a8d4f96.yaml @@ -1,7 +1,14 @@ --- deprecations_providers: - | - The `Qobj` structure and related classes are now deprecated, they were introduced as part of the `BackendV1` workflow and are no longer necessary for interacting with :class:`.BackendV2` backends. Remote backend interaction should be done via `QPY` or `OpenQASM` instead. + The Qobj structure and related classes (see :mod:`qiskit.qobj`) are now deprecated. They were + introduced as part of the :class:`.BackendV1` workflow and are no longer necessary for + interacting with :class:`.BackendV2` backends. :class:`.QuantumCircuit` serialiaztion should be + done via QPY (see :mod:`qiskit.qpy`) or OpenQASM (see :mod:`qiskit.qasm2` and :mod:`qiskit.qasm3`) + instead. deprecations_transpiler: - | - The `assemble` function is now deprecated and will be removed in the 2.0 release. The function was primarily used to create a `Qobj`, which is no longer necessary in :class:`.BackendV2`-based workflows. It was also used for binding parameters, a functionality fully covered by :meth:`~.QuantumCircuit.assign_parameters`. + The :func:`.assemble` function is now deprecated and will be removed in the 2.0 release. + The function was primarily used to create a ``Qobj``, which is no longer necessary in + :class:`.BackendV2`-based workflows. It was also used for binding parameters, a functionality + fully covered by :meth:`.QuantumCircuit.assign_parameters`. diff --git a/releasenotes/notes/1.2/extended-random-circuits-049b67cce39003f4.yaml b/releasenotes/notes/1.2/extended-random-circuits-049b67cce39003f4.yaml index f4bb585053bc..8102682f319b 100644 --- a/releasenotes/notes/1.2/extended-random-circuits-049b67cce39003f4.yaml +++ b/releasenotes/notes/1.2/extended-random-circuits-049b67cce39003f4.yaml @@ -1,21 +1,25 @@ --- features_circuits: - | - The `random_circuit` function from `qiskit.circuit.random.utils` has a new feature where - users can specify a distribution `num_operand_distribution` (a dict) that specifies the + The :func:`.random_circuit` function has a new feature where + users can specify a distribution ``num_operand_distribution`` (a dict) that specifies the ratio of 1-qubit, 2-qubit, 3-qubit, and 4-qubit gates in the random circuit. For example, - if `num_operand_distribution = {1: 0.25, 2: 0.25, 3: 0.25, 4: 0.25}` is passed to the function + if ``num_operand_distribution = {1: 0.25, 2: 0.25, 3: 0.25, 4: 0.25}`` is passed to the function then the generated circuit will have approximately 25% of 1-qubit, 2-qubit, 3-qubit, and - 4-qubit gates (The order in which the dictionary is passed does not matter i.e. you can specify - `num_operand_distribution = {3: 0.5, 1: 0.0, 4: 0.3, 2: 0.2}` and the function will still work - as expected). Also it should be noted that the if `num_operand_distribution` is not specified - then `max_operands` will default to 4 and a random circuit with a random gate distribution will - be generated. If both `num_operand_distribution` and `max_operands` are specified at the same - time then `num_operand_distribution` will be used to generate the random circuit. - Example usage:: + 4-qubit gates. Also it should be noted that the if ``num_operand_distribution`` is not specified + then ``max_operands`` will default to 4 and a random circuit with a random gate distribution will + be generated. If both ``num_operand_distribution`` and ``max_operands`` are specified at the same + time then ``num_operand_distribution`` will be used to generate the random circuit. - from qiskit.circuit.random import random_circuit + Example usage: + + .. plot:: + :include-source: - circ = random_circuit(num_qubits=6, depth=5, num_operand_distribution = {1: 0.25, 2: 0.25, 3: 0.25, 4: 0.25}) - circ.draw(output='mpl') + from qiskit.circuit.random import random_circuit + + circ = random_circuit( + num_qubits=6, depth=5, num_operand_distribution={1: 0.25, 2: 0.25, 3: 0.25, 4: 0.25} + ) + circ.draw(output="mpl") diff --git a/releasenotes/notes/1.2/fix-bitarray-fromcounts-nobits-82958a596b3489ec.yaml b/releasenotes/notes/1.2/fix-bitarray-fromcounts-nobits-82958a596b3489ec.yaml deleted file mode 100644 index 6be5ea21bdf5..000000000000 --- a/releasenotes/notes/1.2/fix-bitarray-fromcounts-nobits-82958a596b3489ec.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed a bug in :meth:`.BitArray.from_counts` and :meth:`.BitArray.from_samples`. - Previously these would raise an error if given data containing only zeros, and no - value for the optional argument ``num_bits``. Now they produce a :class:`.BitArray` - with :attr:`.BitArray.num_bits` set to 1. diff --git a/releasenotes/notes/1.2/fix-bitarray-slice-bits-shots-c9cb7e5d907722f5.yaml b/releasenotes/notes/1.2/fix-bitarray-slice-bits-shots-c9cb7e5d907722f5.yaml index 56fd81012428..c15d6334004b 100644 --- a/releasenotes/notes/1.2/fix-bitarray-slice-bits-shots-c9cb7e5d907722f5.yaml +++ b/releasenotes/notes/1.2/fix-bitarray-slice-bits-shots-c9cb7e5d907722f5.yaml @@ -7,5 +7,5 @@ upgrade_primitives: - | :meth:`.BitArray.__getitem__` will now raise ``IndexError`` when indices are out of bounds or the number of dimensions - of indices does not match that of BitArray. + of indices does not match that of :class:`.BitArray`. They used to raise ``ValueError`` in the case. diff --git a/releasenotes/notes/1.2/fix-c3sx-gate-matrix-050cf9f9ac3b2b82.yaml b/releasenotes/notes/1.2/fix-c3sx-gate-matrix-050cf9f9ac3b2b82.yaml deleted file mode 100644 index accd20de4ae5..000000000000 --- a/releasenotes/notes/1.2/fix-c3sx-gate-matrix-050cf9f9ac3b2b82.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Fixed a missing decorator in :class:`.C3SXGate` that made it fail if :meth:`.Gate.to_matrix` was called. - The gate matrix is now return as expected. diff --git a/releasenotes/notes/1.2/fix-collect-clifford-83af26d98b8c69e8.yaml b/releasenotes/notes/1.2/fix-collect-clifford-83af26d98b8c69e8.yaml deleted file mode 100644 index 48eac19acc9d..000000000000 --- a/releasenotes/notes/1.2/fix-collect-clifford-83af26d98b8c69e8.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Add more Clifford gates to the :class:`.CollectCliffords()` transpiler pass. - In particular, we have added the gates :class:`ECRGate()`, :class:`DCXGate()`, - :class:`iSWAPGate()`, :class:`SXGate()` and :class:`SXdgGate()` to this transpiler pass. diff --git a/releasenotes/notes/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml b/releasenotes/notes/1.2/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml similarity index 81% rename from releasenotes/notes/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml rename to releasenotes/notes/1.2/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml index e4cf03778e3a..dea5f1109d49 100644 --- a/releasenotes/notes/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml +++ b/releasenotes/notes/1.2/fix-consolidate-blocks-custom-gate-no-target-e2d1e0b0ee7ace11.yaml @@ -4,6 +4,6 @@ fixes: Fixed a bug in the :class:`.ConsolidateBlocks` transpiler pass, when the input circuit contains a custom opaque gate and neither the ``basis_gates`` or ``target`` options are set the pass would raise a - ``QiskitError`` and fail. This has been corrected so that the in these + :class:`.QiskitError` and fail. This has been corrected so that the in these situations the transpiler pass will not consolidate the block identified containing a custom gate instead of failing. diff --git a/releasenotes/notes/fix-dd-misalignment-msg-76fe16e5eb4ae670.yaml b/releasenotes/notes/1.2/fix-dd-misalignment-msg-76fe16e5eb4ae670.yaml similarity index 100% rename from releasenotes/notes/fix-dd-misalignment-msg-76fe16e5eb4ae670.yaml rename to releasenotes/notes/1.2/fix-dd-misalignment-msg-76fe16e5eb4ae670.yaml diff --git a/releasenotes/notes/1.2/fix-isometry-rust-adf0eed09c6611f1.yaml b/releasenotes/notes/1.2/fix-isometry-rust-adf0eed09c6611f1.yaml deleted file mode 100644 index 4eeaa9aa3d7a..000000000000 --- a/releasenotes/notes/1.2/fix-isometry-rust-adf0eed09c6611f1.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fix a bug in :class:`~.library.Isometry` due to an unnecessary assertion, - that led to an error in :meth:`.UnitaryGate.control` - when :class:`~.library.UnitaryGate` had more that two qubits. diff --git a/releasenotes/notes/1.2/fix-kwarg-validation-BitArray-1bf542a1fb5c15c6.yaml b/releasenotes/notes/1.2/fix-kwarg-validation-BitArray-1bf542a1fb5c15c6.yaml index 41a0fc53261e..97316c622fa2 100644 --- a/releasenotes/notes/1.2/fix-kwarg-validation-BitArray-1bf542a1fb5c15c6.yaml +++ b/releasenotes/notes/1.2/fix-kwarg-validation-BitArray-1bf542a1fb5c15c6.yaml @@ -1,4 +1,5 @@ --- fixes: - | - The keyword argument ``order`` of the function :meth:`.BitArray.from_bool_array` should be 'little' or 'big'. Added checks to raise error if an invalid value is entered. + The keyword argument ``order`` of the function :meth:`.BitArray.from_bool_array` should be + ``"little"`` or ``"big"``. Added checks to raise error if an invalid value is entered. diff --git a/releasenotes/notes/1.2/fix-mcx-performance-de86bcc9f969b81e.yaml b/releasenotes/notes/1.2/fix-mcx-performance-de86bcc9f969b81e.yaml index 8cee3356ac4c..a31ea469ed11 100644 --- a/releasenotes/notes/1.2/fix-mcx-performance-de86bcc9f969b81e.yaml +++ b/releasenotes/notes/1.2/fix-mcx-performance-de86bcc9f969b81e.yaml @@ -2,5 +2,5 @@ fixes: - | Improve the decomposition of the gate generated by :meth:`.QuantumCircuit.mcx` - without using ancilla qubits, so that the number of :class:`.CXGate` will grow - quadratically in the number of qubits and not exponentially. + without using ancilla qubits, so that the number of :class:`.CXGate`\s will grow + quadratically in the number of qubits, as expected, and not exponentially. diff --git a/releasenotes/notes/1.2/fix-parameter-cache-05eac2f24477ccb8.yaml b/releasenotes/notes/1.2/fix-parameter-cache-05eac2f24477ccb8.yaml deleted file mode 100644 index 05ac759569f7..000000000000 --- a/releasenotes/notes/1.2/fix-parameter-cache-05eac2f24477ccb8.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - The :attr:`.QuantumCircuit.parameters` attribute will now correctly be empty - when using :meth:`.QuantumCircuit.copy_empty_like` on a parametric circuit. - Previously, an internal cache would be copied over without invalidation. - Fix `#12617 `__. diff --git a/releasenotes/notes/1.2/fix-qc-depth-0q-cdcc9aa14e237e68.yaml b/releasenotes/notes/1.2/fix-qc-depth-0q-cdcc9aa14e237e68.yaml deleted file mode 100644 index a0744b3dd89a..000000000000 --- a/releasenotes/notes/1.2/fix-qc-depth-0q-cdcc9aa14e237e68.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -fixes: - - | - :meth:`.QuantumCircuit.depth` will now correctly handle operations that - do not have operands, such as :class:`.GlobalPhaseGate`. - - | - :meth:`.QuantumCircuit.depth` will now count the variables and clbits - used in real-time expressions as part of the depth calculation. diff --git a/releasenotes/notes/1.2/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml b/releasenotes/notes/1.2/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml deleted file mode 100644 index d995af06bccb..000000000000 --- a/releasenotes/notes/1.2/fix-sk-load-from-file-02c6eabbbd7fcda3.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -fixes: - - | - Fix the :class:`.SolovayKitaev` transpiler pass when loading basic - approximations from an exising ``.npy`` file. Previously, loading - a stored approximation which allowed for further reductions (e.g. due - to gate cancellations) could cause a runtime failure. - Additionally, the global phase difference of the U(2) gate product - and SO(3) representation was lost during a save-reload procedure. - Fixes `Qiskit/qiskit#12576 `_. diff --git a/releasenotes/notes/1.2/fix-swap-router-layout-f28cf0a2de7976a8.yaml b/releasenotes/notes/1.2/fix-swap-router-layout-f28cf0a2de7976a8.yaml index 834d7986ab85..3d675388dc34 100644 --- a/releasenotes/notes/1.2/fix-swap-router-layout-f28cf0a2de7976a8.yaml +++ b/releasenotes/notes/1.2/fix-swap-router-layout-f28cf0a2de7976a8.yaml @@ -1,7 +1,8 @@ --- fixes: - | - Fixed an oversight in the :class:`.Commuting2qGateRouter` transpiler pass where the qreg permutations - were not added to the pass property set, so they would have to be tracked manually by the user. Now it's - possible to access the permutation through the output circuit's ``layout`` property and plug the pass - into any transpilation pipeline without loss of information. + Fixed an oversight in the :class:`.Commuting2qGateRouter` transpiler pass where the + quantum register permutations were not added to the pass property set, so they would have to be + tracked manually by the user. Now it is possible to access the permutation through the output + circuit's ``layout`` property and plug the pass into any transpilation pipeline without loss of + information. diff --git a/releasenotes/notes/1.2/fix-symbolic-unit-scaling-c3eb4d9be674dfd6.yaml b/releasenotes/notes/1.2/fix-symbolic-unit-scaling-c3eb4d9be674dfd6.yaml index 5ca00904a9ae..157a9af6c201 100644 --- a/releasenotes/notes/1.2/fix-symbolic-unit-scaling-c3eb4d9be674dfd6.yaml +++ b/releasenotes/notes/1.2/fix-symbolic-unit-scaling-c3eb4d9be674dfd6.yaml @@ -5,4 +5,5 @@ fixes: between seconds and nanoseconds. If the pulse was symbolically defined, an unnecessary floating-point error could be introduced by the scaling for certain builds of ``symengine``, which could manifest in unexpected - results once the symbols were fully bound. See `#12392 `__. + results once the symbols were fully bound. + Fixed `#12392 `__. diff --git a/releasenotes/notes/1.2/fix-v2-pulse-drawer-d05e4e392766909f.yaml b/releasenotes/notes/1.2/fix-v2-pulse-drawer-d05e4e392766909f.yaml deleted file mode 100644 index b158703c6b89..000000000000 --- a/releasenotes/notes/1.2/fix-v2-pulse-drawer-d05e4e392766909f.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed a bug in :func:`qiskit.visualization.pulse_v2.interface.draw` that didn't - draw pulse schedules when the draw function was called with a :class:`.BackendV2` argument. - Because the V2 backend doesn't report hardware channel frequencies, - the generated drawing will show 'no freq.' below each channel label. diff --git a/releasenotes/notes/1.2/fix-vf2-aer-a7306ce07ea81700.yaml b/releasenotes/notes/1.2/fix-vf2-aer-a7306ce07ea81700.yaml deleted file mode 100644 index 52ea96d0984b..000000000000 --- a/releasenotes/notes/1.2/fix-vf2-aer-a7306ce07ea81700.yaml +++ /dev/null @@ -1,4 +0,0 @@ -fixes: - - | - The :class:`.VF2Layout` pass would raise an exception when provided with a :class:`.Target` instance without connectivity constraints. - This would be the case with targets from Aer 0.13. The issue is now fixed. diff --git a/releasenotes/notes/1.2/fixes_GenericBackendV2-668e40596e1f070d.yaml b/releasenotes/notes/1.2/fixes_GenericBackendV2-668e40596e1f070d.yaml deleted file mode 100644 index 9d297125e3c2..000000000000 --- a/releasenotes/notes/1.2/fixes_GenericBackendV2-668e40596e1f070d.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -fixes: - - | - The constructor :class:`.GenericBackendV2` was allowing to create malformed backends because it accepted basis gates that couldn't be allocated in the backend size . That is, a backend with a single qubit should not accept a basis with two-qubit gates. diff --git a/releasenotes/notes/1.2/linear-binary-matrix-utils-rust-c48b5577749c34ab.yaml b/releasenotes/notes/1.2/linear-binary-matrix-utils-rust-c48b5577749c34ab.yaml deleted file mode 100644 index a8e9ec743808..000000000000 --- a/releasenotes/notes/1.2/linear-binary-matrix-utils-rust-c48b5577749c34ab.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -features_synthesis: - - | - Port internal binary matrix utils from Python to Rust, including - binary matrix multiplication, gaussian elimination, rank calculation, - binary matrix inversion, and random invertible binary matrix generation. - These functions are not part of the Qiskit API, and porting them to rust - improves the performance of certain synthesis methods. diff --git a/releasenotes/notes/1.2/mcxvchain_dirty_auxiliary-5ea4037557209f6e.yaml b/releasenotes/notes/1.2/mcxvchain_dirty_auxiliary-5ea4037557209f6e.yaml index 7a4850370f7f..3230159c9365 100644 --- a/releasenotes/notes/1.2/mcxvchain_dirty_auxiliary-5ea4037557209f6e.yaml +++ b/releasenotes/notes/1.2/mcxvchain_dirty_auxiliary-5ea4037557209f6e.yaml @@ -1,10 +1,10 @@ --- -features: +features_synthesis: - | :class:`.MCXVChain` has two new Boolean parameters `relative_phase` and `action_only`. - If `action_only` the circuit does not clean the dirty qubits. If `relative_phase` - the gate is implemented up to a global phase. Both parameters are used to optimize the - decomposition of MCXVChain. -fixes: + If ``action_only`` is ``True`` the circuit does not clean the dirty qubits. If ``relative_phase`` + is ``True`` the gate is implemented up to a global phase. Both parameters are used to optimize the + decomposition of :class:`.MCXVChain`. - | - :class:`.MCXVChain` with k controls and k-2 dirty auxiliary qubits now requires 8k-6 cx gates. + :class:`.MCXVChain` with :math:`k` controls and :math:`k-2` dirty auxiliary qubits now + requires :math:`8k-6` CX gates. diff --git a/releasenotes/notes/1.2/outcome_bitstring_target_for_probabilities_dict-e53f524d115bbcfc.yaml b/releasenotes/notes/1.2/outcome_bitstring_target_for_probabilities_dict-e53f524d115bbcfc.yaml index d0466b8f75d8..22c82c3276f4 100644 --- a/releasenotes/notes/1.2/outcome_bitstring_target_for_probabilities_dict-e53f524d115bbcfc.yaml +++ b/releasenotes/notes/1.2/outcome_bitstring_target_for_probabilities_dict-e53f524d115bbcfc.yaml @@ -2,10 +2,10 @@ features: - | The :class:`.StabilizerState` class now has a new method - :meth:`~.StabilizerState.probabilities_dict_from_bitstring` allowing the + :meth:`.StabilizerState.probabilities_dict_from_bitstring` allowing the user to pass single bitstring to measure an outcome for. Previouslly the - :meth:`~.StabilizerState.probabilities_dict` would be utilized and would - at worst case calculate (2^n) number of probability calculations (depending + :meth:`.StabilizerState.probabilities_dict` would be utilized and would + at worst case calculate (:math:`2^n`) number of probability calculations (depending on the state), even if a user wanted a single result. With this new method the user can calculate just the single outcome bitstring value a user passes to measure the probability for. As the number of qubits increases, the more diff --git a/releasenotes/notes/1.2/oxidize-pmh-ec74e4002510eaad.yaml b/releasenotes/notes/1.2/oxidize-pmh-ec74e4002510eaad.yaml index b25adbec21f9..3be852142236 100644 --- a/releasenotes/notes/1.2/oxidize-pmh-ec74e4002510eaad.yaml +++ b/releasenotes/notes/1.2/oxidize-pmh-ec74e4002510eaad.yaml @@ -1,17 +1,17 @@ --- features_synthesis: - | - Port :func:`.synth_cnot_full_pmh`, used to synthesize a linear function + Port :func:`.synth_cnot_count_full_pmh`, used to synthesize a linear function into a CX network, to Rust. This produces approximately 44x speedup, as measured on 100 qubit circuits. - | - The function :func:`.synth_cnot_full_pmh` now allows choosing the + The function :func:`.synth_cnot_count_full_pmh` now allows choosing the (heuristically) optimal ``section_size`` by setting it to ``None``. Then, a value is chosen which attempts to minimize the upper bound on the number of CX gates, that is :math:`\alpha \log_2(n)` where :math:`n` is the number of qubits and :math:`\alpha \approx 0.56`. fixes: - | - Fixed a bug in :func:`.synth_cnot_full_pmh` where providing a ``section_size`` that did + Fixed a bug in :func:`.synth_cnot_count_full_pmh` where providing a ``section_size`` that did not divide the number of qubits without remainder could lead to wrong results. Now any ``section_size`` (at most equal to the number of qubits) synthesizes the correct circuit. For a (heuristically) optimal value, set ``section_size=None``. diff --git a/releasenotes/notes/1.2/parameterexpression-hash-d2593ab1715aa42c.yaml b/releasenotes/notes/1.2/parameterexpression-hash-d2593ab1715aa42c.yaml deleted file mode 100644 index 075de45b3b23..000000000000 --- a/releasenotes/notes/1.2/parameterexpression-hash-d2593ab1715aa42c.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -fixes: - - | - :class:`.ParameterExpression` was updated so that fully bound instances - that compare equal to instances of Python's built-in numeric types (like - ``float`` and ``int``) also have hash values that match those of the other - instances. This change ensures that these types can be used interchangeably - as dictionary keys. See `#12488 `__. diff --git a/releasenotes/notes/peephole-before-routing-c3d184b740bb7a8b.yaml b/releasenotes/notes/1.2/peephole-before-routing-c3d184b740bb7a8b.yaml similarity index 52% rename from releasenotes/notes/peephole-before-routing-c3d184b740bb7a8b.yaml rename to releasenotes/notes/1.2/peephole-before-routing-c3d184b740bb7a8b.yaml index b89a622987d0..4ce8f1c317f9 100644 --- a/releasenotes/notes/peephole-before-routing-c3d184b740bb7a8b.yaml +++ b/releasenotes/notes/1.2/peephole-before-routing-c3d184b740bb7a8b.yaml @@ -2,19 +2,26 @@ features_transpiler: - | Added a new pass :class:`.Split2QUnitaries` that iterates over all two-qubit gates or unitaries in a - circuit and replaces them with two single-qubit unitaries, if possible without introducing errors, i.e. - the two-qubit gate/unitary is actually a (kronecker) product of single-qubit unitaries. + circuit and replaces them with two single-qubit unitaries, if possible without introducing errors, i.e., + the two-qubit gate/unitary is actually a tensor product of single-qubit unitaries. - | The passes :class:`.Collect2qBlocks`, :class:`.ConsolidateBlocks` and :class:`.Split2QUnitaries` have been added to the ``init`` stage of the preset pass managers with optimization level 2 and optimization level 3. - The modification of the `init` stage should allow for a more efficient routing for quantum circuits that either: + The modification of the ``init`` stage should allow for a more efficient routing for quantum circuits that either: - * contain two-qubit unitaries/gates that are actually a product of single-qubit gates + * contain two-qubit unitaries/gates that are actually a product of single-qubit gates, or * contain multiple two-qubit gates in a continuous block of two-qubit gates. In the former case, the routing of the two-qubit gate can simply be skipped as no real interaction between a pair of qubits occurs. In the latter case, the lookahead space of routing algorithms is not - 'polluted' by superfluous two-qubit gates, i.e. for routing it is sufficient to only consider one single + 'polluted' by superfluous two-qubit gates, i.e., for routing it is sufficient to only consider one single two-qubit gate per continuous block of two-qubit gates. These passes are not run if the pass - managers target a :class:`.Target` that has a discrete basis gate set, i.e. all basis gates have are not + managers target a :class:`.Target` that has a discrete basis gate set, i.e., all basis gates have are not parameterized. +upgrade_transpiler: + - | + Optimization levels 2 and 3 now additionally employ peephole optimization is now employed + **before** the translation/synthesis stage (previously this was only done in the optimization + stage). The effects of peephole optimization include the removal of gates that are very close to + the identity, for example, controlled-phase gates with a rotational angle smaller than + :math:`2\pi \otimes 2^{-25}`. diff --git a/releasenotes/notes/1.2/plot-circuit-layout-5935646107893c12.yaml b/releasenotes/notes/1.2/plot-circuit-layout-5935646107893c12.yaml index 72f2c95962a5..06b2c826324c 100644 --- a/releasenotes/notes/1.2/plot-circuit-layout-5935646107893c12.yaml +++ b/releasenotes/notes/1.2/plot-circuit-layout-5935646107893c12.yaml @@ -1,5 +1,5 @@ --- fixes: - | - Fixed a bug in :func:`plot_coupling_map` that caused the edges of the coupling map to be colored incorrectly. - See https://github.com/Qiskit/qiskit/pull/12369 for details. + Fixed a bug in :func:`.plot_coupling_map` that caused the edges of the coupling map to be colored incorrectly. + Fixed `#12354 `__. diff --git a/releasenotes/notes/1.2/port_star_prerouting-13fae3ff78feb5e3.yaml b/releasenotes/notes/1.2/port_star_prerouting-13fae3ff78feb5e3.yaml index f8eca807bec6..818423cbd9dc 100644 --- a/releasenotes/notes/1.2/port_star_prerouting-13fae3ff78feb5e3.yaml +++ b/releasenotes/notes/1.2/port_star_prerouting-13fae3ff78feb5e3.yaml @@ -1,11 +1,5 @@ --- features_transpiler: - - | - Port part of the logic from the :class:`StarPrerouting`, used to - find a star graph connectivity subcircuit and replaces it with a - linear routing equivalent. - | - The function :func:`star_preroute` now performs the heavily lifting - to transform the dag by in the rust space by taking advantage - of the functions :func:`_build_sabre_dag` and - :func:`_apply_sabre_result`. + The performance of :class:`.StarPreRouting`, used to find a star graph connectivity + subcircuit, is improved by performing the heavy lifting in Rust space. diff --git a/releasenotes/notes/1.2/prepare-1.2.0-b19149907f9aae29.yaml b/releasenotes/notes/1.2/prepare-1.2.0-b19149907f9aae29.yaml new file mode 100644 index 000000000000..7e73596b110a --- /dev/null +++ b/releasenotes/notes/1.2/prepare-1.2.0-b19149907f9aae29.yaml @@ -0,0 +1,23 @@ +--- +prelude: > + The Qiskit 1.2.0 release focuses mainly on improving performance + and quality of the compiler. Also, it is the last release supporting + Python 3.8. In Qiskit 1.3.0 the minimal required Python version + will be 3.9. + + Among a wide range of new features, improvements, and fixes, the release highlights are: + + * The circuit infrastructure, including gates and operations, is moved + to Rust. This enables a series of speedups in circuit construction + and circuit manipulation. + + * Leveraging the above point, parts of the synthesis library are now + constructing circuits in Rust. This produces a significant speedup + when synthesizing operations such as Cliffords, permutations, or linear functions. + As example, decomposing 50+ qubit Cliffords benefit from an + approximate 1000-fold speedup in runtime. + + * The quality of compiled circuits is improved by optimizing with a unitary peephole + optimization at the initial stage of the transpilation workflow (at optimization level + ``>1``), and by using a dense layout as a Sabre layouting trial (at optimization level ``>0``). + diff --git a/releasenotes/notes/1.2/product-formula-improvements-1bc40650151cf107.yaml b/releasenotes/notes/1.2/product-formula-improvements-1bc40650151cf107.yaml index fc9713e7a436..a01d763e9458 100644 --- a/releasenotes/notes/1.2/product-formula-improvements-1bc40650151cf107.yaml +++ b/releasenotes/notes/1.2/product-formula-improvements-1bc40650151cf107.yaml @@ -2,14 +2,13 @@ features_circuits: - | Added the ``insert_barriers`` keyword argument to the - :meth:`~.QuantumCircuit.repeat` method. Setting it to ``True`` will insert + :meth:`.QuantumCircuit.repeat` method. Setting it to ``True`` will insert barriers between circuit repetitions. features_synthesis: - | Added the ``wrap`` keyword argument to the :class:`.ProductFormula` classes which (when enabled) wraps individual Pauli evolution terms. This can be useful when visualizing circuits. -upgrade_synthesis: - | The ``atomic_evolution`` argument to :class:`.ProductFormula` (and its subclasses) has a new function signature. Rather than taking some Pauli @@ -17,9 +16,10 @@ upgrade_synthesis: function takes in an existing circuit and should append the evolution of the provided Pauli and given time to this circuit. This new implementation benefits from significantly better performance. +upgrade_synthesis: - | :class:`.LieTrotter` and :class:`.SuzukiTrotter` no longer wrap the individually evolved Pauli terms into gate definitions. If you rely on a certain decomposition level of your circuit, you have to remove one level of - :meth:`~.QuantumCircuit.decompose` or add the ``wrap=True`` keyword argument + :meth:`.QuantumCircuit.decompose` or add the ``wrap=True`` keyword argument to your synthesis object. diff --git a/releasenotes/notes/1.2/qasm2-big-condition-cfd203d53540d4ca.yaml b/releasenotes/notes/1.2/qasm2-big-condition-cfd203d53540d4ca.yaml deleted file mode 100644 index a5863cae2310..000000000000 --- a/releasenotes/notes/1.2/qasm2-big-condition-cfd203d53540d4ca.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - The OpenQASM 2 parser (:mod:`qiskit.qasm2`) can now handle conditionals - with integers that do not fit within a 64-bit integer. Fixed - `#12773 `__. diff --git a/releasenotes/notes/1.2/qasm2-to-matrix-c707fe1e61b3987f.yaml b/releasenotes/notes/1.2/qasm2-to-matrix-c707fe1e61b3987f.yaml deleted file mode 100644 index 84cfd1a1d351..000000000000 --- a/releasenotes/notes/1.2/qasm2-to-matrix-c707fe1e61b3987f.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -fixes: - - | - Custom gates (those stemming from a ``gate`` statement) in imported OpenQASM 2 programs will now - have an :meth:`.Gate.to_matrix` implementation. Previously they would have no matrix definition, - meaning that roundtrips through OpenQASM 2 could needlessly lose the ability to derive the gate - matrix. Note, though, that the matrix is calculated by recursively finding the matrices of the - inner gate definitions, as :class:`.Operator` does, which might be less performant than before - the round-trip. diff --git a/releasenotes/notes/1.2/qasm3-basis-gates-keyword-c5998bff1e178715.yaml b/releasenotes/notes/1.2/qasm3-basis-gates-keyword-c5998bff1e178715.yaml new file mode 100644 index 000000000000..0c4fcc251e54 --- /dev/null +++ b/releasenotes/notes/1.2/qasm3-basis-gates-keyword-c5998bff1e178715.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + The OpenQASM 3 exporter (see :mod:`qiskit.qasm3`) will now correctly error when asked to use a + keyword or other invalid identifier as a "basis gate", as it has no way of generating correct + output in these cases. diff --git a/releasenotes/notes/1.2/raise-on-illegal-replace-block-50cef8da757a580a.yaml b/releasenotes/notes/1.2/raise-on-illegal-replace-block-50cef8da757a580a.yaml deleted file mode 100644 index f4971fe520a0..000000000000 --- a/releasenotes/notes/1.2/raise-on-illegal-replace-block-50cef8da757a580a.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Previously, :meth:`.DAGCircuit.replace_block_with_op` allowed to place an - ``n``-qubit operation onto a block of ``m`` qubits, leaving the DAG in an - invalid state. This behavior has been fixed, and the attempt will raise - a :class:`.DAGCircuitError`. diff --git a/releasenotes/notes/1.2/storage-var-a00a33fcf9a71f3f.yaml b/releasenotes/notes/1.2/storage-var-a00a33fcf9a71f3f.yaml deleted file mode 100644 index b3b18be2fc1a..000000000000 --- a/releasenotes/notes/1.2/storage-var-a00a33fcf9a71f3f.yaml +++ /dev/null @@ -1,122 +0,0 @@ ---- -features_circuits: - - | - :class:`.QuantumCircuit` has several new methods to work with and inspect manual :class:`.Var` - variables. - - See :ref:`circuit-real-time-methods` for more in-depth discussion on all of these. - - The new methods are: - - * :meth:`~.QuantumCircuit.add_var` - * :meth:`~.QuantumCircuit.add_input` - * :meth:`~.QuantumCircuit.add_capture` - * :meth:`~.QuantumCircuit.add_uninitialized_var` - * :meth:`~.QuantumCircuit.get_var` - * :meth:`~.QuantumCircuit.has_var` - * :meth:`~.QuantumCircuit.iter_vars` - * :meth:`~.QuantumCircuit.iter_declared_vars` - * :meth:`~.QuantumCircuit.iter_captured_vars` - * :meth:`~.QuantumCircuit.iter_input_vars` - * :meth:`~.QuantumCircuit.store` - - In addition, there are several new dynamic attributes on :class:`.QuantumCircuit` surrounding - these variables: - - * :attr:`~.QuantumCircuit.num_vars` - * :attr:`~.QuantumCircuit.num_input_vars` - * :attr:`~.QuantumCircuit.num_captured_vars` - * :attr:`~.QuantumCircuit.num_declared_vars` - - | - :class:`.ControlFlowOp` and its subclasses now have a :meth:`~.ControlFlowOp.iter_captured_vars` - method, which will return an iterator over the unique variables captured in any of its immediate - blocks. - - | - :class:`.DAGCircuit` has several new methods to work with and inspect manual :class:`.Var` - variables. These are largely equivalent to their :class:`.QuantumCircuit` counterparts, except - that the :class:`.DAGCircuit` ones are optimized for programmatic access with already defined - objects, while the :class:`.QuantumCircuit` methods are more focussed on interactive human use. - - The new methods are: - - * :meth:`~.DAGCircuit.add_input_var` - * :meth:`~.DAGCircuit.add_captured_var` - * :meth:`~.DAGCircuit.add_declared_var` - * :meth:`~.DAGCircuit.has_var` - * :meth:`~.DAGCircuit.iter_vars` - * :meth:`~.DAGCircuit.iter_declared_vars` - * :meth:`~.DAGCircuit.iter_captured_vars` - * :meth:`~.DAGCircuit.iter_input_vars` - - There are also new public attributes: - - * :attr:`~.DAGCircuit.num_vars` - * :attr:`~.DAGCircuit.num_input_vars` - * :attr:`~.DAGCircuit.num_captured_vars` - * :attr:`~.DAGCircuit.num_declared_vars` - - | - :attr:`.DAGCircuit.wires` will now also contain any :class:`.Var` manual variables in the - circuit as well, as these are also classical data flow. - - | - A new method, :meth:`.Var.new`, is added to manually construct a real-time classical variable - that owns its memory. - - | - :meth:`.QuantumCircuit.compose` has two need keyword arguments, ``var_remap`` and ``inline_captures`` - to better support real-time classical variables. - - ``var_remap`` can be used to rewrite :class:`.Var` nodes in the circuit argument as its - instructions are inlined onto the base circuit. This can be used to avoid naming conflicts. - - ``inline_captures`` can be set to ``True`` (defaults to ``False``) to link all :class:`.Var` - nodes tracked as "captures" in the argument circuit with the same :class:`.Var` nodes in the - base circuit, without attempting to redeclare the variables. This can be used, in combination - with :meth:`.QuantumCircuit.copy_empty_like`'s ``vars_mode="captures"`` handling, to build up - a circuit layer by layer, containing variables. - - | - :meth:`.DAGCircuit.compose` has a new keyword argument, ``inline_captures``, which can be set to - ``True`` to inline "captured" :class:`.Var` nodes on the argument circuit onto the base circuit - without redeclaring them. In conjunction with the ``vars_mode="captures"`` option to several - :class:`.DAGCircuit` methods, this can be used to combine DAGs that operate on the same variables. - - | - :meth:`.QuantumCircuit.copy_empty_like` and :meth:`.DAGCircuit.copy_empty_like` have a new - keyword argument, ``vars_mode`` which controls how any memory-owning :class:`.Var` nodes are - tracked in the output. By default (``"alike"``), the variables are declared in the same - input/captured/local mode as the source. This can be set to ``"captures"`` to convert all - variables to captures (useful with :meth:`~.QuantumCircuit.compose`) or ``"drop"`` to remove - them. - - | - A new ``vars_mode`` keyword argument has been added to the :class:`.DAGCircuit` methods: - - * :meth:`~.DAGCircuit.separable_circuits` - * :meth:`~.DAGCircuit.layers` - * :meth:`~.DAGCircuit.serial_layers` - - which has the same meaning as it does for :meth:`~.DAGCircuit.copy_empty_like`. -features_qasm: - - | - The OpenQASM 3 exporter supports manual-storage :class:`.Var` nodes on circuits. -features_qpy: - - | - QPY (:mod:`qiskit.qpy`) format version 12 has been added, which includes support for memory-owning - :class:`.Var` variables. See :ref:`qpy_version_12` for more detail on the format changes. -features_visualization: - - | - The text and `Matplotlib `__ circuit drawers (:meth:`.QuantumCircuit.draw`) - have minimal support for displaying expressions involving manual real-time variables. The - :class:`.Store` operation and the variable initializations are not yet supported; for large-scale - dynamic circuits, we recommend using the OpenQASM 3 export capabilities (:func:`.qasm3.dumps`) to - get a textual representation of a circuit. -upgrade_qpy: - - | - The value of :attr:`qiskit.qpy.QPY_VERSION` is now 12. :attr:`.QPY_COMPATIBILITY_VERSION` is - unchanged at 10. -upgrade_providers: - - | - Implementations of :class:`.BackendV2` (and :class:`.BackendV1`) may desire to update their - :meth:`~.BackendV2.run` methods to eagerly reject inputs containing typed - classical variables (see :mod:`qiskit.circuit.classical`) and the :class:`.Store` instruction, - if they do not have support for them. The new :class:`.Store` instruction is treated by the - transpiler as an always-available "directive" (like :class:`.Barrier`); if your backends do not - support this won't be caught by the :mod:`~qiskit.transpiler`. - - See :ref:`providers-guide-real-time-variables` for more information. diff --git a/releasenotes/notes/1.2/synth_permutation_depth_lnn_kms-c444f3a363f3a903.yaml b/releasenotes/notes/1.2/synth_permutation_depth_lnn_kms-c444f3a363f3a903.yaml index 65f81686cd33..1bf9b091adca 100644 --- a/releasenotes/notes/1.2/synth_permutation_depth_lnn_kms-c444f3a363f3a903.yaml +++ b/releasenotes/notes/1.2/synth_permutation_depth_lnn_kms-c444f3a363f3a903.yaml @@ -1,4 +1,5 @@ --- features_synthesis: - | - Port :func:`.synth_permutation_depth_lnn_kms`, used to synthesize permutations for linear connectivity, to Rust. \ No newline at end of file + Improved the performance of :func:`.synth_permutation_depth_lnn_kms`, used to synthesize + permutations for linear connectivity, by porting it to Rust. \ No newline at end of file diff --git a/releasenotes/notes/1.2/target-has-calibration-no-properties-f3be18f2d58f330a.yaml b/releasenotes/notes/1.2/target-has-calibration-no-properties-f3be18f2d58f330a.yaml deleted file mode 100644 index 07970679722d..000000000000 --- a/releasenotes/notes/1.2/target-has-calibration-no-properties-f3be18f2d58f330a.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - :meth:`.Target.has_calibration` has been updated so that it does not raise - an exception for an instruction that has been added to the target with - ``None`` for its instruction properties. Fixes - `#12525 `__. diff --git a/releasenotes/notes/1.2/update-primitive-v2-metadata-cf1226e2d6477688.yaml b/releasenotes/notes/1.2/update-primitive-v2-metadata-cf1226e2d6477688.yaml index 570f5211b080..a3ceb86dbcda 100644 --- a/releasenotes/notes/1.2/update-primitive-v2-metadata-cf1226e2d6477688.yaml +++ b/releasenotes/notes/1.2/update-primitive-v2-metadata-cf1226e2d6477688.yaml @@ -9,5 +9,5 @@ features_primitives: * ``shots`` is added for :class:`.BackendSamplerV2` and :class:`.BackendEstimatorV2` * ``precision`` is renamed with ``target_precision`` for :class:`.StatevectorEstimator` - Note that metadata of :class:`.StatevectorEstimator` does not have ``shots`` because + Note that the metadata of :class:`.StatevectorEstimator` does not have ``shots`` because the class computes expectation values with :class:`.Statevector` and shots are not used. diff --git a/releasenotes/notes/1.2/workaroud_12361-994d0ac2d2a6ed41.yaml b/releasenotes/notes/1.2/workaroud_12361-994d0ac2d2a6ed41.yaml index 9c19be117ed2..3cc285c55176 100644 --- a/releasenotes/notes/1.2/workaroud_12361-994d0ac2d2a6ed41.yaml +++ b/releasenotes/notes/1.2/workaroud_12361-994d0ac2d2a6ed41.yaml @@ -11,4 +11,4 @@ features_visualization: [default] circuit_idle_wires = false - will change the default to display the bits in reverse order. + will change the default to not display idle wires. diff --git a/releasenotes/notes/backendv1-d0d0642ed38fed3c.yaml b/releasenotes/notes/backendv1-d0d0642ed38fed3c.yaml deleted file mode 100644 index 3b19a7ab9a2c..000000000000 --- a/releasenotes/notes/backendv1-d0d0642ed38fed3c.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -deprecations_providers: - - | - The :class:`.BackendV1` class is deprecated and it will be removed not earlier than the next major release. - There are several migration paths available depending on the main purpose of the backend object:: - - - To expose backend information with no access to execution (just a hardware description), consider constructing a :class:`.Target` directly. - - To provides access to execution capabilities, consider relying on the primitives interfaces instead. - - Alternatively, to continue providing simultaneous :class:`.Target` (hardware information) and ``run`` (execution) capabilities, consider moving to :class:`.BackendV2` (see ). - - - | - The models in :mod:`qiskit.providers.models` are part of the deprecated :class:`.BackendV1` workflow - and no longer necessary for :class:`.BackendV2`. If a user workflow requires these representations it - likely relies on deprecated functionality and should be updated to use :class:`.BackendV2`. diff --git a/releasenotes/notes/fix-var-wires-4ebc40e0b19df253.yaml b/releasenotes/notes/fix-var-wires-4ebc40e0b19df253.yaml deleted file mode 100644 index 7cd1e74806b0..000000000000 --- a/releasenotes/notes/fix-var-wires-4ebc40e0b19df253.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -fixes: - - | - Fixed an issue with :func:`.dag_drawer` and :meth:`.DAGCircuit.draw` - when attempting to visualize a :class:`.DAGCircuit` instance that contained - :class:`.Var` wires. The visualizer would raise an exception trying to - do this which has been fixed so the expected visualization will be - generated. diff --git a/releasenotes/notes/qasm3-basis-gates-keyword-c5998bff1e178715.yaml b/releasenotes/notes/qasm3-basis-gates-keyword-c5998bff1e178715.yaml deleted file mode 100644 index 82347fd920fc..000000000000 --- a/releasenotes/notes/qasm3-basis-gates-keyword-c5998bff1e178715.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - The OpenQASM 3 exporter will now correctly error when asked to use a keyword or other invalid - identifier as a "basis gate", as it has no way of putting out correct output in these cases.