Questions tagged [quantum-gate]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
111 views

Qiskit Encoding of a Hamiltonian

I am not sure if this is a trivial question and I am just stuck or this is worth posting. I have a Hamiltonian, which is written in terms of Pauli matrices, such as H = 4.5$I$ - 16 $X_1$ - 16 $X_2$ - ...
user avatar
  • 35
3 votes
2 answers
132 views

Is there a function in qiskit that allows me to insert quantum gates at certain indices of a circuit?

Here's my quantum circuit with mid-circuit measurements: ...
user avatar
  • 2,148
5 votes
1 answer
75 views

Native Gate Decomposition

TL;DR: I've got a very small set of gates to use and need to find efficient decompositions for $R_y$ and controlled $R_y$ gates. Does anyone have any better ideas than what I have? I'm looking to ...
user avatar
0 votes
1 answer
54 views

Are quantum gates superoperators? How to write a quantum circuit as superoperator?

I have some questions related to superoperators: What is the differences between quantum operators and superoperators? For instance quantum gates are also unitary operators but can we say quantum ...
user avatar
  • 406
4 votes
1 answer
72 views

Confusion with the number of CNOTs in a circuit

I am a bit puzzled on the following circuit. According to this Quantum Computing SE thread it holds that $$ e^{i(Z\otimes Z)t} = {\rm CNOT} (I\otimes e^{iZt}){\rm CNOT} \qquad (1) $$ As a result we ...
user avatar
2 votes
1 answer
66 views

Why the Ry rotation matrix give counterclockwise rotation?

The y-axis centered rotation matrix is $R_{y}(\delta)=\left[\begin{matrix} \cos \frac{\delta}{2} & -\sin \frac{\delta}{2} \\ \sin \frac{\delta}{2} & \cos \frac{\delta}{2} \end{matrix} \right]$....
user avatar
  • 93
1 vote
1 answer
131 views

Writing Toffoli Gate Matrix by one and two qubit gate matrices

I am trying to write Toffoli gate matrice by using one and two qubit gates matrices. I follow this circuit link for the circuit I first started to write the matrices of one and two qubit gates: ...
user avatar
  • 406
5 votes
2 answers
95 views

How many quantum gates are needed to prepare an arbitrary state?

In this paper there is this sentence: [...] the description of a $2^n\times2^n$ unitary matrix $U$ (which is a poly($n$)-size quantum circuit) According to the meaning of "which" in ...
user avatar
1 vote
1 answer
56 views

How to implement general 2-qubit gate in n-qubit system?

I am trying to implement a general 2-qubit gate in an n-qubit system (not using qiskit or cirq). Example: Consider 4 qubits. Assume we want to act a CX on qubit 2 as control and qubit 3 as target. The ...
user avatar
  • 11
1 vote
2 answers
186 views

Are input/output nodes only a fiction?

When running quantum algorithms, are input and output nodes of any gate in a quantum circuit two separate sets of (physical qubit) nodes, or are we only mutating/overwriting one fixed set of nodes? ...
user avatar
  • 313
1 vote
1 answer
36 views

Statistical 'process' behind quantum gates

Thinking about gate creating entangled state, it looks to me that the inputs to the gate look like marginal/independent distributions, and the output looks like their joint distribution. Does this ...
user avatar
  • 313
3 votes
2 answers
424 views

Does the X (NOT) gate affect superpositions at all?

Does "NOT" gate have any effect on qubit in superposition state? After applying Hadamard gate on qubit seems like the "NOT" gate doesn't have any effect on it. Could somebody ...
user avatar
1 vote
1 answer
56 views

When can we unprepare a circuit using Clifford + measurements?

I have seen sometimes that in some protocols, one can uncompute a circuit using only Clifford + measurements. See for example Erase the two qubits containing $p_{w,r}$ and $p_{w,s}$, then the ...
user avatar
  • 401
0 votes
0 answers
37 views

