How do I search for Verification of Quantum Computing
The answer is, when working with sufficiently small numbers, we can simulate the quantum process on a classical computer.  It might take exponentially longer on the classical computer, but for small numbers, that's still feasible (the exponential of a small number is still not too large).

See Question 6 at Scott Aaronson's FAQ (https://www.scottaaronson.com/blog/?p=4317) as well as part (2) of https://www.scottaaronson.com/blog/?p=4372.