from_list
*static* PauliOperator.from_list(pauli_tuples, dtype=<class 'complex'>, qubit_count=None)
Construct from a list of tuples containing Pauli strings and coefficients.
Parameters
- pauli_tuples (list [ tuple [ str , complex ] ]) – A list of tuples specifying the Pauli terms.
- qubit_count (Optional [ int ] , optional) – The number of qubits in the system. If not provided, it will be inferred automatically from the length of the Pauli strings inside pauli_tuples.
- dtype (type , optional) – The data type to be used for storing the coefficients. Defaults to complex.
Returns
PauliOperator – The constructed Pauli operator.
Raises
QctrlArgumentsValueError – If the qubit_count is smaller than the length of any Pauli string in pauli_tuples.