Is a² — b² the same as (a+b)*(a-b)?

--

Mathematically, the answer is yes, of course, they are the same because:

a² — b² = a*a-b*b = (a+b)*(a-b)

But if you are doing quantum arithmetic, while the output might be the same, it is advisable to consider whether calculating a² — b² or calculating (a+b)*(a-b) is better.

Why do we care about quantum arithmetic? Continue reading here

--

--