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

How to prepare a random 1-qubit superposition for data encoding

Let's assume we have a normalized data vector $\vec{x}= [x_1,x_2]$. How can I prepare a state $$|\psi\rangle = x_1|0\rangle+x_2|1\rangle$$ for any $\vec{x}$. I know that this state is in general not ...
1
vote
1answer
16 views

Is there any quantum gate that can change quantum hardware topology(architecture)?

I read about this paper Hardware-aware Heuristic for the Qubit Mapping problem in the NISQ Era. I wonder there is the only SWAP gate that can change the quantum hardware topology. Is there any gates ...
4
votes
1answer
48 views

What is the general method for creating real gate sequences from mathematical algorithms?

Background I have been doing research on quantum computing on my own for over a year now and I feel like I may have missed a fundamental step. I have no idea how to take a mathematical algorithm and ...
2
votes
0answers
24 views

How to convert discrete quantum circuits to their continuous variable equivalents?

With a full set of either CV, or qubit gates, you should be able to implement a universal circuit. I am wondering how to "convert" one circuit to another. If I have a circuit with a U3 gate, ...
3
votes
1answer
128 views

How can we construct a control-control y-rotation (CCRy) gate in Qiskit?

Qiskit has a CRy gate, however I couldn't find a CCRy (double control Ry) gate implementation. How can we construct the CCRy circuit given below in Qiskit without any ancillary qubits? Edit: A quick ...
3
votes
1answer
86 views

What is the action of sandwiching an operator with two CNOT gates?

When a gate is sandwiched (or conjugated) by two CNOT gates, what effect does it have on the gate being sandwiched? For example, in the figure below, it is clear what effect the controlled $R_y(\theta)...
1
vote
0answers
26 views

Qiskit: is there a quick way to work out the spherical coordinates for a given qubit statevector?

