Questions tagged [quantum-gate]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
50 views

How to switch bit in the quantum state?

I want to transform binary representation from one to other. Here, I have 2 registers one act as control register and another is target register with the same number of qubits $n$. Consider $n = 3$ ...
0
votes
1answer
138 views

How is data encoded in a quantum neural network?

I am a newbie to quantum machine learning. I am trying to build a quantum neural network (QNN). What I studied so far about QNN is that input would be qubits and hidden layer parameter can be set ...
1
vote
1answer
34 views

Construct a orale for XOR

I am trying to construct an oracle which should accept 10 or 01 (i.e. $|1\rangle$ should be returned for these input). In the below picture the oracle is between the barrier and after the barrier we ...
2
votes
1answer
62 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 - |...
3
votes
1answer
106 views

Rotations to encode $f(x)$ into ancilla qubit for quantum Monte Carlo

I'm trying to understand the quantum monte-carlo algorithm starting at the most basic version. A key step is rotating (Algorithm 1 p.g 8), an ancilla bit by rotation $R$ with respect to the value of a ...
0
votes
1answer
37 views

Creating Bell states (a question from tutorial) [closed]

I was going through a Quantum Computation lecture series on YouTube given by Umesh Vazirani. There in Lecture 6.3 he talks about creating a Bell state using a Hadamard and CNOT gate. He seems to be ...
2
votes
1answer
23 views

S gate vs P gate?

The paper A Fully Fault-Tolerant Representation of Quantum Circuits uses the $P$ gate which is given as: $$P = \begin{bmatrix}1 & 0\\0 & i\\\end{bmatrix}.$$ Nielsen and Chuang Quantum ...
5
votes
3answers
350 views

Quantum circuit to implement matrix exponential

I want to build a circuit which will implement $e^{iAt}$, where $ A= \begin{pmatrix} 1.5 & 0.5\\ 0.5 & 1.5\\ \end{pmatrix} $ and $t= \pi/2 $. We see that $A$ can be written as, $A=1.5I+0.5X$. ...
1
vote
0answers
37 views

Decompose Toffoli gate with minimum cost for IBM quantum computer

The known decomposition of toffoli gate that can be used on IBM quantum computer is : I want to know any other Toffoli gate decompositions that can be used on IBM quantum computer and have a cost ...
0
votes
1answer
49 views

Qubit in a mix sin/cosine state

The question is pretty simple. How can I get an input qubit $|0⟩$ in the state, say $$\cos{\frac{\pi}{10}}|0⟩ + \sin{\frac{\pi}{10}}|1⟩$$ Or any other sine/cosine mix state? Which gates do I need to ...
1
vote
1answer
159 views

Simple algebraic explanation for normalizing states

I'm wondering how a set of three 0-state qubits, each prepared identically, like so: When considered together, may produce the fraction: along with their combined states. This is the entire circuit....
3
votes
1answer
56 views

Error bound on approximating arbitrary rotation gates

I'm working on the following problem form Nielsen and Chuang (Ex. 4.40) regarding the universality of Hadamard, phase and $\pi/8$ gates for single qubit gates: For arbitrary $\alpha$, $\beta$, $E(R_{\...
3
votes
2answers
101 views

What is a local operator?

I have a sort of basic question. I think an operator that acts on $n$-partite states is defined (up to permutation of parties) to be local if it can be written as $$A = A_1 \otimes_{i=2}^n \mathbb{I}...
4
votes
2answers
259 views

How can I fill a unitary knowing only its first column?

I have a unitary matrix that I want to construct. I only care what happens to the first computational state, so the first column is specified. So far, I've been assigning each question mark to a ...
5
votes
1answer
146 views

CNOT gate in ZX-calculus

In ZX-calculus, the CNOT gate is represented by this: Can someone show my why this is true, using just the basic rewriting rules? All books/papers I have seen simply take it without proof, but I can'...
5
votes
0answers
137 views

Physical implementation of gates on IBM Q

There is a lot of quantum gates in IBM Q Composer, however, only few are implemented physically while others can be composed of them. When one looks at description of a quantum processor in IBM Q ...
2
votes
0answers
63 views

