How To Program Qubits
Programming qubits is simply about using probability to your advantage. Unlike classical computers, quantum computing is all about physics, not math. Qubits rely on not the result, but on the probability of measuring a certain answer.
A simple way of programming qubits is using logic gates.
It is physically impossible to measure the quantum state of a qubit. However, a classical state can be measured from the qubit (0,1) with the probability of measuring each classical state equal to the component of each state of the qubit.
quantum state = ∂|0> + ß|1> --> measures 0 with probability of ∂2
--> measures 1 with probability of ß2
The problem with measurement is that measurement disturbs the quantum system. Measurement causes the quantum state to collapse, and act as a classical bit. The solution is not to measure the qubit, but to change the quantum state, and therefore the probabilities of the measurement. To due this, logic gates are used.
One example of a logic gate is the Hadamard gate.
The Hadamard gate will multiply the state by: (1/√2) ( 1 1 )
1 -1
The Hadamard gate will change the |0> state to: (|0> + |1>)/√2
The Hadamard gate will change the |1> state to: (|0> - |1>)/√2
This results in the quantum state: ∂((|0> + |1>)/√2) + ß((|0> - |1>)/√2)
By using gates such as the Hadamard gate, it can determined whether the ∂ state or ß state came in.