qiskit.opflow.primitive_ops.PauliSumOp.from_list¶
- classmethod PauliSumOp.from_list(pauli_list, coeff=1.0, dtype=<class 'complex'>)[source]¶
Construct from a pauli_list with the form [(pauli_str, coeffs)]
- Parameters
pauli_list (
List
[Tuple
[str
,Union
[complex
,ParameterExpression
]]]) – A list of Tuple of pauli_str and coefficient.coeff (
Union
[complex
,ParameterExpression
]) – A coefficient multiplying the primitive.dtype (
type
) – The dtype to use to construct the internal SparsePauliOp. Defaults tocomplex
.
- Return type
- Returns
The PauliSumOp constructed from the pauli_list.