Questions tagged [quantum-gate]
For questions regarding usage, performance, implementation, application or theory related to quantum gates.
285
questions
3
votes
1
answer
147
views
What does a quantum NOT operation do to an entangled set of qubits?
Quantum computing is not my field, so answers understandable to a layman will be most useful. Please forgive any incorrect terminology in my question!
Assume that a set of the states of N qubits ...
3
votes
1
answer
328
views
How is the joint state of these qubits derived?
Can someone show to me the steps to derive the joint state at the bottom of this image, please?
I tried to follow his explanation but I didn't get the same results…
This is taken from the lecture ...
3
votes
1
answer
1k
views
Reversibility and irreversibility of logic gates (quantum vs classical)
I have been told that one of the great keys that unlock quantum computing's potential is the reversibility of quantum logic gates as for classical gates there's some loss of information, but I cannot ...
2
votes
2
answers
2k
views
Qiskit CNOT-gate matrix mixup?
In the qiskit textbook chapter 1.3.1 "The CNOT-Gate" it says that the matrix representation on the right is the own corresponding to the circuit shown above, with q_0 being the control and ...
2
votes
2
answers
2k
views
How to make a circuit for the CNOT using $H$ and $CZ$ gates?
How can we draw a circuit that is based on the gates $H, CZ$ that implements $CNOT$.
I know that the $H$ gate is like that:
And also the $CZ$ gate is:
But I'm not sure how to draw this with the ...
2
votes
1
answer
86
views
Can a circuit map $|x,y\rangle$ to the reflection of $|y\rangle$ with respect to $|x\rangle$?
Statement of the problem.
I want to consider/design a quantum circuit that takes as input two vectors $\vert x \rangle$ and $\vert y \rangle$. The output of this quantum circuit must contain the ...
2
votes
1
answer
94
views
How to determine an unknown quantum gate if we know all other gates in the circuit and the inputs and outputs? [duplicate]
Suppose we have a quantum circuit like this. All the gates are known except for one. For any input of q[0] and q[1], we know the corresponding output. I have provided the output state for four ...
2
votes
0
answers
797
views
Decomposition of an arbitrary gate using given matrix in Qiskit
If I have an arbitrary non-unitary matrix of say
$$
U = \begin{pmatrix}
1.5 & 0 & 0 & 0 \\
0 & 0 & 0 & 1.6 \\
0 & 0 & 1 & 0 \\
0 & 1 & 0 & 0 \\
\end{...
1
vote
1
answer
475
views
A problem with application of multi controlled rotation gates [closed]
This message pops up when I run an mcrx gate
The mcrx gate needs a single qubit as target.
Here is a part of code I run:
...
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 ...
17
votes
4
answers
2k
views
How do the probabilities of each state change after a transformation of a quantum gate?
Quantum gates are represented by matrices, which represent the transformations applied to qubits (states).
Suppose we have some quantum gate which operates on $2$ qubits.
How does the quantum gate ...
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 ...
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 ...
15
votes
1
answer
3k
views
Why are non-Clifford gates more complex than Clifford gates?
There are two groups of quantum gates - Clifford gates and non-Clifford gates.
Representatives of Clifford gates are Pauli matrices $I$, $X$, $Y$ and $Z$, Hadamard gate $H$, $S$ gate and $CNOT$ gate. ...
12
votes
1
answer
2k
views
Are circuits with more than 1000 gates common?
I have seen circuits with 30 qubits and around 500 gates. Also circuits with 32 qubits and 6000 gates. Are circuits with more than 1000 gates common in quantum computing? Are there many quantum ...
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 "...
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?
11
votes
3
answers
798
views
What's an example of building a circuit $U_f$ that implements a simple function $f$?
I'd like to be able to program simple functions into simulators such as QCL. I read that any function $f$ can be implemented, but I don't know how to get say a unitary matrix that implements $f$.
$\...
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 ...
10
votes
2
answers
792
views
Show that these two expressions for the oracle transformation are equivalent
Suppose $x \in \{0,1\}^n$. The standard way to make a query is with an oracle $O_x$ that given an input $|i,b \rangle $ returns $|i,b \oplus x_i \rangle$. Via the phase kick-back trick, this can be ...
10
votes
2
answers
1k
views
Where is the parallelism in Deutsch-Jozsa algorithm?
I am newbie on Quantum Computing. Actually I am a software engineer but I want to understand how quantum computers work. So my question may be absurd. Sorry about that.
I tried to understand Deutsch-...
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?
9
votes
3
answers
735
views
Does conditional gate collapse controller's superposition?
I've created a simple circuit in Q-Kit to understand conditional gates and outputted states on each step:
In the beginning there is clear 00 state, which is the input
The first qubit is passed ...
9
votes
1
answer
504
views
What is the set of generators for the qutrit Clifford group?
According to this article, any Clifford gate, acting on $n$ qubits, can be generated by Hadamard, CNOT, and S gates.
What are the set of generators for qutrit Cliffords?
9
votes
2
answers
517
views
Could the Hadamard gate have been constructed differently with similar characteristics?
Say we had a Hadamard-like gate with the -1 in the first entry instead of the last. Let's call it $H^1$.
$$H = \begin{bmatrix}1&1\\1&-1\end{bmatrix}$$
$$H^1 = \begin{bmatrix}-1&1\\1&...
9
votes
2
answers
1k
views
How to prove that the query oracle is unitary?
The query oracle: $O_{x}|i\rangle|b\rangle = |i\rangle|b \oplus x_{i}\rangle$ used in algorithms like Deutsch Jozsa is unitary. How do I prove it is unitary?
8
votes
2
answers
511
views
Number of gates required to approximate arbitrary unitaries
If I understand correctly, there must exist unitary operations that can be approximated to a distance $\epsilon$ only by an exponential number of quantum gates and no less.
However, by the Solovay-...
8
votes
2
answers
2k
views
Possibility of a "reset" quantum gate
I wish to have a "reset" gate. This gate would have an effect to bring a qubit to the $\mid0\rangle$ state.
Clearly, such a gate is not unitary (and so I'm unable to find any reliable implementation ...
8
votes
1
answer
406
views
Is the controlled-Hadamard gate in the Clifford group?
Is the controlled-Hadamard gate a member of the Clifford group? I understand that Controlled Pauli gates are in the Clifford group.
If controlled Hadamard is Clifford member, then is a controlled-...
8
votes
2
answers
463
views
Construct Controlled-$G^{\dagger}$ from known Controlled-$G$
Let there be a known a scheme (quantum circuit) of Controlled-G, where unitary gate G has G$^†$ such that G≠G$^†$ and GG$^†$=I (for example S and S$^†$, T and T$^†$, V and V$^†$, but not Pauli and H ...
7
votes
1
answer
2k
views
How does the CNOT gate operate when the control qubit is a superposition?
If a control qubit is in superposition, how it will affect target qubit if it is collapsed or in superposition? Is it true that CNOT works only if the control bit collapsed to 1? Also, is it possible ...
7
votes
1
answer
274
views
Most efficient way for general state generation
Assume we are given an $n$-qubit system and complex numbers $a_0, \ldots, a_{m-1}$ with $m = 2^n$. Assume further we start with the initial state $|0 \ldots 0\rangle$ and want to make the ...
7
votes
3
answers
4k
views
Composing the CNOT gate as a tensor product of two level matrices
I don't understand, why is the control not gate used so often. As far as I understand it, if you apply two 2 level operations on two qubits then you get a 4 x 4 matrix by the tensor product. So how ...
7
votes
1
answer
705
views
Are anti-unitary gates possible?
According to Wigner’s theorem, every symmetry operation must be represented in quantum mechanics by an unitary or an anti-unitary operator. To see this, we can see that given any two states $|\psi\...
7
votes
3
answers
2k
views
Hadamard gate as a product of $R_x$, $R_z$ and a phase
I am having problems with this task.
Since the Hadamard gate rotates a state $180°$ about the $\hat{n} = \frac{\hat{x} + \hat{z}}{\sqrt{2}}$ axis, I imagine the solution can be found the following ...
7
votes
2
answers
4k
views
What is the square root of the NOT gate? [duplicate]
I have encountered different matrix of operator "the Square Root of NOT gate".
For example, the matrix is specified here:
$\sqrt {NOT} = \frac{1}{2}\left( {\begin{array}{*{20}{c}}
{1 + i}&...
7
votes
1
answer
288
views
How to check if a $n$-qubit unitary is the tensor product of single-qubit unitaries
Let's assume I give you the expression of a unitary matrix acting on two qubits that is:
$$U=\sum_{i} A_i \otimes B_i$$
for some operators $A_i$ and $B_i$.
Is there a simple criterion allowing you to ...
7
votes
1
answer
393
views
Decomposing a $(w+1)$-qubit permutation gate into $w$-qubit permutation gates, SWAPs and NOTs
Say I have a quantum circuit of $w+1$ qubits with a permutation gate (mapping computational basis states to computational basis states) that does the permutation $(i, i+1)(i+4, i+5)$ on $w+1$ qubits ...
7
votes
1
answer
557
views
Prove that adding any non Clifford gate to the Clifford group yields a universal gate set
I have seen it claimed in multiple places that adding any non Clifford gate to the Clifford group yields a universal gate set. It is, however, not easy to find an accessible proof of this fact.
The ...
7
votes
1
answer
209
views
Does conjugation by a Clifford send each non-identity Pauli to every other non-identity Pauli with equal frequency?
I see here in Olivia DeMatteo's notes, she states:
When we consider the action of the entire Clifford group on a single non-identity Pauli, it
maps that Pauli to each of the $d^2 − 1$ other possible ...
6
votes
2
answers
379
views
Partial trace and SWAP in the basis of subsystems
I'm trying to derive equation $(1)$ on p.2 in Lloyd et al, 2013 which reads
$$
\text{Tr}_A\left[\exp(-i\theta S_{AB}) (\rho_A \otimes \sigma_B) \exp(i\theta S_{AB}) \right] = (\cos^2 \theta) \sigma_B +...
6
votes
0
answers
102
views
Is the universality of a qubit based quantum computer different from the universality of a continuous-variable quantum computer?
I understand that a quantum computer is universal if it can compute anything that a quantum Turing machine can. Another way to think about universality is that any unitary transformation on, e.g., a ...
6
votes
1
answer
331
views
Question Regarding Quantum Period-Finding Fourier Transform Approximation
I am following the 5.4.1 Period-Finding Algorithm in Nielsen and Chuang as shown below:
My confusion lies with the second expression of point 3 in the procedure. Why is the second expression an ...
6
votes
2
answers
377
views
If an auxiliary qubit is allowed, how to construct toffoli gate in easier way?
We know if we don't use auxiliary, the construction of Toffoli gate will be:
However, if now you are allowed to use one auxiliary qubit, how to realize a CCNOT in a simplier way? (Can we only use X,Y,...
6
votes
2
answers
359
views
How to implement the CCH gate in quantum computers available in clouds?
How to implement CCH gate in quantum computers available in clouds? If there is not any gate directly available for it, what are the possible ways to represent CCH?
6
votes
1
answer
463
views
How to check if a two-qubit gate is entangling?
I would like to know if there's an analog for Schmidt rank that can tell me if a two-qubit unitary is entangling?
Suppose I have a parametrized two-qubit unitary $U^{(2)}(\theta)$. I would like to ...
6
votes
2
answers
705
views
Custom gates on IBM Q
I realized that QASM supports custom gates. However, when I tried to create the gate, transpiling error appeared both on simulator and real quantum processor. I suspect that IBM has not implemented ...
6
votes
1
answer
170
views
What are the relations between the permutation group and the Clifford group?
I'm trying to understand the relation between the permutation group on all the $2^n$ bitstrings and the Clifford group. My question arises from the fact that the Toffoli gate (which can be thought of ...
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 ...
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).
...