  The development of a universal fault-tolerant quantum computer that can solve
efficiently various difficult computational problems is an outstanding
challenge for science and technology. In this work, we propose a technique for
an efficient implementation of quantum algorithms with multilevel quantum
systems (qudits). Our method uses a transpilation of a circuit in the standard
qubit form, which depends on the parameters of a qudit-based processor, such as
their number and the number of accessible levels. This approach provides a
qubit-to-qudit mapping and comparison to a standard realization of quantum
algorithms highlighting potential advantages of qudits. We provide an explicit
scheme of transpiling qubit circuits into sequences of single-qudit and
two-qudit gates taken from a particular universal set. We then illustrate our
method by considering an example of an efficient implementation of a $6$-qubit
quantum algorithm with qudits. We expect that our findings are of relevance for
ongoing experiments with noisy intermediate-scale quantum devices that operate
with information carrier allowing qudit encodings, such as trapped ions and
neutral atoms as well as optical and solid-state systems.
