qpe_toolbox.circuit.custom_gates

Custom two-qubit gates registered with quimb’s gate registry.

Functions

su4swap_gate_param_gen(params)

Return the SU4SWAP gate array, a general two-qubit gate rooted at identity.

register_su4swap_gate()

Register the SU4SWAP gate with quimb's gate registry, if not already present.

Module Contents

qpe_toolbox.circuit.custom_gates.su4swap_gate_param_gen(params)[source]

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).

Parameters:

params (array_like) – The 15 real parameters of the underlying SU4 gate.

Returns:

The gate as a (2, 2, 2, 2) array, on the same backend as params.

Return type:

array_like

qpe_toolbox.circuit.custom_gates.register_su4swap_gate()[source]

Register the SU4SWAP gate with quimb’s gate registry, if not already present.