Computes difference in parity between a previous PQRS... terms and the next PQRS... term. This difference is computed on a auxiliary qubit.
operation ApplyDeltaParity (prevFermionicTerm : Int, nextFermionicTerm : Int, aux : Qubit, qubits : Qubit) : Unit is Adj + Ctl
prevFermionicTerm : Int
List of indices to previous PQRS... terms.
nextFermionicTerm : Int
List of indices to next PQRS... terms.
aux : Qubit
Auxiliary qubit onto which parity computation results are stored.
qubits : Qubit
Qubit acted on by all PQRS... terms.
Output : Unit
This assumes that indices of P < Q < R < S < ... for both prevPQ and nextPQ.