In quantum circuit, how do you implement the rotation of multi-body interaction, such as $e^{-i\theta\sigma_z^1\sigma_z^2\sigma_z^3}$? I already know the case of less than two-body interaction, but I cannot find any textbook about more than three-body interaction.
1 Answer
Here's an image from a previous answer of mine:
If you replace the $\sigma_1\otimes\sigma_2\otimes\ldots\otimes\sigma_n$ with the tensor product of operators that you want (a single tensor product; a sum of terms needs some extra techniques based on, at its most simplistic, a Trotter expansion), and set the phase of the phase gate, $t$ equal to $-2\theta$, this will do the job up to a global phase.
Basically, what the circuit does is it entangles the register with the ancilla such that the ancilla is in the state 0/1 or the other register is in a +1 or -1 eigenstate of the operator respectively. That means you can use the ancilla to decide if you need to acquire a phase, before undoing the entanglement.