qiskit.opflow.expectations.MatrixExpectation.convert¶ MatrixExpectation.convert(operator)[source]¶ Accept an Operator and return a new Operator with the Pauli measurements replaced by Matrix based measurements. Parameters operator (OperatorBase) – The operator to convert. Return type OperatorBase Returns The converted operator.