Scheme of the proposed three-step protocol. (1) Mapping of the Hamiltonian H, where each corresponds to a fermionic operator, N is the total number of fermionic modes, and α is the highest order of the many-body interaction, using the Jordan-Wigner transformation, to a sum of tensor products of spin operators. (2) Trotter expansion of the resulting evolution. (3) Implementation of each nonlocal evolution, up to local rotations, with a sequence of two MS gates and a local gate. We point out that the use of local rotations allows one to obtain an arbitrary fermionic Hamiltonian. While the MS gates correspond to an interaction upon all the ions, the intermediate one is a local rotation applied on just one ion. To simulate a dynamics of fermions coupled to bosons, one would substitute the local gate by , resulting in a linear coupling of bosons to a quadratic fermionic operator.