I am trying to prepare the n-qubits GHZ state using LOCC on Qiskit. The implementation uses the result of some mid-circuit measurements for later operations. I am now using something like
with circ.if_test((cr[0],1)):
with circ.if_test((cr[1],0)):
circ.x(4)
which is conditioning the future gates (x gate on qubit 4 here) on the measurement results of the ancilla qubits saved in a classical register cr. The issue is that I need to check a condition like $\Sigma_i a_i = 0 \text{ mod 2}$ where $a_i$ are the ancilla measurement results, and so it would be much easier to perform arithmetic on the bits in the classical register rather than checking all the possibilities one by one (which is exponential in the number of qubits). Is there a way to do that on Qiskit? I am trying different operations like '+' or '^' but these operations cannot be used with clbit type.