
Learn Quantum Computing with Python and IBM Quantum
By :

For the multi-qubit gates, try flipping the Source and Target. Do you see a difference when you decompose the circuit?
No, there is no difference that can be seen, only that the source is now assigned to the opposite qubits.
Decompose all the gates for both single- and multi-qubit circuits. What do you notice about how the universal gates are constructed?
The single gates are now displayed by their respective basis gate, including rotation values, if any. Multi-qubit gates, such as the Toffoli gate, are also broken down into specific gates that are used to construct the operation of the Toffoli gate between the assigned qubits.
Implement the Toffoli gate where the target is the center qubit of a three-qubit circuit.
Use the following code to implement the Toffoli gate where the target is the center qubit of a three-qubit circuit:
...