Questions tagged [quantum-gate]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Changing the sign of relative phase

Say I have a qubit in the state (ignoring normalization) $$|\phi\rangle = \alpha|0\rangle + e^{i\alpha}\beta|1\rangle.$$ How can I invert the sign of its phase, thus making it $$\alpha|0\rangle + e^{-...
0
votes
1answer
30 views

A CNOT between two Hadamard gates: why does the CNOT changed the output of the second Hadamard gate?

Applying the Hadamard gate twice in a row, it restores the original input: https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22H%22]]} However, if a CNOT control is added between the two ...
3
votes
1answer
70 views

Is there an efficient way to realize a Toffoli with control qubits fixed at $|+\rangle$?

I wrote a circuit that makes use of Toffoli gates, but it is too inefficient for my purpose. In my circuit the states of control qubits are fixed to $|+\rangle$ state. So I wanted to know if there is ...
1
vote
2answers
104 views

Question about a circuit from “Quantum Computing for Computer Scientists”

I am trying to implement a basic quantum computing emulator. In the chapter on Grover's algorithm, we're shown the following circuit: They demonstrate Grover's algorithm with a function $f$ that ...
3
votes
0answers
82 views

Which codes can implement transversal non-Clifford gates

A paper Three-dimensional surface codes: Transversal gates and fault-tolerant architectures discusses 3D surface codes and shows that CZ and CCZ gates are transversal in [these] codes. They give a ...
4
votes
0answers
41 views

How do we realise photonic gates?

I am interested in photonic computing, and I am curious how the gates work. I once saw a picture of a photonic CNOT gate that used just mirrors and polarizers. I have not been able to find any ...
1
vote
1answer
60 views

CSS Code and Fault-tolerant Problem in Nielsen and Isaac Chuang‘s book

Could someone help me with $Problem-10.52$ in Nielsen and Isaac Chuang‘s book? The screenshot is shown below. I have no idea about that. Hope someone can give me some suggestions. By the way, if I ...
0
votes
2answers
44 views

Creating a parameterized Operator in Qiskit

I'm trying to run a VQE for a specific custom Anzats. The Anzats is built up of an unitary matrix $U_H$, which I'm trying to created in this way: ...
2
votes
1answer
48 views

Physical implementing random unitary

If I from qiskit.quantum_info import random_unitary and then random_unitary(2**number_of_qubits) What returns is a unitary ...
0
votes
0answers
24 views

What is a “repeat until success quantum circuit” in quantum neural networks?

I am working now on a quantum neural network project and want a deep explanation on the Repeat Until Success circuit. What I know about this circuit is that it allows a nonlinear activation function ...
1
vote
1answer
60 views

Pauli Matrix tolerant and encoding

I'm stumped by these questions in Chuang's book. If I have a state $|ψ\rangle=1/2\sqrt2(1+M_0)(1+M_1)(1+M_2)|0\rangle_7$, where $$M_0=X_0X_4X_5X_6; M_1=X_1X_3X_5X_6; M_2=X_2X_3X_4X_6$$ I rewrite its ...
-1
votes
1answer
27 views

How to create a gate with functionality CCX(a,b,b)?

Can we create a Controlled gate with below functionality? if {a==|1> && b==|1>} then {qc.x(b)} Basically, a CCX gate but the output Qubit is actually one of the input Qubits. Apparently, ...
1
vote
2answers
293 views

How do I create an inverse identity gate?

Is it possible for me to construct a gate that inverse everything ($|0\rangle \rightarrow -|0\rangle, |1\rangle \rightarrow -|1\rangle$, etc. basically like a $-I$ gate) from the basic $X, Y, Z, CX,......
-1
votes
1answer
47 views
1
vote
0answers
25 views

How to apply a operator to qubit system on the basis of current state of system?

Suppose I have three different operators $U_1, U_2,U_3$. Now, these three operators will be applied if my current state of the system is $|\psi_0\rangle,|\psi_1\rangle $ and $|\psi_2\rangle$ ...
3
votes
2answers
43 views

Can the following Bell states have probability amplitudes other than 1/2 and still be entangled?

From my understanding, a qubit is entangled when the state of one qubit depends on the other, and vice versa. Can the following bell states have probability amplitudes other than 1/2 and still be ...
1
vote
1answer
23 views

State vector after applying CNOT

In the circuit, the CNOT gate is applied in 11 state and it should transform into 10 state. But why is the probability of getting 01 state 100 percent?
1
vote
3answers
57 views

How to make the gate decomposition of CCCRY

I asked about decomposition gate of CCRY last week, and the answer was: However, I now also want to do this for CCCRY. Please someone tell me.
0
votes
2answers
72 views

