I have encountered doubts when using qiskit to calculate T-depth. I am not sure whether it is a problem with the way the code is written, or I am still a little vague about T-depth, so I would like to ask everyone for advice.
I use this code to get T_depth containing T and T*
T_depth= circ.depth(lambda gate: gate[0].name in ['t', 'tdg'])
The following is an example of a circuit that I have doubts about: Original circuit: Circuit after automatic arrangement:
So far, I can understand why it is arranged like this, but I don’t understand why the T-depth result shows not 7, but 4?