qpe_toolbox.circuit.custom_gates ================================ .. py:module:: qpe_toolbox.circuit.custom_gates .. autoapi-nested-parse:: Custom two-qubit gates registered with quimb's gate registry. Functions --------- .. autoapisummary:: qpe_toolbox.circuit.custom_gates.su4swap_gate_param_gen qpe_toolbox.circuit.custom_gates.register_su4swap_gate Module Contents --------------- .. py:function:: su4swap_gate_param_gen(params) Return the ``SU4SWAP`` gate array, a general two-qubit gate rooted at identity. Equivalent to swapping the two output legs of quimb's 15-parameter ``SU4`` gate, so it tends to the identity as its parameters go to zero. It spans the same manifold as ``SU4`` (a subset of U(4)) and carries a free phase, so its determinant is not 1 (not literally an SU(4) gate). :param params: The 15 real parameters of the underlying ``SU4`` gate. :type params: array_like :returns: The gate as a ``(2, 2, 2, 2)`` array, on the same backend as ``params``. :rtype: array_like .. py:function:: register_su4swap_gate() Register the ``SU4SWAP`` gate with quimb's gate registry, if not already present.