Questions tagged [quantum-gate]
For questions regarding usage, performance, implementation, application or theory related to quantum gates.
1,620
questions
3
votes
3
answers
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 ...
0
votes
0
answers
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
1
answer
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 ...
25
votes
4
answers
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
2
answers
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 ...
0
votes
1
answer
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 ...
0
votes
0
answers
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
1
answer
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 ...
2
votes
1
answer
54
views
What are efficient methods for measuring gate noise?
In this question I'm concerned with getting detailed spectral information about analog noise in quantum gates.
Assume we have imperfect control over transitions between $\vert 0\rangle$ and $\vert 1\...
5
votes
1
answer
589
views
Two qubit gate decomposition using Qiskit
I am writing some python code to be able to optimise the total error in two qubit gate decomposition.
I am using the Qiskit module qiskit.quantum_info.synthesis.two_qubit_decompose
My question relates ...
4
votes
0
answers
49
views
A measure of entanglement created by a unitary operation
Let $U$ be a unitary matrix acting on a 3-qubit system. If there is no correlation among any pairs of the three qubits, the unitary operation can be represented as $U = U_1 \otimes U_2 \otimes U_3$, ...
1
vote
1
answer
91
views
Problem with the mathematical definition of the eigenvalue algorithm on a specific exercise
I think I understand well how the eigenvalue algorithm works but when I try to define it mathematically I have problems.
Specifically I have the matrix U:
$$
U =
\begin{pmatrix}
0 & i \\
i & 0
...
0
votes
1
answer
45
views
Netlist of the transpiled circuit in Qiskit
I am new to running quantum circuits in Qiskit. In the IBM quantum learning lab, I transpiled a simple 4-qubit quantum circuit using a 7-qubit IBM quantum computer. I received a tranpiled circuit ...
5
votes
2
answers
90
views
Decomposition of a $4 \times 4$ unitary matrix
I am currently studying the paper "Decomposition of unitary matrices and quantum gates (2012)" and referring to the textbook Quantum Computation and Quantum Information. Among the topics, I ...
3
votes
1
answer
100
views
How much complexity is required to implement $\text{C$_\Pi$NOT}$ gate?
The projector-controlled not gate $\text{C$_\Pi$NOT}$ is defined as
$$\text{C$_\Pi$NOT} \, \colon= \Pi \otimes X + (\mathbb{I}-\Pi)\otimes\mathbb{I}\,, \tag{1}$$ in András Gilyén et. al. (2018)[arXiv:...
6
votes
2
answers
165
views
Equivalence checking of quantum circuits up to error
Suppose you are given two circuit descriptions $A$ and $B$ where by a circuit description I mean a sequence of gates (in the order they are applied) and the qubits they are applied on. (For the sake ...
0
votes
1
answer
60
views
How to perform below operation in Qiskit?
I want to implement the below equation in Qiskit.
$(A \otimes B).\rho.(B^\dagger \otimes A^\dagger)$ where $\rho$ is a density matrix and $A$ and $B$ are CNOT gates.
$$ A=\begin{bmatrix}
1 & 0 &...
2
votes
2
answers
168
views
What role does Landauer's principle play in quantum reversibility?
In section 3.2.5 of Nielsen and Chuang (starting page 153) they talk about Landauer’s principle, where they discuss the lower bound on the thermodynamic cost of erasing information.
In irreversible ...
0
votes
1
answer
36
views
Frequency of qubits in qiskit simulators
I am trying to study the effect of dynamical decoupling sequences (Hahn Echo and CPMG) using qiskit's qasm_simulator with an added noise model from ...
4
votes
2
answers
328
views
What is the thought process for circuit making after seeing input and output of a matrix?
Here is an exercise (4.27) from Nielsen and Chuang and I found the answer (given in the figure below) online without any explanation. The question was to construct a circuit by seeing a matrix (given ...
0
votes
1
answer
251
views
EPR pairs (Bell states) preparation circuit in SymPy
I am trying to recretate this circuit from the book: https://www.elsevier.com/books/quantum-information-processing-quantum-computing-and-quantum-error-correction/djordjevic/978-0-12-821982-9
The ...
4
votes
1
answer
316
views
How to define a custom gate from a matrix in TKET
I'm currently learning all about different quantum tools such as qiskit, tket, cirq, Forest SDK and so on. I just want to create a circuit that gets executed given a matrix, because a circuit can be ...
9
votes
1
answer
302
views
When is the square root of a Clifford gate a Clifford gate?
Is there any condition for the square root or any rational power of a Clifford gate to be a Clifford gate (generated by $S$, Hadamard $H$, and CNOT)? It can be easily shown that $\sqrt{X}$ is Clifford ...
1
vote
1
answer
49
views
Phase accumulation for multiple Rabi driving pulses
When a single-qubit gate is operated by Rabi driving, the resulting operator is equivalent to
$$ \hat{O} = R_z(\omega t) R_x(\Omega t)\tag{1}$$
where $\omega$ is the frequency of the driving field, $\...
1
vote
0
answers
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
1
answer
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 '...
2
votes
1
answer
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:
...
2
votes
2
answers
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
3
answers
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
2
answers
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.
...
6
votes
1
answer
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
0
answers
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-...
0
votes
1
answer
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 ...
2
votes
1
answer
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 ...
0
votes
1
answer
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 ...
8
votes
1
answer
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 ...
0
votes
1
answer
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 &...
2
votes
0
answers
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
1
answer
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 (...
3
votes
1
answer
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 ...
5
votes
1
answer
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 ...
4
votes
1
answer
151
views
Can every unitary be approximated by gates from the Clifford Hierarchy?
For $k > 1$, we recursively define $\mathcal C^{(k)}(n)$ as
$$
\mathcal C^{(k)}(n) = \Bigl\{ U \in \mathbf U(2^n)
\mathrel{\Big\vert} \forall P \in \mathcal C^{(1)}(n) : U P U^\dagger
\in \...
0
votes
1
answer
96
views
How does the V gate perform modular exponentiation?
The V gate is defined such that $V^2=X$:
$$ V|0\rangle = \frac{1}{2}\begin{bmatrix} 1+i&1-i\\1-i&1+i\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix} = \frac{1+i}{2}|0\rangle + \frac{1-i}{2}|1\...
1
vote
0
answers
30
views
Why does unitary matrix acts only on input qubit state of a vector that is a result of add modulo 2?
Let $|\psi\rangle = \frac{1}{\sqrt{2}}\sum_{k=0}^{1}(-1)^{ka}|k, k \oplus b\rangle $ so that $|\psi'\rangle = \frac{1}{\sqrt{2}}[\sum_{k=2}^{1}(-1)^{ka}(U_{A}|k\rangle \otimes U_{B}|k \oplus b\rangle)]...
3
votes
2
answers
128
views
What do the values in a unitary matrix represent/what do they mean? How do you figure out what gate a unitary matrix represents?
I am trying to learn Qiskit on my own. I am struggling with unitary matrices. I understand what a unitary matrix is, and why a matrix is unitary. But, I don't understand what the values inside of the ...
1
vote
1
answer
269
views
IBM quantum circuit - order of tensor product for equivalent matrix
I'm trying to understand how to apply tensor products on 3-qubit systems (or well at least 2 qubits). Let's take a basic example:
where $$\lvert \psi \rangle = \lvert q_2q_1q_0\rangle $$ with $q_2$ ...
1
vote
1
answer
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:
...
0
votes
1
answer
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
0
answers
122
views
Is there a way to implement a noisy CNOT gate using CUGate in Qiskit
Wondering if there's a way to implement the noisy version of CNOT (or CX) gate via CUGate using qiskit library for a given fidelity p?
0
votes
1
answer
69
views
The expectation values for the values of both qubits [closed]
Let’s consider the two-qubit state
|Ψ⟩ =(1/2)|00⟩ + i(√3/4)|01⟩ +(3/4)|10⟩.
a) Find the expectation values for the values of both qubits separately.