Return a string representation of this PauliTerm without its coefficient and with
        implicit qubit indices.

        If a list of qubits is provided, each character in the resulting string represents
        a Pauli operator on the corresponding qubit. If qubit indices are not provided as input,
        the returned string will be all non-identity operators in the order. This doesn't make
        much sense, so please provide a list of qubits. Not providing a list of qubits is
        deprecated.

        >>> p = PauliTerm("X", 0) * PauliTerm("Y", 1, 1.j)
        >>> p.pauli_string()
        "XY"
        >>> p.pauli_string(qubits=[0])
        "X"
        >>> p.pauli_string(qubits=[0, 2])
        "XI"

        :param list qubits: The list of qubits to represent, given as ints. If None, defaults to
            all qubits in this PauliTerm.
        :return: The string representation of this PauliTerm, sans coefficient

def pauli_string(self, qubits=None):
        """
        Return a string representation of this PauliTerm without its coefficient and with
        implicit qubit indices.

        If a list of qubits is provided, each character in the resulting string represents
        a Pauli operator on the corresponding qubit. If qubit indices are not provided as input,
        the returned string will be all non-identity operators in the order. This doesn't make
        much sense, so please provide a list of qubits. Not providing a list of qubits is
        deprecated.

        >>> p = PauliTerm("X", 0) * PauliTerm("Y", 1, 1.j)
        >>> p.pauli_string()
        "XY"
        >>> p.pauli_string(qubits=[0])
        "X"
        >>> p.pauli_string(qubits=[0, 2])
        "XI"

        :param list qubits: The list of qubits to represent, given as ints. If None, defaults to
            all qubits in this PauliTerm.
        :return: The string representation of this PauliTerm, sans coefficient
        """
        if qubits is None:
            warnings.warn("Please provide a list of qubits when using PauliTerm.pauli_string",
                          DeprecationWarning)
            qubits = self.get_qubits()

        return ''.join(self[q] for q in qubits)