# Questions tagged [quantum-gate]

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

188 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
47 views

### Find the desire state with a set of gates?

I encoded a state |000> applied by a U3 gate, resulting in state: a|000>+b|100>. I need to create a circuit to achieve the desired state (a'|**0>+b'|**1>) with * as any 0 or 1 state. ...
1 vote
36 views

### modify Shor’s quantum order finding algorithm in such a way that it uses as few qubits as possible

I am supposed to modify Shor’s quantum order finding algorithm in such a way that it uses as few qubits as possible. Beforehand, I already did an exercise where I showed that the inverse Quantum ...
1 vote
33 views

### Computation for threshold of CNOT gate

I'm trying to reproduce some threshold results using 7-qubit Steane code in those legacy papers. I managed to obtain the graph for circuit noise and single qubit gate e.g. the pseudocode for computing ...
1 vote
174 views

### Trying to construct modular exponentiation gate in Qiskit

https://qiskit.org/textbook/ch-algorithms/shor.html in this tutorial I don't understand especially in how they define for the modular exponentiation gate with only swap gate (inside c_amod15 function)....
1 vote
31 views

### how do x, y, z, and h gates transform amplitude, phase, and magnitude? Affect of one gate to others?

I have been taking the qiskit and I am having trouble understanding how they work. How does the phase affect the actually probability of the output? The course also talks about the amplitude trees of ...
1 vote
42 views

### How to apply CNOT with control qubits in first register and target qubit in second register

I would like to know how to mathematically describe the states of the qubits in both registers in the following circuit:
1 vote
22 views

### How to extract the entanglement fidelity from an arbitrary quantum operation?

I have an arbitrary process matrix that does an entangling operation (a controlled-pi/2 rotation) plus some additional phase rotations that are not of interest. I am curious to find a way to extract a ...
1 vote
42 views

### Universality : Working with one qubit

I am working on the Pennylane's code camp problems and I'm stuck with the challenge 4. I am utterly clueless about this question, as in what is it asking from me, they provide us with a $2\times 2$ ...
1 vote
43 views

### Calculate the single qubit unitary (U) created by the sequence of gates: U=XZH

I don't know how are we going to proof this by using tensor product of XZH
1 vote
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://...
1 vote
87 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} & & ...
1 vote
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. ...
1 vote
68 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
81 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 ...
1 vote
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 (...
1 vote
77 views

### The relationship between number of shots and performance of quantum agent

What is the relationship between number of shots and the performance of quantum agent in Quantum neural network? and what is the limit of number of shoots in QASM simulator?
1 vote
66 views

### Faithful description of a photonic setting with the circuit model

The above picture comes from this paper. The circuit on the left and the one on the right are equivalent (up to the basis). However, there is an important difference: the circuit makes the input -- i....
1 vote
46 views

### What's the best way to design a circuit with logic gates that use the same input lines?

I am implementing a Carry Select Adder, the problem is that the circuit is quite complex to translate in Qiskit. I need to use one (or multiple) line(s) as input for two (or more) gates. In particular,...
1 vote
77 views

### CNOT chain vs CNOT fountain in qiskit

I was going through qiskit's synthesis module, their methods take an argument called cx_structure which has two possible values, ...
1 vote
64 views

1 vote
61 views

### How to measure the error rate (or fidelity) of a particular gate (such a H, T) by Qiskit

We know the calibration data of IBM's quantum devices can be retrieved through the randomized benchmarking method, which is included in Qiskit. However, the calibaration data about gates just gives ...
1 vote
156 views

### Matrix for $U^{2^j}$ from Shor's algorithm for any $a$ and $N$

I'm implementing Shor's algorithm from scratch and therefore want to implement a unitary gate $U$ such that $U^{2^j}|y\rangle = |a^{2^j}y \: \text{mod} \: N\rangle$. I know that an efficient way of ...
1 vote
84 views

### In (O'Brien et al. 2004), why is the target qubit not affected when the control is $\vert 0\rangle$?

I'm currently reading this paper https://arxiv.org/abs/quant-ph/0403062 but I fail to understand how the input of the control qubit affects the output of the target qubit. I do understand that when ...
1 vote
141 views

### How do I get sate vector for each shot running on a quantum computer?

I was running this code on a quantum computer how can I generate a state vector for each shot while running on a quantum computer? qikit code ...
1 vote
128 views

### 3-qubit phase shift gate/circuit implementation without any Ancilla qubits

Hi, I need help me with figuring out the 3-qubit phase shift circuit without any ancillas similar to the 2-qubit circuit shown in below attached picture....... Please do let me know! Thanks in advance!...
1 vote
39 views

1 vote
57 views

### Quantum circuit simplification using classical computers

Suppose that we have this kind of circuit where the first unitary operator U is used for the state preparation while the Hadamard operator is used of state detection. Let's say we try to run this ...
51 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 ...
25 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 ...
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 ...