Quantum Computation with Qudits in Spin Systems and Harmonic Oscillators