German
Sprachen
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.SparsePauliOp.sum

static SparsePauliOp.sum(ops)[Quellcode]

Sum of SparsePauliOps.

This is a specialized version of the builtin sum function for SparsePauliOp with smaller overhead.

Parameter

ops (list[SparsePauliOp]) – a list of SparsePauliOps.

Rückgabe

the SparsePauliOp representing the sum of the input list.

Rückgabetyp

SparsePauliOp

Verursacht
  • QiskitError – if the input list is empty.

  • QiskitError – if the input list includes an object that is not SparsePauliOp.

  • QiskitError – if the numbers of qubits of the objects in the input list do not match.