Quantum mechanics in finite-dimensional Hilbert space