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.

Filter by
Sorted by
Tagged with
4
votes
2answers
123 views

How to find a circuit for the roots of QFT?

After reading about using quantum gates instead of ancillas, it asserts that every quantum circuit has a square root. Theoretically, they do, but is there a practical method to generate the quantum ...
0
votes
0answers
28 views

[CNOT GATE]how to go from a passage matrix acting on |C0>,C1>|T0>,T1> to the Cnot matrix acting on |C0T0>,C0T1>

In article A controlled-NOT gate for frequency-bin qubits, the authors built a passage matrix acting on the states $T_0$, $T_1$, $C_0$, $C_1$ and then they infered the famous two qubit matrix notation....
3
votes
2answers
60 views

Are Toffoli gates actually used in designing quantum circuits?

In an actual quantum computer, are we designing circuits with Toffoli Gates and then using compilers or optimizers to remove redundancies so that we can use fewer qubits than a full Toffoli gates ...
1
vote
2answers
57 views

How to construct a CU3 gate using only CX and U3 gates?

Knowing that CX and U3 (taking 3 parameters $\theta, \phi$ and $\lambda$) form a set of universal gates how can I construct an arbitrary CU3 gate using a decomposition of only CX and arbitrary U3 ...
2
votes
1answer
60 views

What are the differences between the Toffoli and Fredkin gates (historical, practical, etc.)

I'm trying to understand the historical ordering and the practical differences between the Toffoli Gate and the Fredkin Gate. Toffoli's February 1980 tech report MIT/LCS/TM-151 states: Where ...
3
votes
3answers
90 views

What is the complexity of splitting a state into a superposition of $n$ computational basis states?

