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
0 answers
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
0 votes
0 answers
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 ...
5 votes
0 answers
43 views

Arbitrary rotations in the plane spanned by two known quantum states

Suppose I have two quantum states $|\psi_1\rangle,|\psi_2\rangle$ that I know how to prepare from some fixed initial state, say $|0\rangle^{\otimes N}$ on some $N$ qubits with known quantum circuits $...
1 vote
2 answers
41 views

Is it possible to express T, CNOT, SWAP, and CCNOT gates as a product of rotation gates?

I am trying to learn some basics in quantum computing and reached a place where I need to understand deeply unitary matrix decomposition. Therefore, I am looking for some help whether literature or ...
1 vote
1 answer
190 views

Matrix representation of any conditioned gate

Is there an algorithm explaining how to represent any gate in the matrix form? Suppose, the circuit is the following: where operator $ U = e^{iA\pi/4} = \begin{bmatrix} 0.35-0.85i & -0.35-0.15i ...
0 votes
1 answer
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
1 answer
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'...
0 votes
1 answer
64 views

Understanding the Hadamard gate and what is meant by qubits

I'm trying to understand the Qiskit documentation in order to see if there are differences in notation from my quantum mechanics lecture notes. The Hadamard Gate transforms $ |0 \rangle$ into $|+ \...
3 votes
1 answer
47 views

Independence in state prepared by independently drawn Haar random gates

Consider independently drawn $2 \times 2$ Haar random unitaries $U_1, U_2, \ldots, U_n$ and $$V = U_1 \otimes U_2 \otimes \cdots U_n.$$ Consider the state $\sigma$ given by $$\sigma = V \rho V^{*}, $$ ...
  • 1,009
3 votes
1 answer
66 views

Why is the Qiskit transpiler not resolving the equivalence $I = R_y(-\theta) R_y(\theta)$?

Suppose you are given the following quantum circuit in Qiskit: ...
1 vote
2 answers
35 views

Problem adding two numbers in a quantum computer with Drapper's algorithm

I would like to add numbers. In this simple example a = 1 and b = 1. The circuit I created looks like this: We have two registers a and b. Both have a size of 3 qubits. I'm using Big Endian notation, ...
  • 37
0 votes
0 answers
69 views

Conditions for Fault-tolerant QC to work better than not doing any EC (except the ideal decoder)

I've been exploring fault-tolerant QC with the simplest 7-qubit Steane code, yes I'm able to obtain all the predicted thresholds for various transversal gates and the EC gadgets. I then tried to ...
3 votes
2 answers
54 views

Why is rz gate error not exactly zero in IBMQ washington device?

I am looking at the calibration data for IBMQ's washington device (which is published daily) and am finding non-zero values for the field "rz_gate_error_value". I used to think that RZ gates ...
  • 157
2 votes
1 answer
37 views

How to write CNOT within a tensor product expression of operations on the whole system

