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
2 votes
1 answer
56 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
  • 429
2 votes
0 answers
30 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
29 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
69 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
35 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
74 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
  • 755
2 votes
1 answer
119 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
49 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
31 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
115 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
94 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
70 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
  • 455
0 votes
2 answers
83 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
  • 455
4 votes
1 answer
67 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
  • 443
3 votes
1 answer
115 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
  • 83
3 votes
0 answers
55 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
  • 125
1 vote
1 answer
76 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
74 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
124 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
  • 55.7k
0 votes
1 answer
83 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,190
3 votes
2 answers
82 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
32 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
75 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
56 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
  • 11
1 vote
2 answers
165 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
245 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
46 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
58 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
54 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
155 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
578 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
203 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
2 votes
1 answer
117 views

Implementing controlled rotation for FRQI by using controlled Ry and NOT Gate

I was reading about Flexible Representation of Quantum Images (FRQI) encoding in Qiskit textbook. It says that, given $$\{\theta_0, \theta_1, ..., \theta_{4^{n}-1}\} \quad (\theta_i \in [0,\pi/2])$$ ...
Syed Emad Uddin's user avatar
1 vote
1 answer
404 views

qiskit : can you get circuit from unitary matrix?

In qiskit you can get a unitary matrix from a circuit (circuit to unitary matrix example). Is the opposite direction possible? Can you input a unitary matrix and have qiskit come up with a circuit? If ...
unknown's user avatar
  • 1,942
5 votes
2 answers
245 views

What's the most efficient decomposition in terms of T-count of the 4-qubit Toffoli with 1 ancilla?

When decomposing the 4-qubit Toffoli in the Clifford+T universal gate set with 1 ancilla qubit, what is the most efficient implementation one can get in terms of T-count? I can only find papers that ...
Ocelot's user avatar
  • 83
1 vote
1 answer
122 views

How to synthesize function $f(x)$ in amplitude encoding

In computational basis encoding, the way to encode $f(x)$ is known - a classical circuit is converted to a quantum circuit which takes $|x\rangle|0\rangle \to |x\rangle|f(x)\rangle $. I wonder how I ...
John Luke's user avatar
0 votes
1 answer
89 views

Implementing Odd Permutations Without Ancilla Bit

The paper says that The inversion $\alpha \mapsto \alpha^{-1} $ (where 0 is mapped to 0) can be seen as a permutation on $\mathbb F_{256}$. This permutation is odd, while quantum circuits with NOT, ...
user's user avatar
  • 1
3 votes
1 answer
168 views

Cirq : Reference for Toffoli decomposition

I was trying to find a reference for the 7 T-gate decomposition of the Toffoli gate given by Cirq. The decomposition originates from the the one used for CCZPowGate as given in the doc string here ...
Madhav Vijayan's user avatar
1 vote
0 answers
159 views

PyZX optimisation steps for Clifford circuits

Given the following ZX-diagram It should represent some random Clifford circuit (LC means Local Clifford). As far as I got, any Clifford circuit can be transformed into a ZX-diagram like the above, i....
Daniele Cuomo's user avatar
1 vote
3 answers
449 views

How to decompose a multi qubit Clifford unitary into a sequence of clifford gates

What are the algorithms that allow to decompose any given multi qubit Clifford unitary into elementary Clifford operations (e.g. Pauli+CNOT, with no T gate)?
John Brown's user avatar
1 vote
0 answers
66 views

Faithful description of a photonic setting with the circuit model

The above picture comes from this paper. The circuit on the left and the one on the right are equivalent (up to the basis). However, there is an important difference: the circuit makes the input -- i....
Daniele Cuomo's user avatar
2 votes
2 answers
422 views

Does phase kickback require the system to be in the eigenstate?

I've been watching this video for the introduction to phase kickback. And here's a diagram: I got confused if we really need $|\psi_k\rangle$ to be an eigenstate to make the kickback work. It seems ...
IGY's user avatar
  • 361
1 vote
1 answer
301 views

Best implementation for logical CNOT on Shor's code?

As the Shor's code is a CSS code, it admits a transversal implementation of logical CNOT. An immediate implementation may perform 9 (reversed) CNOT, by respecting the order of the qubits. However. ...
Daniele Cuomo's user avatar
2 votes
1 answer
73 views

How to initialize a state of the form$\frac{1}{\sqrt{2}}(|\texttt{++}\rangle + |\texttt{--}\rangle$) in the circuit model?

I wonder how to initialise a Bell-like state, in the circuit model, where instead of standard $|\Phi^{\texttt{+}}\rangle$, the entanglement is in the x-basis. Hence a state $\frac{1}{\sqrt{2}}(|\...
Daniele Cuomo's user avatar
3 votes
2 answers
260 views

On the photonic implementation of Shor's code

The above picture comes from this paper. I can see that the standard Shor's code has been re-designed. I have two main doubts: I can't figure out in figure (b) how the setting inputs the state $\...
Daniele Cuomo's user avatar
0 votes
1 answer
77 views

When are the following equivalences correct?

I can't figure out how the equivalences in the picture hold. The picture comes from this recent publication on PRA. EDIT: I think I might have been mislead by the gate represenation. In fact, the gate ...
Daniele Cuomo's user avatar
2 votes
1 answer
89 views

Is there a name for a gate that 'moves' one qubit to a new position via multiple SWAP gates?

Let's say there is a qubit at position $i$, and I want to move it to position $i'$. Without loss of generality, let's say $i < i'$. By 'move it' I mean, perform multiple $SWAP$ operations so that ...
Quantum Guy 123's user avatar
1 vote
2 answers
117 views

CNOT chain vs CNOT fountain in qiskit

I was going through qiskit's synthesis module, their methods take an argument called cx_structure which has two possible values, ...
Zeeshan ahmed's user avatar
2 votes
0 answers
37 views

Techniques to parallelize controlled-unitaries controlled by the same qubit but acting on different target qubits

I need to find a way to parallelize a set of controlled-unitaries that are all controlled by the same qubit and are targetting $n$ different qubits. The main constraint that I have is that I can only ...
Marco Fellous-Asiani's user avatar
4 votes
0 answers
92 views

What is the correct name of this quantum gate? Possibly state control gate

Let $\vec v \in \mathbb{C}^2 $ be the following quantum state: $$ \vec v = \frac{1}{\sqrt{2}}\begin{bmatrix} v_{1} \\ v_{2} \\ \end{bmatrix},\space \lvert v_1 \rvert = 1,...
misanek123's user avatar