|
| 1 | +--- |
| 2 | +deprecations: |
| 3 | + - | |
| 4 | + Qiskit has deprecated circuit library classes that were based on |
| 5 | + `BlueprintCircuit` in favor of methods that construct the circuits |
| 6 | + instead. However, with these methods, the number of qubits |
| 7 | + cannot be adjusted later. So for example `RealAmplitudes` class is |
| 8 | + replaced by `real_amplitudes` method, ZZFeatureMap` by |
| 9 | + `zz_feature_map` etc. |
| 10 | +
|
| 11 | + As BlueprintCircuit will be removed from Qiskit, similarly based classes |
| 12 | + in Qiskit Machine Learning are now deprecated. These classes are |
| 13 | + :class:`~qiskit_machine_learning.circuit.library.QNNCircuit` and |
| 14 | + :class:`~qiskit_machine_learning.circuit.library.RawFeatureVector` where |
| 15 | + similarly their replacements are the like-named methods |
| 16 | + :meth:`~qiskit_machine_learning.circuit.library.qnn_circuit` and |
| 17 | + :meth:`~qiskit_machine_learning.circuit.library.raw_feature_vector` |
| 18 | + respectively. |
| 19 | +
|
| 20 | + Please note that, as mentioned earlier above, the same same restriction |
| 21 | + on the number of qubits applies to these methods too, i.e. it must be |
| 22 | + known/specified when the circuit is created and cannot be changed later. |
| 23 | +
|
| 24 | + Also where an algorithm might default to one of these Blueprint-based |
| 25 | + classes, e.g. VQC, any such defaults have been changed to use the |
| 26 | + replacement methods instead, where later adjustment of the circuit's |
| 27 | + number of qubits is not possible. In such cases if the number of qubits |
| 28 | + given to the algorithm does not match what is needed from the circuit |
| 29 | + and it cannot be adjusted then an exception will be raised. |
0 commit comments