I am trying to calculate the spherical coordinates of different qubit states (i.e. working out $\theta$ and $\phi$ from: $|\psi\rangle = e^{-i\phi/2}\cos(\theta/2)|0\rangle + e^{i\phi/2}\sin(\theta/2)|...
2
votes
1answer
37 views

Qiskit: how can you use a different state for each shot in a quantum circuit? [duplicate]

I am trying to run a quantum circuit many times, each time using a different random state - a single qubit i.e. $|\psi\rangle= a|0\rangle + b|1\rangle$ with different $a$ and $b$. Once each qubit has ...
2
votes
1answer
36 views

What is the difference between SWAP & Bridge gates?

While I'm studying about Qubit allocation (mapping), I wonder what the differences between SWAP and Bridge gates are. I know that a SWAP gate and Bridge gate can be represented with 3 CNOT gates and 4 ...
2
votes
1answer
32 views

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

I am currently reading Nielsen & Chuang, and one of the questions asks to calculate a density matrix with the following mixed state, $$ \frac{1}{9}\begin{bmatrix} 5 & 1 & −i \\ 1 & 2 &...
2
votes
1answer
36 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 \\ ...
1
vote
2answers
36 views

In quantum adiabatic simulation, is the $s$ in $(1-\frac{s}{T})H_{in}+\frac{s}{T} H_{cl}$ related to the $t$ in $e^{-iHt}$?

I just want to do a whole adiabatic calculation on quantum circuit. To prepare two Hamiltonian of $H_{initial}$ and $H_{classical}$ and solve $H_{classical}$ using adiabatic calc like quantum ...
6
votes
2answers
385 views

How can one argue that the $S$-gate is Clifford while $T$-gate is not?

How can one argue that $S$-gate is Clifford while $T$-gate is not?
0
votes
0answers
11 views

unable to install qiskit-aqua[cvx]…While installing, i am getting the below error. If anyone can suggest

I am unable to install qiskit-aqua[cvx]...While installing, i am getting the below error. If anyone can suggest. I have pasted the error snapshot below
2
votes
1answer
35 views

How does MCPhaseGate/MCU1Gate works internally in qiskit?

I was curious about the implementation of MCPhase/MCU1Gate and how it works without ancilla qubits. I ended up checking the code of the some auxiliary (?) function ...
1
vote
1answer
33 views

IBM Qiskit QAOA gate implementation question

In section $5.2$ of the QAOA chapter in Qiskit textbook, section $5.2$, state preparation uses the gate $U_{k,l}(\gamma) = e^{\frac{i \gamma}{2} (1-Z_k Z_l)}$. Later, in section $5.3$, this gate is ...
1
vote
0answers
34 views

How can I create an ADD gate for two quantum states?

I want create an ADD gate like this: in qiskit using elementary gates. Can it be done? How can I proceed?
3
votes
0answers
29 views

Implementation of the “Quantum Verification of Matrix Products” algorithm

I would like to implement a Quantum Verification of Matrix Products, using Ambainis OR Burhman algorithm but I don't know how to start. There isn't much documentation about it, and no circuit in the ...
2
votes
0answers
60 views

How to perform a phase operator on register that contains two or more qubits?

My problem is easy to understand, just how to calculate the matrix of phase operator(or phase gate) acts on multi-qubits so that i can perfrom it in quantum circuit on IBM Quantum Experience just like ...
3
votes
1answer
52 views

Error Propagation in quantum gates

When decomposing an arbitrary SU(2) matrix into elements from a universal gate set (i.e. with the Solovay-Kitaev Theorem) we try to get the lowest error possible, which leads to 'chains' of these ...
0
votes
0answers
47 views

Types of Quantum Computer [duplicate]

I am confused of all that different Quantum computers. please correct me if I say something wrong. There are two main different types of quantum computing: Quantum Gates based computing quantum ...
2
votes
0answers
29 views

Fowler Distance in Solovay-Kitaev Algorithm

I have been using this code to implement the Solovay-Kitaev algorithm for approximating arbitrary single qubit gates. One measure of success it gives is the 'Fowler distance'. I cant find a definition ...
1
vote
1answer
49 views

Generic CNOT gate in qiskit from tensor product

I would like to use qiskit to verify for generalized CNOT gates that, e.g. for 4 qubits \begin{equation} \text{cu(0,3)} = |0\rangle\langle 0|\otimes1\!\!1\otimes1\!\!1\otimes1\!\!1 + |1\rangle\langle ...
4
votes
2answers
118 views

Partial trace and SWAP in the basis of subsystems

I'm trying to derive equation $(1)$ on p.2 in Lloyd et al, 2013 which reads $$ \text{Tr}_A\left[\exp(-i\theta S_{AB}) (\rho_A \otimes \sigma_B) \exp(i\theta S_{AB}) \right] = (\cos^2 \theta) \sigma_B +...
5
votes
1answer
161 views

More efficient implementation of $4$-qubit gate

While working on an error detection algorithm, I stumbled upon the problem of simplifying the following implementation Here, the $S$ gate is defined by $$S=\left( \begin{array}{cc} \frac{\sqrt{3}}{2}...
3
votes
1answer
72 views

In quantum teleportation, does Bob's qubit depend on Alice's $\alpha$ and $\beta$ coefficients?

Does applying an operation to one half of an entangled pair affect the other? As in the case of quantum teleportation when Alice applies CNOT to her half of the pair and the qubit she wants to send ($\...
4
votes
1answer
85 views

SWAP Test as a Projective Measurement [closed]

In a much cited paper by Lloyd et al Quantum Algorithm for Supervised and Unsupervised Machine Learning, they proposed a rather cute quantum algorithm to evaluate the distance between an input feature ...
1
vote
1answer
37 views

Multiply-Controlled X Gate/MCT Gate Implementation

I am currently trying to implement a multi-controlled Toffoli/multi-controlled X gate in Braket, but I am confused as to the general concept of cascaded X gates and other implementations. I've read ...
6
votes
1answer
42 views

How does the subtraction gate work in Fourier space

I am currently reading Shor's algorithm on my own and I come across a paper via this link. It shows the circuit for implementing Shor's alogrithm. Here it depicts that taking a QFT circuit on the ...
0
votes
1answer
40 views

How do two H gates act on two entangled qubits?

In this circuit, if the two qubits are initial in state 0, then after the oracle they are entangled and in state: $0.5 * (|00\rangle+|01\rangle+|10\rangle-|11\rangle)$ My question is how do the two H ...
1
vote
1answer
31 views

Formula for a single unit gate acting on a lexicographically represented state

I've been trying to find in textbooks a discussion on the action of arbitrary single qubit gates on a lexicographic state. That is, given an operator $G_{l}= 1\otimes 1...\otimes G \otimes ... \...
0
votes
1answer
31 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, ...
2
votes
1answer
65 views

proof that the gate U is equivalent to the given circuit mathematically

I have solved this question by this, but can't able to get my mistake in it.
2
votes
1answer
44 views

Where is CZ gate in Qiskit circuit composer

I am trying to build the Grover circuit using the Qiskit circuit composer. The Grover example has a cz gate. I can't find that gate in circuit composer. I am new at this.
0
votes
0answers
24 views

Parity Operation in Braket Implementation of Grover's

I'm thinking this might be a very simple issue, but for some reason I'm having some trouble returning correct results when implementing Grover's in Braket. When I've come to the parity checking ...
3
votes
3answers
66 views

How does one create the unitary sending $|0\rangle$ into a target quantum state?

The Hadamard gate allows us to construct an equal superposition of states. If one wants to construct an arbitrary superposition e.g. $\alpha\vert 0\rangle + \beta\vert 1\rangle + ..$, how does one ...
3
votes
0answers
43 views

IBM QE - Parameters that differentiate the various backends

I'm doing a university thesis using IBM's quantum backends. In my analysis I am making some considerations on what differentiates one backend from another other than the number of qubits and quantum ...
3
votes
1answer
102 views

How to construct a controlled-Hadamard gate using single qubit gates and controlled phase-shift?

How can I construct a controlled-Hadamard gate using single qubit gates and controlled phase-shift? I am stuck in this and any help would be appreciated.
0
votes
0answers
26 views
5
votes
2answers
306 views

How to generalize the relationship HXH = Z for higher dimensions

Concerning the Hadamard gate and the Pauli $X$ and $Z$ gates for qubits, it is straightforward to show the following relationship via direct substitution: $$ HXH = Z.\tag{1}$$ And I would like to ...
3
votes
1answer
102 views

What can gate teleportation be used for in practice?

I was quite fascinated when I learned about gate teleportation, but I am struggling with understanding what it may be used for. Sure, one can use ancillae bits to teleport gates into various parts of ...
3
votes
1answer
103 views

How does a rotation about the y-axis on a Bloch sphere affect the state of a qubit?

I am unsure how exactly it can be inferred that the following sequence of logic gates and rotation operators acting on a three-qubit state $\lvert abc\rangle$ $$ R_{y,c}\left(\frac{\pi}{4}\right)CNOT(...
5
votes
3answers
388 views

Why can I not apply a control gate/function to a gate like T, S, S dagger, … (using IBM Quantum Experience)? Is there another option?

I am trying to use the circuit composer of the IBM QE. I am doing the inverse QFT on 3 qubits and therefore need a control on T and S dagger gates, but it won't let me. Does anyone know why or know a ...
1
vote
2answers
139 views

How to describe the state of a qubit passing through two Hadamard gates? [duplicate]

Describe the state of the qubit at points A, B and C. How does this demonstrate that we need the “ket” (or the vector) representation of qubits, rather than just describing them in terms of ...
1
vote
0answers
43 views

Measurement of any qubit state in Y-basis [duplicate]

how can I measure any qubit state in Y-basis in qiskit. there is this solution here How to measure in another basis but it gives the qubit's position on bloch sphere in z-axis where as I think it ...
4
votes
1answer
78 views

Single-qubit rotations on a subspace within two-qubit unitary

I would like to implement the operation $$ U(a,b) = \exp\left(i \frac{a}{2} (XX + YY) + i \frac{b}{2} (XY - YX) \right) $$ ($a,b \in \mathbb{R}$) without using Baker-Campbell-Hausdorf expansion, ...
2
votes
2answers
66 views

A question regarding quantum phase estimation algorithm

Why are $U$s raised to successive powers of two in quantum phase estimation circuit diagram when we use $n$ register qubits $|0\rangle|0\rangle|0\rangle$?
2
votes
3answers
74 views

How the various quantum gates are implemented physically in quantum computer?

I'm not able to find any sources. Can you point me to some?
0
votes
1answer
51 views

A problem with application of multi controlled rotation gates [closed]

This message pops up when I run an mcrx gate The mcrx gate needs a single qubit as target. Here is a part of code I run: ...

1
2 3 4 5
17