def METHOD_NAME(self):
    # pylint: disable=cyclic-import
    from qiskit.synthesis.permutation.permutation_utils import _get_ordered_swap
    name = f"permutation__{'_'.join(str(n) for n in self.pattern)}_"
    out = QuantumCircuit(self.num_qubits, name=name)
    for i, j in _get_ordered_swap(self.pattern):
        out.swap(i, j)
    return out.to_gate()