# Cliffords to Transform into Common Eigenbasis

Say I have the following Hamiltonian (given in terms of Pauli operators):

$$$$H=aX_1Z_2+bZ_1X_2.$$$$

Both Pauli terms commute with each other. I want to make a measurement of $$\langle H\rangle$$ but only want to make one measurement using the Pauli terms' common eigenbasis. How do I find the set of Clifford gates which allows me to do this?

What I've tried:

I've found a unitary $$U$$ such that $$U.X_1Z_2.U^\dagger$$ and $$U.Z_1X_2.U^\dagger$$ are diagonal but not the Clifford gates which create $$U$$.

If the Hamiltonian were $$aX_1+bX_2$$ then $$U=H_1H_2$$ would work.

If the Hamiltonian were $$aZ_1+bZ_2$$ then no $$U$$ would be required.

If the Hamiltonian were $$aX_1+bZ_2$$ then $$U=H_1X_2$$ would work.

If the Hamiltonian were $$aZ_1+bX_2$$ then $$U=X_1H_2$$ would work.

This seems really simple but is somehow eluding me. Any help would be very appreciated!

• Have you tried applying a controlled-Z gate? Nov 15, 2021 at 20:04

1. Pick an observable that has a term $$X_q$$ or $$Y_q$$.
2. For each other term $$P_{q_2}$$ in that observable, apply a controlled-$$P$$ operation controlled by $$q$$ targeting $$q_2$$. The observable you want to measure (in order to measure the original intended observable before the inserted operation) no longer has the $$P_{q_2}$$ term.
3. The observable-to-measure is now a single $$X_q$$ or $$Y_q$$ term. Apply a single-qubit rotation to change that term into a $$Z_q$$ term. All other observables also no longer have an $$X_q$$ or $$Y_q$$ term (on $$q$$) since that would imply they anti-commuted with the observable you just isolated.
4. Keep repeating steps 1-3 until there are no $$X$$ or $$Y$$ terms remaining. Make sure you're properly keeping track of the signs of the observables as you operate on them.
5. All observables are now products of single-qubit $$Z$$ observables. Measure all qubits in the $$Z$$ basis. Multiply together appropriately to get the desired observables.