How does Quantum Teleportation works? [duplicate]

I've started learning Quantum Computing from the Qiskit Textbook and was able to easily understand or work out everything until it came to the working of Quantum Teleportation I can understand the ...
4
votes
1answer
250 views

How to decompose a multi-target controlled gate?

I'm trying to replicate with qiskit the results of this paper in which basically they implement a quantum version of the Principal Component Analysis applying Quantum Phase Estimation algorithm in ...
1
vote
1answer
44 views

$\sf BQP$ and general $\mathrm{SU}(2^n)$ gates

In his lecture on quantum computing, Scott Aaronson describes polynomial-size quantum circuits, Now, once we fix a universal set (any universal set) of quantum gates, we'll be interested in those ...
3
votes
0answers
43 views

Why are two qubits gates more noisy?

I would like to understand why two qubit gates are generally more noisy. If I am interested in single qubit gates, I can have an effective modelling as a master equation: $$\dot{\rho}=\frac{1}{i \...
2
votes
3answers
54 views

What does the $\sqrt{NOT}$ gate have to do with irreversibility?

In his essay "Why now is the right time to study quantum computing" Aram Harrow writes, after describing the action of the $\sqrt{NOT}$ gate, that: However, if we apply $\sqrt{NOT}$ a second time ...
5
votes
1answer
110 views

Aproximating unitaries with elements from a t-design

(This is basically a reference request) I am wondering if there are any results out there on to what accuracy a given unitary can be approximated with an element drawn from a t-design. To ...
6
votes
2answers
179 views

How to represent an $n$-qubit circuit in matrix form?

If a given quantum circuit has $n$ qubit inputs and a certain number of gates, how can we represent the whole circuit in matrix form? Here's an example: I am sorry, I am confused on how to express ...
3
votes
2answers
365 views

How does the CNOT gate work?

As defined, CNOT should for the two input states $|0\rangle = \pmatrix{1 \\ 0}$ and $\pmatrix{\alpha \\ \beta}$ should result in the second state unchanged: $\pmatrix{\alpha \\ \beta}$. However, to me ...
3
votes
0answers
36 views

What limits speed of quantum gates?

I would like to check something. Consider I am working on cQED (superconducting qubits), or ion trapped, or silicon qubits (I would like to exclude "exotic for me" quantum computing like photon based,...
1
vote
2answers
54 views

Constructing a time evolution operator $e^{it H}$ for $H^2=I$

Consider a Hamiltonian $H = \sigma_x \otimes \sigma_z$ Construct the time evolution operator $U(t) = \mathrm{e}^{-\frac{iHt}{\frac{h}{2\pi}}}$ [Hint:Write down the expansion of $\mathrm{e}^x$ and use ...
0
votes
0answers
36 views

State fidelity in Qiskit

Can someone provide me an example for finding state fidelity of two circuits? For example, if I have a Toffoli gate with two different approaches of decomposition then how do I calculate fidelity ...
3
votes
1answer
80 views

General approach for switching control and target qubit

It is well known that circuit can be replaced with this circuit The situation is even easier in case of controlled $\mathrm{Z}$ where gate controlled by $q_0$ and acting on $q_1$ have same matrix as ...
1
vote
1answer
66 views

How do I know in which state the qubit is in each step of the circuit for the simulator in qiskit?

I would like to know how to know in which state a qubit is (I am talking about single-qubit errors), because in order to apply a non unitary gate in the simulator I have to renormalize the state or ...
0
votes
1answer
55 views

Interpretation of CNOT after basis-change

Consider the product of gates acting on two qubits: $$ \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{pmatrix} ...
4
votes
2answers
145 views

How to read the elements of a circuit in qiskit?

I would like to know if there is a way to read the elements of a circuit. What I mean is if I have a QuantumCircuit object, can I obtain the gates that are applied ...
1
vote
1answer
45 views

computing a quantum circuit by hand (CNOT on non-computational basis states)

I'm trying to compute the state of a particular circuit using Dirac notation but I get stuck after a while .. you can find the circuit there. The numerical coefficients do not matter and I want to ...
3
votes
1answer
78 views

Exercises on computing by hand quantum circuits

I'm trying to become familiar with manipulation of the Dirac notation. I want to be able to compute quickly the final states obtained in a small circuit. Typically, it should include 2 to 5 qubits, ...
3
votes
1answer
82 views

The Clock Speed for the Quantum Computers

Is there a way to look up the clock speed for the different computers?
1
vote
2answers
90 views

Circuit of a very trivial thing

I am writing to double check that if have a hamiltonian of the form $H = I_1 \otimes I_2$, when I seek to find the unitary, $e^{-i\gamma I_1 \otimes I_2}$, there really is no need to convert this into ...
1
vote
1answer
40 views

Toffoli gates with Hadamard coins (QISKIT)

I am creating the following circuit with Qiskit (2Toffoli gates controlled with coins) And to set the coins for one iteration of the circuit i do the following : ...
1
vote
1answer
135 views

What is the general matrix for the Swap gate?

In section 3.3.2 of this PDF, The general SWAP gate is defined as $ S (\alpha, \hat{y}) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos(\alpha/2) & -\sin(\alpha/2) & ...
2
votes
1answer
72 views

How to make circuit of a 32 X 32 matrix?

I have a 32 X 32 matrix show in the picture below and I want to make a circuit for this matrix. Also in the picture below to the matrix picture I have written the each column in bra-ket notation to ...
1
vote
1answer
32 views

What are the different ways of representing unitary gates in terms of the matrix?

What are the different ways of representing unitary gates in terms of the matrix? In other words what would be the two different matrices which on multiplication give you unitary gate matrix?
2
votes
0answers
59 views

How to decompose arbitrary gates in Qiskit? [duplicate]

I have been exploring quantum computing, I have no idea of decomposing arbitrary gates in Qiskit. Can someone help me with an example?
1
vote
1answer
56 views

Achieve a control gate with 2 hadamard coins

I want to implement two Toffoli gates with 4 qubits: 3 serving as control qubits (the 2 hadamard coins and one other qubit) and the last one as target qubit and 3 qubits (2 coins 1 target qubits) as ...
4
votes
1answer
61 views

What is a “cascade of gates”?

While I'm reading some literature about synthesizing quantum circuit, I couldn't understand what cascades of Toffoli gates means. How Toffoli cascade runs in quantum circuit?
1
vote
0answers
253 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{...
2
votes
1answer
224 views

Simpler implementation of the Toffoli gate on IBM Q for special circumstances

On current quantum hardware, a depth of circuit is constrained because of noise. In some cases, results are totally decoherent and as a result meaningless. This is especially true when Toffoli gates ...
3
votes
2answers
153 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,...
4
votes
1answer
65 views

What do empty white circles mean in a quantum circuit?

I'm studying Shor's algorithm. but I see from the beginning this empty circle. what this circle means??
11
votes
4answers
709 views

What is the opposite of measurement, in a quantum circuit?

My understanding is that at the level of quantum mechanics, almost all operations are reversible in time. Most gates in a quantum circuit clearly obey this rule; they can be reversed by applying some ...
0
votes
2answers
348 views

Swap test to calculate inner product with qiskit for multi-qubit states

Is it possible to perform a controlled swap test with multiple targets with qiskit? I have tried using cswap(ancilla[0],qb1,qb2), where qb1 is an n-qubit register and qb2 is as well
6
votes
2answers
552 views

Why can the QFT be replaced by Hadamard gates?

I'm studying Shor's Algorithm. In the book, author explains QFT can be replaced by Hadamard gates? Why this process is possible?? Thank you everybody. This is QPE. I attach part of book!!
2
votes
0answers
46 views

Easiest hash function to implement on Qiskit

Trying to build an Oracle circuit for Grover's algorithm that will try to find a desired input in order to get a certain output of a hash function. Was wondering if there were any 4 or 8 bit hash ...

1
3 4
5
6 7
14