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

\begin{equation} H=aX_1Z_2+bZ_1X_2. \end{equation}

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!

  • $\begingroup$ Have you tried applying a controlled-Z gate? $\endgroup$
    – DaftWullie
    Nov 15, 2021 at 20:04

1 Answer 1


If you're not worried about the depth of the circuit, or about chunking observables into commuting sets, then you can solve the observables one by one:

  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.
  • $\begingroup$ @Craig_Gidney, I am looking to chunk them together though. As I said I want to make only 1 measurement. $\endgroup$ Nov 15, 2021 at 19:09
  • $\begingroup$ @KenRobbins By chunking I was referring to the case where you have commuting and anti-commuting measurements, and need to find a minimal number of groups to divide the measurement into such that within each group all measurements commute. You said all measurements commute so you're in the case with just 1 group, and don't need to solve the grouping part. $\endgroup$ Nov 15, 2021 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.