Questions tagged [quantum-gate]

For questions regarding usage, performance, implementation, application or theory related to quantum gates.

Filter by
Sorted by
Tagged with
6 votes
3 answers
521 views

Use of change of phase gates

As explained in this this answer, when we have different (relative) phases between two states, those two states will yield the same probabilities when measured in the same basis but different ...
Ntwali B.'s user avatar
  • 401
11 votes
1 answer
3k views

Implementing a CCCNOT gate using only Toffoli gates

A CCCNOT gate is a four-bit reversible gate that flips its fourth bit if and only if the first three bits are all in the state $1$. How would I implement a CCCNOT gate using Toffoli gates? Assume ...
chuster's user avatar
  • 255
5 votes
2 answers
2k views

What are some open sources projects on quantum computing? [duplicate]

I am looking to collaborate on open source simulation efforts.
Enrique Segura's user avatar
5 votes
1 answer
213 views

How to implement a random selection of one of the 3 qubits on the IBM Q (composer)?

I would like to implement a quantum program on the IBM Composer with following characteristics: The output is the observed value of 3 qubits Only one of the 3 qubits should be observed as $1$, the 2 ...
JanVdA's user avatar
  • 1,138
7 votes
1 answer
543 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,272
6 votes
1 answer
608 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,272
13 votes
2 answers
728 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,272
23 votes
1 answer
6k views

How to interpret a quantum circuit as a matrix?

If a circuit takes more than one qubit as its input and has quantum gates which take different numbers of qubits as their input, how would we interpret this circuit as a matrix? Here is a toy example:...
Archil Zhvania's user avatar
6 votes
2 answers
563 views

How to prove that Z operator rotates points on Bloch sphere about Z axis through 180°?

My idea was to apply $Z$ operator 𝐭𝐰𝐢𝐜𝐞, which leads us back to the point where we started from, and also show that after applying the $Z$ operator just 𝐨𝐧𝐜𝐞 we are not at the same point ...
Archil Zhvania's user avatar
8 votes
1 answer
1k views

How to apply single and two qubit gates to 2 qubits multiple times?

Let's say we have the following quantum circuit: Let's say we input the state $|00\rangle$ . Both of the $H$ gates produce the output $1/\sqrt{2}$, but which one of the following $2$ vectors is the ...
Archil Zhvania's user avatar
15 votes
1 answer
11k views

How to input 2 qubits in 2 Hadamard gates?

Let's say we have a circuit with $2$ Hadamard gates: Let's take the $|00\rangle$ state as input. The vector representation of $|00\rangle$ state is $[1 \ 0 \ 0 \ 0]$, but this is the representation ...
Archil Zhvania's user avatar
6 votes
1 answer
402 views

How to implement a Square root of Swap gate that swaps 2n-qubits on the IBM Q (composer)?

I am looking for an implementation using the quantum gates provided by the IBM composer of the following quantum function: input $2n$ qubits output $2n$ qubits wherein $50\%$ of the cases the state ...
JanVdA's user avatar
  • 1,138
17 votes
2 answers
8k views

How to implement the 4 Bell states on the IBM Q (composer)?

I would like to simulate the 4 "Bell States" on the IBM composer? How can I best implement those 4 Bell states using the existing set of gates ? Here below you see the definition of the 4 Bell ...
JanVdA's user avatar
  • 1,138
11 votes
2 answers
2k views

Rotating about the y- or z-axis of the Bloch sphere

In order to rotate about an axis of the Bloch sphere we ususally use pulses e.g. in trapped ion quantum computing or superconducting qubits. Let's say we have rotation around the x-axis. What do I ...
Quasar's user avatar
  • 263
9 votes
3 answers
3k views

How to implement the "Square root of Swap gate" on the IBM Q (composer)?

I would like to simulate a quantum algorithm where one of the steps is "Square root of Swap gate" between 2 qubits. How can I implement this step using the IBM composer?
JanVdA's user avatar
  • 1,138
14 votes
3 answers
976 views

How to think about the Z gate in a Bloch sphere?

I am confused about how to understand the $Z$ gate in a Bloch sphere. Considering the matrix $Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$ it is understandable that $Z|0\rangle = |0\...
Bick's user avatar
  • 842
11 votes
3 answers
2k views

Implementation of the oracle of Grover's algorithm on IBM Q using three qubits

I am trying to get used to IBM Q by implementing three qubits Grover's algorithm but having difficulty to implement the oracle. Could you show how to do that or suggest some good resources to get ...
Bick's user avatar
  • 842
28 votes
4 answers
10k views

How can I implement an n-bit Toffoli gate?

I want to create a Toffoli gate controlled by n qubits, and implement it in QISKit. Can this be done? If so, how?
Ali Javadi's user avatar
  • 1,612
