German
Sprachen
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.opflow.primitive_ops.PauliSumOp.matrix_iter

PauliSumOp.matrix_iter(sparse=False)[Quellcode]

Return a matrix representation iterator.

This is a lazy iterator that converts each term in the PauliSumOp into a matrix as it is used. To convert to a single matrix use the to_matrix() method.

Parameter

sparse (bool) – optionally return sparse CSR matrices if True, otherwise return Numpy array matrices (Default: False)

Rückgabe

matrix iterator object for the PauliSumOp.

Rückgabetyp

MatrixIterator