Multi-Qubit Gates
Discussion some of simple gates that operate on multiple qubits
Last updated
Discussion some of simple gates that operate on multiple qubits
Last updated
Unlike single qubit gates, multi-qubit gates are to complex to be described using the relatively simple Bloch sphere diagram. For these we'll just have their matrix to describe their behaviour.
Something important to note is that all gates must have the same number of inputs as there are outputs. This is because no information can be lost in quantum systems - whatever goes in must come out again.
This gate is also called the "CX" or the "controlled X" gate. You can guess what this means - it preforms the same operation as the Pauli X gate but controlled by another qubit.
Notice that this works the same way it would when constructing classical truth tables to describe operations on classical bits.
This gate does what is says - it swaps the state of the two bits included in the operation. So if the starting state is:
The resulting state will be:
And of course, vice versa.
In the section about classical models of computation, we talked a bit about constructing all possible classical logic gates with just one - the NAND gate. The NAND gate is a universal gate because of this special property.
In quantum computing we have the same concept. All possible quantum gates can be a constructed with a selection of one and two qubit gates. Exactly which gates depends - there are multiple possible universal sets of quantum gates. You'll see different resources will rely on different universal sets. For this tutorial what most important is that you understand the concept.
We pass in two bits - a control bit and a target bit. If the control bit is , the target bit will flip states. If the control bit is , nothing happens. The control bit is never affected by this gate.
The Toffoli gate ("double control", "CCNOT", "CCX" or "TOFF") does basically the same thing, except this time we have two control bits. If both control bits are , we flip our target bit. If either of them are nothing happens. The control bits are still never effected.
As we operate on more quits, and end up with more distinguishable states, are matrices get larger. The same as a system with qubits have distinguishable states, or matrices will likewise have numbers of rows and columns.
So our TOFF gate, which works on 3 qubits, has distinguishable states, and there for 8 rows and 8 columns in it's matrix.
The controlled Z gate ("CZ") works essentially just like the controlled X gate. It's the Pauli Z gate with an extra control bit. When the control bit is , we preform the Z gate operation. When the control bit is nothing changes. As before, the control bit is never affected by this operation.