# Deriving circuit templates for Hamiltonian simulation

## Background

I've been reading the paper entitled Some improvements to product formula circuits for Hamiltonian simulation. The authors propose three improvements motivated by phase estimation type circuits.

My question concerns the first of the three improvements. In section 3.2 the authors propose alternative circuits for time-evolved Hamiltonians. I am curious if there is a nice way to derive the circuits from the operator terms.

$$$$H_{0132} = h_{0132} ( a_0^† a^†_1 a_3 a_2 + a_2^† a^†_3 a_1 a_0 )$$$$ Next they apply the Jordan Wigner Transformation resulting in a Hamiltonian defined in terms of $$A$$ and $$A^\dagger$$

$$$$H_{0132} = h_{0132} ( A^† \otimes A^† \otimes A \otimes A + A \otimes A \otimes A^† \otimes A^† )$$$$

Note that $$$$A = \frac{1}{2}(X+iY) = |0\rangle\langle1|\quad \text{and} \quad A^\dagger = \frac{1}{2}(X-iY) = |1\rangle\langle0| \,.$$$$

At this point, I it would be standard to express $$H_{0132}$$ and a linear combination of Pauli strings but the authors go straight to implementing the operator expressed as tensor products of $$|0\rangle\langle1|$$ and $$|1\rangle\langle0|$$.

So we now have $$$$H_{0132} = h_{0132} ( |1100\rangle\langle 0011| + |0011\rangle\langle 1100|)\, .$$$$

Now, the unitary operator we want to implement as a quantum circuit is $$U_{0132} = e^{- i \theta ( |1100\rangle\langle 0011| + |0011\rangle\langle 1100|) }\, .$$

The authors give the following circuit for $$U_{0132}$$

This looks a diagonalisation of the form $$V D V^\dagger$$ where $$D$$ is the controlled gate in the middle.

Additionally, they give circuits for the operators $$e^{- i \theta' ( |1010\rangle\langle 0101| + |0101\rangle\langle 1010|)}$$ and $$e^{- i \theta'' ( |1001\rangle\langle 0110| + |0110\rangle\langle 1001|)}$$

(see the diagrams labelled (7) and (8)). Note that the only thing that changes between the different circuits is the control state of the multi-controlled $$Z$$ rotation. In the diagram above the control state is $$|110\rangle$$. For the other operators it is $$|101\rangle$$ and $$|011\rangle$$.

They also say that all three operators can be implemented with only a single basis rotation as follows...

• How to derive the circuits from the operator terms? The only thing that changes is the controlled gate. See my attempt below - it feels quite ad hoc.
• (Related) How do I see that all three operations can be performed as in the circuit above? It feels like I should be able to make some arguement about diagonalisation here. EDIT: I guess I can see how this might work following my ad-hoc rule below.

## What I've tried so far

Consider again the operator $$U_{0132} = e^{- i \theta ( |1100\rangle\langle 0011| + |0011\rangle\langle 1100|) }\, .$$

In this operator there are the two basis states $$|1100\rangle$$ and $$|0011\rangle$$. If we run through the first of the circuits above we see that the first three CNOT gates will transform the basis states as follows $$|1100\rangle \to |1100\rangle \quad \text{and} \quad |0011\rangle \ \to |1101\rangle$$

The resulting bitstrings differ only by one bit (this is true for the other operators too). Note that one of the two basis states is left unchanged by the CNOT gates.

It then seems that the control state of the $$Z$$ rotation is always $$|0\rangle$$ on same qubit index where the $$|0\rangle$$ is found in the transformed bitstring.

So for $$U_{0132}$$ the tranformed bitsting is $$|1101\rangle$$ so I choose to control the $$Z$$ rotation on the state $$|110\rangle$$.

This rule seems to work for the circuits in the paper but it feels ad-hoc and a bit disatisfying. I'm not sure if this rule would work beyond the three cases shown in the paper.

Maybe there's something simple that I'm missing but I'd be interested to know if there is a better way.