By default, all qubits are initialized in the state. With the prep_x
instruction, qubits will be initialized in the x-basis in the state:
State initialization can be done at the beginning of an algorithm, but it can also be done during an algorithm (re-initialization). Be aware that re-initialization of a qubit will also reset the binary register entry for that qubit to zero.