Korean
언어
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.SparsePauliOp.sum

static SparsePauliOp.sum(ops)[소스]

Sum of SparsePauliOps.

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

매개변수

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

반환

the SparsePauliOp representing the sum of the input list.

반환 형식

SparsePauliOp

예외 발생
  • 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.