The optimal synthesis of logical gates depends on the available native operations on the quantum processor. For the sake of illustration, suppose to have access to the common set consisting of CNOT gates and parameterized single qubit rotations about \(X\) , \(Y\)  and \(Z\) . This set is universal and admits optimal synthesis formulas for any two-qubit gate utilizing at most 3 CNOTs and 15 single-qubit rotations [1]}.
Fig. REF -(c) illustrates the optimal synthesis of \(\mathtt {SWAP}\mathcal {U}_{MP}^{nm}(\gamma ,\beta )\)  in terms of the canonical known decomposition.
Similar synthesis can be derived for \(\mathtt {SWAP}\mathcal {U}_{ZZ}^{nm}\)  and \(\mathtt {SWAP}\mathcal {U}_{XY}^{nm}\) , showing that for the pictured case there should be a factor of 2 between the resulting depths of the two ansätze. A different set of hardware primitives might increase or reduce the advantage, for instance if the \(\textrm {fsim}\)  gate [2]} or the \(XY\)  gates are available natively then the swap could be subsumed in a renormalization of the angles.
