Skip to main content

Questions tagged [quantum-gate]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
129 views

Are all powers $g^m$ in the Clifford hierarchy if $g$ is?

It is already known that the Clifford hierarchy is not closed under arbitrary products, see this post which shows that the product $ THT $ is not in any level of the hierarchy. What about products of ...
Ian Gershon Teixeira's user avatar
2 votes
2 answers
541 views

Matrix representation of SWAP on two qubit registers?

There is a matrix that can represent a swap gate-- a gate that essentially swaps two qubits. This matrix, $S$, is: $$ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & ...
Loic Stoic's user avatar
2 votes
1 answer
174 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 ...
wizzywizzy's user avatar
2 votes
1 answer
354 views

Circuit construction and Dirac notation of the following operation

I have a state $$ |\tilde{\Phi_2}\rangle =\dfrac{1}{2^{3l/2}}\sum_{x=0}^{2^l-1}\sum_{y=0}^{2^l-1}\sum_{z=0}^{2^l-1}|0\rangle^{\otimes q}\otimes |x\rangle^{\otimes l}\otimes |y\rangle^{\otimes l}\...
Upstart's user avatar
  • 1,412
2 votes
2 answers
100 views

How is involution defined for qudit gates?

A gate is involutory if $G^{2}=I$. This is true for all Pauli gates. Does the definition change if it is a gate for qutrits and beyond? Is there a good article for this?
Root Groves's user avatar
2 votes
1 answer
740 views

FANOUT with Toffoli Gate

Figure 1.16: FANOUT with the Toffoli gate, with the second bit being the input to the FANOUT (and the other two bits standard ancilla states), and the output from the FANOUT appearing on the second ...
Prasanth Kumar Vemula's user avatar
2 votes
3 answers
527 views

Is it possible to get the "symbolic" matrix operator associated with a parameterized quantum circuit using Qiskit?

Qiskit provides the qiskit.quantum_info.Operator class to get the unitary matrix operator from the corresponding quantum circuit, as in the following example: ...
SimoneGasperini's user avatar
2 votes
4 answers
791 views

What is the name for quantum gates that can be reversed?

Sorry if this question sounds too basic. But I can't find a word for those quantum gates than can be reversed (exchanging the target qubit with the control qubit) and still performs the same operation....
Alex's user avatar
  • 183
2 votes
1 answer
138 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}$ ...
SimoneGasperini's user avatar
2 votes
1 answer
485 views

If CNOTs and single qubit gates are universal then why do we need to prove that controlled U operations can be composed by them as well?

In the book by Chuang and Nielsen they prove that controlled U operations can be made out of CNOTs and single qubit gates. But then they go on to prove that they are universal by showing that every n ...
bilanush's user avatar
  • 881
2 votes
3 answers
880 views

How do I apply a Hadamard gate on a given qubit, in matrix formalism?

Hadamard gate matrix is: $$\frac{1}{\sqrt2}\begin{bmatrix}1 & 1 \\ 1 & -1\end{bmatrix}$$ The matrix for $|0\rangle$ is: $$\begin{bmatrix}1 \\ 0\end{bmatrix}$$ I am unable to understand, how ...
Kumar's user avatar
  • 219
2 votes
1 answer
522 views

How to Construct Swap Gates from Permutation Matrix?

This is a follow-up question from here. Let's say after an LUP decomposition, we have an 8x8 permutation matrix: $ P^{-1} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ ...
prairie99's user avatar
2 votes
1 answer
173 views

Gate corresponding to $-I$

I am implementing a quantum circuit in Qiskit. I create the equal superposition state $$ -|00\rangle + |01\rangle + |10\rangle +|11\rangle $$ but I want to obtain the quantum state $$ |00\rangle - |...
usercs's user avatar
  • 471
2 votes
1 answer
372 views

How do we perform a measurement of an arbitrary 1-qubit quantum state in any arbitrary orientation?

Let's imagine we have an arbitrary 1-qubit quantum system $\alpha \vert 0 \rangle + \beta \vert 1 \rangle$ Making a measurement in the +/- basis is equivalent to performing a Hadamard gate and then ...
Rabins Wosti's user avatar
2 votes
1 answer
1k views

Can SWAP operators change trace of a product state? [closed]

I am currently reading https://arxiv.org/abs/1501.03099. In the third part of the paper, "Measuring and detecting quantumness", the authors define the SWAP operators, use them on the initial ...
netflix_and_physics's user avatar
2 votes
1 answer
244 views

How do Hadamard and CNOT gates work on Qiskit SDK? Why is the output reversed?

Here is the code that I have been using on IBM Q Experience (should be the latest version of Qiskit). From my understanding it seems like the outputs of Hadamard and CNOT gates are reversed in a 2-...
Wilson Zhu's user avatar
2 votes
1 answer
125 views

Is $e^{i\beta} R_Z(-2\beta)$ equivalent to $U_1(2\beta)$?

