Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

qiskit.quantum_info.entropy

entropy(state, base=2)

GitHub(opens in a new tab)

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.