@@ -879,18 +879,18 @@ def _ehrlich_algorithm(initial_string, return_indices: bool = True):
879
879
Based on the Gray code called Ehrlich algorithm. For more details, please see Ref. [1].
880
880
881
881
Args:
882
- initial_string (ndarray): initial bitstring as an :math:`1`-dimensional array
882
+ initial_string (ndarray): initial bitstring as an :math:`1`-dimensional array
883
883
of size :math:`n`. All ones in the bitstring need to be consecutive.
884
- For instance, for :math:`n = 6` and :math:`k = 2`, the bistrings
884
+ For instance, for :math:`n = 6` and :math:`k = 2`, the bistrings
885
885
:math:`000011` and :math:`001100` are examples of acceptable inputs.
886
- In contrast, :math:`001001` is not an acceptable input.
887
- return_indices (bool, optional): if ``True``, returns the list of indices of
888
- qubits that act like controls and targets of the circuit to be created.
886
+ In contrast, :math:`001001` is not an acceptable input.
887
+ return_indices (bool, optional): if ``True``, returns the list of indices of
888
+ qubits that act like controls and targets of the circuit to be created.
889
889
Defaults to ``True``.
890
890
891
891
Returns:
892
- list or tuple(list, list): If ``return_indices=False``, returns list containing
893
- sequence of bistrings in the order generated by the Gray code.
892
+ list or tuple(list, list): If ``return_indices=False``, returns list containing
893
+ sequence of bistrings in the order generated by the Gray code.
894
894
If ``return_indices=True`` returns tuple with the aforementioned list and the list
895
895
of control anf target qubits of gates to be implemented based on the sequence of
896
896
bitstrings.
0 commit comments