From 357983ec8763478bdad424abfeb80ee46105e382 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Thu, 23 Nov 2023 16:39:18 +0100 Subject: [PATCH] Remove deprecated `IntegerComparator.num_ancilla_qubits` (#11306) * remove deprecated IntegerComparator.num_ancilla_qubits * reno --- .../circuit/library/arithmetic/integer_comparator.py | 11 ----------- ...omparator_num_ancilla_qubits-bd1cff3366c345ae.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/5079_IntegerComparator_num_ancilla_qubits-bd1cff3366c345ae.yaml diff --git a/qiskit/circuit/library/arithmetic/integer_comparator.py b/qiskit/circuit/library/arithmetic/integer_comparator.py index 699e8c221ff3..1324d512ea6f 100644 --- a/qiskit/circuit/library/arithmetic/integer_comparator.py +++ b/qiskit/circuit/library/arithmetic/integer_comparator.py @@ -14,7 +14,6 @@ """Integer Comparator.""" from __future__ import annotations -import warnings import numpy as np from qiskit.circuit import QuantumCircuit, QuantumRegister, AncillaRegister @@ -100,16 +99,6 @@ def geq(self, geq: bool) -> None: self._invalidate() self._geq = geq - @property - def num_ancilla_qubits(self): - """Deprecated. Use num_ancillas instead.""" - warnings.warn( - "The IntegerComparator.num_ancilla_qubits property is deprecated " - "as of 0.16.0. It will be removed no earlier than 3 months after the release " - "date. You should use the num_ancillas property instead." - ) - return self.num_ancillas - @property def num_state_qubits(self) -> int: """The number of qubits encoding the state for the comparison. diff --git a/releasenotes/notes/5079_IntegerComparator_num_ancilla_qubits-bd1cff3366c345ae.yaml b/releasenotes/notes/5079_IntegerComparator_num_ancilla_qubits-bd1cff3366c345ae.yaml new file mode 100644 index 000000000000..9364ffd605b3 --- /dev/null +++ b/releasenotes/notes/5079_IntegerComparator_num_ancilla_qubits-bd1cff3366c345ae.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The property ``IntegerComparator.num_ancilla_qubits`` is removed, which was + deprecated in Qiskit 0.23 (released on Oct 2020). Its functionality is fully covered + by :attr:`.IntegerComparator.num_ancilla`.