How can I delay the construction of the power of a gate in a parametric circuit?

I want to implement the parametric power of a gate. I know that the parametric power is impractical to implement (cf https://github.com/Qiskit/qiskit-terra/issues/4751). So, I want to delay the ...
user avatar
6 votes
2 answers
157 views

Can we rotate Bloch vectors for qudits like we do with qubits in the Bloch sphere?

I have been looking into the Bloch vectors for qudits and have been wondering if we can do rotations that are similar to the rotations in the qubit Bloch sphere. Like, once we create a Bloch vector ...
user avatar
0 votes
0 answers
22 views

Why are the angle coding of the samples cascaded and only use so few qubits

I want to ask about the angle coding. Is the angle coding that Abbas said really like this? There are two samples and four features. Why does she only use two qubits? Instead of four. And the sample ...
user avatar
1 vote
1 answer
76 views

Implement approximate $Ry(2\pi /3)$ with gate set {$Rx(\pi),Ry(\pi),Rz(\pi),Rx(\pm \pi/2),Ry(\pm \pi/2),Rz(\pm \pi/2),T,S,H,CZ$}

With gate sets {$Rx(\pi),Ry(\pi),Rz(\pi),Rx(\pm \pi/2),Ry(\pm \pi/2),Rz(\pm \pi/2),T,S,H,CZ$}, I want to implement an approximate $2\pi/3$ rotation around Y axis. An ancilla qubit can be used as well. ...
user avatar
  • 177
3 votes
1 answer
442 views

What is the purpose of gates with more than 2 inputs?

What is the purpose of multi-qubit gates (n>=3), if gates with one or two inputs are enough for any computation?
user avatar
  • 313
3 votes
1 answer
113 views

Entanglement entropy and depth

I wanted to verify two intuitions about the entanglement entropy of quantum states. Consider an $n$ qubit quantum state, prepared by a depth $d$ circuit acting on $|0\rangle^{\otimes n}$ and a ...
user avatar
1 vote
1 answer
60 views

What does the expression $\langle y^{(n)}|\otimes𝟙 \,|\Psi_b\rangle$ mean?

I'm trying to understand the following paper, https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.013167, but I'm new to quantum computing. In it they use this expression: $$\langle ...
user avatar
  • 113
2 votes
1 answer
411 views

Is a quantum circuit with a controlled-T gate possible?

This diagram comes from the textbook, Quantum information (Author: Stephen Barnett), fig. 6.13. The problem is what I know that T gate isn't a multi-qubit gate, so is it possible that T gate becomes ...
user avatar
  • 23
2 votes
1 answer
41 views

Can the ancilla for Qiskit's mcx with mode="recursion" be dirty?

I think their implementation is close to the one from here which does use a dirty ancilla, but I just want to make sure
user avatar
  • 131
2 votes
1 answer
65 views

Deutsch-Josza on balanced 3 bit function

I am trying to understand the Deutsch-Jozsa algorithm for general $U_f$, but the following function is causing me trouble $f(x,y,z)=x\cdot y \oplus z$. It gives rise to the following quantum gate $U_f:...
user avatar
  • 123
1 vote
1 answer
155 views

Show that the effect of a Controlled Unitary on qubits followed by a measurement is unchanged depending on when measurement is taken

I understand that a Controlled Unitary is just a generalization of a control gate, such as CNOT etc, and that it is given in state representation as $$\hat C_U = |0\rangle\langle0|\otimes\mathbb{I} + |...
user avatar
  • 71
7 votes
2 answers
163 views

What quantum gates admit a basis-independent interpretation of their action?

The SWAP gate swaps the state of the two qubits so that in the computational basis $|01\rangle \rightarrow |10 \rangle$ with a matrix representation given by: \begin{bmatrix} 1 & 0 & 0 & 0 ...
user avatar
  • 171
1 vote
1 answer
259 views

Clifford gates are transversal What exactly does this transversal mean? What is the difference between non-Clifford gates and Clifford gates?

Clifford gates are transversal What exactly does this transversal mean? What is the difference between non-Clifford gates and Clifford gates? Why is it simple for Clifford gates to implement ...
user avatar
  • 39
2 votes
1 answer
57 views

Decompose bell measurement gate into combination of controlled-not gates and one-qubit gates

OPENQASM2.0 has only one two-qubit gate: controlled not. For a teleportation experiment, I need to perform a measurement in the Bell basis. That is, I need a two-qubit gate with matrix representation $...
user avatar
1 vote
1 answer
76 views

How to implement *nested* Grover search (in Quirk)?

$\newcommand{\ket}[1]{|#1 \rangle}$ $\newcommand{\bra}[1]{\langle #1 |}$ PS: I suppose this question could also ask "How to implement $2 \ket{s}\bra{s} - I$ for any (identifiable) $\ket{s} \in \...
user avatar
  • 344
3 votes
1 answer
108 views

Implication of SWAP being not positive in terms of quantum channel

I am going over chapter 3 of Preskill's lecture notes regarding complete positivity. Specifically, on page 19, it is mentioned that since SWAP has eigenstates with eigenvalue -1, it is not positive, ...
user avatar
  • 73
5 votes
1 answer
312 views

Can the spin-1/2 720° rotation trick apply to qubits?

The idea of a 4π rotation to return an electron to its original state instead of just a single 2π rotation exists - but can this idea apply to qubits or entangled qubits? Are there any use cases for ...
user avatar
4 votes
1 answer
45 views

What is the method to create arbitrary controlled circuits in Qiskit?

I am working on an implementation of an algorithm which uses ampitude estimation and amplification as a subroutine but we are not using qiskit but QuEST. QuEST doesn't have any direct method to ...
user avatar
2 votes
1 answer
67 views

Why does $H^2=X^2 =I$ not imply $H=X$?

if $HH = I$ and $XX =I$, then is $H=X$? $HH = I = XX$ or, $HH = XX$ then, taking under root, is $H = X$? This is absurd but how to disprove it?
user avatar
  • 153
7 votes
1 answer
229 views

Is Toffoli a fault tolerant transversal gate of the repetition code on bit-flip-error-only qubits?

Suppose you have physical qubits that only have bit flip noise (no phase flip noise, no unwanted measurements, no leakage, no amplitude decay, etc; just unwanted X rotations). Such qubits can be kept ...
user avatar
  • 21.8k
1 vote
0 answers
40 views

How to to build/simulate Toffoli gate using CSWAP (Fredkin) gates? [duplicate]

I have seen a question about the other way (CSWAP from CCNOT). Both are 3 qubit gates. Is there a way to simulate CCnot from Fredkin gates?
user avatar
1 vote
0 answers
27 views

How do I construt a mixed state for an arbitrary symmetric matrix?

A symmetric matrix can be seen as a density matrix. If I have an arbitrary symmetrical matrix, can I use a quantum random access memory to construct a corresponding mixed state? What kind of quantum ...
user avatar
1 vote
0 answers
38 views

How should I think about circuit metrics like "qubit count," "circuit depth," and "gate count" when dealing with the OpenQASM 3 `ctrl` modifier?

It seems like circuit metrics like qubit count, circuit depth, and gate count are pretty useful. Qubit count determines whether a it's even possible to run a program on resource-limited quantum ...
user avatar
  • 111
5 votes
1 answer
127 views

Does conjugation by a Clifford send each non-identity Pauli to every other non-identity Pauli with equal frequency?

I see here in Olivia DeMatteo's notes, she states: When we consider the action of the entire Clifford group on a single non-identity Pauli, it maps that Pauli to each of the $d^2 − 1$ other possible ...
user avatar
4 votes
1 answer
91 views

How to theoretically compare the complexity of quantum and classical algorithms?

I am working on reducing an NP class problem to a QUBO so can be solved with QAOA. I know that there is not a practical way to compare the performance as there is no QPU with enough qubits. I am doing ...
user avatar
  • 81
2 votes
1 answer
59 views

What are the typical gate times for single-qubit and 2-qubit gates for ion trap, superconducting, neutral atom, photonic, spin QC?

What are the typical gate times for single-qubit and 2-qubit gates for -- ion trap, -- superconducting, -- neutral atom, -- photonic, -- spin quantum computers based on today's technologies?
user avatar
  • 305
1 vote
0 answers
85 views

How many physical qubits are needed to encode a logical qubit on ion trap, superconducting, neutral atom, photonic QC?

How many physical qubits are needed to encode a logical qubit on an -- ion trap, -- superconducting, -- neutral atom, -- photonic, -- spin quantum computer based on today's technologies?
user avatar
  • 305
1 vote
1 answer
80 views

Implementation of quantum phase estimation in Quirk

after reading the chapter of QPE (Quantum phase estimation) in Nielsen, I wanted to try an implementation in Quirk. My idea was to apply the T-gate, from which I know the following relation $T|1\...
user avatar
  • 616
2 votes
2 answers
144 views

Compute the output of this Approximate Quantum Cloning three-qubit circuit

Above is a circuit for "Approximate Quantum Cloning" The preparation state is given by $$|\psi\rangle =\alpha|0\rangle+\beta|1\rangle$$ The gates labelled $\theta_i$ denote single qubit ...
user avatar
  • 71
2 votes
1 answer
70 views

How to tranfer given superposition to quantum circuit?

Let's say I have a superposition of qubit defined as $\frac{1}{2} (| 000 \rangle + | 001 \rangle + | 111 \rangle + | 110 \rangle)$ (as given in the answer here: Explanation of output produced by the ...
user avatar
4 votes
0 answers
85 views

Solovay-Kitaev Balanced Group Commutators in SU(2) Implementation

I am currently looking into quantum compilation and came across Dawson and Nielsen's paper on the Solovay-Kitaev Algorithm, which seems like a good starting point as it is referenced in a many of the ...
user avatar
  • 41
6 votes
3 answers
447 views

Is the SWAP gate a Clifford Gate? How would I express it using the Clifford Gate generators?

By my calculations, it looks like the SWAP gate is a Clifford Gate. See the following table: I follow the same method as in this paper for showing a gate is a Clifford Gate. I got the above table by ...
user avatar
4 votes
2 answers
123 views

How is Quantum Phase Estimation useful for simulating dynamics of a many-body system?

I am quite aware of the Quantum Fourier Transform (QFT) as well as the very closely related topic of Quantum Phase Estimation (QPE). The latter is usually motivated as follows: Given a unitary $U$ and ...
user avatar
  • 409
2 votes
1 answer
72 views

How to Construct Swap Gates from Permutation Matrix?

This is a follow-up question from here. Let's say after an LUP decomposition, we have an 8x8 permutation matrix: $ P^{-1} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ ...
user avatar
4 votes
1 answer
89 views

Is there a higher dimensional Fredkin gate?

The Fredkin gate is CSWAP gate. Given a control register in $0$ or $1$, the gate does nothing or swaps two target registers respectively. Is there a higher dimensional version of this gate? I have ...
user avatar
  • 2,008
1 vote
2 answers
81 views

Create your own n-qubit quantum gate in Qiskit

I need to create the 2-qubit gates that are not supported by Qiskit (Ex: Controlled - F gate). Is there any way to create a class/object and use it as other basic gates? Example: ...
user avatar
  • 315
0 votes
1 answer
65 views

How to apply 2x2 matrix transformation gates upon 1x4 tensor product columns of two tensored qubits?

The tensor product of two qubits yields a 4-row column vector. Once tensored, how are we supposed to apply common gates such as NOT on just one of the qubits, an operation which expects 2x2 or at ...
user avatar
  • 101

1 2
3
4 5
24