Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.quantum_info.entropy

entropy(state, base=2)

GitHub

Calculate the von-Neumann entropy of a quantum state.

The entropy SS is given by

S(ρ)=Tr[ρlog(ρ)]S(\rho) = - Tr[\rho \log(\rho)]

Parameters

Returns

The von-Neumann entropy S(rho).

Return type

float

Raises

QiskitError – if the input state is not a valid QuantumState.

Was this page helpful?
Report a bug or request content on GitHub.