Calculates the norm of a quantum state.
The norm is equal to the trace of the density matrix if the state
is mixed and to the norm of the state vector if the state is pure.
A (State) – the quantum state
the norm of the state
- Return type: