Questions tagged [quantum-gate]

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

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

How to decompose arbitrary gates in Qiskit?

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
38 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
38 views

What is cascade?

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
55 views

Decomposition of an arbitrary gate using given matrix in Qiskit

If I have a matrix of say $$ \begin{pmatrix} 1.5 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1.6 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ \end{pmatrix}, $$ how do I ...
1
vote
1answer
70 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
101 views
+50

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
47 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??
9
votes
4answers
632 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
53 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
5
votes
2answers
418 views

Why QFT can 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
32 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 ...
8
votes
1answer
74 views

Why Non-Clifford gates are more complex than Clifford gates?

There are two groups of quantum gates - Clifford gates and non-Clifford gates. Representatives of Clifford gates are Pauli matrices $I$, $X$, $Y$ and $Z$, Hadamard gate $H$, $S$ gate and $CNOT$ gate. ...
0
votes
1answer
54 views

How to obtain the noise of a circuit in Qiskit?

I referred to the following Qiskit's document: state_fidelity. The inputs of state_fidelity are quantum state vectors or density matrices. For example, $|00\rangle$...
1
vote
1answer
75 views

What is the $\lambda$ parameter in the $U3$ gate used for?

The most general single qubit gate is $\mathrm{U3}$ given by matrix $$ \mathrm{U3}= \begin{pmatrix} \cos(\theta/2) & -\mathrm{e}^{i\lambda}\sin(\theta/2) \\ \mathrm{e}^{i\phi}\sin(\theta/2) & ...
1
vote
1answer
47 views

Controlled NOT gate using multiple control qubits in Q#

I am trying to implement the Grover's search algorithm using Q# and I am not able to implement the oracle (black box) part for the search of state $|1010\rangle$. How to implement the controlled NOT ...
2
votes
2answers
60 views

How will quantum computers access large amounts of storage?

I've seen many articles in the popular press saying that quantum computers will enable searching through huge amounts of data in an instant. But I can't figure out how the current architectures can do ...
5
votes
1answer
65 views

Global phase and single qubit gate: does it actually matter for two (or more) qubit gates?

Consider the $X$ gate. Mathematically, we have $X=i e^{-i\frac{\pi}{2} X}$ But as global phase of unitaries don't matter because they will simply act a global phase to the wavefunction, we can ...
3
votes
1answer
53 views

Constructing a circuit for $C^1(U)$ for rotation operators with TWO single qubit gates and CNOT gate

This is the exercise 4.23 from Nielsen and Chuang, asking that if it is possible to construct $C^1(U)$ for $U=R_{x,y}(\theta)$ with TWO single qubit gates and CNOT gate. My answer is no, and I would ...
1
vote
2answers
62 views

IBM quantum computers gate delay values

I am doing an state of the art study about the existing quantum computer technologies and one of the parameters of interest is the gate delay value, as it determines the time expected from a gate from ...
2
votes
1answer
73 views

How to interpret a 4 qubit quantum circuit as a matrix?

This is part of Simon Algorithm (Initial state + some Oracle function) There is a post that explains how to interpret circuits (How to interpret a quantum circuit as a matrix?), but I'm not sure how ...
3
votes
1answer
103 views

Where are the physical gates in the Google processor?

Google's article Quantum supremacy using a programmable superconducting processor states that the processor "53 qubits, 1,113 single-qubit gates, 430 two-qubit gates, and a measurement on each qubit, ...
1
vote
0answers
38 views

Can two intrinsic angular momentum directions (spin) be used for future entanglement after collapse? [closed]

Persuant to all contributors, here I will use a coin toss analogy since the vector direction is either up or down (heads or tails). Two coins will be used for each of two tosses. It's assumed that the ...
-1
votes
2answers
63 views

How to find eigenvalues and eigenvector for a quantum gate? [closed]

I need to know how can I find eigenvalues and eigenvectors for a quantum gate, for example $X$ gate.
1
vote
0answers
56 views

Can we apply Grover to meet-in-the-middle attack?

$\newcommand{\Ket}[1]{\left|#1\right>}$ If we have the superposition $$\displaystyle \sum \dfrac{1}{2^n} \Ket x \Ket{ f(x)} \Ket 0 \Ket y \Ket{g(y)} \Ket 0 \Ket {\delta_{x,y}} ,$$ here $\delta_{x,...
0
votes
0answers
24 views

Decomposition in projectQ

I'm currently working in ProjectQ, I have to decompose the Toffoli Gate to simpler gates and have to visualize it after decomposition but I'm not sure where to start with and also how to create a ...
1
vote
1answer
54 views

What is the outcome of this circuit?

What would be the outcome of this circuit?
4
votes
2answers
123 views

What unitary gate produces these quantum states from the computational basis?

Suppose that we have one-qubit unitary $U$ that maps $$ \left| 0 \right> \longmapsto \frac{1}{\sqrt{2}} \left| 0 \right> + {\frac{1+i}{2}} \left| 1\right> $$ and $$ \left| 1 \right> \...
1
vote
0answers
47 views

Simplify the system to find the $\theta$, $\phi$ on bloch sphere [duplicate]

I have problem to simplify the quantum system states on bloch sphere to get $\theta$, $\phi$ values, My question is not duplicated! $$ \left| \varphi \right>=\frac{1+i}{\sqrt{3}} \left| 0 \right>...
2
votes
1answer
114 views

Why is implementation of controlled Hadamard on IBM Q so complex?

With reference to question how to implement CCH gate I easily realized that CH gate can be implemented with $\mathrm{Ry}$ gates and $\mathrm{CNOT}$ followingly: Note $\theta = \frac{\pi}{4}$ for ...
3
votes
1answer
59 views

How to implement controlled multiqubit gates in qiskit?

To implement a stabilizer code I need to measure stabilizer generators, as shown in Fig. 10.16 in Nielsen & Chuang. Is there a way for controlled multiqubit gates in qiskit?
4
votes
2answers
90 views

How to implement the CCH gate in quantum computers available in clouds?

How to implement CCH gate in quantum computers available in clouds? If there is not any gate directly available for it, what are the possible ways to represent CCH?
2
votes
3answers
72 views

Pauli I in eoh procedure doesn't become a global phase gate in qiskit evolution_instruction method. Possible consequences

If one has two qubits in arbitrary stats and wishes to apply a controlled version of some global phase gate $P(\varphi) = \begin{pmatrix} e^{i\varphi} & 0 \\ 0 & e^{i\varphi} \end{pmatrix}$ ...
6
votes
1answer
114 views

Decomposing a $(w+1)$-qubit permutation gate into $w$-qubit permutation gates, SWAPs and NOTs

Say I have a quantum circuit of $w+1$ qubits with a permutation gate (mapping computational basis states to computational basis states) that does the permutation $(i, i+1)(i+4, i+5)$ on $w+1$ qubits ...
2
votes
1answer
80 views

How to implement a Fredkin gate using Toffoli and CNOTs?

Inspired by a question Toffoli using Fredkin, I tried to do "inverse" task, i.e. to implement Fredkin gate (or controlled swap). In the end I implemented it with three Toffoli gates. Firstly, I ...
1
vote
1answer
64 views

Computing circuit depth in Cirq

I ran into a problem of how to extract circuit depth from Cirq circuit object. In Cirq circuits consist of a list of Moments. Number of moments is not equal to the circuit depth in general case. I ...
2
votes
4answers
97 views

Can you use Rz to flip from $|+\rangle$ to $|-\rangle$?

Here's the Rz matrix: $$ Rz(\theta) = \begin{bmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{bmatrix} $$ As I understand it, Rz rotates around the Z axis on the Bloch sphere. Since $|+\...
4
votes
1answer
76 views

What is the corresponding code for finding the state of a qubit on the Bloch sphere?

To find the state of a qubit on the Bloch sphere we use the following formula: \begin{equation} |\psi\rangle=\mathrm{cos}\frac{\theta}{2}|0\rangle+\mathrm{e}^{i\phi}\mathrm{sin}\frac{\theta}{2}|1\...
2
votes
1answer
66 views

Is it possible to write a Q# teleportation code which returns a qubit?

In the teleportation codes I have found so far from Microsoft, the codes are written based on returning the bool values but I wonder if in teleportation process, ...
1
vote
1answer
97 views

Print data() with statevector and qasm simulator - Qiskit

I am new to Qiskit and I am trying to implement some very simple 1-qubit gates. I want to initialize the state of the qubit (to 0 and then to 1) and then apply the gate and print the new state of the ...
0
votes
3answers
87 views

Represent qubit in a superposition [closed]

How do we represent a qubit $\vert 1 \rangle$ and put in a superposition (in dirac)?
-1
votes
1answer
51 views

Quantum adder mod 4 [closed]

Does anyone has (or is aware of) a solution to Nielsen's QCQI 4.36 exercise: construct a circuit to add two-qubit numbers x and y modulo 4 vs $|x,y\rangle \rightarrow |x, x+y \mod 4\rangle$
0
votes
1answer
52 views

What is the difference between “intraphoton” and “interphoton” entanglement?

I am trying to better understand the following: What is the difference between Intraphoton Entanglement and Interphoton Entanglement? I am new in this field and i want to proceed some work on ...
2
votes
1answer
76 views

Can Toffoli operate on a qubit in superposition?

I understand that CNOT and Toffoli (CCNOT) gates are not universal for quantum computation since they (alone) cannot create superposition. Moreover, it is totally possible to perform a CNOT operation ...
6
votes
2answers
166 views

How to transform e.g., a 4 by 4 unitary matrix into a quantum circuit

I am new to Quantum Computing. I would really appreciate if some one could offer me some ideas, suggestions and/or useful references to solve the following problem about realizing an arbitrary ...
2
votes
2answers
70 views

Matrix representation of a measurement

It is well known that any operation on a quantum computer is described with a unitary matrix (a quantum gate) because quantum computing is reversible. Only non-reversible operation is a measurement ...
2
votes
0answers
34 views

Gate times for different qubit technologies

Different qubit technologies exist and for each, operations are implemented differently. My question is what the typical times are for the standard gates (single qubit rotations, Hadamard, CNOT, T, ...
0
votes
2answers
64 views

Which gate combination should I use? [closed]

From my circuits in ibm q the final output is given by only a single qbit Which gives state |ψ⟩ Tell me a combination of gates to do the following If |ψ⟩ = |0⟩ Then output |0⟩ If |ψ⟩=α|0⟩+β|1⟩ ...
-1
votes
1answer
42 views

Quantum gates rotate qbit around bloch sphere? Or quantum gates rotate bloch sphere around qbit?

Quantum gates rotate qbit around bloch sphere? Or quantum gates rotate bloch sphere around qbit? "The simplest quantum gates are the Paulis: X, Y and Z. Their action is to perform a half rotation ...
1
vote
1answer
90 views

Why qiskit superconducting device native gates different from that of trapped ion device?

For IBMQ device based on superconducting technology, when we transpile the circuit, it is decomposed of U1,U2,U3 and CNOT gates, which are its native gates. However for trapped ion device, its native ...
2
votes
1answer
84 views

Custom gates on IBM Q

I realized that QASM supports custom gates. However, when I tried to create the gate, transpiling error appeared both on simulator and real quantum processor. I suspect that IBM has not implemented ...

1 2 3 4 5 9