Building a Hamiltonian matrix

Write a function that:

  1. Has as input the single-particle indices \( p,q,r,s \) for the two-body operator and the index \( \alpha \) for the ket Slater determinant;
  2. Returns the index \( \beta \) of the unique (if any) Slater determinant such that
$$ | \beta \rangle = \pm \hat{a}^\dagger_p \hat{a}^\dagger_q\hat{a}_s \hat{a}_r |\alpha \rangle $$ as well as the phase

This is equivalent to computing $$ \langle \beta | \hat{a}^\dagger_p \hat{a}^\dagger_q\hat{a}_s \hat{a}_r |\alpha \rangle $$