OperatorStateFn.to_density_matrix

OperatorStateFn.to_density_matrix(massive=False)[source]

Return numpy matrix of density operator, warn if more than 16 qubits to force the user to set massive=True if they want such a large matrix. Generally big methods like this should require the use of a converter, but in this case a convenience method for quick hacking and access to classical tools is appropriate.

Return type

ndarray