5 votes
1 answer
223 views

Conditional Phase Gate Superconducting Qubits

In the paper "Demonstration of two-qubit algorithms with a superconducting quantum processor" (L. DiCarlo et al., Nature 460, 240 (2009), arXiv) they demonstrate how to realize conditional phase gates ...
Quasar's user avatar
  • 263
7 votes
2 answers
523 views

Why is the decomposition of a qubit-qutrit Hamiltonian in terms of Pauli and Gell-Mann matrices not unique?

If I have the $X$ gate acting on a qubit and the $\lambda_6$ gate acting on a qutrit, where $\lambda_6$ is a Gell-Mann matrix, the system is subjected to the Hamiltonian: $\lambda_6X= \begin{pmatrix}0 ...
user1271772's user avatar
  • 12.8k
11 votes
2 answers
4k views

How can a controlled-Ry be made from CNOTs and rotations?

I want to be able to applied controlled versions of the $R_y$ gate (rotation around the Y axis) for real devices on the IBM Q Experience. Can this be done? If so, how?
James Wootton's user avatar
7 votes
1 answer
75 views

How to avoid error when applying certain combinations of degree of freedom rotations using a quantum circuit?

When applying each of the six degree of freedom rotations (or certain combinations of them) in an SO(4) using quantum gates, the results I expected are produced. For example, the following circuit in ...
JavaFXpert's user avatar
13 votes
3 answers
765 views

Is acting with a positive map on a state not part of a larger system allowed?

