mutual_information¶
- mutual_information(state, base=2)[source]¶
Calculate the mutual information of a bipartite state.
The mutual information \(I\) is given by:
where \(\rho_A=Tr_B[\rho_{AB}], \rho_B=Tr_A[\rho_{AB}]\), are the reduced density matrices of the bipartite state \(\rho_{AB}\).
- Parameters
state (Statevector or DensityMatrix) – a bipartite state.
base (int) – the base of the logarithm [Default: 2].
- Returns
The mutual information \(I(\rho_{AB})\).
- Return type
float
- Raises
QiskitError – if the input state is not a valid QuantumState.
QiskitError – if input is not a bipartite QuantumState.