As of May 31, 2023, we have updated our Code of Conduct.

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

CNOT quasiprobability decomposition with $\gamma = 3$

In this paper of Christophe Piveteau and David Sutter, they prove that the $\gamma$-factor of the quasiprobability decomposition of the CNOT gate is equal to $3$ (if we don't allow classical ...
stopper's user avatar
  • 333
0 votes
0 answers
77 views

How to use more than 3 classical registers in a single quantum circuit in Qiskit without getting error: not enough memory slots?

I'm trying to run a quantum circuit on qasm simulator which has more than 3 classical registers. It gives error when I try to execute it. The circuit looks ...
Devesh's user avatar
  • 53
6 votes
1 answer
173 views

What are the relations between the permutation group and the Clifford group?

I'm trying to understand the relation between the permutation group on all the $2^n$ bitstrings and the Clifford group. My question arises from the fact that the Toffoli gate (which can be thought of ...
mavzolej's user avatar
  • 1,740
0 votes
1 answer
146 views

Finding controlled Y gate?

I was working with qiskit textbook --> Basic Circuit Identities where I get that I can write a CY gate with s CNOT and sdg gate but I want to find out the unitary matrix for that circuit without ...
Rayhan's user avatar
  • 123
6 votes
1 answer
425 views

Is there a non-Clifford gate preserving both $X$ and $Z$ errors?

I would like to know if there exists an $n$-qubit (for $n \geq 2$) quantum gate $G_n$ that preserves both $X$ and $Z$ errors and that is additionnally non-Clifford. In other words, I would like that $...
Marco Fellous-Asiani's user avatar
2 votes
0 answers
36 views

What do the values of θ, ɸ, and λ represent visually in the Bloch Sphere when defining a unitary gate? [duplicate]

In IBM Quantum Docs, it is stated that a unitary matrix can be defined as $U = \begin{bmatrix} \cos(\theta/2) & -e^{j\lambda}\sin(\theta/2) \\ e^{j\phi}\sin(\theta/2) & e^{j\lambda+j\phi}\cos(\...
Satvik Duddukuru's user avatar
1 vote
1 answer
54 views

Is there any shortcut to create a controlled gate or any technique?

I was solving Controlled H gate from qiskit textbook -> Basic Circuit Identities There I tried to find the unitary matrix for CH gate but it get's really complicated when I use tensor product or ...
Rayhan's user avatar
  • 123
1 vote
1 answer
268 views

How to decompose 8x8 Unitary Matrix into tensor product of three phased gate?

Our goal is decompose 8x8 unitary matrices $U_j$ to extend the Solving TSP with Quantum Phase estimation $U_j = \begin{pmatrix} e^{ia}& 0& 0& 0& 0& 0& 0&0 \\ 0&...
Nghia Nguyen Huu's user avatar
5 votes
1 answer
161 views

What are well-known orthogonal 2-designs, other than the real Clifford group?

The paper Real Randomized Benchmarking https://quantum-journal.org/papers/q-2018-08-22-85/ https://arxiv.org/abs/1801.06121 makes use of the fact that the real Clifford group is an orthogonal 2-design ...
Ian Gershon Teixeira's user avatar
2 votes
1 answer
52 views

How to calculate the meauring probabilities of quantum states $\vert 0\rangle$ and $\vert 1 \rangle$ in $R_x$ gate?

In the below code snippet, what is the probability of measuring $|1\rangle$? qc = QuantumCircuit(1) qc.rx(3*math.pi/4, 0)
Ragavan Veerarajan's user avatar
0 votes
1 answer
42 views

Cannot derive probability graph for Hadamard gate given in Qiskit textbook

I am reading the Qiskit textbook(beta) and they have explained Hadamard gate using an amplitude tree. To show how two H-gates on a qubit give the output as 0 everytime they said to consider that it ...
Rai's user avatar
  • 3
0 votes
0 answers
63 views

How to represent the following regular quantum circuits with tensor and concatenation symbols?

I am fascinated by such a quantum structure as above, how should the regular distribution for Toffoli and SWAP gates be described by the formula? Is the following correct? $\prod\limits_{n}{{{I}_{{{2}^...
R-X Zhao's user avatar
  • 390
0 votes
1 answer
60 views

Is the mathematical expression between the CNOT gates arranged in this way a tensor product or a concatenated product?

Is the mathematical expression between the CNOT gates arranged in this way a tensor product or a concatenated product? That is \begin{matrix} \text{CNO}{{\text{T}}^{\otimes n}} & or & \prod\...
R-X Zhao's user avatar
  • 390
1 vote
1 answer
102 views

How can we represent a CNOT gate using a cascade of rotation gates?

I have been working using qiskit to implement the CNOT decomposition into a cascade of rotation gates from this source. After computing the unitary matrix, the resultant matrix is not the same as the ...
Frost Griffin's user avatar
1 vote
1 answer
53 views

How to calculate c not, toffoli gate with additional line

How to calculate cnot gate(or toffoli) in red box Why is there additional line? And is it same as the two toffoli gate?
Seokhyeon Lee's user avatar
3 votes
2 answers
206 views

Equivalent $[\![n,k,d]\!]$ codes and transversal gates

An operator on the Hilbert space of $ n $ qubits is called a local unitary if it is of the form $$ U=\bigotimes_{i=1}^n g_i $$ where each $ g_i $ is a $ 2 \times 2 $ unitary matrix. In other words if ...
Ian Gershon Teixeira's user avatar
1 vote
0 answers
57 views

Quantum Algorithm to Solve a Maze

I am trying to understand the paper "Quantum Algorithm to Solve a Maze - Converting the Maze Problem into a Search Problem" by Debabrata Goswami and Niraj Kumar (here the reference https://...
janbo's user avatar
  • 11
1 vote
0 answers
89 views

Decompose 8x8 Unitary Matrix into tensor product of three phased gate

We try to decompose 8x8 unitary matrices \begin{pmatrix} e^{ia} & & & & & & \\ & e^{ib} & & & & & \\ & & e^{ic} & & ...
Nghia Nguyen Huu's user avatar
0 votes
1 answer
251 views

About swap gate [closed]

As I was reading Qiskit textbook and there is this problem ... How can I swap a $|+\rangle$ to a $|-\rangle$ Qiskit textbook --> Basic Circuit Identities
Rayhan's user avatar
  • 123
3 votes
0 answers
96 views

What other discrete non-trivial non-Clifford groups of gates are there?

I do not know many groups (as in group theory) of quantum gates. Aside from trivial ones, I know there is Pauli group and the Clifford group. Recently I discovered another interesting group generated ...
Mauricio's user avatar
  • 2,013
0 votes
0 answers
47 views

How can the result of 1 million transformations on a qubit be verified to be correct?

I tried to do almost a million transformations on a qubit. I made a three qubit circuit with equal superposition of |0> and |1> (using Hadamard gate) and on the first qubit (qubit 0), added one ...
ArunG's user avatar
  • 1
2 votes
2 answers
325 views

Matrix representation of SWAP on two qubit registers?

There is a matrix that can represent a swap gate-- a gate that essentially swaps two qubits. This matrix, $S$, is: $$ \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & ...
Loic Stoic's user avatar
2 votes
2 answers
242 views

Quasiprobability decomposition of the CZ-gate

I was trying to obtain the quasiprobability decomposition of the CNOT gate by using the information in this paper. The authors give us the example for the CZ gate (Figure 2, i.e. the one below). The ...
stopper's user avatar
  • 333
2 votes
1 answer
97 views

Are relative phase Toffoli gates universal for reversible circuits?

Let us define a new three qubit gate as: $$\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 ...
Mauricio's user avatar
  • 2,013
2 votes
1 answer
103 views

Padding a quantum circuit to increase the amplitude by a constant

Let us be given the description of a quantum circuit $\mathsf{Q}$, acting on $n$ qubits, such that \begin{equation} \langle 0^n|\mathsf{Q}|0^n\rangle = \frac{\#0_f - \#1_f}{\sqrt{2^n}}, \end{equation}...
Tom Clancy's user avatar
1 vote
0 answers
27 views

How to read data from multiple qubits and feed it to a MLP

Being new in the field of quantum computing, I tried with the implementation of "https://qiskit.org/textbook/ch-machine-learning/machine-learning-qiskit-pytorch.html" using a single qubit. ...
user14924's user avatar
  • 187
2 votes
1 answer
142 views

How to generate CNOT-gates via Bell pairs

In this paper from Christophe Piveteau and David Sutter, the authors use Bell pairs to generate CNOT-gates. The procedure is shown in Fig.2 and Fig.3 of the paper. By doing the calculations about that ...
stopper's user avatar
  • 333
9 votes
2 answers
371 views

Non-entangling two-qubit gates

The non-entangling gates in $ SU_4 $ contains the entire group of gates of the form $$ SU_2 \otimes SU_2. $$ It also contains $$ \zeta_8 SWAP= \zeta_8 \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 &...
Ian Gershon Teixeira's user avatar
1 vote
1 answer
790 views

AttributeError: 'list' object has no attribute 'values' [closed]

While implementing a code, getting the below error: ...
user14924's user avatar
  • 187
1 vote
0 answers
33 views

Construct the unitaries U by decomposition in TSP Qiskit? [duplicate]

I'm stuck in here and really don't understand this stuff. In order to construct the unitary matrices for Quantum Phase Estimation, Qiskit decomposes the diagonal unitary matrices U(j) by tensor ...
Nghia Nguyen Huu's user avatar
1 vote
0 answers
70 views

How MCMT is implemented in Qiskit, what is the initiution behind it?

I have read about and used the MCMT qiskit gate (Multiple Control Multiple Target). But I wonder how they have implemented it, how is a gate (like CCCZ for example) is decopmosed into basic gates and ...
Yousef Zook's user avatar
1 vote
1 answer
88 views

How to apply mid-circuit measurement and measurement based conditional operations in `amazon-braket`?

Is there any method to apply mid circuit measurements in amazon-braket? I'm implementing a circuit that has few operations conditioned to measurement. In ...
Devesh's user avatar
  • 53
1 vote
2 answers
228 views

How do I draw a multi control cz gate or do I have to make my own gate?

I want to build a diffuser and an oracle so that's why I wanted a multi control cz gate but I looked everywhere I didn't get any
Rayhan's user avatar
  • 123
4 votes
1 answer
224 views

How to represent a statevector in Dirac notation form using Qiskit?

I am learning from qiskit textbook, and I was wondering how may I get a statevector of the following form: $$ \frac{\sqrt{2}}{2}|00\rangle + \frac{\sqrt{2}}{2}|10\rangle $$ If I run code for this in ...
Rayhan's user avatar
  • 123
0 votes
1 answer
212 views

Building Unitaries in TSP Quantum Phase Estimation Qiskit?

In the paper [https://arxiv.org/pdf/1805.10928.pdf] 2 published by IBM, they use Quantum Phase Estimation to solve the TSP problem. I don't understand the reason why they can decompose the diagonal ...
Nghia Nguyen Huu's user avatar
2 votes
2 answers
185 views

How to find a circuit for a unitary operator $e^{-i s |v \rangle \langle v| t }$?

Let $|v \rangle$ be an eigenstate of an $n$-qubit and $2$-local Hamiltonian $$H = \sum_{i=1}^n \left (X_i + a_i Z_i \right) + \sum_{(i,j)} b_{i,j} Z_i Z_j,$$ where $\sigma_i = I \otimes \cdots \...
MonteNero's user avatar
  • 2,194
2 votes
0 answers
155 views

How to implement an unitary operator expressed as a linear combination of unitaries without qubits ancilla

Let's say that I know the decomposition of a unitary operator $\hat{A}$ in terms of other unitary operators $U_{k=0, \dots, M}$, i.e: $$ \hat{A} = \sum_k \alpha_k U_k$$ I know how to implement in ...
Andrés Ruiz's user avatar
2 votes
2 answers
95 views

Preparing a superposition state modulo $k$

Consider being given the description of a function $f: \{0, 1\}^n \rightarrow \{0, 1\}^m$ and the binary representation of an integer $k$. Is the state \begin{equation} |\psi_{f, k}\rangle = \frac{1}{\...
Tom Clancy's user avatar
0 votes
0 answers
19 views

Sample random unitary at a given distance from a given unitary

Is it possible? I.e., what is the most natural procedure of such sampling? The sampling has to be 'uniform' in a vicinity (of radius $\epsilon$) of given $U$ (can I say "according to Haar measure ...
trurl's user avatar
  • 49
6 votes
2 answers
353 views

How to intuitively understand why $T$ gate can't be implemented transversally?

Suppose we have all to all connectivity and can implement fault-tolerant logical gates in the Clifford group. Why can't we just apply a physical $T$ gate to every physical qubit in the code block? (...
Jiakai Wang's user avatar
4 votes
1 answer
275 views

Are there Clifford gates that preserve some computational basis states while otherwise generating superpositions?

Consider a two-qubit Clifford gate that maps $|00\rangle$ to $|00\rangle$, up to a phase. Can it map at least one of the other computational basis states $|10\rangle, |01\rangle, |11\rangle$ into a ...
user196574's user avatar
2 votes
1 answer
79 views

Encoding arbitrary quantum gates using qubits

Given an arbitrary 3-qubit state $\sum_{xyz} c_{xyz}|xyz\rangle$, is there a circuit (possibly with measurement) that creates the state $\sum_{xy} c_{xyy}|x\rangle$, up to a normalization constant? As ...
Trebor's user avatar
  • 123
3 votes
1 answer
121 views

Does a fidelity of $\mathcal{F}(U_1|0\rangle, U_2|0\rangle)=1$ imply that $U_1=U_2$?

I'm now studying quantum ML and now studying about fidelity ($\mathcal{F}$). To my knowledge, fidelity means the distance between two quantum states, $\textit{i.e.,}$ if $\mathcal{F} ==1$, then the ...
JERMY's user avatar
  • 101
1 vote
0 answers
37 views

CNOT gate path interference

I have a question on paper https://doi.org/10.1038/nature02054. In this paper, the CNOT gate is realized using a beam displacer for higher stability. The figure below shows a 1:1 mapping from (a) to (...
유승연's user avatar
4 votes
1 answer
121 views

If you had a 1000 qubit NISQ machine with arbitrary connectivity, what would you do?

Many current devices are constrained to nearest neighbor connectivity or small system sizes, but suppose that a NISQ machine with 99-99.5% level two-qubit gate fidelities and arbitrary connectivity ...
shixian105's user avatar
1 vote
0 answers
24 views

Can a Quantum computer simulate classical hack and exploit in a network ? Also how would it be any different from the classical computer [closed]

I'm trying to write a realistic story around Quantum computing and was wondering how different a network exploit/hack would look if a Quantum computer was to hack into a private network, instead of ...
abhishek singh's user avatar
2 votes
2 answers
237 views

Does the ZX calculus allow for Y-axis rotations?

I'm trying to understand how Y-axis rotations are represented in ZX Calculus. In the paper, wikipedia, everywhere I look, it's as if there is no such thing as Y-axis rotations, only X and Z. I ...
RustyToms's user avatar
  • 123
0 votes
0 answers
24 views

Mapping a classical cipher into quantum implementation of Grover Oracle

I am translating simple ciphers into quantum implementation in order to create oracle for Grover algorithm. I have started the task with a light weight SPECK cipher (got both classical and quantum ...
aneela's user avatar
  • 223
5 votes
1 answer
176 views

Regarding the inductive proof that any Clifford gate can be made of Hadamard, phase and c-not

In Exercise 10.40 of Nielsen and Chunang's textbook, the reader is supposed to construct an inductive proof of Theorem 10.6 that any Clifford gate can be made of Hadamard, phase and c-not. There it is ...
user3493403's user avatar
1 vote
1 answer
513 views

How to create a quantum circuit with 800+ features using PennyLane

I am new to Quantum ML, and I am currently using PennyLane to do the QML activity. As per this article, total number of features is equal to the total number of qubits. (In the example, they have ...
Shikhar's user avatar
  • 11

1
3 4
5
6 7
31