# Questions tagged [quantum-gate]

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

1,502 questions
Filter by
Sorted by
Tagged with
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 ...
• 401
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 ...
• 255
2k views

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

I am looking to collaborate on open source simulation efforts.
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 ...
• 1,138
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 ...
• 3,272
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 ...
• 3,272
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 ...
• 3,272
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:...
• 2,147
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 ...
• 2,147
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 ...
• 2,147
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 ...
• 2,147
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 ...
• 1,138
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 ...
• 1,138
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 ...
• 263
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?
• 1,138
976 views

• 12.8k
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?
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 ...
• 183
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 ...
1k views

• 16.9k