# Questions tagged [quantum-gate]

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

1,172 questions
Filter by
Sorted by
Tagged with
1 vote
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$ - ...
• 35
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: ...
• 2,148
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 ...
• 190
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 ...
• 406
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 ...
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]$....
• 93
1 vote
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: ...
• 406
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 ...
1 vote
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 ...
• 11
1 vote
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? ...
• 313
1 vote
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 ...
• 313
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 ...
1 vote
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 ...
• 401
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 ...
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 ...
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 ...
• 93
1 vote
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. ...
• 177
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?
• 313
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 ...
• 769
1 vote
60 views

• 71
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 ...
• 171
1 vote
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 ...
• 39
57 views

• 344
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, ...
• 73
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 ...
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 ...
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?
• 153
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 ...
• 21.8k
1 vote
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?
• 247
1 vote
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 ...
1 vote
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 ...
• 111
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 ...
• 1,037
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 ...
• 81
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?
• 305
1 vote
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?
• 305
1 vote
80 views

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 ...
• 2,008
1 vote
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: ...
• 315