diff --git a/qiskit_machine_learning/utils/adjust_num_qubits.py b/qiskit_machine_learning/utils/adjust_num_qubits.py index bfd15c6ee..f146d1513 100644 --- a/qiskit_machine_learning/utils/adjust_num_qubits.py +++ b/qiskit_machine_learning/utils/adjust_num_qubits.py @@ -30,16 +30,17 @@ def derive_num_qubits_feature_map_ansatz( Derives a correct number of qubits, feature map, and ansatz from the parameters. If the number of qubits is not ``None``, then the feature map and ansatz are adjusted to this - number of qubits if required. If such an adjustment fails, an error is raised. - Also, if the feature map or ansatz or both are ``None``, then ``ZZFeatureMap`` and - ``RealAmplitudes`` are created respectively. If there's just one qubit, ``ZFeatureMap`` is - created instead. + number of qubits if required. If such an adjustment fails, an error is raised. Also, if the + feature map or ansatz or both are ``None``, then :class:`~qiskit.circuit.library.ZZFeatureMap` + and :class:`~qiskit.circuit.library.RealAmplitudes` are created respectively. If there's just + one qubit, :class:`~qiskit.circuit.library.ZFeatureMap` is created instead. If the number of qubits is ``None``, then the number of qubits is derived from the feature map or ansatz. Both the feature map and ansatz in this case must have the same number of qubits. If the number of qubits of the feature map is not the same as the number of qubits of the ansatz, an error is raised. If only one of the feature map and ansatz are ``None``, then - ``ZZFeatureMap`` or ``RealAmplitudes`` are created respectively. + :class:`~qiskit.circuit.library.ZZFeatureMap` or :class:`~qiskit.circuit.library.RealAmplitudes` + are created respectively. If all the parameters are none an error is raised.