In the comments to a question I asked recently, there is a discussion between user1271772 and myself on positive operators. I know that for a positive trace-preserving operator $\Lambda$ (e.g. the ...
Quantum spaghettification's user avatar
9 votes
2 answers
1k views

Is the Kraus representation of a quantum channel equivalent to a unitary evolution in an enlarged space?

I understand that there are two ways to think about 'general quantum operators'. Way 1 We can think of them as trace-preserving completely positive operators. These can be written in the form $$\...
Quantum spaghettification's user avatar
20 votes
4 answers
3k views

Why are quantum gates unitary and not special unitary?

Given that the global phases of states cannot be physically discerned, why is it that quantum circuits are phrased in terms of unitaries and not special unitaries? One answer I got was that it is just ...
wdc's user avatar
  • 407
5 votes
1 answer
1k views

What exactly is a phase vector?

The following $2\times 2$ matrix $$ P = \begin{bmatrix} e^{i\theta} & 0 \\ 0 & e^{i\phi} \end{bmatrix} $$ represents a quantum gate because it's a unitary matrix. If we multiply $P$ by ...
user avatar
16 votes
1 answer
1k views

Obtaining gate $e^{-i\Delta t Z}$ from elementary gates

I am currently reading "Quantum Computation and Quantum Information" by Nielsen and Chuang. In the section about Quantum Simulation, they give an illustrative example (section 4.7.3), which I don't ...
brzepkowski's user avatar
  • 1,019
4 votes
2 answers
238 views

What can I deduce about $f(x)$ if $f$ is balanced or constant?

$\newcommand{\qr}[1]{|#1\rangle}$Question. Can you check whether this is correct? Also, given the analysis below, what is the domain of and co-domain of $f(\qr{x})$? I think it is $V^4 \to W^4 : f$ ...
R. Chopin's user avatar
  • 1,179
10 votes
1 answer
687 views

What happens if two separately entangled qubits are passed through a C-NOT gate?

Suppose I transform a state as follows: I start with the state $\lvert 0\rangle \otimes \lvert0\rangle \otimes \lvert0\rangle \otimes \lvert 0 \rangle$. I entangle the 1st and 2nd qubits (with an H ...
Midhun XDA's user avatar
10 votes
1 answer
545 views

How do you apply a CNOT on polarization qubits?

I read that a qubit can be encoded in a polarization state (horizontal or vertical polarization of a photon). How do you perform two-qubit operations on a polarization qubit?
Daniel Tordera's user avatar
38 votes
2 answers
6k views

What is quantum gate teleportation?

Quantum state teleportation is the quantum information protocol where a qubit is transferred between two parties using an initial shared entangled state, Bell measurement, classical communication and ...
Kiro's user avatar
  • 1,865
13 votes
2 answers
1k views

How do you rotate a Fock state qubit?

I read that a qubit can be encoded in a Fock state, such as the presence or absence of a photon. How do you perform single qubit rotations on Fock states?
Daniel Tordera's user avatar
46 votes
4 answers
12k views

How do I add 1+1 using a quantum computer?

This can be seen as the software complement to How does a quantum computer do basic math at the hardware level? The question was asked by a member of the audience at the 4th network of the Spanish ...
agaitaarino's user avatar
  • 3,747
17 votes
2 answers
2k views

Do multi-qubit measurements make a difference in quantum circuits?

Consider the unitary circuit model of quantum computation. If we need to generate entanglement between the input qubits with the circuit, it must have multi-qubit gates such as CNOT, as entanglement ...
Kiro's user avatar
  • 1,865
15 votes
1 answer
1k views

Why do we use the standard gate set that we do?

The typically used gate set for quantum computation is composed of the single qubits Cliffords (Paulis, H and S) and the controlled-NOT and/or controlled-Z. To go beyond Clifford we like to have full ...
James Wootton's user avatar
15 votes
3 answers
996 views

What is the quantum circuit equivalent of a (delayed choice) quantum eraser?

Quantum computers are efficiently able to simulate any other quantum system. Hence there must be some sort of equivalent of a (possibly simulated) quantum eraser setup. I would like to see such an ...
user avatar
4 votes
2 answers
255 views

Processing density capabilities in a quantum processor

Given the theoretical infinite quantum states that a qbit can be expressed as is there any practical limit to the processing density in any given quantum processor as compared to the absolute limits ...
Chris Rutherfurd's user avatar
10 votes
2 answers
531 views

Does quantum control allow to implement any gate?

Using quantum control techniques it is possible to control quantum systems in a wide range of different scenarios (e.g. 0910.2350 and 1406.5260). In particular, it was shown that using these ...
glS's user avatar
  • 21.7k
17 votes
1 answer
1k views

How are gates implemented in a continuous-variable quantum computer?

I've mostly worked with superconducting quantum computers I am not really familiar with the experimental details of photonic quantum computers that use photons to create continuous-variable cluster ...
Mark Fingerhuth's user avatar
6 votes
1 answer
316 views

What is the difference between quantum control and quantum optimal control?

In the context of quantum control theory, it is common to see references to both quantum control and quantum optimal control (e.g. 0910.2350 or the guide on qutip quantrum control functions). ...
glS's user avatar
  • 21.7k
14 votes
2 answers
4k 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,482
7 votes
2 answers
112 views

Symmetry of tensor product w.r.t. Vazirani 2-qubit video

Quantum Computing (QC) pioneer Vazirani has graciously long provided some nice videos on an intro to QC. E.g. in "2 qubit gates + tensor product" (2014) he introduces the tensor product w.r.t. QC ...
vzn's user avatar
  • 255
18 votes
2 answers
1k 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
33 votes
1 answer
12k views

How are quantum gates implemented in reality?

Quantum gates seem to be like black boxes. Although we know what kind of operation they will perform, we don't know if it's actually possible to implement in reality (or, do we?). In classical ...
Sanchayan Dutta's user avatar
12 votes
1 answer
581 views

How are quantum gates realised, in terms of the dynamic?

When expressing computations in terms of a quantum circuit, one makes use of gates, that is, (typically) unitary evolutions. In some sense, these are rather mysterious objects, in that they perform "...
glS's user avatar
  • 21.7k
9 votes
2 answers
3k views

How does evolving a two-qubit state through a CNOT gate entangle them?

Reading into CNOT gate I understand that, mathematically, such a gate entangles the control qubit and the target. (the resulting state is $\frac{1}{\sqrt 2}(|00\rangle+|11\rangle)$) However, looking ...
ItamarG3's user avatar
  • 695
8 votes
1 answer
225 views

New algorithm for faster QC simulation by IBM

This new algorithm for QC calculation was introduced recently (2017 4Q) by IBM/ Pednault et al. to great fanfare. The paper seems more couched in the language of physics. Are there any basic ...
vzn's user avatar
  • 255
27 votes
2 answers
2k views

Why is it important to eliminate the garbage qubits?

Most reversible quantum algorithms use standard gates like Toffoli gate (CCNOT) or Fredkin gate (CSWAP). Since some operations require a constant $\left|0\right>$ as input and the number ...
Be Brave Be Like Ukraine's user avatar
12 votes
1 answer
1k views

How does Fourier sampling actually work (and solve the parity problem)?

I'm writing with respect to part I and part II of the Fourier sampling video lectures by Professor Umesh Vazirani. In part I they start with: In the Hadamard Transform: $$|0...0\rangle \to \sum_{\{...
Sanchayan Dutta's user avatar
37 votes
8 answers
6k views

If all quantum gates must be unitary, what about measurement?

All quantum operations must be unitary to allow reversibility, but what about measurement? Measurement can be represented as a matrix, and that matrix is applied to qubits, so that seems equivalent to ...
Auden Young's user avatar
  • 3,369