Questions tagged [quantum-gate]
For questions regarding usage, performance, implementation, application or theory related to quantum gates.
1,620
questions
0
votes
0
answers
42
views
Conjugation of Unitary Matrices in Quantum Channel
A quantum channel is given in the form $U(\rho)=\sum_{j}p_jK_j\rho K_j^\dagger$. I have read in another thread that a quantum channel is the generalized version of a quantum gate (represented by a ...
2
votes
2
answers
165
views
Conditional unitary based on output of a function
I read about dynamic circuits in Qiskit which uses an if-test. My question is how can we give a custom function in the if-test? Based on its documentation, we can only provide a classical register to ...
0
votes
3
answers
222
views
How to represent Beam-Splitter and Kerr gates as basic quantum logic gates?
I want to know how to convert these exponential forms to tensor products of well known logic gates (like the ones built into Qiskit). My goal is to program the Beam-splitter-Kerr ansatz circuit for ...
2
votes
1
answer
129
views
Origin of the names of S-gate and T-gate [duplicate]
I have had several opportunities to explain quantum computers to the general public, and I am always at a loss to explain S gate and T gate. Could someone please tell me if there is an origin of the ...
3
votes
3
answers
491
views
When does CNOT entangle?
Let $|\psi_1\rangle$ and $|\psi_2\rangle$ be qubit states such that $\text{CNOT}|\psi_1\rangle \otimes |\psi_2\rangle$ is entangled. I'm interested in if there is a simple condition that this imposes ...
3
votes
2
answers
136
views
Decomposition of rotational matrix using {$H, T$} only
We know that {$H,T$} is universal. However, I don't understand how we can generate any rotational matrix from this set. For example, how can I build
\begin{bmatrix}
cos(\pi/8) & sin(\pi/8)\\
...
1
vote
1
answer
20
views
How to mathematically represent the $CSWAP_{1 \rightarrow 0,2}$ gate?
The controlled-$SWAP$ gate represented in the circuit above can be written down by the following mathematical expression:
$$
CSWAP_{0 \rightarrow 1,2} = |0\rangle\langle0| \otimes I_{4 \times 4} + |1\...
1
vote
2
answers
111
views
What is CNOT1,3 gate? In general, what is CNOT1,n gate? [duplicate]
I'm familiar with the CNOT gate and I know the matrix of that gate.
But what is CNOT1,3 gate and what is its matrix, how to compute it?
0
votes
0
answers
154
views
Can Someone Help Me Create a Custom Feature Map with the Latest Version of Qiskit?
I am trying to create a custom feature map that I can use as input to the VQC classifier for classification purposes. I attempted to follow a GitHub repository: https://github.com/qiskit-community/...
0
votes
3
answers
138
views
How to prove that CNOT and Rz gates are permutable?
How to prove that CNOT and Rz gates are permutable?
I tried to equate their switch to zero and calculate it, but for this you need to multiply the matrices. But the 4x4 and 2x2 matrices cannot be ...
-3
votes
1
answer
31
views
What are the expected measurement results in the diagram below? [closed]
I ask you to give a mathematical solution to this problem
0
votes
0
answers
27
views
Physical implementation of error detection scheme with an ancilla qubit
I have two data qubits coupled with an ancilla qubit. I need a Hamiltonian H such that:
If the ancilla qubit is in state $|0⟩$, do nothing on the 2 qubits.
If the ancilla qubit is in state $|1⟩$, ...
1
vote
2
answers
70
views
Can a classical circuit of size $2^k$ be modelled by a quantum circuit of size $k$ or vice versa?
There is something fundamental I don’t understand about quantum computing and hence the following question may be very trivial or stupid for which I apologize in advance.
A boolean function $f:\{0,1\}^...
2
votes
0
answers
41
views
Can we show that a quantum circuit with Poly(n) gates has a Hamitonian with Poly(n) terms?
It is already known that if the Hamiltonian is a sum of Poly(N) Pauli terms, it has an efficient implementation as a quantum circuit. This should mean that the circuit can be implemented with Poly(N) ...
0
votes
0
answers
29
views
Quantum image encryption using NEQR and QTRNG
I have represented a 2x2 grayscale image using NEQR and I generated a key image using QTRNG. After the xor operation between the original and key image, I only need the encrypted image value, to avoid ...
1
vote
1
answer
185
views
CZ-gate in neutral atoms computer with Rydberg pulses
I'm trying to understand the protocol to obtain a CZ-Gate with two qubits and Rydberg pulses : https://queracomputing.github.io/Bloqade.jl/dev/3-level/#pulse-CZ-gate
Apply Rydberg π-pulse on control ...
1
vote
2
answers
75
views
Which IBM composer gate realizes the 2x2 single-qubit $-I$ matrix?
Which IBM Quantum composer gate is used to realize the 2x2 matrix $-I$ acting on a single qubit? And how is it called?
2
votes
1
answer
60
views
Diagonal gates in qubit Clifford hierarchy are generated by $ C^i Z^{1/2^j} $
Let $ \mathcal{C}^{(t)} $ denote the $ t $ level of the $ n $ qubit Clifford hierarchy.
Let $ \mathcal{F}^{(t)} $ denote the collection of all diagonal gates in $ \mathcal{C}^{(t)} $. $ \mathcal{C}^{(...
1
vote
1
answer
178
views
How to represent as a matrix the CSWAP on non-adjacent qubits?
I was reading this post recently on the CNOT gate between non-adjacent qubits in a 3 qubit system.
And the accepted answer generalizes to general controlled unitaries, saying that any controlled ...
1
vote
0
answers
44
views
Quantum algorithm with $|y\rangle \mapsto (-1)^{xy}|y\rangle$ for all $y$ with at most $T$ many $1$s
Given an N-bit string $x$, which we can access by queries, give a quantum algorithm that maps $$|y\rangle \mapsto (-1)^{xy}|y\rangle$$ for all $y \in \{0,1\}^{N}$ that have at most T many $1$s and the ...
1
vote
1
answer
112
views
How does grid or ring (coupling map topology) affect the depth of the circuit?
Why does different grid maps have different depths, i.e why does a 10x10 grid has more depth than 10x3. Also how does topology affect the depth?
0
votes
1
answer
115
views
How to decompose the following circuit using just CX and U3 gate?
I am trying to decompose the following circuit using just the CX gate and U3 gate.
This is because IBM uses CX and U3 gates as basis states and trying to understand the same. Is there a function that ...
1
vote
1
answer
70
views
How can I produce the state $\frac{1}{\sqrt{2}^N} (|1,0^{N-1}\rangle + |01,0^{N-2}\rangle + ...+|0^{N-1},1\rangle)$ [duplicate]
Let's say my algorithm starts with the qubit state $|0^N\rangle$. Is there a possibility to end up in a superposition where every component is made of a bitstring containing exactly an $1$ at on ...
2
votes
1
answer
93
views
How to represent two gates addition on Qiskit composer. we can do tensor product and multiplication but how to do Addition
How to represent two gates addition on Qiskit composer we can do it in python code by using qiskit library but I would like to visually see how addition of two operators look like in composer.
I am ...
3
votes
2
answers
45
views
How to shift the eigenvalues of a quantum Hermitian operator G to ±r?
Consider a gate $\mathcal{G}(\mu)=e^{-i \mu G}$ generated by a Hermitian operator G. If G has just two distinct eigenvalues(which can be repeated) we can, without loss of generality,
shift the ...
2
votes
1
answer
109
views
How to write an $n$-qubits parametric unitary as a linear combination of tensor products between parametric 2$\times$2 matrices?
As far as I understood, it should always be possible to decompose any $n$-qubits unitary $U$ into a linear combination of tensor products between $n$ complex matrices $W_i \in \mathbb{M}_{2 \times 2}$ ...
0
votes
2
answers
51
views
Why does a bitwise product show up in Simon’s algorithm?
I’m reading up on Simon’s problem from the Qiskit textbook, but don’t understand the second Hadamard transform of the first qubit register.
Mathematically, they are stating that a state that looks ...
4
votes
1
answer
356
views
Link between quantum computing and Lie theory?
I know only little thing about Lie theory but I would like to learn more about its link to quantum computing.
Has someone got some references explaining it well ?
1
vote
2
answers
189
views
How to write the $iSWAP$ unitary as a linear combination of tensor products between 1-qubit gates? [duplicate]
As far as I understood, it should always be possible to decompose any $n$-qubits unitary $W$ into a linear combination of tensor products between $n$ single-qubit unitaries $U_i$:
$$W = \sum_k \...
3
votes
1
answer
102
views
Does every code have a strongly transversal Pauli group?
A transversal logical gate for an $ n $ qubit code is a gate from the group of local unitaries
$$
\bigotimes_{i=1}^n U(2)
$$
which also preserves the codespace. For an $ ((n,K,d)) $ code we say a ...
0
votes
0
answers
33
views
defining a unitary isometry
I am defining the coefficient unitary in full details but stuck. I tried many ways so that the cross terms gets cancelled and the diagonal terms has one.
0
votes
1
answer
43
views
How to implement the -I matrix using Pauli gates
I'm trying to build a quantum walk circuit. I have the C0 matrix as follows
import numpy as np
C0 = np.array([[-1, 0], [0, -1]])
As we can see, it's the (-)...
3
votes
2
answers
151
views
What is $HTHTH\left| 0 \right>$?
I'm currently going through Introduction to Classical and Quantum Computing, by Thomas Wong, and I'm struggling with exercise 2.33 (page 108):
Exercise 2.33. Answer the following:
(a) Calculate $...
1
vote
3
answers
388
views
How to build the quantum circuit corresponding to a given unitary matrix?
I have the following matrix for a circular quantum walk
...
0
votes
2
answers
496
views
Transform Pauli basis to other basis
The Pauli basis is
\begin{align}
I=\left[\begin{matrix}
1&0 \\
0&1
\end{matrix}
\right],
\end{align}
\begin{align}
X=\left[\begin{matrix}
0&1 \\
1&0
\end{matrix}
\right],
\...
2
votes
2
answers
238
views
How would you represent the $T$ gate in terms of rotations around the $X$ and $Y$ axes?
I know that the $T$ gate is equivalent to a $\frac{\pi}{4}$ rotation around the $Z$-axis, but what about $X$ and $Y$?
0
votes
0
answers
301
views
Pauli decomposed Hamiltonian as Diagonal U gate
While trying to implement a quantum circuit, I had to apply Hadamard gates to all qubits to achieve equal superposition. Done.
The next operation is decomposing the Hamiltonian into a sum of tensor ...
0
votes
1
answer
69
views
Pytket's SquashTK1 pass changes symbolic parameters of gates into complicated expressions
For a very simple circuit, such as
from pytket.circuit import Circuit, fresh_symbol
a = fresh_symbol("a")
circ = Circuit(1)
circ.X(0)
circ.Ry(a,0)
the ...
1
vote
1
answer
98
views
SWAP test: clarification of measurement output
I've been reading the wikipedia page on the SWAP test, and am particularly confused on the last step of the explanation of the circuit.
I understand every step, except for the last one:
$P(0) = \frac{...
1
vote
1
answer
57
views
Is it possible to use quantum state to store and read information without destorying it?
Like building a ROM device? Please consider the influence of the non-cloning theorem and better show some papers. Thanks!
PS: I heard that error-correction methods might help to achieve this goal. Is ...
3
votes
2
answers
1k
views
How does one perform amplitude encoding using only unitary gates?
How does one perform amplitude encoding using only unitary gates ?
Could you show me a concrete example ?
2
votes
2
answers
107
views
Time complexity of block-encoded matrices
A lot of modern quantum computation has this idea of "block-encoding" matrices; loosely, this is encoding a non-unitary matrix into the top left corner of a larger unitary matrix. This ...
1
vote
1
answer
347
views
Controlled Z gate entanglement
In order to prove that the Controlled Z gate can create entanglement, I'm trying to show that using these two arbitrary $2\times 2$ matrices and their tensor product:
$$
\begin{bmatrix}a_1&b_1\\...
0
votes
1
answer
62
views
Formal Definition of a Quantum Circuit
The complexity class $BQP$ is defined like so:
A language $L \subseteq \{0, 1\}^*$ is in $BQP$ if there exists a family of "polynomial time uniform quantum circuits" $\{Q_n | n \in \mathbb{...
2
votes
1
answer
326
views
How to remove gates added in the quantum circuit?
I am new to Qiskit and was learning Quantum teleportation circuit on youtube. I unknowingly executed a cell while trying to modify the circuit draw style which added the unnecessary gates. How can I ...
-2
votes
1
answer
33
views
Entanglement and superposition illustration
I found an example of how "the power" of superposition can be explained in simple words. Toss two coins. While they are still in the air, they can be thought of encoding 4 states. Wow! Cool! ...
4
votes
2
answers
145
views
What is $H\left| \psi \right>$ with $\left| \psi \right> = \alpha\left| 0 \right> + \beta\left| 1 \right>$?
I'm currently going through Introduction to Classical and Quantum Computing, by Thomas Wong, and I'm struggling with exercise 2.29 (page 107):
Exercise 2.29. Say $\left| \psi \right> = \alpha\left|...
1
vote
2
answers
59
views
Sorting two numbers using quantum computing
To better understand how quantum computing works, I am trying to sort two numbers using unitary matrix. Based on this definition, I understand a quantum Turing machine to have the automorphism (...
0
votes
1
answer
25
views
What is the difference between Gate.power() and Gate.repeat()?
Why are the gates a and b in this code not the same?
a = UGate(0,0,0.9*np.pi).power(2)
b = UGate(0,0,0.9*np.pi).repeat(2)
I thought that unitary gates function ...
0
votes
1
answer
263
views
What is a "virtual" gate as defined by Qiskit?
I came across the Qiskit textbook page for the R_z gate. It's classified as a virtual gate. What does that mean exactly? How does this gate differ from the R_x and R_y gate?