As far as I know the single qubit gate $$ e^{i\beta\sigma_z} = \begin{bmatrix} e^{i\beta} & 0 \\ 0 & e^{-i\beta} \end{bmatrix} = e^{i\beta} \begin{bmatrix} 1 & 0 \\ 0 & e^{-i2\beta} \...
John's user avatar
  • 207
2 votes
1 answer
208 views

How does measuring a value of one operator affect the probability of measuring a value for another operator?

Suppose I have two non-commuting operators, $U_1$ and $U_2$ with eigenvalues $\lambda_{1,1}, \lambda_{1,2}$ and $\lambda_{2,1}, \lambda_{2,2}$, respectively. In order to determine how measuring one ...
Indy500's user avatar
  • 21
2 votes
1 answer
463 views

How would I compute a density matrix of a 2 qubit mixed state?

I am currently reading Nielsen & Chuang, and one of the questions asks to calculate a density matrix with the following mixed states, how would I do this? $$ |00> \;with \;probability \; 2/4 \\ ...
lambda's user avatar
  • 101
2 votes
2 answers
596 views

Is there a good way to mathematically write a CNOT operation over non-neighboring qubits in a circuit? [duplicate]

I was wondering if there is any way to present the CNOT matrix as we usually present single qubit operations $$... 1 \otimes NOT \otimes 1 ...$$ I know that for adjacent qubits in a circuit we can ...
César Leonardo Clemente López's user avatar
2 votes
0 answers
119 views

Is there a quantum operation that can transform a superposition of states into its complement?

Given a superposition of states "B" which is a subset of the suoerposition "A" of all possible states of a set of qbits, is there a quantum operation that produces superposition $R=...
S. McGrew's user avatar
  • 245
2 votes
1 answer
310 views

How to generate matrix for swap(a, b) gate for n qubits

I am trying to simulate a swap gate that swaps two qubits of indices a and b where there are n qubits total. I understand how to make a truth table and generate a matrix based off of that for each ...
Not_swap_master's user avatar
2 votes
2 answers
385 views

How to construct a CU3 gate using only CX and U3 gates?

Knowing that CX and U3 (taking 3 parameters $\theta, \phi$ and $\lambda$) form a set of universal gates how can I construct an arbitrary CU3 gate using a decomposition of only CX and arbitrary U3 ...
AdonaiH's user avatar
  • 45
2 votes
1 answer
758 views

What's the matrix representation of this 3-qubit CZ circuit?

How do I calculate the matrix representation of this part of a teleportation circuit? It must be a matrix of dimension 8.
Nillmer's user avatar
  • 755
2 votes
1 answer
205 views

Does the CX gate always leave the first qubit unchanged and swap the amplitudes of the second one?

I'm a self-learner of quantum computing and is at the very beginning. I do have some math and coding background though. I'm trying to understand how working with entangled qubits helps performing ...
SBF's user avatar
  • 123
2 votes
1 answer
879 views

How do I compute the square root of the $Y$ gate?

I am trying to compute the square root of the Y gate. $$Y_\theta =\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$$ There are many ways for doing this. I ...
Nicholas Sathripa's user avatar
2 votes
2 answers
247 views

Do quantum gates rotate a qubit around the Bloch sphere, or do quantum gates rotate the Bloch sphere around a qubit?

Do quantum gates rotate a qubit around the Bloch sphere? Or do quantum gates rotate the Bloch sphere around a qubit? "The simplest quantum gates are the Paulis: X, Y, and Z. Their action is to ...
guest's user avatar
  • 313
2 votes
1 answer
3k 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 ...
Devymex's user avatar
  • 175
2 votes
1 answer
615 views

Show that the effect of a Controlled Unitary on qubits followed by a measurement is unchanged depending on when measurement is taken

I understand that a Controlled Unitary is just a generalization of a control gate, such as CNOT etc, and that it is given in state representation as $$\hat C_U = |0\rangle\langle0|\otimes\mathbb{I} + |...
Dwye's user avatar
  • 121
1 vote
1 answer
204 views

In quantum teleportation, Is it possible for bob to just see the state vector after receiving it from Alice without measuring it?

I was reading about quantum teleportation using Qiskit. Alice wants to teleport some quantum state to Bob. My question is Is it possible for bob just to see the state vector after receiving it from ...
User1086's user avatar
1 vote
1 answer
270 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.
Hirokoudai's user avatar
1 vote
3 answers
400 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?
Se1fie's user avatar
  • 41
1 vote
0 answers
77 views

Is there a quantum gate that can do this?

Is there a quantum gate that can do the following? Given a first set of N qbits, mutually entangled in such a way that each state in the superposition meets a given condition, generate a second set of ...
S. McGrew's user avatar
  • 245
1 vote
1 answer
705 views

Applying a projector to a qubit in a qiskit circuit

I'd like to be able to apply $|0 \rangle \langle 0|$ to project a qubit to the state $|0 \rangle$ in the middle of qiskit circuit (see, for example, the attached circuit). I wonder if, in general, ...
danuzco's user avatar
  • 25
1 vote
1 answer
155 views

How does the graphical notation used to denote doubly-controlled gates work?

