Closed kevinsung closed 3 months ago
Actually, I think it can be implemented with a single call to apply_orbital_rotation
. Swapping modes i
and j
corresponds to an orbital rotation described by the identity matrix with columns i
and j
swapped.
Add
apply_fswap_gate
function to python/ffsim/gates/basic_gates.py.This gate swaps two fermionic modes. Under the Jordan-Wigner transform, this gate has the following matrix when applied to neighboring qubits:
It looks like it can be implemented with a combination of
tunneling_interaction
,num_interaction
, andnum_num_interaction
. Maybe there is a smarter way.