# Questions tagged [gate-synthesis]

For questions about finding (short) gate sequences to implement a specific unitary operation, for example decomposing a complicated multi-qubit gate into a sequence of basic gates. It might apply to optimizing circuits with respect to length or depth or finding gate sequences to implement an algorithm.

140 questions
Filter by
Sorted by
Tagged with
4k views

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

In a three-qubit system, it's easy to derive the CNOT operator when the control & target qubits are adjacent in significance - you just tensor the 2-bit CNOT operator with the identity matrix in ...
7k views

509 views

### How is it possible to implement unitary operator when its size is exponential in inputs?

A quantum circuit can use any unitary operator. Its matrix is exponential in the number of input bits. In practice how can this ever be possible (aside from operators which are tensor products), i.e. ...
383 views

### Basic approximation in Solovay-Kitaev algorithm

I read the Solovay-Kitaev algorithm for approximation of arbitrary single-qubit unitaries. However, while implementing the algorithm, I got stuck with the basic approximation of depth 0 of the ...
1k views

360 views

### Is there a general method to implement a 'greater than' quantum circuit?

I am interesting in finding a circuit to implement the operation $f(x) > y$ for an arbitrary value of $y$. Below is the circuit I would like to build: I use the first three qubits to encode $|x⟩$, ...
384 views

### How can I fill a unitary knowing only its first column?

I have a unitary matrix that I want to construct. I only care what happens to the first computational state, so the first column is specified. So far, I've been assigning each question mark to a ...
485 views

### How do we code the matrix for a controlled operation knowing the control qubit, the target qubit and the $2\times 2$ unitary?

Having n qubits, I want to have the unitary described a controlled operation. Say for example you get as input a unitary, an index for a controlled qubit and another for a target. How would you code ...
324 views

### How to visualize Hadamard gate as $X$-$Z$-$X$ decomposition?

In the book Quantum Computation and Quantum Information by Nielsen and Chuang, chapter 4, exercise 4.4 (pg. 175), the author has asked to express Hadamard gate as product of $R_x$, $R_z$ rotations and ...
113 views

### Decomposing gates resembling exponentiated members of desired gateset

Suppose I have access to a pretty typical gate set, for example $\{\text{CNOT}, \text{SWAP}, \text{R}_{x}, \text{R}_{y}, \text{R}_{z}, \text{CR}_x, \text{CR}_y, \text{CR}_z\}$ where $\text{CR}$ is a ...
107 views

I am trying to write $|0\rangle+i|1\rangle$ in terms of elementary gates like H, CNOT, Pauli Y, using the IBM QE circuit composer. I was thinking some kind of combination of H and Y since $Y|0\rangle=... 2answers 131 views ### Clarification needed: "Simulation" of$e^{-iHt}$and its time complexity On page 3 here it is mentioned that: However, building on prior works [32, 36, 38] recently it has been shown in  that to simulate$e^{−iHt}$for an$s$-sparse Hamiltonian requires only$\...
I want to build a circuit that performs the following operation:  U_f = \left(\begin{array}{cccccccccc} 1 & 0 & 0 & \dots & \dots & \dots & \dots & \dots & \dots &...