$\qquad$ $\qquad$ What is the difference between solid and hollow? How to express the corresponding matrix of these figures? In addition, if they are not adjacent, what should be done in the middle of ...
Despriobaby's user avatar
1 vote
1 answer
66 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 ...
Saul_better's user avatar
1 vote
2 answers
363 views

How does the stated Pauli decomposition for $\operatorname{CP\cdot A\cdot CP}$ arise?

I'm having a bit of trouble understand @DaftWullie's answer here. I understood that the $4\times 4$ matrix $A$ $$ \frac{1}{4} \left[\begin{matrix} 15 & 9 & 5 & -3 \\ 9 & 15 & 3 &...
Sanchayan Dutta's user avatar
1 vote
0 answers
91 views

Simplify the system to find the $\theta$, $\phi$ on bloch sphere [duplicate]

I have problem to simplify the quantum system states on bloch sphere to get $\theta$, $\phi$ values, My question is not duplicated! $$ \left| \varphi \right>=\frac{1+i}{\sqrt{3}} \left| 0 \right>...
Strong Man's user avatar
1 vote
1 answer
292 views

Decomposition of unitary operator into rotations around Bloch sphere

I apologize in advance for any mistakes as I am new to this field and come from a programming, rather than mathematical/physical background. I am looking for a way to decompose a given operator $U$ ...
Satvik Duddukuru's user avatar
1 vote
1 answer
1k views

How to draw CCZ gate in IBM Quantum composer

How to draw CCZ gate in IBM Quantum Composer? There is no CCZ gate in quantum composer. In addition to this, please help me to draw the gate shown in below figure in quantum composer.
Vinay Sharma's user avatar
1 vote
1 answer
316 views

How is it possible to perform a c-not on 4 qubits using the same control qubits on IBM Q computers?

I was wondering after seeing ibmq_16_melbourne layout how it is possible to perform this circuit : It seems when looking at ibm q computers that a qubits can at max target 3 qubits because the arrow ...
Samuel Beaussant's user avatar
1 vote
1 answer
702 views

Solving a circuit implementing a two-level unitary operation

The circuit below implements the following two-level unitary transformation: $\tilde{U}$ is a unitary matrix: $\tilde{U} = \left[\begin{matrix} a & c \\ b & d \end{matrix}\right]$ where $a, ...
Davide_sd's user avatar
  • 285
1 vote
2 answers
238 views

How can the state $\lvert0\rangle+M^{-1/2}\sum_{j=1}^M\lvert j\rangle$ be generated?

I was wondering if anybody to help me to generate the following state. It would be preferable if you use only Hadamard, CNOT and T-gates, on $\lceil\log_2(M+1)\rceil$ qubits: $$|\psi\rangle = \frac{1}{...
Aman's user avatar
  • 463
1 vote
1 answer
103 views

Raise tensor product to float power in qiskit

I am trying to implement the gate $(X \otimes X)^\alpha$ where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product and $\alpha$ is a real number. Is there a way to implement this in a ...
Cat Telliber's user avatar
1 vote
1 answer
365 views

Writing Toffoli Gate Matrix by one and two qubit gate matrices

I am trying to write Toffoli gate matrice by using one and two qubit gates matrices. I follow this circuit link for the circuit I first started to write the matrices of one and two qubit gates: ...
quest's user avatar
  • 626
1 vote
0 answers
66 views

Faithful description of a photonic setting with the circuit model

The above picture comes from this paper. The circuit on the left and the one on the right are equivalent (up to the basis). However, there is an important difference: the circuit makes the input -- i....
Daniele Cuomo's user avatar
1 vote
1 answer
213 views

Implement approximate $Ry(2\pi /3)$ with gate set {$Rx(\pi),Ry(\pi),Rz(\pi),Rx(\pm \pi/2),Ry(\pm \pi/2),Rz(\pm \pi/2),T,S,H,CZ$}

With gate sets {$Rx(\pi),Ry(\pi),Rz(\pi),Rx(\pm \pi/2),Ry(\pm \pi/2),Rz(\pm \pi/2),T,S,H,CZ$}, I want to implement an approximate $2\pi/3$ rotation around Y axis. An ancilla qubit can be used as well. ...
Inm's user avatar
  • 505
1 vote
2 answers
353 views

How can you construct the different two-qubit Bell states?

How can you construct the different Bell states? For example $$\frac{|01⟩-|10⟩}{\sqrt{2}}$$
Annonymus's user avatar
  • 141
1 vote
2 answers
421 views

Is there any method to parse a qasm in qiskit

I'd want to parse the qasm file for analyze the quantum gate consisting its qasm file. However, Qiskit provides the attribute of the quantum circuit, ...
Sanghyeon Lee's user avatar
1 vote
2 answers
2k views

RZZ from CNOT and RZ

The following should represent an RZZ gate (source: https://pennylane.ai/qml/demos/tutorial_qaoa_maxcut.html) How do the CNOT and an RZ compute mathematically to the RZZ? $$ R_Z(\theta) = \begin{...
Evan Camilleri's user avatar

1
3 4 5
6
7