Posts

Showing posts from August, 2022

The spookiness of Controlled Gates

Image
In Quantum Computing, by far the most popular example of controlled gate is the control-not gate. Most, if not all, the textbooks start with an example of control-not and afterwards, expands to the more generalized concept of controlled gates. It is indeed an effective way to gently introduce the topic, making a smooth connection between the existing classical gate - XOR - and the quantum control-not gate - CNOT. But simplicity is not always synonym of completeness. Controlled gates are a little spookier than initially presented by the textbooks. You will see here that there is more to the controlled gates than shown in the first chapters of quantum computing textbooks. Firstly, a quick recap on the control-not gate.  The control-not gate is a quantum gate with 2 input qubits: the first qubit is the 'control' qubit and the second one the 'target'. The control qubit controls the NOT operation to be applied in the target qubit - if the control qubit is in state |1>,...

The order (of the qubits) matters

Image
Those programming using Quantum Computers will, eventually, come across this somewhat awkward observation when using the simulators or the real computers. The topic is often neglected by tutorials in quantum computing, and, to a certain extend, it is understandable that tutorials do not tackle it at first. In fact, if you are simply running operations on circuits in the machine, it will be hard to spot or bother about it. Nevertheless, it can cause a great deal of confusion and pain for those who are unaware or overlook it. The problem, firstly addressed in the classical computers and now resurfacing with the quantum computers, is related to the order that qubits are organized on a sequence of qubits. Note that, when considering a sequence of qubits, and considering their significance in relation to the sequence, there are two ways to order them: either the qubit on the leftmost position of the sequence is considered the least significant qubit of the sequence, or the one in the right...