Let there be a known a scheme (quantum circuit) of Controlled-G, where unitary gate G has G$^†$ such that G≠G$^†$ and GG$^†$=I (for example S and S$^†$, T and T$^†$, V and V$^†$, but not Pauli and H gates).
My question for the experts is:
How is correct that new scheme of Controlled-G$^†$ gate may be constructed from this known scheme of Controlled-G gate by reversing the order of used gates (U) and each U in this scheme changes to the corresponding U$^†$ (if U≠U$^†$ of course)?
For example, see below my OPENQASM-program (note that suffix 'dg' for gate name is used instead '$^†$'in OPENQASM), where it is used well-known scheme of Controlled-S gate and my scheme of Controlled-S$^†$ gate, constructed from this well-known scheme by the above method.
So far I have only received successful results of applying this method and have not found any obvious contradictions with the known theory [*], but suddenly I didn't take something into account.
My program in OPENQASM for example:
//Name of Experiment: Amy Matthew controlled-s and my controlled-sdg gates v7
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c[3];
gate cs a,b {
// a is control, b is target
// see https//uwspace.uwaterloo.ca/bitstream/handle/10012/7818/AmyMatthew.pdf
// fig.4.6b
cx b,a;
tdg a;
cx b,a;
t a;
t b;
}
gate csdg a,b {
// a is control, b is target
// my controlled-sdg (I hope that is reverse of controlled-s)
tdg b;
tdg a;
cx b,a;
t a;
cx b,a;
}
h q[0];
cx q[0],q[1]
;
x q[2];
h q[2];
barrier q;
cs q[0],q[2];
cs q[1],q[2];
barrier q;
csdg q[0],q[2];
csdg q[1]
,q[2];
barrier q;
h q[2];
measure q -> c;
[*]: Elementary gates for quantum computation Barenco et al. (1995)