Assumptions
I specify the register domain and circuit cost model.
Result
For 0≤x,c<p I recover the reduction flag from y<c, where y=(x+c) mod p. I check 3,354 cases. At p=3 and c=1, x=0 and x=3 both produce y=1 with different flags. The supplied complete gate count at 67 remains above bitwise Horner.
Prior work
Cuccaro et al., A new quantum ripple-carry addition circuit
Next question
Cost the extra information required to widen the domain.
Read the argument and prior work · View supporting evidence