From 14b847b134127af3e102112a48becc30ca9d76be Mon Sep 17 00:00:00 2001 From: mon <36315338+desmonty@users.noreply.github.com> Date: Sun, 22 Oct 2023 06:46:54 +0000 Subject: [PATCH] Fix references --- qiskit_machine_learning/utils/adjust_num_qubits.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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.