quantax.utils.pfa_update#

quantax.utils.pfa_update(inv_old: Array, update: Array, update_idx: Array, return_inv: bool)#

Applies a low-rank update to a pfaffian matrix, returning the ratio between the updated pfaffian and the old pfaffian as well as the inverse of the update orbitals

The update to the orbitals is an “L shaped update” constructed from low_rank_update_matrix. update = jnp.zeros([nparticle,nparticle]), update = update.at[update_idx].set(update_matrix) update = update - update.T

Args inv_old: The inverse of the orbital matrix before the update update: The condensed form of the update update_idx: The indices indicating the rows/columns to be updated return_inv: bool indicating whether to update the inverse

Returns rat: The ratio between the updated pfaffian and the old pfaffian inv: The inverse of the updated pfaffian orbitals