How to perform the unitary transformation $U|i,j_1\rangle = 1/\sqrt{k}(|i,j_1\rangle+|i,j_2\rangle+|i,j_3\rangle…+|i,j_k\rangle)$?

Is the following unitary transformation possible? If so, what will be the value of $U$? $$U|i,j_1\rangle = 1/\sqrt{k}(|i,j_1\rangle+|i,j_2\rangle+|i,j_3\rangle...+|i,j_k\rangle)$$ Here, $i$ is a node ...
1
vote
1answer
37 views

How do I check what is wrong in my full-adder code?

I am trying to solve the first question on the qiskit test which is writing a code for a full adder. So based on my research if I have $A$ q[0], $B$ ...
3
votes
2answers
333 views

How does the CX gate work?

I have a silly question as I am an absolute beginner! So as described in Qiskit: It performs the NOT operation (equivalent to applying an X gate) on the second qubit only when the first qubit is $|1\...
0
votes
1answer
58 views

Quick question about Two-qubit SWAP gate from the Exchange interaction

I am reading the following paper: Optimal two-qubit quantum circuits using exchange interactions. I have a problem with the calculation of the unitary evolution operator $U$ (Maybe it is stupid): I ...
0
votes
2answers
40 views

What is the effect of the reset gate on the matrix form of a gate/circuit?

From what I understand, any circuit can be combined to make a gate, which has a square, unitary matrix form that acts on the $2^n$ row of the qubits state column vector. For example, the circuit ...
0
votes
0answers
43 views

Is there a way to entangle to a dirty qubit?

Let's say I do something to a qubit, and I want to entangle it to a 2nd one, like this: ...
1
vote
0answers
23 views

Understanding “Restrictions on Transversal Encoded Quantum Gate Sets”

I am trying to understand a part from the article "Restrictions on Transversal Encoded Quantum Gate Sets". in the article they talk about the importance of transversal encoded gates for ...
3
votes
1answer
35 views

Definitions of $D_y$ gate in Hamiltonian simulation: are they the same?

