From 0dc3bfea3719f391ffdc100fa77317c39f32fd97 Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Thu, 16 Mar 2023 18:09:29 -0400 Subject: [PATCH 1/6] Bump version numbers to 0.23.3. --- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/conf.py | 2 +- qiskit/VERSION.txt | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f22a7ae860c4..7877fab3ea25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -413,7 +413,7 @@ dependencies = [ [[package]] name = "qiskit-terra" -version = "0.23.2" +version = "0.23.3" dependencies = [ "ahash 0.8.0", "hashbrown 0.12.3", diff --git a/Cargo.toml b/Cargo.toml index a92d930cb7a1..1bf410c83151 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "qiskit-terra" -version = "0.23.2" +version = "0.23.3" edition = "2021" rust-version = "1.56.1" diff --git a/docs/conf.py b/docs/conf.py index c603ef509630..9041bae1e194 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,7 @@ # The short X.Y version version = "0.23" # The full version, including alpha/beta/rc tags -release = "0.23.2" +release = "0.23.3" extensions = [ "sphinx.ext.napoleon", diff --git a/qiskit/VERSION.txt b/qiskit/VERSION.txt index fda96dcf6304..9e40e75c5d2a 100644 --- a/qiskit/VERSION.txt +++ b/qiskit/VERSION.txt @@ -1 +1 @@ -0.23.2 +0.23.3 diff --git a/setup.py b/setup.py index bd35824ff619..8ee23136113f 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ setup( name="qiskit-terra", - version="0.23.2", + version="0.23.3", description="Software for developing quantum computing programs", long_description=README, long_description_content_type="text/markdown", From 5d8a603b20bf260c3d82e39c6747b067efe17415 Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Fri, 17 Mar 2023 16:26:57 -0400 Subject: [PATCH 2/6] Fix broken links. --- .../notes/fix-bound-pm-backend-primitives-98fd11c5e852501c.yaml | 2 +- .../notes/fix-memory-commutation-checker-dbb441de68706b6f.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/releasenotes/notes/fix-bound-pm-backend-primitives-98fd11c5e852501c.yaml b/releasenotes/notes/fix-bound-pm-backend-primitives-98fd11c5e852501c.yaml index 4197e41be561..ca9eb6b9b2f5 100644 --- a/releasenotes/notes/fix-bound-pm-backend-primitives-98fd11c5e852501c.yaml +++ b/releasenotes/notes/fix-bound-pm-backend-primitives-98fd11c5e852501c.yaml @@ -1,7 +1,7 @@ --- fixes: - | - Fixed the :class:`.BackendSampler` and :class:`.BackendExtimator` to run successfully + Fixed the :class:`.BackendSampler` and :class:`.BackendEstimator` to run successfully with a custom ``bound_pass_manager``. Previously, the execution for single circuits with a ``bound_pass_manager`` would raise a ``ValueError`` because a list was not returned in one of the steps. diff --git a/releasenotes/notes/fix-memory-commutation-checker-dbb441de68706b6f.yaml b/releasenotes/notes/fix-memory-commutation-checker-dbb441de68706b6f.yaml index dee3704aae08..cd30d7693edb 100644 --- a/releasenotes/notes/fix-memory-commutation-checker-dbb441de68706b6f.yaml +++ b/releasenotes/notes/fix-memory-commutation-checker-dbb441de68706b6f.yaml @@ -1,7 +1,7 @@ --- fixes: - | - Fixed an issue with the :class:`~.CommutationChecker` class where it would + Fixed an issue with the :class:`.CommutationChecker` class where it would attempt to internally allocate an array for :math:`2^{n}` qubits when it only needed an array to represent :math:`n` qubits. This could cause an excessive amount of memory for wide gates, for example a 4 qubit From 55d24ff738d245d191e21f202c9668564c6903da Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Mon, 20 Mar 2023 11:58:05 -0400 Subject: [PATCH 3/6] Fix docs for CommutationChecker. --- qiskit/circuit/__init__.py | 8 ++++++++ qiskit/circuit/commutation_checker.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qiskit/circuit/__init__.py b/qiskit/circuit/__init__.py index 7da3bf2d41e6..1b88276a3fd2 100644 --- a/qiskit/circuit/__init__.py +++ b/qiskit/circuit/__init__.py @@ -308,6 +308,14 @@ :toctree: ../stubs/ random.random_circuit + +Commutation Utilities +--------------------- + +.. autosummary:: + :toctree: ../stubs/ + + CommutationChecker """ from .quantumcircuit import QuantumCircuit from .classicalregister import ClassicalRegister, Clbit diff --git a/qiskit/circuit/commutation_checker.py b/qiskit/circuit/commutation_checker.py index 2a809bf7e348..54f423a8cea1 100644 --- a/qiskit/circuit/commutation_checker.py +++ b/qiskit/circuit/commutation_checker.py @@ -29,7 +29,9 @@ def _identity_op(num_qubits): class CommutationChecker: - """This code is essentially copy-pasted from commutative_analysis.py. + """Checks if two Operations commute. + + This code is essentially copy-pasted from commutative_analysis.py. This code cleverly hashes commutativity and non-commutativity results between DAG nodes and seems quite efficient for large Clifford circuits. They may be other possible efficiency improvements: using rule-based commutativity analysis, From 72ebda6882b6129a6b79bf13d57a5e3626d8a3f4 Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Mon, 20 Mar 2023 16:59:23 -0400 Subject: [PATCH 4/6] Move impl comment from docstring to comment. --- qiskit/circuit/commutation_checker.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/qiskit/circuit/commutation_checker.py b/qiskit/circuit/commutation_checker.py index 54f423a8cea1..c4fc142d2234 100644 --- a/qiskit/circuit/commutation_checker.py +++ b/qiskit/circuit/commutation_checker.py @@ -28,15 +28,13 @@ def _identity_op(num_qubits): ) +# This code is essentially copy-pasted from commutative_analysis.py. +# This code cleverly hashes commutativity and non-commutativity results between DAG nodes and seems +# quite efficient for large Clifford circuits. +# They may be other possible efficiency improvements: using rule-based commutativity analysis, +# evicting from the cache less useful entries, etc. class CommutationChecker: - """Checks if two Operations commute. - - This code is essentially copy-pasted from commutative_analysis.py. - This code cleverly hashes commutativity and non-commutativity results between DAG nodes and seems - quite efficient for large Clifford circuits. - They may be other possible efficiency improvements: using rule-based commutativity analysis, - evicting from the cache less useful entries, etc. - """ + """Checks if two Operations commute.""" def __init__(self): super().__init__() From c9debf770e41570195511220c84e487c2746808c Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Mon, 20 Mar 2023 20:57:36 -0400 Subject: [PATCH 5/6] Add prelude. --- releasenotes/notes/prepare-0.23.3-bf51a905756c4876.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 releasenotes/notes/prepare-0.23.3-bf51a905756c4876.yaml diff --git a/releasenotes/notes/prepare-0.23.3-bf51a905756c4876.yaml b/releasenotes/notes/prepare-0.23.3-bf51a905756c4876.yaml new file mode 100644 index 000000000000..13e13d2de2ae --- /dev/null +++ b/releasenotes/notes/prepare-0.23.3-bf51a905756c4876.yaml @@ -0,0 +1,3 @@ +--- +prelude: > + Qiskit Terra 0.23.3 is a minor bugfix release. From 995822f953c919d8c66e8d86892a0a5f7b5b8c0e Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Tue, 21 Mar 2023 11:04:38 -0400 Subject: [PATCH 6/6] Additional doc fixes. --- qiskit/quantum_info/__init__.py | 3 ++- qiskit/quantum_info/states/__init__.py | 1 + ...piler-optimize-1q-decomposition-score-e79ea05c3cf1b6fa.yaml | 2 +- .../clip-quantumstate-probabilities-5c9ce05ffa699a63.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qiskit/quantum_info/__init__.py b/qiskit/quantum_info/__init__.py index 45a8d46e4765..43a30805b548 100644 --- a/qiskit/quantum_info/__init__.py +++ b/qiskit/quantum_info/__init__.py @@ -42,6 +42,7 @@ Statevector DensityMatrix StabilizerState + QuantumState Channels ======== @@ -128,7 +129,7 @@ from .operators.measures import process_fidelity, average_gate_fidelity, gate_error, diamond_norm from .operators.dihedral import CNOTDihedral -from .states import Statevector, DensityMatrix, StabilizerState +from .states import Statevector, DensityMatrix, StabilizerState, QuantumState from .states import ( partial_trace, state_fidelity, diff --git a/qiskit/quantum_info/states/__init__.py b/qiskit/quantum_info/states/__init__.py index 1e49ee353b7b..5d865db68a93 100644 --- a/qiskit/quantum_info/states/__init__.py +++ b/qiskit/quantum_info/states/__init__.py @@ -14,6 +14,7 @@ from .statevector import Statevector from .stabilizerstate import StabilizerState +from .quantum_state import QuantumState from .densitymatrix import DensityMatrix from .utils import partial_trace, shannon_entropy from .measures import ( diff --git a/releasenotes/notes/0.23/fix-transpiler-optimize-1q-decomposition-score-e79ea05c3cf1b6fa.yaml b/releasenotes/notes/0.23/fix-transpiler-optimize-1q-decomposition-score-e79ea05c3cf1b6fa.yaml index fb392da2e216..c42b7a6a7f9a 100644 --- a/releasenotes/notes/0.23/fix-transpiler-optimize-1q-decomposition-score-e79ea05c3cf1b6fa.yaml +++ b/releasenotes/notes/0.23/fix-transpiler-optimize-1q-decomposition-score-e79ea05c3cf1b6fa.yaml @@ -1,6 +1,6 @@ --- fixes: - | - Fixes a bug in the :class:`Optimize1qGatesDecomposition` transformation pass + Fixes a bug in the :class:`.Optimize1qGatesDecomposition` transformation pass where the score for substitutions was wrongly calculated when the gate errors are zero. diff --git a/releasenotes/notes/clip-quantumstate-probabilities-5c9ce05ffa699a63.yaml b/releasenotes/notes/clip-quantumstate-probabilities-5c9ce05ffa699a63.yaml index 0ba63168064a..aa9b8faed532 100644 --- a/releasenotes/notes/clip-quantumstate-probabilities-5c9ce05ffa699a63.yaml +++ b/releasenotes/notes/clip-quantumstate-probabilities-5c9ce05ffa699a63.yaml @@ -4,5 +4,5 @@ fixes: Clip probabilities in the :meth:`.QuantumState.probabilities` and :meth:`.QuantumState.probabilities_dict` methods to the interval ``[0, 1]``. This fixes roundoff errors where probabilities could e.g. be larger than 1, leading - to errors in the shot emulation of the :class:`.Sampler`. + to errors in the shot emulation of the sampler. Fixed `#9761 `__.