# How to deterministically add two integers on a quantum computer

I am new to the Quantum Computer world. I understand the basics of Quantum mechanics and I have watched a few lectures on Quantum computers, Quantum gates and played a bit on IBM QC.

As far as I understand every qubit and every QC will output a probabilistic value. For example 1+1 could be

1. 0
2. 1
3. 2

How can we do a deterministic simple computation like 1+1=2 via a quantum computer? and if we can, how can it be faster than a classical computer?

New contributor
Omar Elkhouly is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

• superposition(example like Hadamard gate in Deutsch–Jozsa algorithm where $$N$$qubit $$= 2^n$$ classical states),