If I have an $n$ qubit register and I act on the $k^{\mathrm{th}}$ qubit with an arbitrary operator $\hat{G}$, I can write the operation on the whole register as the operation, $$\underbrace{\mathbb{1}...
4 votes
2 answers
84 views

How to check a given unitary evolution is correct in a real quantum computer in Qiskit?

For a given unitary, I want to know whether this unitary gate is correctly evolved in the circuit. In the simulator, I can use "statevector" to get the state vector to check the correctness ...
1 vote
1 answer
46 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 ...
  • 121
0 votes
1 answer
86 views

Given the following matrix representing a quantum gate, how do I implement it in Qiskit?

I have the following matrix and I need to build the corresponding quantum gate operator using Qiskit native gates (I guess phase and $CNOT$ is the universal set but I'm not sure): $$ \begin{pmatrix} \...
1 vote
2 answers
104 views

How to repeat the same Qiskit instruction $N$ times (no for loop)?

I need to build the following 1-qubit QuantumCircuit in Qiskit, repeating the pair ($X$ gate, barrier) for $N$ times: The most straightforward way to do this is by ...
3 votes
2 answers
104 views

Doing non-unitary operations on quantum computer

So I am trying to implement non-unitary operations on Qiskit. There is an option to perform conditional operations in Qiskit. Suppose I prepare a qubit state in superposition. $|\psi\rangle=\sqrt{\...
1 vote
0 answers
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
1 answer
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 ...
-3 votes
0 answers
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
1 answer
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
1 answer
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
0 answers
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 ...
0 votes
1 answer
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
0 votes
1 answer
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 votes
0 answers
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
1 answer
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
2 answers
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
1 answer
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)...
-1 votes
1 answer
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
1 answer
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
1 answer
34 views

Adder circuit yields large errors on real hardware

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

Is it necessary to apply CNOT for the sole purpose of "establishing a correlation" between two qubits

Disclaimer: I recently started learning quantum information. I've been exploring creating the $|\Phi^+\rangle = \frac{1}{\sqrt{2}} (|00\rangle + |11\rangle)$ Bell state (starting with the state $|00\...
2 votes
1 answer
85 views

clarifying a step in the proof of Solovay-Kitaev theorem

There is a step in the proof of the proof of Solovay-Kitaev theorem about the existence of a set containing words of at most length length $l_0$ that cover $SU(2)$ . The proof I'm reading in given in ...
  • 301
0 votes
1 answer
31 views

ctrl_state 'order' of control( )

I am qurious about the order of ctrl_state The Quantum Circuit what I expected is this. q1 is controled when '0' and q2 and a3 is controled when '1' So I wirte code that is ctrl_state='011' But ...
0 votes
0 answers
28 views

Question about quantum simulation of the Jaynes-Cummings Hamiltonian

Can you help me with solving exercise 8 (4) in the lecture notes Dynamics and Control of Open Quantum Systems which is about finding the unitary operator corresponding to the Jaynes-Cummings ...
  • 43
1 vote
2 answers
39 views

How to simplify sequence of gates in QASM file?

I would like to know if there is a functionality in qiskit to simplify a sequence of gates in a QASM file. For example, say we have a sequence of two expensive (in fault-tolerant context) gates $TT$. ...
  • 1,758
1 vote
2 answers
121 views

Why Circuit error when I use append(U)

I am new of this field. I want to make custom Unitary transform. I make a test matrix with Identity matrix. If I use UnitaryGate and append it to main circuit, it would not work. Here is my code. I ...
4 votes
0 answers
112 views

Inverses and the Clifford Hierarchy

Elements of the (qubit) Clifford Hierarchy are unitary matrices. For a good definition of the Clifford Hierarchy see: Is there a closure property for the entire Clifford hierarchy? While a complete ...
0 votes
0 answers
26 views

How can i describe Custome Gate Sets in Cirq?

i try to create a Custome GateSet with the CompilationTargetGateset class but it does not work. ...
  • 97
0 votes
2 answers
44 views

Implementing Simon's oracle for a 2:1 function

I'm trying to implement Simon's oracle for a 2 to 1 function like described in the answer for the same question here: https://quantumcomputing.stackexchange.com/a/6587/22394 As I interpret the answer ...
  • 37
1 vote
0 answers
31 views

How to apply CNOT with control qubits in first register and target qubit in second register

I would like to know how to mathematically describe the states of the qubits in both registers in the following circuit:
  • 37
0 votes
1 answer
57 views

calculating the unitary of a circuit using Qiskit's simulator

i am trying to verify qiskit's get_unitary() result. this is my code: ...
2 votes
1 answer
70 views

Where can I find a comprehensive list of gate decompositions used by transpilers?

Does anyone know of a web site, paper etc. that has a list of "gate decompositions" e.g. the kind of decompositions that occur when the transpiler decomposes non-native gates to native gates....
  • 197
1 vote
1 answer
38 views

Why $|0\rangle \langle 0|=\frac {1}{n} \sum_{j=1}^{n}|0_j\rangle \langle 0_j|\bigotimes \mathbb {I}_{\overline j}$ in VQLS

I am having some trouble to derive equation In paper Variational Quantum Linear Solver $|0\rangle \langle 0|=\frac {1}{n} \sum_{j=1}^{n}|0_j\rangle \langle 0_j|\bigotimes \mathbb {I}_{\overline j}$ $|...
  • 31
2 votes
1 answer
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 ...
2 votes
1 answer
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
2 votes
1 answer
35 views

Implementation of quantum Hadamard gate using electron spins?

The Hadamard gate performs the following operation on an incoming electron spin: What is a realistic laboratory way of implementing a Hadamard gate that will change a known electron spin into one ...
  • 191

1
2 3 4 5
28