Skip to main content

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
0 votes
0 answers
21 views

Solving variables in symbolic unitary to get a desired real-valued unitary using qiskit or qympy, qiskit-symb/pytket

I am trying to decompose a 4x4 unitary into 2 qubit circuit using U3 and CNOT gates but the circuit implementation qiskit gives me is not optimized. So I started looking at qiskit-symb and qympy to ...
AishM's user avatar
  • 1
0 votes
1 answer
121 views

Is there a tool to decompose 4-Qubit unitaries (aka 16x16 matrices)?

I was wondering if there is a tool that can decompose such a matrix in gates on 4 qubits? I found one for 3-qubit gates (9x9 matrices) in Cirq but nothing for bigger matrices. (The matrix is not ...
Schrödinger314's user avatar
1 vote
1 answer
39 views

Implementation of a unitary operator scaled by a factor

Is it possible to implement a unitary operator scaled by a factor on a quantum computer? Let's say the unitary operator is $U$: $$U=\begin{bmatrix} u_0 & u_1 \\ u_2 & u_3 \end{bmatrix}\...
upe's user avatar
  • 311
0 votes
1 answer
55 views

Realization of the gate $(I\pm U)/2$

The state after applying the Hadamard test (before measurement) is $$\newcommand{\ket}[1]{|#1\rangle}\newcommand{\bra}[1]{\langle#1|}\ket{0}\frac{I+U}{2}\ket{\psi} + \ket{1}\frac{I-U}{2}\ket{\psi}.$$ ...
upe's user avatar
  • 311
2 votes
2 answers
67 views

Better constant for linear depth incrementers

Currently working on some quantum arithmetic and was wondering if we have a better constant factor for a linear depth incrementer. As an example (and the best I could currently find), Craig Gidney ...
LukasM's user avatar
  • 53
2 votes
2 answers
49 views

Calculating number of CNOT gates in Pauli evolution gate

How to calculate the number of CNOT gates for a Pauli exponentiation for given time? I am performing Trotterization which involves performing Pauli evolution ...
Zee's user avatar
  • 391
0 votes
0 answers
27 views

BQSkit Selecting Starting Circuit Structure

Background On the BQSKit repository, there is a nice example of using the qfactor algorithm to instantiate a 3-qubit Toffoli circuit. For this to work, however, it is first necessary to specify an ...
Shadow43375's user avatar
5 votes
4 answers
115 views

$U_1\oplus U_2$ decomposable into $I\oplus U$ and 1-qubit gates?

TL;DR Let $U_1, U_2, U$ be arbitrary 1-qubit quantum gates. Can 2-qubit gates of the form $U_1\oplus U_2$ always be decomposed into a combination of controlled gates ($I\oplus U$) and single qubit ...
upe's user avatar
  • 311
1 vote
1 answer
75 views

How many gates are necessary to implement an arbitrary n-qubit permutation unitary?

How many gates are necessary to implement an arbitrary n-qubit permutation unitary, using only 1- and 2-qubit gates? An n-qubit permutation unitary is a $2^n$ x $2^n$ unitary matrix where each entry ...
QNA's user avatar
  • 181
2 votes
1 answer
99 views

How to retrieve a phase gate from a circuit made out of $CX$ and $T$

The extract below comes from this paper. It is an example that shows a basic phase polynomial, related to the $CCZ$ gate. It can also be written with $CX$ and $T$ gates. I can't find the connection ...
Daniele Cuomo's user avatar
3 votes
1 answer
110 views

Is it possible to decompose a controlled gate with control qubit in the $|+\rangle$ state?

$\newcommand{\ket}[1]{\vert#1\rangle}\newcommand{\bra}[1]{\langle#1\vert}$ Given a quantum circuit with 2 qubits that executes a controlled gate $CU$ where the control qubit is in the $\ket{+}$ state, ...
upe's user avatar
  • 311
0 votes
1 answer
52 views

How can I shift elements around in my state vector according to a specific pattern?

Consider the statevector $|\psi_1\rangle=(a_0,...,a_{N-1})^T$. My goal is to shift the elements around to end up with $|\psi_2\rangle=(a_{3N/4},...,a_{N-1},a_0,...a_{N/2},\vec{\phi})^T$ where $\vec{\...
thespaceman's user avatar
1 vote
1 answer
98 views

How to find an equivalent circuit without ancilla qubits?

$\newcommand{\ket}[1]{|#1\rangle}$ I have the following quantum circuit: (The inner qubits are both initialized to $|i\rangle$. $U$ is a arbitrary quantum gate.) But I am only interested in the ...
upe's user avatar
  • 311
3 votes
1 answer
164 views

Clifford+T synthesis with imperfect T gates

From this paper, it has been nicely shown that the number of perfect $T$ gates required to simulate arbitrary single-qubit gates grows linearly with $\log(1/\epsilon)$, where $\epsilon$ is the error ...
Yunzhe's user avatar
  • 761
1 vote
0 answers
45 views

Proving that linear reversible boolean functions are permutation functions

The answer to this question begins with a statement of my interest: 𝑈|𝑥⟩=|𝑓(𝑥)⟩ where 𝑓:𝔽𝑛2→𝔽𝑛2 is a reversible Boolean function. These are exactly the permutations of bitstrings Assuming ...
Daniele Cuomo's user avatar
1 vote
0 answers
39 views

Calculation of feasible operations for a certain set of primitive gates

Assume we have a set of primitive operations of a quantum processor. How can I determine the set of feasible operations or prove that a certain operation is not feasible? As an example, one could ...
qntdni's user avatar
  • 23
3 votes
1 answer
75 views

What is the function group generated by generalised Toffoli gates?

I am trying to define a mathematical framework that starts from a generic function $f$, which I can synthesis as a circuit of generalised Toffoli gates -- i.e. $m$ controls, 1 target. I would like to ...
Daniele Cuomo's user avatar
2 votes
1 answer
249 views

Multi-control multi-target gate

I'm using qiskit for simulation. Suppose, I have 6 qubits with indices [0, 1, 2, 3, 4, 5] and I have an operator $U$ of size $4 \times 4$, such that it operates on ...
Марина Лисниченко's user avatar
2 votes
1 answer
66 views

Consecutive phased X rotation gates simplification

I have two consecutive phased X rotation (see cirq PhasedXPowGate gate definition), how to find both t' and p' angles (according to previoux cirq definition) so that two consecutive PhasedXPowGate are ...
user12910's user avatar
  • 451
2 votes
0 answers
45 views

CNOT circuit synthesis with Gauss elimination. Explanation and beyond?

This paper introduces to the synthesis of a (optimal) circuit of CNOTs only; starting from a parity map encoded into a matrix. It is based on Gaussian Elimination. This is an important result, which ...
Daniele Cuomo's user avatar
1 vote
0 answers
31 views

Can the optimal synthesis of a parity matrix generate complex combinations of CXs?

Consider the method described in Optimal Synthesis of Linear Reversible Circuits. I am led to think that, for any parity matrix given in input to such a method, the output would be a sequence of CX ...
Daniele Cuomo's user avatar
0 votes
1 answer
82 views

Can we express $CX_{2,1}CX_{1,2}$ as single standard 2-qubits gate?

I'd like to know if the above circuit can be synthesised as any single standard 2-qubit gate -- e.g. an Ising gate. Eventually, other 1-qubit correcting gates. EDIT: with standard I mean any gate that ...
Daniele Cuomo's user avatar
2 votes
1 answer
47 views

Math Behind $X$ Gate With Arbitrary Phase is equivalent to $ZXZ$ Gate

An X gate where there is a phase shift $\phi$ to the applied sinusoidal wave $U = e^{-i\frac{\theta}{2}(cos(\phi)\sigma_x+sin(\phi)\sigma_y)}$ is equivalent to a series of gates $Z_{-\phi}X_{\theta}Z_{...
Esam El-khouly's user avatar
1 vote
0 answers
78 views

Application of transformation $U_d$ that maps any qudit state to $|d-1\rangle$

When giving examples of universal gate sets in the paper Qudits and High-Dimensional Quantum Computing, the authors first define the transformation that maps any given qudit state to $|d-1\rangle$: $$ ...
banercat's user avatar
  • 763
2 votes
1 answer
455 views

Constructing a controlled phase gate from given gates

As part of a project in a quantum computing course we were asked to classically simulate the quantum phase estimation algorithm, which has inverse QFT as one of its components. On the Wikipedia page ...
Ziv's user avatar
  • 21
1 vote
0 answers
67 views

Global (Ising) Gates and ZX-calculus representation

I could find from this source -- but also from other works on ZX-calculus -- the following extract: This looks to me as a generalisation of a 2-qubit Ising gate to an $n$-qubit global Ising gate. ...
Daniele Cuomo's user avatar
1 vote
0 answers
35 views

How to find the canonical form (i.e., phase-free representation) of a unitary matrix?

While reading Weiden and others' recent paper: Improving Quantum Circuit Synthesis with Machine Learning, I came across the notion of canonically representing a unitary matrix. More precisely, two ...
SML0712's user avatar
  • 39
2 votes
1 answer
163 views

Exact synthesis of Toffoli gate from CNOT and rational single-qubit gates?

Is it possible to implement a Toffoli gate exactly using just CNOT gates and single qubit complex rational gates (i.e. with entries in $\mathbb{Q}(i)$), possibly with ancillas? I know this works with ...
D0r1an's user avatar
  • 21
2 votes
2 answers
143 views

Gate synthesis with parametrised precision

I am wondering whether Qiskit (or other quantum program language) can perform gate synthesis with parametrised precision. I tried with ...
Zehong Fan's user avatar
1 vote
1 answer
73 views

How can I simulate the following 2×2 Hamiltonian $e^{i\begin{bmatrix} 8 & 6+i \\ 6-i & -1\end{bmatrix}}$?

How can I simulate the following 2×2 Hamiltonian $$ e^{i\begin{bmatrix} 8 & 6+i \\ 6-i & -1\end{bmatrix}}|\Psi\rangle$$ ie. how to rewrite that matrix exponential in terms of other, well-used ...
James's user avatar
  • 491
0 votes
2 answers
97 views

Is there a matrix exponential $e^{iA}$ gate in IBM Quantum Experience?

Is there a gate that can perform the matrix exponential operation $$e^{iA}|\Psi\rangle$$ in IBM quantum experience API? What is the name and symbol for this type of gate (or some other gates that can ...
James's user avatar
  • 491
4 votes
1 answer
79 views

Computing the Bloch sphere representation of an arbitrary operator in $U(2)$

Computing the Matsumoto-Amano normal form of an operator in $U(2)$ involves finding the Bloch sphere representation of said operator, see Remarks on Matsumoto and Amano’s normal form for single-qubit ...
Ntwali B.'s user avatar
  • 453
3 votes
1 answer
154 views

How many two-qubit controlled gates do you need to simulate any CU gates where U is a diagonal matrix?

Assuming we have n qubit, the first qubit is a control qubit, and the rest are the targets of $U$. If $U$ is a diagonal matrix, is there any theory to find the minimum number of two-qubit controlled ...
Huy By's user avatar
  • 93
3 votes
0 answers
63 views

Brute force gate decomposition of (specific) 4 qubit unitary matrix

I have a specific 4-qubit 16x16 unitary matrix $U$ with $9$ parameters. My goal is to find a gate decomposition in terms of e.g. ...
Korbinian's user avatar
  • 145
1 vote
1 answer
111 views

How to convert a basic matrix into a quantum circuit?

Classical gates are not invertible, but larger expressions made from those gates can be invertible. One example of an invertible function is the function $f(A,B,C) = X,Y,Z$: $X = A \ B \ | \ \neg B \ ...
G S's user avatar
  • 13
2 votes
1 answer
94 views

Converting a Matrix to a Gate in OpenQasm 2

I am a beginner when it comes to quantum computing so forgive me if this is a dumb question. Does anyone know how to create a gate from any matrix on OpenQasm2? Specifically, can anyone provide any ...
Sam's user avatar
  • 31
4 votes
0 answers
160 views

Universality with Toffoli + Hadamard

If I take the two gates Hadamard and Toffoli, then it is clear that I cannot simulate an arbitrary $n$ qubit unitary on $n$ qubits because both matrices are real, so there's no access to the complex ...
DaftWullie's user avatar
  • 59.4k
0 votes
1 answer
114 views

perform a SWAP measurement using local operations and classical feedback

I am interested in performing a SWAP measurement, namely, measure 2 qubits and project their state onto either the triplet state manifold $\{|00\rangle, |11\rangle, |01\rangle + |10\rangle\}$ or the ...
Lior's user avatar
  • 1,220
3 votes
2 answers
90 views

Can a $CX_{1,2}\cdot CX_{2,1}$ be synthesised to some $CU$ plus local gates?

Can the above circuit be synthesised to an operation where there is only one control qubit? I.e. a controlled-unitary gate, eventually surrounded by local gates.
Daniele Cuomo's user avatar
2 votes
0 answers
39 views

Number of distinct permutation classes up to multiplication by Clifford elements

Question The number of permutation gates on $n$ qubits is $2^n!$. Define an equivalence relation on these gates by $p_1 \approx p_2$ iff $p_1 = C_L p_2 C_R$ where $p_1, p_2$ are $n$-qubit permutation ...
Jonas Anderson's user avatar
2 votes
1 answer
108 views

Unitary to circuit in qiskit

I have a program that determine the unitary matrix of a unknown gate in a quantum circuit and then it checks in the standard gate list to get the name of unknown gate. It is guaranteed that unknown ...
wizzywizzy's user avatar
1 vote
0 answers
69 views

How to Trotterize a CNOT gate?

I came across a paper that said that they Trotterized a CNOT gate into 4 blocks of CU gates where the CU gate parameters are specified. This was all done on Qiskit. How does this Trotterization ...
NikNack's user avatar
  • 51
1 vote
2 answers
244 views

Decomposition of $\exp(-i (X_1X_2 + Y_1Y_2) X_3)$

The three-body terms $\exp[-i\theta(X_1X_2+Y_1Y_2)X_3]$ and $\exp[-i\theta(X_1X_2+Y_1Y_2)Y_3]$ lead to unitaries of the form $$ \begin{bmatrix} 1 & & & & & & & \\ & 1 ...
NaturalLog's user avatar
2 votes
1 answer
277 views

How to construct solution based on the Schrödinger equation and split it into gates?

To the best of my knowledge, the gate notation forms the quantum programming. For instance, I use qiskit, pennylane, etc. products to see how the algorithms do their job. At the same time the "...
Марина Лисниченко's user avatar
0 votes
1 answer
57 views

How to implement the cross term (multi-qubit) in the square of the finite difference operator?

I am trying to simulate the Hamiltonian evolution of the 1+1D $\lambda\phi^4$ scalar field theory by digitising it and encoding on a quantum computer. The process of digitising is taken from this ...
K0mp0t1k's user avatar
1 vote
0 answers
67 views

Non-local $CNOT$ By means of Ising gates

Consider the circuit below. This is almost the same as the standard protocol to perform a non-local $CNOT_{0,3}$. The only difference is that I decomposed the upper local $CNOT_{0,1}$ into one Ising ...
Daniele Cuomo's user avatar
0 votes
1 answer
76 views

Transforming an unkown phase into unkown bit values on bell states

Consider the state $|\Psi^\pm\rangle = \frac{1}{\sqrt{2}}(|01\rangle \pm |10\rangle)$. The $|\Psi^\pm\rangle$ state is a bell state up to an unkown phase. I am looking for a sequence of single-qubit ...
Daniele Cuomo's user avatar
8 votes
1 answer
204 views

What is the minimum number of non-Clifford gates does it take to prepare a superposition over all "two-hot" basis vectors?

The generalized W state: $$W_n=\frac{1}{\sqrt{n}}(|100\cdots 0\rangle + |010\cdots 0\rangle + \ldots + |00\cdots 01\rangle)$$ is often thought of as the uniform superposition over all "one-hot&...
Mark Spinelli's user avatar
1 vote
2 answers
876 views

How to construct common classical gates with CNOT circuit?

How can I construct AND, OR, NAND, NOR with CNOT gates. First off, this other question describes how to make them with matrices. Theoretically I can construct all those gates already. I know how to ...
ions me's user avatar
  • 113
4 votes
1 answer
287 views

Shortest depth on Clifford+T to decompose a Toffoli

I am looking for a reference providing a circuit that has the smallest possible depth, without ancilla, once the Toffoli has been decomposed on Clifford+T gateset, where Clifford is generate by cNOT, ...
Marco Fellous-Asiani's user avatar

1
2 3 4 5