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
3 votes
0 answers
39 views

How many two-qubit controlled gates do you need to simulate any CU gates where U is a diagonal matrix?

Assuming we have n qubit, the first qubit is a control qubit, and the rest are the targets of $U$. If $U$ is a diagonal matrix, is there any theory to find the minimum number of two-qubit controlled ...
4 votes
2 answers
322 views

Exotic transversal gate group for stabilizer code

What are examples of interesting $ [[n,1,d]] $ or $ [[n,2,d]] $ stabilizer codes, $ d \geq 2 $, whose group of transversal gates is not isomorphic to a subgroup of the Clifford group (on 1 and 2 ...
12 votes
1 answer
4k views

General parametrisation of an arbitrary $2 \times 2$ unitary matrix

From Nielsen & Chuang's Quantum Computation and Quantum Information (QCQI): Since $U$ is unitary, the rows and columns of $U$ are orthonormal, form which it follows that there exist real numbers $...
0 votes
1 answer
47 views

SX operator and superposition

I am running some tests using the probabilities we get from statevector to assert values in qiskit. For instance, with two qubits and a hadamard gate on the first one we have: ...
1 vote
1 answer
23 views

How to create a multicontrol mcx gate or operation in cirq

In qiskit the method to apply a multi control with more than 2 control qubits is: qc.mct ( listcontrols,targetbit,listancillas, mode=mode[i]) What is the ...
1 vote
3 answers
42 views

How to join different quantum circuits into one big circuit on specific qubits in qiskit?

I have a quantum circuit that loads the data and is acting on qubit q0,q1,q2 then another circuit that does the same on q3,q4,q5 ...
0 votes
0 answers
21 views

Does the Hadamard gate synchonize the complex coefficients of the various states?

Suppose a two-qubit system has been set by a Hadamard gate into nearly equal superposition $$ c_{00}|00\rangle + c_{01}|01\rangle + c_{10}|10\rangle + c_{11}|11\rangle $$ where $c_{00}, c_{01}, c_{10},...
2 votes
1 answer
68 views

Does SZS equal Z?

I am completely new to quantum computing and playing QuantAttack. While playing, I found something strange: SZS turns into Z. According to the Wikipedia article that the game recommends reading, SZS ...
0 votes
0 answers
18 views

How is the Pauli X, Y, Z implemented in order to "flip" the complex phase of the state probability?

Let's suppose that a 2 qubit system has the following wavefunction: $$ \Psi = C_{00}\Psi_0\Psi_0 + C_{01}\Psi_0\Psi_1 + C_{10}\Psi_1\Psi_0 + C_{11}\Psi_1\Psi_1 $$ I suppose that what is meant by the &...
11 votes
3 answers
3k views

How to approximate $Rx$, $Ry$ and $Rz$ gates?

Quantum Inspire is a quantum computing platform provided by QuTech. It consists of two real quantum processors - Starmon-5 and Spin-2. Whereas it is possible to use rotation gates $Rx$, $Ry$ and $Rz$ ...
0 votes
0 answers
13 views

What would be the simplest physical implementation of a CNOT operation between spin and energy DoF's?

I'm working on a project where I'm considering a two-level system ("atom" for convenience) which possesses two linearly independent degrees of freedom, one of them a spin degree of freedom ...
0 votes
0 answers
11 views

Local Simulator for Aquila Aws

I am new to this field, so i would like to be sure that the local simulator is actually free. Then, I would like to know how to check the number of qubits avaiable in the simulator.
0 votes
3 answers
77 views

How to represent Beam-Splitter and Kerr gates as basic quantum logic gates?

I want to know how to convert these exponential forms to tensor products of well known logic gates (like the ones built into Qiskit). My goal is to program the Beam-splitter-Kerr ansatz circuit for ...
2 votes
1 answer
32 views

Converting a Matrix to a Gate in OpenQasm 2

I am a beginner when it comes to quantum computing so forgive me if this is a dumb question. Does anyone know how to create a gate from any matrix on OpenQasm2? Specifically, can anyone provide any ...
2 votes
1 answer
72 views

Why is Bernstein-Vazirani guessing considered a one guess?

In Bernstein-Vazirani algorithm, we can see the application of $CX$ gates from each qubit that represents the bit in state 1, onto the $|-\rangle$ state. It seems clear to me that the $CX$ will apply ...
1 vote
1 answer
22 views

How to best represent 5-Qbit codeword operator in Qiskit

We learned that in the 5-Qibit error correcting code, the logical zero state $ | \bar{0} \rangle $ is encoded in the form of $ \frac{1}{4} (\mathbb{1}+M_0)(\mathbb{1}+M_1)(\mathbb{1}+M_2)(\mathbb{1}+...
1 vote
1 answer
46 views

Qiskit library.gaussian() does not accept parametric expression

I'm trying to build a gaussian pulse in qiskit where I keep the amplitude as a parameter but for the followig code ...
1 vote
1 answer
38 views

Controlled unitaries in quantum singular value transformation

tldr -- Building general polynomials with QSVT requires implementing controlled versions of vanilla QSVT circuits. Is this a trivial task? Does it change the complexity? How is it done in practice? ...
4 votes
1 answer
358 views

Building a state with parallel execution

I'm trying to implement the main algorithm described in the Quantum Recommendation Systems paper. In order to do this, I have to create a quantum state $|x\rangle$ corresponding to a real vector ...
3 votes
2 answers
201 views

Name of quantum gate that cycles the Paulis

Background: There is a single qubit quantum gate of the form $$ \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -i \\ 1 & i \end{pmatrix}. $$ As far as I know, this was originally introduced as the $T$ ...
0 votes
1 answer
25 views

Nonsensical projection of initialized qubits in Qiskit

I wanted to try Qiskit by setting up two qubits initialized to $ | 11 \rangle $ or $ | 01 \rangle $ and two classical bits to measure those two initialized qubits. For this simple demonstration, I ...
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 ...
2 votes
1 answer
87 views

Are quantum controlled non-unitary circuit operations possible?

Are quantum controlled non-unitary operations possible? For instance can I define a controlled-reset where I reset a target qubit to $|0 \rangle$ if a controlled qubit is in the $|1\rangle$ state? How ...
0 votes
0 answers
56 views

Half-wave plate (HWP) Hadamard gate implementation

The transformation of a qubit encoded in the polarization state from $|H\rangle$ to the state $|+\rangle$ is theoretically achievable with an HWP@π/8. However, I rarely see this solution in ...
0 votes
1 answer
33 views

Qiskit_machine_learning QNNEstimator 'Estimator job failed' when using CU-Gates

I'm trying to construct a QNN using controlled arbitrary unitary gates. While some simple code versions work perfectly for controlled single rotations, the moment I add CU gate with parameters, the ...
7 votes
1 answer
394 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 ...
0 votes
0 answers
17 views

How does using a controlled rotation gate , with the slope of the linear function as a parameter, loads that function onto the amplitude?

I was going through the paper Quantum Risk Analysis in the section III they came up with a technique, in which they represented the analytical function into a polynomial and then used the slope of ...
2 votes
1 answer
41 views

How to represent two gates addition on Qiskit composer. we can do tensor product and multiplication but how to do Addition

How to represent two gates addition on Qiskit composer we can do it in python code by using qiskit library but I would like to visually see how addition of two operators look like in composer. I am ...
1 vote
1 answer
24 views

How to add noise mode in Sampler (SamplerQNN) in qiskit for quantum neural network?

I would like to add a noise model to one of the tutorial examples of quantum machine learning in the Qiskit site (PyTorch QGAN implementation). I used the following codes ...
0 votes
1 answer
17 views

Creating a parameterized Operator in Qiskit that cannot be decomposed into Qiskit supported gates

I am trying to create a custom ansatz to use the built-in Qiskit VQE() function. My ansatz is composed of single qubit gates and a hamiltonian gate which cannot be decomposed into Qiskit supported ...
8 votes
0 answers
142 views

Can you programatically check whether a given set of gates is universal?

I am wondering if there is an automated way to determine whether a given set of quantum operations is universal. More precisely given a set of 1 and 2 qubit gates can we write a program to determine ...
1 vote
3 answers
199 views

Is it possible to get the "symbolic" matrix operator associated with a parameterized quantum circuit using Qiskit?

Qiskit provides the qiskit.quantum_info.Operator class to get the unitary matrix operator from the corresponding quantum circuit, as in the following example: ...
7 votes
2 answers
681 views

Arbitrary powers of NOT and SWAP

The square-root of not and square-root of swap gates are often singled out for discussion of gates displaying important properties relating to quantum computers. How do I define arbitrary (non-...
3 votes
1 answer
94 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
3 votes
1 answer
178 views

What are the possible gates that I can use to vary input states before CNOT?

We know that the noise of the $\text{CNOT}$ gate varies depending on the input state before it. What are the gates that I can put in the place of the 4 identity gates above to change the input state ...
3 votes
2 answers
65 views

Transformation of 0 state to superposition of 0 and + state with only using single qubit gates

How to transform a qubit from state $|0\rangle$ to $(|0\rangle+|+\rangle)/N$ by only using an additional qubit, a controlled Hadamard gate, a Hadamard gate and a $Y$ or $Z$ gate? Sequence of the gates ...
0 votes
1 answer
16 views

Qiskit syntax to remove all gate operations for a given qubit line in a circuit

I am looking for a method to remove all operations for a given qubit in a Qiskit circuit. Here, I am looking to remove potentially many gate operations that are operating on that qubit line. Ideally I ...
0 votes
0 answers
15 views

Derivation of complexity for data encoding schemes

Could anyone help to derive the space-time complexities of the following different data encoding schemes ?
0 votes
0 answers
33 views

Understanding the meaning of [2, 2] for input_register and target_register in a custom Cirq gate

I'm learning a custom gate implementation from google Cirq official tutorial of shor algorithm(https://colab.research.google.com/github/quantumlib/Cirq/blob/master/docs/experiments/shor.ipynb#scrollTo=...
0 votes
1 answer
44 views

What state do you get applying the pauli Y gate to $|\pm\rangle$? [duplicate]

I know it's a basic question but what state gives when you apply pauli $Y$ gate over states $+$ and $-$? If I apply $Y|+i⟩ = |+i⟩$ or $Y|0⟩ = i|1⟩$, but I don't understand what do you get when you do $...
0 votes
5 answers
2k views

Google Colab - ImportError: The class MatplotlibDrawer needs pylatexenc

When I run the following command qc.draw(output='mpl') for my circuit qc, I get this error: ...
1 vote
0 answers
26 views

Question on circuit function evaluation

In this question, from what I understand, the circuit on the right hand side can not be evaluated for f(0) so depending on value of y, we will have two different f(0)s so this equality of circuits ...
1 vote
1 answer
60 views

Is every diagonal gate whose non-zero entries are $2^k$th roots of unity in the two qubit Clifford hierarchy?

Does the two qubit Clifford hierarchy contain all diagonal gates whose entries are $ 2^k $ roots of unity? In particular, is it true that every $ 4 \times 4 $ diagonal matrix whose diagonal entries ...
0 votes
1 answer
121 views

Apply Hadamard on a qubit in a register

I want to implement a Hadamard gate on a single qubit in a register. Given two qubits q0 := $|0\rangle$ and q1 := $|+\rangle$ I would like to use a Hadamard gate on the first qubit (q0). My intuition ...
1 vote
1 answer
46 views

How does grid or ring (coupling map topology) affect the depth of the circuit?

Why does different grid maps have different depths, i.e why does a 10x10 grid has more depth than 10x3. Also how does topology affect the depth?
2 votes
1 answer
81 views

Gate teleportation between different QEC codes

I've heard people mention that one can teleport a gate from one QEC code into another, but I am trying to better understand operationally what exactly this entails, and whether there are any ...
2 votes
0 answers
34 views

Quantum circuit runtime

I want to estimate the execution time of some experiments, and I would be interested to know how the time needed to run a quantum circuit grows in function of the number of qubits and the parametric ...
0 votes
0 answers
29 views

Conjugation of Unitary Matrices in Quantum Channel

A quantum channel is given in the form $U(\rho)=\sum_{j}p_jK_j\rho K_j^\dagger$. I have read in another thread that a quantum channel is the generalized version of a quantum gate (represented by a ...
2 votes
2 answers
102 views

Conditional unitary based on output of a function

I read about dynamic circuits in Qiskit which uses an if-test. My question is how can we give a custom function in the if-test? Based on its documentation, we can only provide a classical register to ...
1 vote
1 answer
86 views

How many single and double qubit gates are required to create a uniform superposition of vertices of a Johnson Graph J(n,r)?

Can I in $\tilde{O}(r)$ number of gates (single and double qubit) create a uniform superposition of vertices of Johnson Graph $J(n,r)$? I would like to create a state $|\psi\rangle = \frac{1}{\sqrt{n \...

1
2 3 4 5
31