Implementation: We prototype Paulihedral in Python 3.8 (denoted by `PH').
The entire compilation flow has two stages.
The first stage is the quantum simulation program optimizations.
The baselines include the CQC \(\rm t|ket\rangle \)  compiler [1]} which employs the simultaneous diaganolization [2]}, [3]}, [4]}, a popular technique for optimizing quantum simulation programs (`TK'), and the QAOA compiler [5]}, [6]}, [7]}, an algorithm-specific compiler for unconstrained optimization QAOA on graphs (`QAOA compiler').
The second stage is the generic compilation and we have two industry generic compilers, the IBM's Qiskit [8]} at the highest optimization level 3 (`Qiskit_L3') and the CQC \(\rm t|ket\rangle \)  generic compiler [1]} at the highest optimization level 2 (`tket_O2'),
The experiments are performed on a server with a 28-core Intel Xeon Platinum 8280 CPU and 1TB RAM.
Note that due to the limited representation ability of \(\rm t|ket\rangle \) , the algorithmic constraints are hard to be encoded in `TK'.
To run our experiments and perform a fair comparison at our best, we relax those constraints in `TK' and this relaxation allows a larger optimization space.
