Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [quantum-gate]

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

225 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
40 views

CNOT gate path interference

I have a question on paper https://doi.org/10.1038/nature02054. In this paper, the CNOT gate is realized using a beam displacer for higher stability. The figure below shows a 1:1 mapping from (a) to (...
유승연's user avatar
1 vote
0 answers
116 views

What is the relationship between the number of shots and the performance of a quantum agent?

What is the relationship between number of shots and the performance of quantum agent in Quantum neural network? and what is the limit of number of shoots in QASM simulator?
Getahun Fikadu's user avatar
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
0 answers
50 views

What's the best way to design a circuit with logic gates that use the same input lines?

I am implementing a Carry Select Adder, the problem is that the circuit is quite complex to translate in Qiskit. I need to use one (or multiple) line(s) as input for two (or more) gates. In particular,...
eddie's user avatar
  • 11
1 vote
0 answers
67 views

Slight issue with QFTing two qubits

Let's consider two qubits and the corresponding computational basis $\{|0\rangle\, |1\rangle, |2\rangle, |3\rangle\}$. In binary form, any of these vectors can also be written as a product $|x_1\...
Creeptographer's user avatar
1 vote
0 answers
56 views

How to simulate $H(\theta) = B(\sin\theta S_1^x +\cos\theta S_1^z +\sin\theta S_2^x +\cos\theta S_2^z)+aS_2^zI_z$ on IBM Qiskit

I am trying to simulate this Hamiltonian on IBM Qiskit, for varying values of $\theta$: $H(\theta) = B(\sin\theta S_1^x +\cos\theta S_1^z +\sin\theta S_2^x +\cos\theta S_2^z)+aS_2^zI_z$ Where S is ...
new2simulating's user avatar
1 vote
0 answers
51 views

Sequential Circuits in IBMQ and Qiskit and generating a clock pulse

I am trying to implement the Peres Gate with Feedback from Feynmann Gate feeding back into the third input to Peres Gate. This sequence needs to be repeated. There is also a clock pulse that needs to ...
Abhik Banerjee's user avatar
1 vote
0 answers
67 views

How should I think about circuit metrics like "qubit count," "circuit depth," and "gate count" when dealing with the OpenQASM 3 `ctrl` modifier?

It seems like circuit metrics like qubit count, circuit depth, and gate count are pretty useful. Qubit count determines whether a it's even possible to run a program on resource-limited quantum ...
Finn's user avatar
  • 111
1 vote
1 answer
105 views

How many single and double qubit gates are required to create a uniform superposition of vertices of a Johnson Graph J(n,r)?

