# How do we physically initialize qubits in a Quantum register?

In quantum algorithms we need to initialize the qubits at the start of our algorithm in some quantum register. Suppose that if we are working with a four qubit quantum register we can initialize the register into values such as $$|0000\rangle$$ or another value such as $$|0101\rangle$$, which means that the first and third qubits are in basis $$|0\rangle$$ state and the second and fourth qubits are in basis $$|1\rangle$$ state. Once we have initialized these qubits as such we can then proceed to apply various quantum gates on them.

My question is that in a physical quantum computer (not a simulator) where say we represent qubits with electron spin, how do we manupulate such electrons so that we can initialize a Quantum register, say with the value $$|0101\rangle$$?

It very much depends on your physical realisation. In some realisations, such as when using photons, the process of producing the photon typically produces it in a fixed polarisation (which is probably what you’re using to encode a qubit). Alternatively, you pass the photon through a polarisation filter. This is equivalent to the most typical strategy - measure the qubit in some basis. That way, you know the definite state that the qubit is in, and you can convert it into the right state. As a final option, many systems have a natural Hamiltonian that is applied to them, and the system is cooled in order to produce the ground state of that Hamiltonian. Again, you’ve got a fixed state (typically the all zero state) and you can convert that into whatever initial state you want.

Well the procedure depends on the physical system that you are using to realize the quantum register. An example I can give is of Diamond NV-Center. In simplest case, the vacancy electron is modelled as spin-1 particle here(there are reasons to model it like this) and nitrogen-14 nuclei has spin 1. So total system lies in a Hilbert space of 9-Dimensions or you can say there are 9 energy levels. Lets say you want to realise a 2-qubit register, then you would need 4-energy levels. Define the levels as $|00\rangle$, $|01\rangle$, $|10\rangle$ and $|11\rangle$. Lets say in equilibrium system is in $|00\rangle$ state, if you want to initialize the system in $|01\rangle$ state then all you would need is an electromagnetic pulse of energy being equal to the energy difference of $|01\rangle$ and $|00\rangle$ levels. In NV-Center, normally microwave and radio-frequency pulses are used.

One of the simplest way to think about physical realization of qubits is using Photons.

Let's say you have a photon that is vertically or horizontally polarized. There are physical devices to create and measure polarizations of these photons. So, you can mark the horizontally polarized photons as the state $\lvert 0 \rangle$ and the vertically polarized one as the $\lvert 1 \rangle$ state.

Additionally, you could use photon polarizer to change a particular photons polarization to turn a $\lvert 0 \rangle$ to a $\lvert 1 \rangle$ or vice versa. This wiki article would help you a bit. Moreover, you could check out this cool video from professor Allan Adams where real life photon polarization is demonstrated. (link)