I'm reading a Hamiltonian simulation example proposed in this paper. From their notation, the operator $D_y$ (sometimes it's called $H_y$) serves the function to diagonalize the Pauli matrix $\sigma_y(...
9
votes
2answers
846 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-...
3
votes
2answers
64 views

Transforming $|100\rangle$ state into $|000\rangle + |111\rangle$ state using only Hadamard and CNOT gates

Hi, How to convert $|100\rangle$ 3-qubit quantum state into $\frac{1}{\sqrt{2}}(|000\rangle + |111\rangle)$ state using only Hadamard and CNOT gates? Also, is output state an entangled one?
1
vote
2answers
92 views

Which Gate set can be used to perform the function $U|0\rangle =\frac{1}{\sqrt{n}}\sum_{i=0}^{n}(|i\rangle)$?

I want to perform the following operation: $$U|0\rangle =1/\sqrt{n}\sum_{i=0}^{n}(|i\rangle).$$ I know that Hadmard gate can give me the superposition of states $|0\rangle$ and $|1\rangle$. But it can ...
1
vote
2answers
98 views

Can the (universal) state inversion operator be physically realized?

I was trying to solve an exercise from Vazirani's course "Qubits, Quantum Mechanics and Computers": A mathematically nice, but unphysical, way to detect entanglement is to use the state ...
1
vote
1answer
47 views

How to make Controlled-CRY Gates

I found that how to make CRY Gates. But I don't know how to make Controlled-CRY Gates. Please show me a figure. Sorry for the poor English.
1
vote
2answers
63 views

What are the properties of the matrices representing quantum gates?

Quantum gates are basically matrices belonging to $C_{2\times2}$. Now, what are the properties of these matrices? We know that to preserve the normalization factor of the qubits these are unitary. All ...
4
votes
2answers
271 views

How to realize SWAP operation using iSWAP gate?

The following are the matrices for SWAP and iSWAP gates. SWAP = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \...
3
votes
1answer
40 views

Gate characteristics of different platforms

I would like to know if there is a place in which is summarized the gate characteristics of the different quantum computer existing (IBM,Google, others). For instance, which kind of two qubit gate ...
2
votes
2answers
108 views

Transforming $|01 \rangle + |10 \rangle - |11 \rangle \to |01 \rangle - |10 \rangle + |11 \rangle$

How to convert from current state: $$|\psi \rangle =\dfrac{ |01 \rangle + |10 \rangle - |11 \rangle}{\sqrt{3}}$$ into a target state $$|\phi \rangle = \dfrac{|01 \rangle - |10 \rangle + |11 \rangle}{\...
3
votes
3answers
115 views

How can I construct a 2-qubit state using single qubit gates and CNOT gate?

How can I construct the below 2-qubit state using suitable single qubit gates (maximum 3) and one CNOT gate starting with state $|00\rangle$? $$ |\omega\rangle=\frac{1}{3}(2|00\rangle+|01\rangle+2|11\...
3
votes
1answer
274 views

How can I simulate Hamiltonians composed of Pauli matrices?

Suppose I want to perform the time-evolution simulation on the following Hamiltonians: $$ H_{1} = X_1+ Y_2 + Z_1\otimes Z_2 \\ H_{2} = X_1\otimes Y_2 + Z_1\otimes Z_2 $$ Where $X,Y,Z$ are Pauli ...
0
votes
3answers
68 views

Why 2 $H$ gates in series create a probability of 100% for one value of the qubit and 0% of the second value of the qubit?

Why 2 $H$ gates in series create a probability of 100% for one value of the qubit and 0% of the second value of the qubit since an $H$ gate acts like a superposition generator?
2
votes
1answer
90 views

Toffoli circuit explanation [closed]

Can anyone explain me the behaviour of these two circuits? They contain Hadmard and rotation gates before the Toffoli gate. Results of simulation:
2
votes
2answers
109 views

How can I find a quantum channel connecting two arbitrary quantum states?

Given two arbitrary density matrices $\rho, \sigma\in \mathcal{H}$ (they have unit trace and are positive), how do I go about finding a possible quantum channel $\mathcal{E}$ such that $\mathcal{E}(\...
3
votes
1answer
46 views

What is k-state and how to go about creating a circuit?

The k-state is given by: $$ |𝐾⟩ = \dfrac{\sqrt{3}|100⟩ − 𝑒^{𝑖π/4}|010⟩ + \sqrt{2}|001⟩}{ \sqrt{6}}$$ I am fairly new to quantum computing and do not have much background in the field. I understand ...
1
vote
1answer
35 views

What are the physical meanings of the outer product when writing expressions for unitary gates?

I'm really confused with the interpretation of those equations: $1.$ The evolution of states under unitary operations can be expressed as $$ U = \sum_k\exp(i\phi_k)|\psi_k\rangle\langle\psi_k| $$ $2.$ ...
1
vote
1answer
76 views

What is the difference between the states $i|1\rangle$ and $|+i\rangle$?

I am new to Quantum computing. I see $|\mbox{+}i\rangle$ state maps to y-axis on bloch sphere ($\theta = 90$ degree and $\phi = 90$ degree) while $i|1\rangle$ maps on x-axis, $i|1\rangle$ is stated as ...
1
vote
1answer
44 views

Computation of qubits with quantum gates using density matrix form

I'm making a quantum circuit with qubits and quantum gates. While I'm doing it, I have some problem with it. My calculation process is below. As you can see, start qubit is $|0 \rangle$ and after 'X' ...
3
votes
1answer
92 views

How to perform this $d$-dimensional unitary operation on IBM Q?

$U_{a,b}=\sum^{d-1}_{x=0}\omega^{bx}|x+a\rangle\langle x|$,$\omega=e^{\frac{2\pi i}{d}}$,$a,b\in\{0,1,2,...,d-1\}$ Can someone please give me the pic of the quantum circuit?
2
votes
1answer
58 views

Which method of executing a multi-control gate is more efficient?

I am interested in executing multi-control gates and I have found two methods to do so as explained below. The first is taken from Nielsen and Chuang (2010) from their Figure 4.10. This method ...
3
votes
2answers
78 views

Optimizations in quantum circuits

In a paper called On quantum circuits employing roots of the Pauli matrices, I found this figure, where I couldn't understand the equality in the circled circuits. I need an explanation of how the ...
2
votes
2answers
53 views

How to apply control on a register if that register is equal to a specific n-bit string c*?

Say we want to apply CNOT, and the control register "c" is a n-bit string. Given a specific c*, is it possible to change all bits of the register into 1, if and only if the initial c equals ...
6
votes
2answers
208 views

How to compute the measurement probability in swap test?

The figure of a circuit and the state are as follows. The final state before the measurement is $|O_{out}\rangle=\frac{1}{2}|0\rangle(|\phi\rangle|\psi\rangle+|\psi\rangle|\phi\rangle)+\frac{1}{2}|1\...
1
vote
1answer
42 views

A Simon's algorithm with secret string b = 01, IBM Quantum experience gives a different result from whay I calculate

I try to design the circuit for $b = 11$ and succeeded in running. Therefore, I start to think of the circuit for different secret string $b = 01$. The circuit I made is down below: Here is the ...

1
2 3 4 5
15