Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Is it possible to exactly compile Toffoli using H and CSWAP gates and ancilla qubits?

Question: Given controlled-SWAP (CSWAP) and Hadamard (H) gates, is it possible to exactly compile the Toffoli (CCX) gate? Note that I'm not looking for an encoded Toffoli gate. The answer should ...
Jonas Anderson's user avatar
1 vote
0 answers
40 views

Qiskit not efficiently compiling with new gate basis

I am using Qiskit to compile a small Qiskit circuit (shown below) with a gate basis consisting of Rigetti native gates: RZ ...
Steve Jeffrey's user avatar
0 votes
1 answer
158 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
6 votes
1 answer
232 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
  • 61.7k
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 ...
ions me's user avatar
  • 113
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, ...
user's user avatar
  • 1
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,...
misanek123's user avatar
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 $...
Anna Naden's user avatar
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 ...
Nikita Nemkov's user avatar
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 ...
BlackHat18's user avatar
  • 1,515
3 votes
1 answer
471 views

How to create CNOT from an entangling gate and arbitrary single-qubit gates?

I am working on the classical simulation of quantum circuits. I know how to efficiently implement the following entangling gate, which -- in the following paper: https://arxiv.org/pdf/1803.02118 -- ...
Moritz Epping's user avatar
2 votes
1 answer
97 views

Do we need to use an ancillary qubit when decomposing arbitrary $U(2^n)$ gates using Clifford+T universal gate sets?

As I know, we can decompose $U$ without ancilla if it's from special unitary group $SU(2^n)$. Do we need to use ancilla qubit on decomposing arbitrary $n$-qubit $U$ using Clifford+T universal gates ...
Игорь Токарев's user avatar
5 votes
2 answers
722 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 ...
vy32's user avatar
  • 651
2 votes
2 answers
410 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 ...
AdonaiH's user avatar
  • 45
7 votes
1 answer
435 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 ...
vy32's user avatar
  • 651
1 vote
0 answers
56 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$ ...
tererecomchimarrao's user avatar
9 votes
3 answers
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 ...
Bidon's user avatar
  • 878
1 vote
0 answers
931 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 ...
invalidexplorer's user avatar
12 votes
1 answer
396 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 ...
Yaroslav Kharkov's user avatar
4 votes
1 answer
197 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 ...
Léo Colisson's user avatar
2 votes
1 answer
907 views

What quantum gate is XNOR equivalent to?

The standard way to implement a reversible XOR gate is by means of a controlled-NOT gate or CNOT; this is the "standard quantum XOR operation". Physics.Stackexchange Is there a "standard quantum XNOR ...
user820789's user avatar
  • 3,342
5 votes
1 answer
370 views

How can I decompose a gate into $\{\mathrm{CNOT}, \mathrm{H}, \mathrm{P}(\theta)\}$?

I am working with the set $\{\mathrm{CNOT}, \mathrm{H}, \mathrm{P}(\theta)\}$ where $\mathrm{H}$ is the Hadamard gate, and $\mathrm{P}(\theta)$ is the phase gate with angle $\theta$. I want to build ...
The Bosco's user avatar
  • 313
26 votes
1 answer
1k views

Explicit Conversion Between Universal Gate Sets

I'm interested in the conversion between different sets of universal gates. For example, it is known that each of the following sets is universal for quantum computation: $\{T,H,\textrm{cNOT}\}$ $\{H,...
DaftWullie's user avatar
  • 61.7k
7 votes
1 answer
631 views

Quantum XOR Linked List Construction

After getting help here with XNOR & RCA gates I decided to dive into XOR Swaps & XOR linked lists. I was able to find this explanation for quantum XOR Swapping which seems sufficient for the ...
user820789's user avatar
  • 3,342
6 votes
1 answer
785 views

Quantum Ripple Carry Adder Construction

There is an excellent answer to How do I add 1+1 using a quantum computer? that shows constructions of the half and full adders. In the answer, there is a source for the QRCA. I have also looked at ...
user820789's user avatar
  • 3,342
13 votes
2 answers
887 views

Quantum XNOR Gate Construction

Tried asking here first, since a similar question had been asked on that site. Seems more relevant for this site however. It is my current understanding that a quantum XOR gate is the CNOT gate. Is ...
user820789's user avatar
  • 3,342
10 votes
2 answers
694 views

Shortest sequence of universal quantum gates that correspond to a given unitary

Question: Given a unitary matrix acting on $n$ qubits, can we find the shortest sequence of Clifford + T gates that correspond to that unitary? For background on the question, two important ...
user120404's user avatar
14 votes
2 answers
6k views

Given a decomposition for a unitary $U$, how do you decompose the corresponding controlled unitary gate $C(U)$?

Suppose we have a circuit decomposition of a unitary $U$ using some universal gate set (for example CNOT-gates and single qubit unitaries). Is there a direct way to write down the circuit of the ...
M. Stern's user avatar
  • 2,457
19 votes
2 answers
2k views

What is the mathematical justification for the "universality" of the universal set of quantum gates (CNOT, H, Z, X and π/8)?

In this answer I mentioned that the CNOT, H, X, Z and $\pi/8$ gates form a universal set of gates, which given in sufficient number of gates can get arbitrarily close to replicating any unitary ...
Sanchayan Dutta's user avatar
15 votes
1 answer
480 views

How does approximating gates via universal gates scale with the length of the computation?

I understand that there is a constructive proof that arbitrary gates can be approximated by a finite universal gate set, which is the Solovay–Kitaev Theorem. However, the approximation introduces an ...
M. Stern's user avatar
  • 2,457