Unitary operations are the building blocks of quantum programs. Our task is to design efficient or optimal implementations of these unitary operations by employing the intrinsic physical resources of a given
n-qubit system. The most common versions of this task are known as Hamiltonian simulation and gate simulation, where Hamiltonian simulation can be seen as an infinitesimal version of the general task of gate simulation. We present a Lie-theoretic approach to Hamiltonian simulation and gate simulation. From this, we derive lower bounds on the time complexity in the
n-qubit case, generalizing known results to both even and odd
n. To achieve this we develop a generalization of the so-called magic basis for two-qubits. As a corollary, we note a connection to entanglement measures of concurrence-type.
The gauge field formalism, or operator-valued cochain formalism, has recently emerged as a powerful framework for describing quantum Calderbank-Shor-Steane (CSS) codes. In this work, we extend this framework to construct a broad class of logical gates for general CSS codes, including the S, Hadamard, T, and (multi)controlled-Z gates, under the condition where fault-tolerance or circuit-depth optimality is not necessarily imposed. We show that these logical gates can be expressed as exponentials of polynomial functions of the electric and magnetic gauge fields, which allows us to derive explicit decompositions into physical gates. We further prove that their logical action depends only on the (co)homology classes of the corresponding logical qubits, establishing consistency as logical operations. Our results provide a systematic method for formulating logical gates for general CSS codes, offering new insights into the interplay between quantum error correction, algebraic topology, and quantum field theory.