English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

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 to complex.

Return type

PauliSumOp

Returns

The PauliSumOp constructed from the pauli_list.