A universal algorithm for a deterministic preparation of arbitrary thr
ee-mode bosonic states is introduced. In particular, Ne consider prepa
ration of entangled quantum states of a vibrational motion of an ion c
onfined in a 3D trapping potential. The target states are established
after a proper sequence of laser stimulated Raman transitions. Stabili
ty of the algorithm with respect to a technical noise; is discussed an
d the distance (fidelity) of outputs with respect to target states is
studied.