|
16 | 16 | import copy
|
17 | 17 |
|
18 | 18 | from qiskit.circuit.exceptions import CircuitError
|
19 |
| -from qiskit.utils.deprecation import deprecate_func |
20 | 19 |
|
21 | 20 |
|
22 | 21 | class Bit:
|
@@ -59,52 +58,6 @@ def __init__(self, register=None, index=None):
|
59 | 58 | self._hash = hash((self._register, self._index))
|
60 | 59 | self._repr = f"{self.__class__.__name__}({self._register}, {self._index})"
|
61 | 60 |
|
62 |
| - @property |
63 |
| - @deprecate_func( |
64 |
| - is_property=True, |
65 |
| - since="0.17", |
66 |
| - package_name="qiskit-terra", |
67 |
| - additional_msg=( |
68 |
| - "Instead, use :meth:`~qiskit.circuit.quantumcircuit.QuantumCircuit.find_bit` to find " |
69 |
| - "all the containing registers within a circuit and the index of the bit within the " |
70 |
| - "circuit." |
71 |
| - ), |
72 |
| - ) |
73 |
| - def register(self): # pylint: disable=bad-docstring-quotes |
74 |
| - """Get the register of an old-style bit. |
75 |
| -
|
76 |
| - In modern Qiskit Terra (version 0.17+), bits are the fundamental object and registers are |
77 |
| - aliases to collections of bits. A bit can be in many registers depending on the circuit, so |
78 |
| - a single containing register is no longer a property of a bit. It is an error to access |
79 |
| - this attribute on bits that were not constructed as "owned" by a register.""" |
80 |
| - if (self._register, self._index) == (None, None): |
81 |
| - raise CircuitError("Attempt to query register of a new-style Bit.") |
82 |
| - |
83 |
| - return self._register |
84 |
| - |
85 |
| - @property |
86 |
| - @deprecate_func( |
87 |
| - is_property=True, |
88 |
| - since="0.17", |
89 |
| - package_name="qiskit-terra", |
90 |
| - additional_msg=( |
91 |
| - "Instead, use :meth:`~qiskit.circuit.quantumcircuit.QuantumCircuit.find_bit` to find " |
92 |
| - "all the containing registers within a circuit and the index of the bit within the " |
93 |
| - "circuit." |
94 |
| - ), |
95 |
| - ) |
96 |
| - def index(self): # pylint: disable=bad-docstring-quotes |
97 |
| - """Get the index of an old-style bit in the register that owns it. |
98 |
| -
|
99 |
| - In modern Qiskit Terra (version 0.17+), bits are the fundamental object and registers are |
100 |
| - aliases to collections of bits. A bit can be in many registers depending on the circuit, so |
101 |
| - a single containing register is no longer a property of a bit. It is an error to access |
102 |
| - this attribute on bits that were not constructed as "owned" by a register.""" |
103 |
| - if (self._register, self._index) == (None, None): |
104 |
| - raise CircuitError("Attempt to query index of a new-style Bit.") |
105 |
| - |
106 |
| - return self._index |
107 |
| - |
108 | 61 | def __repr__(self):
|
109 | 62 | """Return the official string representing the bit."""
|
110 | 63 | if (self._register, self._index) == (None, None):
|
|
0 commit comments