Can I in $\tilde{O}(r)$ number of gates (single and double qubit) create a uniform superposition of vertices of Johnson Graph $J(n,r)$? I would like to create a state $|\psi\rangle = \frac{1}{\sqrt{n \...
Subhasree Patro's user avatar
1 vote
0 answers
124 views

How to measure the error rate (or fidelity) of a particular gate (such a H, T) by Qiskit

We know the calibration data of IBM's quantum devices can be retrieved through the randomized benchmarking method, which is included in Qiskit. However, the calibaration data about gates just gives ...
jojo's user avatar
  • 71
1 vote
0 answers
310 views

Matrix for $U^{2^j}$ from Shor's algorithm for any $a$ and $N$

I'm implementing Shor's algorithm from scratch and therefore want to implement a unitary gate $U$ such that $U^{2^j}|y\rangle = |a^{2^j}y \: \text{mod} \: N\rangle$. I know that an efficient way of ...
epelaez's user avatar
  • 2,895
1 vote
0 answers
86 views

In (O'Brien et al. 2004), why is the target qubit not affected when the control is $\vert 0\rangle$?

I'm currently reading this paper https://arxiv.org/abs/quant-ph/0403062 but I fail to understand how the input of the control qubit affects the output of the target qubit. I do understand that when ...
Haxhi Pantina's user avatar
1 vote
0 answers
210 views

3-qubit phase shift gate/circuit implementation without any Ancilla qubits

Hi, I need help me with figuring out the 3-qubit phase shift circuit without any ancillas similar to the 2-qubit circuit shown in below attached picture....... Please do let me know! Thanks in advance!...
Sscr's user avatar
  • 65
1 vote
0 answers
41 views

How can I achieve single-qubit $T$ operation using spin resonance?

We know that $T$ gate is as follows $T=\left(\begin{array}{cc}1 & 0 \\ 0 & e^{i \pi / 4}\end{array}\right)$ And on the other resultant spin-resonance hamiltonian is $\frac{H}{\hbar}=\frac{1}{2}...
299792458's user avatar
  • 133
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
0 answers
48 views

Gate definitions for quantum random access codes

I would like to know how the gates are defined in quantum random access codes? Consider the $2 \to 1$ code described in Lemma 3.1 of this paper. The section defines the encoding and decoding circuits. ...
Omar Shehab's user avatar
1 vote
0 answers
49 views

There seems to be a bias against states with more 1s, in IBM's calibration matrix generator: What are the consequences and possible solutions?

Qiskit's function CompleteMeasFitter builds a calibration matrix in this way (2 qubit case): Everything is initialized in the state $|00\rangle$, which is the ...
user1271772 No more free time's user avatar
1 vote
0 answers
201 views

Generalized construction of W basis

Although this question deals with the construction of a W-state, I was looking for a general way to find all the orthogonal W-states, given a number of qubits. For example, for three qubits, the first ...
QuestionEverything's user avatar
1 vote
0 answers
85 views

Screening procedure in an iterative qubit coupled cluster (iQCC) ansatz

The paper Iterative Qubit Coupled Cluster approach with efficient screening of generators describes a new screening procedure for generators of the QCC ansatz. How does one get from defining the ...
Wychh's user avatar
  • 111
1 vote
0 answers
48 views

Error in qiskit.aqua.operator

I want to implement this thing: Operator([[3, Pauli([1,0,0], [0,0,0])], [2, Pauli([0,0,0],[0,0,3])]]) But while doing this there is an error in ...
Akshat Suwalka's user avatar
1 vote
1 answer
326 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$ ...
logicOnAbstractions's user avatar
1 vote
0 answers
908 views

How to implement controlled u3 gate from Qiskit using simpler gates?

I am trying to implement the u3 controlled gate (able to rotate the qubit in any specified direction in 3 dimensions if the control is 1, for two qubits) using simpler gates. The simpler gates ...
invalidexplorer's user avatar
1 vote
0 answers
65 views

About a Qiskit Function

I want to understand this Qiskit function (a function for creating the gate CNX with Python): more specifically i don't understand what's the rotations (Y and Z) over the qubits for ? I added inline ...
user1319236's user avatar
1 vote
1 answer
66 views

Quantum circuit simplification using classical computers

Suppose that we have this kind of circuit where the first unitary operator U is used for the state preparation while the Hadamard operator is used of state detection. Let's say we try to run this ...
William's user avatar
  • 162
0 votes
0 answers
4 views

Basis amplitude and angle encoding

Can someone please share the code using gates to implement basis, amplitude and angle encoding to convert classical data to quantum using 8 qubits in qiskit and visualize the circuits as well
user14924's user avatar
  • 317
0 votes
1 answer
25 views

How to understand the matrix representation of the Toffoli produced by qiskit?

I would like to ask about the results of running the Toffoli gate matrix and circuit diagram on colab Possible reasons for inconsistent results with the following correct matrix results. I would also ...
Dona's user avatar
  • 1
0 votes
0 answers
7 views

"Session has been closed" Error in solving Maxcut problem by QAOA

I am trying to run this code- https://learning.quantum.ibm.com/tutorial/quantum-approximate-optimization-algorithm same way as they mentioned. After running this code, my qiskit Dashboard show 10-12 ...
Maths_hawk's user avatar
0 votes
0 answers
44 views

How to physically implement a CNOT gate with a photon and a cold atom?

If I have qubits in the same platform (superconducting, photon or cold atoms), the implementation of CNOT gates is relatively well-known. However, if I have a photon and a cold atom, how am I supposed ...
AndyLiuin's user avatar
  • 325
0 votes
0 answers
32 views

How to interpret result for an OR problem solved in Qiskit

I solved "01 KnapSack problem" in Qiskit optimization module. Though the iterations doesn't gets converged but I got an answer (may be infeasible). But my question is that how to interpret ...
Maths_hawk's user avatar
0 votes
0 answers
10 views

Particle number expectation value in QuTip

I am learning now to use QuTiP by going through their documentation site. I am trying to understand what does the argument - particle number expectation value in thermal density matrix do? How does it ...
CuriousMind's user avatar
0 votes
0 answers
38 views

Is there any well defined notion of "the state of a qubit X" if $X$ is a member of a larger qubit system

I'm trying to understand the effect of "measurement" as a gate. But my question is more elementary than that. Consider the following simple quantum circuit: $(X,Y)$ begins in the state $1 ...
Sidharth Ghoshal's user avatar
0 votes
0 answers
46 views

Axis and Angle of rotation of $\frac{1}{\sqrt{2}}\begin{bmatrix}-i&-1\\1&i\end{bmatrix}$

I have made use of the following formulas, \begin{align} \theta&=2\cos^{-1}\bigg(\frac{e^{-i\alpha}Tr(X)}{2}\bigg)\\ n_i&=\frac{e^{-i\alpha}Tr(X\sigma_x)}{2\sin\theta/2}\\ e^{i\alpha}&=\...
Sooraj S's user avatar
  • 831
0 votes
0 answers
36 views

Proof that if W is the image of a Unitary operator with an $n^O(1)$ size quantum circuit, then $R_W$ has an $n^O(1)$ circuit as well

I have been working on the following problem Suppose $H$ is the Hilbert space of n qubits. Let $W_0$ be the subspace of $H ⊗ H$ with basis $|x_0⟩$, x = 0,...,N −1 where $N = 2^n$. Suppose $U$ is a ...
user145282's user avatar
0 votes
0 answers
25 views

What is the role of color in color code? ( theoritically and exprimentally)

We know that the color code has an extra element relative toric code . It is color . I want to know what is the role of color ?
Mohsen's user avatar
  • 1
0 votes
0 answers
26 views

How to deal with logical gates which map Logical Paulis to non-Pauli products?

I am trying to figure out the action of logical gates on quantum codes. I am trying to check the logical operations that the logical gate performs on the code. I can do it in simple cases, for example ...
am567's user avatar
  • 585
0 votes
0 answers
42 views

How to decompose a permutation matrix into two-level unitary matrices?

Assume a have a SBox and want to make quantum circuit for it. The unitary transform matrix for a SBox is special - a permutation matrix. I found an algorithm to decompose any unitary matrix into two-...
Huy By's user avatar
  • 93
0 votes
0 answers
16 views

Diffuser's hadamard logic in equal superposition with negative phases

This is with reference to the question here: How to understand intuitively the Grover diffusion operator? Overall it makes sense on how H^n of the diffuser logic creates the |000..0> from an equal ...
GRK's user avatar
  • 21
0 votes
0 answers
22 views

Spin Hamiltonian to Quantum Circuits and are there any group theory associated with the quantum circuits?

Can we think of Quantum Circuits as another representation to describe the dynamics of a system other than its Hamiltonian? How can we go from the spin Hamiltonian version (for eg: SSH Model ...
CuriousMind's user avatar
0 votes
1 answer
61 views

IBM quantum composer possible bug?(state amplitudes of quantum circuit)

I have this quantum circuit: and from the IBM quantum composer I get this state amplitudes: I wanted to flip the target qubit and keep only its pure state however this is not what I am getting.I am ...
Root Groves's user avatar
0 votes
0 answers
151 views

Qiskit cant run circuit with reset gate with error

In qiskit if i have a reset gate in a circuit. If i want to add noise to the circuit it wont transpile. For example: ...
Narcano's user avatar
  • 31
0 votes
1 answer
162 views

How do qubits interact to form logic gates?

How do qubits interact to form, say, CNOT gates? There are very few comprehensive explanations of how quantum computing works. They all use obscure metaphors that don’t make sense (like Schrödinger’s ...
WhatsYourIQ192's user avatar
0 votes
2 answers
124 views

Conditional quantum circuits

Let's suppose that we have the following $\text{GHZ}$-state $$|\psi\rangle = \frac{1}{\sqrt{2}}|a_1a_2a_3a_4\rangle + \frac{1}{\sqrt{2}}|b_1b_2b_3b_4\rangle$$ By using quantum gates, can we evaluate $...
user avatar
0 votes
0 answers
55 views

How to alter the result of (somewhat) randomly generated circuits?

I create randomly generated circuits by iterating through a list of the gate set (in my case [$CX,SX,RZ,X$]) and adding the gate to the circuit. (In the case of the $CX$ gate we look at the topology ...
Qubii's user avatar
  • 191
0 votes
0 answers
48 views

Quantum Crosstalk in gate scheduling with different gates

I am working on quantum crosstalk, specifically on CNOT and SWAP gate operations that lead to crosstalk. I have encountered works that decompose CNOT and SWAP with iSWAP and CZ gates. I would like to ...
Indu's user avatar
  • 9
0 votes
1 answer
126 views

Why can we simulate any measurement involving $U=R+iQ$ using $U'=R\otimes I+Q\otimes R_x(2\pi)$ instead?

In a book named "INTRODUCTION TO QUANTUM ALGORITHMS VIA LINEAR ALGEBRA", the authors say: For any complex $N×N$ matrix $U$, we can uniquely write $$U = R + iQ$$ Assume we have $$ U' = R \...
Huy By's user avatar
  • 93
0 votes
0 answers
26 views

Functional form of the drive of IBMQ machines

I am trying to apply some ML techniques to try and find out pulse sequences to implement different kinds of gates using Qiskit Pulse. For the ML part, it is necessary for me to know the Hamiltonian of ...
MAAN2498's user avatar
0 votes
0 answers
24 views

Superposition of circuits (d-level case)

In this post: Superposition of quantum circuits, the two states are qubits. Is it possible to generalize this question to two qudit case? ie, given quantum circuits $C_1$ and $C_2$ that generates $\...
Irene's user avatar
  • 133
0 votes
0 answers
43 views

How to add a value of -1/2 on the amplitude of a quantum state?

I have a quantum state which is in $ \cos(c*f(x) + \pi/4) |0\rangle + \sin(c*f(x) + \pi/4) |1\rangle$ by using bunch of RY gates. Now I want to measure the probability of getting the state at $|1\...
user avatar
0 votes
0 answers
32 views

how to find a quantum gate matrix from RHO before and RHO after evolve

to evolve a 4x4 density matrix I use this method: rhoafter = np.dot(np.dot(gate,rhobefore),np.conjugate(gate.T)) And I want to find the gate from rhobefore and ...
Luis ALberto's user avatar
0 votes
0 answers
37 views

Why are the other qubits affected by a phase flip in Shor's 9-qubit code?

We have the following "concatenated" initial state in the 9-qubit Shor code: $\alpha{(|000\rangle+|111\rangle)(|000\rangle+|111\rangle)(|000\rangle+|111\rangle)}/{2\sqrt{2}}+\beta{(|000\...
Alan Whitteaker's user avatar