Fig. 1: Graph-based diagonalization circuit.

A set of commuting Pauli operators P1, …, Pm (yellow) is diagonalized in two steps: first, a layer of single-qubit Clifford gates U = U1 ⊗ … ⊗ Un (red) rotates them into a set of the form \({\mathcal{S}}=\{\pm {X}^{{\bf{k}}}{Z}^{\Gamma {\bf{k}}}\,| \,{\bf{k}}\in {{\mathbb{F}}}_{2}^{n}\}\), where \(\Gamma \in {{\mathbb{F}}}_{2}^{n\times n}\) is an adjacency matrix. Afterward, \({\mathcal{S}}\) is rotated to the computational basis (blue) by uncomputing the graph state vector \(\left\vert \Gamma \right\rangle\) (green). The existence of U and Γ is guaranteed because every stabilizer state is LC-equivalent to a graph state41. We call a graph-based diagonalization circuit hardware-tailored (HT) if Γ is a subgraph of the connectivity graph Γcon of the considered quantum device.