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

About swap gate

As I was reading Qiskit textbook and there is this problem ... How can I swap a $|+\rangle$ to a $|-\rangle$
  • 75
3 votes
0 answers
74 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 ...
  • 1,584
0 votes
0 answers
41 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 ...
  • 1
2 votes
2 answers
156 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 & ...
2 votes
2 answers
69 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 ...
  • 305
2 votes
1 answer
66 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 ...
  • 1,584
2 votes
0 answers
52 views
+100

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}...
1 vote
0 answers
23 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. ...
  • 187
2 votes
1 answer
50 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 ...
  • 305
8 votes
2 answers
252 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 &...
1 vote
1 answer
54 views

AttributeError: 'list' object has no attribute 'values'

While implementing a code, getting the below error: ...
  • 187
1 vote
0 answers
25 views

Construct the unitaries U by decomposition in TSP Qiskit?

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 ...
1 vote
0 answers
22 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 ...
1 vote
1 answer
26 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 ...
  • 53
1 vote
2 answers
54 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
  • 75
4 votes
1 answer
101 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 ...
  • 75
0 votes
1 answer
86 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 ...
2 votes
1 answer
95 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 \...
  • 1,161
2 votes
0 answers
94 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 ...
2 votes
2 answers
80 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}{\...
0 votes
0 answers
17 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 ...
  • 39
5 votes
2 answers
145 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? (...
4 votes
1 answer
225 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 ...
2 votes
1 answer
60 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 ...
  • 123
3 votes
1 answer
112 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 ...
  • 51
1 vote
0 answers
32 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 (...
4 votes
1 answer
91 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 ...
1 vote
0 answers
22 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 ...
2 votes
2 answers
91 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 ...
  • 123
0 votes
0 answers
15 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 ...
  • 181
3 votes
1 answer
91 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 ...
1 vote
1 answer
270 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 ...
  • 11
0 votes
0 answers
23 views

Translate a sparse matrix into a products of elementary gates

I want to construct a parametrized gate whose matrix representation has many zero elements. Are there any known recipes to construct such a gate from elementary gates (Pauli rotations, CNOT, etc.)?
  • 1
2 votes
0 answers
37 views

Approximating the concatenation of two approximate circuits

Suppose I have two quantum circuits $A_n,B_n$ that I have already found to approximate the operations $U,V$ within some error $\epsilon_n$ and each with an overall circuit depth $\ell_n$ using $n$ ...
0 votes
1 answer
37 views

CIRQ How to iteratively apply a multi qubit gate to first n qubits

I've got an arbitrary n qubit circuit, with a "for Q in range(n):", which creates a custom gate class that affects (Q+1) qubits, which I want to apply to first (Q+1) qubits of the circuit ...
1 vote
3 answers
171 views

CNOT entangling a third qubit and how measurement impacts entanglement

I'm trying to understand entanglement, superposition and the effects of measurement on entangled qubits a bit better. About entanglement: I know that the circuit below will entangle the two qubits: ...
  • 145
2 votes
1 answer
27 views

Ungroup a custom quantum gate in QASM 2.0

Is there any API provided by Qiskit to ungroup a custom quantum gate into its component quantum gate. If there is no API, please let me know how to ungroup the custom gate after I made own ...
2 votes
1 answer
198 views

construction of Y gate from X,Z and H gates

As a part of textbook exercise, Y gate is to be constructed using H,Z and X-gates, just like we have $X = HZH$. is there some way/process/intuition to find such combinations or it is just like we need ...
2 votes
1 answer
66 views

Quantum gates supported by qiskit

My question might look a little inappropriate and very basic but I want to know all the quantum gates of qiskit. The link https://qiskit.org/textbook/ch-states/single-qubit-gates.html#generalU gives a ...
2 votes
0 answers
39 views

A path towards building quantum Computing graduation project for undergraduates

I need help. I'm a computer science student with a Data science major. I have a final graduation project this year. With that, I want to create a project in the Quantum computing field. I'm already ...
0 votes
0 answers
10 views

How we can switch the digital multi-qubit gates to analog multi-qubit blocks?

What is the difference between the digital and Analog Quantum gate? and the multi-qubit gates involved in a VQE ansatz can be switched to analog multi-qubit blocks. so How we can switch the digital ...
1 vote
1 answer
70 views

How to draw CCZ gate in Qiskit composer

How to draw CCZ gate in Qiskit composer? There is no CCZ gate in quantum composer. In addition to this,please help me to draw the gate shown in below figure in quantum composer.
1 vote
1 answer
74 views

ucry and ucrz gates in Qiskit

I just came across ucry and ucrz gates in Qiskit. It would be great if someone has experience of using it and can explain it with an example and also with a bit of Python code. I only know about the ...
0 votes
0 answers
18 views

I have two quastion about n-MCT gate decomose into Clifford+Zn

this figure from paper :New techniques for fault-tolerant decomposition of Multi-Controlled Toffoli gate can someone tell me why cir1 is different from cir 2 , can they all represent Toffoli? the ...
1 vote
1 answer
51 views

Julia codes for unitary gate decomposition

I am looking for a way to decompose any given operator U into ZYZ rotations. And then plug the values back into ei∗α∗Rz(θ0)∗Ry(θ1)∗Rz(θ2), to 'recompose' the gate and check if the gate decomposed ...
  • 19
1 vote
2 answers
52 views

What is more important, minimizing the number of gates, or the number of qubits?

I am new to the quantum world, and I have 2 circuits that measure cosine similarity between 2 binary vectors. One uses a swap test, the other uses something called a hyper-state generation procedure. ...
0 votes
1 answer
93 views

Question about Controlled Modulo Quantum Gate

How does the Ux(x, N) function implements Ux|y> -> |xy mod N> ? ...
  • 111
1 vote
1 answer
50 views

What is the value of a control qubit as a Controlled-X Gate or Tofolli Gate parameter?

For example in a Controlled-X or Tofolli gate, qubits can be assigned as control bits. But before the measurement ; what are the values of these qubits in the gate tensor since they can not be 1 or 0 ?...
0 votes
1 answer
40 views

Implementing Odd Permutations Without Ancilla Bit

The paper says that The inversion $\alpha \mapsto \alpha^{-1} $ (where 0 is mapped to 0) can be seen as a permutation on $\mathbb F_{256}$. This permutation is odd, while quantum circuits with NOT, ...
  • 1
1 vote
1 answer
69 views

Quantum gate count minimization

In classical digital logic, we have K-map and Quine–McCluskey algorithm to minimize boolean equation, thereby reducing the number of logic gates needed. Is there such a thing in quantum computing?. ...

1
2 3 4 5
26