Compiler¶
compiler ¶
QuantumTranspiler ¶
Gate-level transpiler: decomposes non-native gates into the native {H, T, Tdg, CX, CZ} basis and performs basic circuit optimisations.
decompose_toffoli
staticmethod
¶
Decompose CCX (Toffoli) into 15 native gates using the standard T/Tdg/CX Barenco decomposition.
Gate count: 6 CX + 7 single-qubit (H, T, Tdg) = 15 total.
Source code in dense_evolution/compiler.py
decompose_swap
staticmethod
¶
transpile
classmethod
¶
Expand CCX → 15 native gates and SWAP → 3 CX. All other gates are passed through unchanged.
Parameters¶
circuit : list of tuples (gate_name, qubit, ...)
Returns¶
Expanded circuit as a list of tuples.