# Tag Info

Accepted

### How to derive the CNOT matrix for a 3-qubit system where the control & target qubits are not adjacent?

For a presentation from first principles, I like Ryan O'Donnell's answer. But for a slightly higher-level algebraic treatment, here's how I would do it. The main feature of a controlled-$U$ operation,...
• 12.2k

### How do I build a gate from a matrix on Qiskit?

You can build your gate with Operator and unitary function e.g: ...
• 481
Accepted

### How do you implement the Toffoli gate using only single-qubit and CNOT gates?

is the decomposition (I took this from google images, originally on this website.) In order to understand how to decompose it, we can look at it's base structure. The idea is that we combine gates ...
• 1,806
Accepted

### Given a decomposition for a unitary $U$, how do you decompose the corresponding controlled unitary gate $C(U)$?

The question may not be entirely well-defined, in the sense that to ask for a way to compute $C(U)$ from a decomposition of $U$ you need to specify the set of gates that you are willing to use. Indeed,...
• 25.6k
Accepted

### What is the mathematical justification for the "universality" of the universal set of quantum gates (CNOT, H, Z, X and π/8)?

The answer you mention references Michael Nielsen and Isaac Chuang's book, Quantum Computation and Quantum Information (Cambridge University Press), which does contain a proof of the universality of ...

### How to derive the CNOT matrix for a 3-qubit system where the control & target qubits are not adjacent?

This is a good question; it's one that textbooks seem to sneak around. I reached this exact question when preparing a quantum computing lecture a couple days ago. As far as I can tell, there's no ...

• 59.4k