# Questions tagged [quantum-gate]

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

1,396 questions
Filter by
Sorted by
Tagged with
3 views

### how does one get native 2-body measurements?

How are Majorana-based architectures able to possess native 2-body measurement operations? Could anyone provide an appropriate reference explaining that? Are those native measurement operations ...
• 153
8 views

### Is a diagonal matrix with one non-zero element a measurable observable?

The HHL algorithm prepares the output state $|x\rangle$. However, we cannot (efficiently) measure the state directly to get its components. Instead, we can construct an operator $M$ to find (the ...
43 views

40 views

### Create a 3-Qubit circuit given the state?

I am trying to implement a 3-qubit circuit given the state. I have been given for example : |w> = x*|010> + y*<101>. How can I reverse engineer to create the desired state. As I am ...
1 vote
27 views

### How can you create S-GATE with U3?

Hello I am trying to create an Q0->HSSH Q1->HSH using U3 Gate only. I am trying U3(pi/2, 0, pi) for H Gate and U3(4pi/2, 2pi,0) for S gate. The output state vector using normal H and S gate don'...
64 views

1 vote
27 views

### Computation for threshold of CNOT gate

I'm trying to reproduce some threshold results using 7-qubit Steane code in those legacy papers. I managed to obtain the graph for circuit noise and single qubit gate e.g. the pseudocode for computing ...
1 vote
46 views

### CNOT gate in Bernstein-Vazirani Algorithm explanation

I am studying the Bernstein-Vazirani Algorithm from the Qiskit Textbook and I don't understand why specifically the CNOT gate is applied when s[q]=1 (see the code at the end of the linked page). I ...
35 views

### Why applying Hadamard Gate on a state and taking normalization inverts the state? [closed]

Applying the Hadamard Gate on a state(0) takes the state into superposition state. If we take normalization and try to find out thesuperposition component PSI, the state is inverted to 1. Mathematics ...
1 vote
66 views

### Commutativity of XY gate

My question is a simple one: Can 2 XY gates commute ? XY gate is a 2-qubit XX+YY interaction also sometimes referred to as iSwap gate.
1 vote
58 views

### Trying to construct modular exponentiation gate in Qiskit

https://qiskit.org/textbook/ch-algorithms/shor.html in this tutorial I don't understand especially in how they define for the modular exponentiation gate with only swap gate (inside c_amod15 function)....
1 vote
26 views

### how do x, y, z, and h gates transform amplitude, phase, and magnitude? Affect of one gate to others?

I have been taking the qiskit and I am having trouble understanding how they work. How does the phase affect the actually probability of the output? The course also talks about the amplitude trees of ...
71 views

### How to decompose root iswap into root cz and single-qubit gates

Id like to decompose root iswap gate into root cz (not cz or cx) and single-qubit gates. 1)Is it possible to decompose like that? 2)Is there a way to do such a decomposition with qiskit, qutip, etc.?
• 1
41 views

### Propagation rules for the cross-resonance gate of IBM ($R_{zx}$)

The $R_{zx}$ is the fundamental two-qubit gate supported by IBM processors. I'd like to see how Pauli operators propagate over such a gate. Other well-known cases are shown in the picture below.
• 1,106
22 views

### qiskit gates for ternary circuits

I want to using qiskit for some ternary quantum circuits. Now I want to know are the gates in this package useable for ternary circuits? or some other gates should be defined?
• 11
1 vote
212 views

### Calculate the difference between two vectors?

Let's say we have two vectors a and b, and they have the same size. Is there a quantum circuit to calculate the difference a-b? To be clear, here's an example: a = [1.2, 0.7] (the norm is not 1), and ...
• 21
1 vote
84 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, ...
1 vote
52 views

### Changing the phase of one qubit is equivalent to changing the phase of another qubit. What is the physical interpretation of this?

Given two qubits, let's say it's in state $|01\rangle = |0\rangle \otimes |1\rangle$. These two qubits are not entangled. Applying a $\theta$ angle phase change (sorry if this is the wrong terminology)...
73 views

### How do I get this FRQI equation? [duplicate]

I have been working with FRQI and there is this equation in a paper is given. Can anyone explain how they get that just by multiplying by $\mathcal{H}$ ? \mathcal{H}\left(|0\rangle^{\otimes2n+1}\...
• 123
1 vote
31 views

### Controlled-phase shift: why only one qubit may be rotated and not the other?

Let be two qubits |x> and |y>. The controlled-phase shift diagram is: With |x>=|1> and |y>=|1>, one has: Why |x> has the sum of all the phase shits and |y> is unchanged? ...
• 11
1 vote
34 views

### Adder circuit yields large errors on real hardware

I was playing with qiskit's adder example using the following code ...
• 13
79 views

• 31
53 views

### Applying Clifford Gate before a Pauli Measurment

I am reading a paper where they describe different randomised measurement protocols. I am confused about a simple case of this protocol that they discuss. The link of the paper is here , and I am ...
124 views

### How to define a custome gate from a matrix in TKET

I'm currently learning all about different quantum tools such as qiskit, tket, cirq, forest sdk and so on. I just want to create a circuit that gets executed given a matrix, because a circuit can be ...
• 97