$\newcommand{\bra}[1]{\left<#1\right|}\newcommand{\ket}[1]{\left|#1\right>}\newcommand{\bk}[2]{\left<#1\middle|#2\right>}\newcommand{\bke}[3]{\left<#1\middle|#2\middle|#3\right>}$ I'...
3
votes
1answer
45 views

Implementing a controlled-controlled-U using controlled-U

Suppose I know how to implement a 2 qubit gate $C-U$ (i.e controlled U), and I want to implement $CC-U$ using $C-U$ and other 1 or 2 qubit gates, is that possible?
1
vote
1answer
55 views

Cheap Toffoli gates with phase errors

Here, a cheap verion of a Toffoli, up to a phase flip for $|101\rangle$, is given by with $A=R_y(\pi/4)$. Are there similar versions of cheap implementation of general $C^nNOT$ gates? I tried to ...
1
vote
0answers
39 views

How can I prove the universality of this set of gates?

I was reading this article. A brief explanation: Here we have a circuit, the registers are a stepfunction state, an single photon state and a function state. The first two have position operators $X$ ...
1
vote
0answers
28 views

Decompose Toffoli gate with minimum cost for IBM quantum computer

The known decomposition of toffoli gate that can be used on IBM quantum computer is : I want to know any other Toffoli gate decompositions that can be used on IBM quantum computer and have a cost ...
4
votes
2answers
231 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 ...
2
votes
2answers
89 views

How to prove that a matrix is an arbitrary unitary?

My goal is to prove that I can synthesise arbitrary unitary from two components. In the end, I find a matrix with the form \begin{equation} \mathbf{W}_j=\begin{pmatrix} |\alpha|2\cos{(\phi_{...
3
votes
0answers
39 views

Cost of controlled-$U_i$

What is the cost (number of gates) of $\sum_{i=0}^{N-1}| i \rangle \langle i|\otimes U_i$ in terms of $N$ and the costs of the unitaries $U_i$? Say the gate set consists of arbitrary one-qubit gates ...
8
votes
3answers
1k views

How can I see, without math, the action of a gate in matrix form?

Suppose we have the Fredkin gate with $$ F= \left( {\begin{array}{cc} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 ...
4
votes
2answers
80 views

How to construct a circuit to perform this operation? Is there a general way of getting a circuit from a matrix?

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 &...
6
votes
1answer
71 views

How to factor Ising YY coupling gate into product of basic gates?

Let us consider Pauli YY coupling gate of the following form $$ YY_\phi= \left(\begin{matrix} \cos(\phi) & 0 & 0 & i \sin(\phi) \\ 0 & \cos(\phi) & -i \sin(\phi) & 0 \\ ...
2
votes
1answer
402 views

Decomposing a controlled phase gate into CNOTs

I'm trying to understand the following derivation of decomposing a controlled $R_k$ (phase) gate into a combination of CNOTs and single qubit gates, but there's one main thing about the process that ...
0
votes
0answers
35 views

Help with understanding Unitary Operator of Quantum Optical Fredkin Gate

I'm referring to the textbook "Quantum Computation and Quantum Information" 10th Anniversary Edition by Nielsen and Chuang. Chapter 7.4 has a Box 7.4 which introduces the Quantum Optical Fredkin Gate....
1
vote
0answers
540 views

How to implement controlled u3 gate from Qiskit using simpler gates?

I am trying to implement the u3 controlled gate (able to rotate the qubit in any specified direction in 3 dimensions if the control is 1, for two qubits) using simpler gates. The simpler gates ...
3
votes
1answer
122 views

control gate with 3 inputs, two control and rotation gate

My question is about if there is any way to represent a circuit that take 3 inputs and applies a rotation gate on the third qubit if the first two qubits is similar (has the same state)?
1
vote
1answer
67 views

Efficient implementation of exponential of projector

If I have an $n$ qubit system and a projector $P$ such as $P_0 = \left|0\right>^{\otimes n}\left<0\right|^{\otimes n}$ (as an example) on those qubits, is there an efficient way to implement the ...
9
votes
1answer
130 views

Sampling random circuits vs Solovay-Kitaev compiler

Suppose I want to obtain a gate sequence representing a particular 1 qubit unitary matrix. The gate set is represented by a discrete universal set, e.g. Clifford+T gates or $\{T,H\}$ gates. A well ...
3
votes
2answers
109 views

Calculate the square root of Euler angles

I am trying to find a nice way to represent the square root of an arbitrary single qubit unitary to implement Lemma 6.1 from this paper Given the Euler angles: $R_z(a)R_y(b)R_z(c) = \left(R_z\left(a'\...
1
vote
1answer
66 views

Approximating unitary matrices — restricted gateset

Note: This question is a follow up of Approximating unitary matrices. The decompositions provided in Approximating unitary matrices are correct and worked for me without problem. But I am now facing ...
3
votes
1answer
117 views

How to create an $n$-qubit normally controlled gate?

Suppose I have a quantum gate $U$ and it's a controlled gate. In particular, I have a $2\times 2$ matrix formulation of the gate's action on 2 adjacent qubits. How can I make this work on an $n$-bit ...
2
votes
1answer
198 views

Using Quantum Fourier Transform in adding two 2-bit numbers

I am trying to use Qiskit to write a code that uses QFT to add 2 numbers. I am referring to this paper: https://iopscience.iop.org/article/10.1088/1742-6596/735/1/012083 I have a few questions: 1) Is ...
1
vote
0answers
40 views

Controlled controlled adder gates involved

Let's say I have a circuit that given in the figure As we can see that this circuit consists of $2$-Toffoli gates and $4$ C-NOT gates, and to construct this entire circuit using only single qubit ...
6
votes
1answer
222 views

How to decompose a controlled unitary $C(U)$ operation where $U$ is a 2-qubit gate?

In the vein of this question, say I have a 2-qubit unitary gate $U$ which can be represented as a finite sequence of (say) single qubit gates, CNOTs, SWAPs, cXs, cYs and cZs. Now I need to implement a ...
5
votes
2answers
347 views

Transform matrix into a combination of simple quantum gates

I am trying to transform this matrix into a combination of quantum gates but I cannot find any such functionality on Qiskit or anywhere else. I have tried to use Quirk but I do not understand it. $$\...
6
votes
1answer
155 views

Nielsen and Chuang's proof for 'approximating arbitrary unitary gates is generically hard'

The following statement is found on the page 199 of Nielsen and Chuang's book (10th Anniversary Edition) in the proof for the fact that 'approximating arbitrary unitary gates is generically hard': ...
1
vote
0answers
107 views

Transferring classical OR gate in a quantum gate

I would be interested to know how to transform the classic OR gate into a quantum gate. I thought a little about myself. The OR gate can also be rewritten as a NAND gate: So, I have now tried to ...
3
votes
2answers
127 views

Minimal quantum OR circuit

The quantum OR circuit between $|a\rangle$ and $|b\rangle$ can be made out of 1 Toffoli and 2 CNOT gates, 1 ancillary qubit. Is there any other implementation? Or is this the minimal in the sense of ...
3
votes
1answer
87 views

Making a maximally mixed 2-qubit state in the IBM Q

I am trying to make a 2-qubit maximally mixed state $\mathbb{I}/4$ where $\mathbb{I}$ is the identity $4\times 4$ matrix. I know that, for a maximally mixed 1-qubit state I can use a Hadamard gate, ...
8
votes
2answers
406 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. ...
3
votes
1answer
132 views

Implementing these $N×N$ matrices on $\log N$ qubits

Consider $n$ qubits and the $N=2^n$ states that I label \begin{equation} |k \rangle = \sum_{i=0}^{n-1} 2^i q_i, \end{equation} i.e. $|q_{n-1}\cdots q_0 \rangle \rightarrow |k\rangle$, where $q_j \in \...
0
votes
0answers
34 views

How are multi-qubit gates extended into larger registers? [duplicate]

Implementing a single-qubit gate in a multi-qubit register is relatively easy. For example, this gate: This is equivalent to $I \otimes H \otimes I$. If the $H$ gate was on the first bit, it would be ...
5
votes
2answers
381 views

Implement Fredkin gate with square root of swap

I would like to implement a Fredkin gate based on square root of swap and one-qubit gates. In particular, I was hoping to find the exact gate named "?" in this circuit: In addition, I want to avoid ...
4
votes
1answer
102 views

Rewrite circuit with measurements with unitaries

In quantum physics, because of the no-cloning theorem, lots of classical proofs of cryptographic problems cannot be turned into quantum proofs (rewinding is usually not possible quantumly). A dream ...
2
votes
1answer
75 views

Optimise implementation of a quantum algorithm when an input is fixed

I need to implement a quantum comparator that, given a quantum register $a$ and a real number $b$ known at generation time (i.e. when the quantum circuit is generated), set a qubit $r$ to the boolean ...
2
votes
1answer
359 views

Building an N-qubit Controlled S Gate

I've been beating my head against this problem for three days now and I just can't seem to crack it. To construct an N-qubit controlled Unitary gate, I can do something like this (note I'm using ...
2
votes
1answer
144 views

If CNOTs and single qubit gates are universal then why do we need to prove that controlled U operations can be composed by them as well?

In the book by Chuang and Nielsen they prove that controlled U operations can be made out of CNOTs and single qubit gates. But then they go on to prove that they are universal by showing that every n ...
2
votes
1answer
497 views

Decompose a general two-qubit gate into general controlled-qubit gates

We often seek to decompose multi-qubit unitaries into single-qubit rotations and controlled-rotations, minimising the latter or restricting to gates like CNOTs. I'm interested in expressing a general ...
2
votes
1answer
128 views

How to implement a $\frac{\theta}{2}$ rotation from $\theta$ rotation?

Is there a way to create a rotation gate which has half the angle of some implementable gate? I am looking to implement a gate on Quirk which allows for standard time-dependent rotations $$R_x(\...
4
votes
0answers
136 views

Decomposition of any 2-level matrix into single qubit and CNOT gates

I saw an example which takes a 2 level matrix. Which is a $8\times8$ matrix that acts non trivially only on 2 levels of only states $|000\rangle$ and $|111\rangle$. The way they do it is by using a ...
5
votes
2answers
1k views

Composing the CNOT gate as a tensor product of two level matrices

I don't understand, why is the control not gate used so often. As far as I understand it, if you apply two 2 level operations on two qubits then you get a 4 x 4 matrix by the tensor product. So how ...
1
vote
1answer
84 views

Proof that $2^n \times 2^n$ operator be decomposed in terms of $2 \times 2$ operators

What is the proof that any $2^n\times 2^n$ quantum operator can be expressed in terms of the tensor product of $n$ number of $2\times 2$ quantum operators acting on a single qubit space each?
6
votes
3answers
756 views

Is there any method of adding two operators in a circuit?

I am trying to reconstruct the time evolution of a Hamiltonian on the quantum computing simulator, quirk. Ideally I would like to generalise this to any simulator. The unitary matrix is $$U(t)=e^{-...
5
votes
3answers
381 views

Hadamard gate as a product of $R_x$, $R_z$ and a phase

I am having problems with this task. Since the Hadamard gate rotates a state $180°$ about the $\hat{n} = \frac{\hat{x} + \hat{z}}{\sqrt{2}}$ axis, I imagine the solution can be found the following ...
1
vote
1answer
83 views

Creating a time dependent custom gate in Quirk

I have created a $16\times 16$ unitary operator using a Hamiltonian by finding its exponential $$U=\exp(-iH\delta t)$$ If I set $\delta t=1$ then I can take this matrix and input it into quirk using ...
2
votes
1answer
326 views

Gate sequence for exponential of product of Pauli Z operators

I want to compile $$\exp(-i \theta \sigma_i^z \sigma_j^z)$$ down to a gate sequence of single qubit rotations and CNOTs. How do I do this? What is the general procedure for compiling a unitary $U$ to ...