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.
231 questions
2
votes
0
answers
46
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 ...
2
votes
1
answer
162
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 ...
1
vote
0
answers
85
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 ...
1
vote
2
answers
314
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 ...
3
votes
1
answer
308
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 "...
0
votes
1
answer
61
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 ...
1
vote
0
answers
71
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 ...
0
votes
1
answer
89
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 ...
8
votes
1
answer
230
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&...
1
vote
2
answers
1k
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 ...
4
votes
1
answer
364
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, ...
2
votes
1
answer
180
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])$$ ...
1
vote
1
answer
993
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 ...
6
votes
2
answers
464
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 ...
5
votes
3
answers
857
views
Quasiprobability decomposition of the CZ-gate
I was trying to obtain the quasi-probability decomposition of the CNOT gate by using the information in this paper.
The authors give us the example for the CZ gate (Figure 2, i.e. the one below).
The ...
1
vote
1
answer
155
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 ...
0
votes
1
answer
123
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, ...
1
vote
1
answer
306
views
Decomposition of unitary operator into rotations around Bloch sphere
I apologize in advance for any mistakes as I am new to this field and come from a programming, rather than mathematical/physical background.
I am looking for a way to decompose a given operator $U$ ...
3
votes
1
answer
186
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
...
1
vote
0
answers
180
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....
1
vote
3
answers
845
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)?
1
vote
0
answers
67
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....
2
votes
2
answers
456
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 ...
3
votes
3
answers
616
views
Best implementation for logical CNOT in Shor's $9$-qubit 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. ...
2
votes
1
answer
82
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}}(|\...
3
votes
2
answers
284
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 $\...
0
votes
1
answer
78
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 ...
2
votes
1
answer
126
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 ...
1
vote
2
answers
159
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, ...
2
votes
0
answers
54
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 ...
4
votes
0
answers
100
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,...
5
votes
1
answer
826
views
Construction of unitary matrices built from linear combination of Pauli strings
Let's define $P_k \in \{ I, X, Y, Z \}^{\otimes n}$ and called each of these $P_k$ as a Pauli string (or word) then given that $$U = \sum_{k=1}^L c_kP_k $$ with the following conditions:
$\sum_{k=1}...
4
votes
1
answer
165
views
If $A^4=B^4=AB=I$, what is a good circuit for $\sqrt A\sqrt B$?
TL/DR
What is a good circuit for:
$$\frac{1}{2}\begin{pmatrix}
-i & i & 1 & 1 \\
1 & 1 & -i & i \\
i & -i & 1 & 1 \\
1 & 1 & i & -i\end{...
2
votes
0
answers
72
views
Creating a unitary for binary encoding with respect to already encoded index states
Let us say that there are two quantum registers qr1 and qr2. Now the qr1 is in the state $\sum_i |x_i\rangle$(here $x_i$ is binary encoded value upto some precision) and originally qr2 is $|0\rangle$, ...
6
votes
2
answers
1k
views
How to perform a controlled Pauli string rotation gate?
I would like to know some circuit decomposition for an arbitrary controlled Pauli string rotation:
\begin{equation}
|0\rangle\langle 0| \otimes e^{i \theta (P_1\otimes...\otimes P_n)}+ |1\rangle\...
4
votes
0
answers
106
views
Relation between geometric and discrete circuit complexity
Geometric complexity of a unitary, as introduced for example here https://arxiv.org/abs/quant-ph/0502070, measures the length of a geodesic connecting the identity matrix and a given unitary in the ...
5
votes
1
answer
342
views
Native Gate Decomposition
TL;DR: I've got a very small set of gates to use and need to find efficient decompositions for $R_y$ and controlled $R_y$ gates. Does anyone have any better ideas than what I have?
I'm looking to ...
4
votes
1
answer
159
views
Confusion with the number of CNOTs in a circuit
I am a bit puzzled on the following circuit. According to this Quantum Computing SE thread it holds that
$$
e^{i(Z\otimes Z)t} = {\rm CNOT} (I\otimes e^{iZt}){\rm CNOT} \qquad (1)
$$
As a result we ...
6
votes
2
answers
724
views
How many quantum gates are needed to prepare an arbitrary state?
In this paper there is this sentence:
[...] the description of a $2^n\times2^n$ unitary matrix $U$ (which is a poly($n$)-size quantum circuit)
According to the meaning of "which" in ...
2
votes
1
answer
85
views
Decompose bell measurement gate into combination of controlled-not gates and one-qubit gates
OPENQASM2.0 has only one two-qubit gate: controlled not. For a teleportation experiment, I need to perform a measurement in the Bell basis. That is, I need a two-qubit gate with matrix representation
$...
8
votes
1
answer
769
views
Is the Solovay-Kitaev theorem relevant for modern hardware?
The Solovay-Kitaev theorem (and more recent improvements) explains how to efficiently compile any 2-qubit unitary into any universal (dense) finite set of gates. My question is if this theorem is ...
1
vote
2
answers
113
views
Circuit including phase factor in $XY(\beta, \theta)$ gate
In Implementation of the XY interaction family with calibration of a single pulse, the $XY(\beta, \theta)$ gate is defined as
$$
XY(\beta, \theta) = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 &...
-1
votes
1
answer
130
views
Decomposition of U1 gate $U_1(\lambda)$ , Phase Shift gate $\phi(\delta) $, and Swap gate [closed]
Can we express U1 gate $U_1(\lambda)$ , Phase Shift gate $\phi(\delta) $, and Swap gate
$$ U_1(\lambda) = \begin{pmatrix}1 & 0 \\ 0 & e^{i\lambda}\end{pmatrix}$$
$$ \phi(\delta) = \begin{...
4
votes
2
answers
1k
views
Optimal decompositions of some standard multi-qubit gates
To have a concrete example in mind: 3-qubit Toffoli gate can be decomposed into 6 $CNOT$s as shown here
I believe this is the most economic decomposition in terms of the number of $CNOT$s used. My ...
2
votes
4
answers
1k
views
How is a Toffoli gate built without using T gates?
Can someone tell me how to make a Toffoli gate without using T gates? Can we use $R_x$ and $R_y$. If yes, then how?
I tried many circuits but I was unable to create the CCNOT gate out of $R_x$, $R_y$ ...
2
votes
1
answer
80
views
Is it possible to decompose $\land(UXU^\dagger)$ in one-qubit operations and only a single $\land(X)$?
Let $U,V$ being any unitary.
Is it possible to decompose $\land(UXU^\dagger)$ in one-qubit operations and only a single $\land(X)$?
Something like the following: $\land(UXU^\dagger) \equiv (\mathbb{I}\...
1
vote
1
answer
47
views
Generalized push for $\land_{ab}(X)$ gate
EDIT: In the following I am using the Feynman notation for controlled operations - e.g. $\land_{ab}(X)$ is equivalent to a $CNOT$ with control qubit $q_a$ and target $q_b$. Ultimately, for any single-...
4
votes
1
answer
169
views
Universality for reversible classical computation
Is there any way to check whether a set of gates (for example, take the set comprising of the CNOT gate and the Hadamard gate) is universal for reversible classical computation?
I can think of trial ...
3
votes
2
answers
674
views
Is it possible to push back an $H$ gate to a $CZ$ gate?
Given the above scenario. Is it possible to "push back" the $H$ gate operation to occur before $CZ$?
Formally I am looking for some operation $CZ\cdot(U_1\otimes U_2) = H\cdot CZ$.
4
votes
0
answers
139
views
How exactly does the QuantumCircuit.decompose() method work?
From what I can understand from the source code, the circuit is converted into a DAG before the decomposition transpiler is performed onto the DAG circuit.
How does converting to a DAG circuit help us ...