# Questions tagged [quantum-gate]

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

1,620 questions
Filter by
Sorted by
Tagged with
192 views

### How is it not a contradiction that it is possible to build fault tolerant circuits with strictly contractive (e.g.: depolarizing noise) channels?

This paper discusses strictly contractive channels, i.e. channels that strictly decrease the trace distance between any two input quantum states. It is shown that if a quantum circuit is composed of ...
53 views

### How to determine the single-qubit phase?

In some works it is suggested to find the qubit phase by the following method: Apply $X/2$ (or $Y/2$) gate - preparing the qubit in superposition. Detune the qubit by flux pulse, for example here ...
1 vote
19 views

### References for mapping qudit gates to qubits equivalent

Let's assume that I'm modelling a d-levels qudit as a set of n qubits, where $d = 2^n$. I would need to map the application of quantum gates on the qudit to a set of operations of the relative qubits ...
9k views

### How to calculate circuit depth properly?

Is the circuit depth the longest sequence of gates applied on one of the qubits? Or is it something more complicated?
1 vote
48 views

### Does the $\text{CNOT}$ gate activate if the control qubit is $-|1⟩?$

I understand how the $\text{CNOT}$ gate works intuitively: However, say we have a circuit where the $Z$ gate is applied to $|1⟩$, which turns $|1⟩ \to -|1⟩$. Then, there is a $\text{CNOT}$ gate with ...
34 views

### general way to decompose a CZ gate on $n$-qubit system

Suppose I have a CZ(i,j) gate (or CNOT) acting on qubit $i$ and $j$, on a $n$-qubit system. Is there a general way to decompose this gate into a set of gates that only involve single-qubit gates and ...
55 views

### Can you push a CZ gate through a Toffoli gate?

Is it possible to push a CZ gate through a Toffoli gate?
1 vote
113 views

### Get parameters of a CU gate for implementing an erroneous CX gate with fidelity = 0.81

Let's say the definition of an erroneous CNOT gate is given as - CNOT is a 2-qubit quantum gate when the control qubit is at state 0, applies identity operation on the target qubit, when the control ...
54 views

1 vote
11 views

### Adding measurement circuits to the singlet state circuit and want to create single circuit

I am trying to add the measurement of Alice and bob's circuit to the singlet circuit. Actually, I am trying to build the e91 protocol. But it is giving me an error like this. ...
1 vote
36 views

### Simulator able to run SwitchCase in qiskit?

I am trying to run my circuit which is the following on a simulator. However, when I want to execute this on almost all the simulators the following error pops up: "The control-flow construct '...
109 views

### If_test() - Dynamic Circuits in qiskit

I am trying to run a dynamic circuit by having mid-measurement in my code as follows: ...
64 views

### Conditioned gates with multiple classical bits

Consider a circuit where you have 6 qubits and apply some gates. Then, you measure qubits 1 , 2 , 3 with results $c_1 , c_2 , c_3$. Next you apply $X^{c_1}$ on the 4-th qubit, $X^{c_1 + c_2}$ on the 5-...
1 vote
157 views

### Why is the error propagation by the CNOT gate considered without taking into account the state?

In the syndrome measurement circuit of a stabilizer code, I think you would consider that Pauli errors propagate through the CNOT gates. I don't understand why one usually considers the propagation of ...
1 vote
196 views

### What is more important, minimizing the number of gates, or the number of qubits?

I am new to the quantum world, and I have 2 circuits that measure cosine similarity between 2 binary vectors. One uses a swap test, the other uses something called a hyper-state generation procedure. ...
6k views

### Classical XOR gate in Quantum Circuit

Can we use classical XOR gate in a quantum circuit? Or are there any alternatives for XOR gate?
1 vote
66 views

### How to explain the output as $|-\rangle$

I am a complete newbie to quantum computing and qiskit. I am trying to implement $H$ gate in Measurement-Based QC architecture based on a paper "Qiskit As a Simulation Platform for Measurement-...
48 views

### What does any 2 Qbit Universal Gate in any Quantum Circuit with an N Qbit Input "operate on" mean mathematically

I am very new to Quantum Computing thus please excuse the layman question. I am aware that just like classical gates Quantum Computation also has a set of universal gates. Moreover, a universal set of ...
65 views

### Constructing a two 3-qubit state involving either X, Y or Z rotation gate

The goal is to construct the state $|\psi\rangle = \frac{1}{2}|010\rangle + \frac{\sqrt{3}}{2}|101\rangle$ Two issues I am facing: What is a good choice for initial state? What is a good choice for ...
33 views

### how do i get the sequence of resulting data on the ibm quantum computers platform?

I have been working on the ibm quantum computer platform, but i have faced a problem with the output. My circuit contains Hadamard gates and entanglement gate between two qubits. I want to get the ...
427 views

### Inverses and the Clifford Hierarchy

Elements of the (qubit) Clifford Hierarchy are unitary matrices. For a good definition of the Clifford Hierarchy see: Is there a closure property for the entire Clifford hierarchy? While a complete ...
149 views

### How to use the csv dataset file imported as a dataframe in QSVM Qiskit code

I am trying to run QSVM qiskit code with my custom dataset which I am loading as a pandas dataframe. When I execute the part below with my own dataset in the place of breast_cancer, it gives error &...
65 views

### How to do modular exponentiation in qiskit with gates?

I understand the following code on why the specific swaps take place, but when I try to replicate it with $N=35$, I get confused. ...
1 vote
50 views

### How to fix two flip-bit errors in a 3 qubit input

Aware of how a 1-bit flip can be fixed for 3-qubit input by having 2 Ancilla bits, encoding, and using the Toffoli gate to fix the error and decode. How can this idea be extended for a 2-bit flip (...
71 views

### Time evolution of Hamiltonian

I have given the following Hamiltonian $$\tilde H = - J_x (X_0 X_1 + X_2 X_3) - J_z (Z_0 Z_2 + Z_1 Z_3) - h\sum_j X_j + Z_j$$ Where, for example, $X_0 = \sigma^x \otimes I \otimes I \otimes I$ and I ...
264 views

### Regarding the inductive proof that any Clifford gate can be made of Hadamard, phase and c-not

In Exercise 10.40 of Nielsen and Chunang's textbook, the reader is supposed to construct an inductive proof of Theorem 10.6 that any Clifford gate can be made of Hadamard, phase and c-not. There it is ...
151 views

1 vote
30 views

1 vote
130 views

### SX operator and superposition

I am running some tests using the probabilities we get from statevector to assert values in qiskit. For instance, with two qubits and a hadamard gate on the first one we have: ...
218 views

### Hamiltonian in CNOT gate implementation

I am studying the physical implementation of the CNOT gate from "Introduction to Quantum Computing" (Ray LaPierre) and I am confused about the order of operators in the tensor product of the ...
1 vote