I was playing with approximation of gates with Clifford+T group on IBM Q. Everything works well on simulator, however, when I tried to run my circuit on actual quantum processor, a transpiler optimized circuit so only one $U3$ gate remained. Hence, I was not able to run my original circuit and assess effect of decoherence etc based on depth of the circuit.
To given an example, my original circuit is
OPENQASM 2.0; include "qelib1.inc"; qreg q; creg c; h q; s q; t q; sdg q; h q; measure q -> c;
After transpiling (on IBM Q Armonk), the resulting QASM code is as follows:
OPENQASM 2.0; include "qelib1.inc"; qreg q; creg c; u3(-0.7853981633974483, 1.5707963267948966, 4.71238898038469) q; measure q -> c;
I tried to add barriers before first
h q; and after last
h q; to prevent optimizer from working, however, without success.
I understand that basic gates on IBM Q are $I$, $U1$, $U2$ and $U3$ and that $H$, $S$, $S^\dagger$ and $T$ are eventually impleted by these $U$ gates.
However, is it possible to avoid optimization so that the original number of gates is preserved? In other words, Hadamard will be presented by one $U3$ gate, phase gate and $T$ by one $U1$ gate each etc.