# Questions tagged [quantum-circuit]

a model in which a computation is a sequence of quantum gates, which are reversible transformations on an n-qubit register (the quantum-mechanical analog of an n-bit register)

468 questions
Filter by
Sorted by
Tagged with
38 views

### Custom gate labels in PennyLane

I have a circuit with Rx gate, and I want to draw it with changed gate label. For example, instead of "RX" I want to have "custom_gate" written in the gate box. I have tried ...
148 views

### Problem with eigenvalue evaluation algorithm application on matrix $U$

Once I get to the end of the algorithm, I can't understand how to calculate the eigenvalue using formulas. Bear in mind that it is an exercise to be carried out with pen and paper. the matrix of $U$ ...
1 vote
44 views

### Increasing memory usage of simulation of quantum circuits in a "for" loop

I have the following code: ...
1 vote
11 views

### Adding measurement circuits to the singlet state circuit and want to create single circuit

I am trying to add the measurement of Alice and bob's circuit to the singlet circuit. Actually, I am trying to build the e91 protocol. But it is giving me an error like this. ...
125 views

### Equivalence of circuits in measurement-based QC

I am looking at Slide 40 from this deck. It is claimed that the circuits 1 to 4 are equivalent. I don't understand the step to go from 2 to 3. How does one backpropagate a measurement in the X basis ...
65 views

### Constructing a two 3-qubit state involving either X, Y or Z rotation gate

The goal is to construct the state $|\psi\rangle = \frac{1}{2}|010\rangle + \frac{\sqrt{3}}{2}|101\rangle$ Two issues I am facing: What is a good choice for initial state? What is a good choice for ...
1 vote
49 views

### creating a generalised Bell state with gates

The Bell state is $$|\beta(a,b)\rangle = \frac{1}{\sqrt{2}}\sum_{k=0}^{1}(-1)^{ka}|k,k \oplus b\rangle\,.$$ How do I get to a general Bell state given an initial state $|ab\rangle$ here $a,b = 0, 1$? ...
50 views

### Role of qubit registers in HHL circuit

I'm trying to figure out how the HHL algorithm works from reading Dervovic's paper and IBM's tutorial. Dervovic shows the following HHL circuit in Fig 5: whereas IBM uses: I want to clarify the IBM ...
301 views

### Is the full quantum circuit always in a pure state?

I'm aware, that if you measure just a subset of a circuit, which is entangled to another subset, it'll be in a mixed state. For example, if you measure q1 in the ...
45 views

### Random quantum circuits with expectation values not close to 0 for large number of qubits

I'm studying output expectation values of random quantum circuits. These random circuits are built using random gates from a universal set. I have noticed that the distribution of the output ...
34 views

### What's a quantum algorithm in the black box model to find $j_1,j_2$ such that $f(x_1,...,x_n)=x_{j1}\oplus x_{j2}$?

Consider the set of all functions $f : \{0, 1\}^n → \{0, 1\}$ that are of the form $f(x_1, x_2, . . . , x_n) = x_{j1}\oplus x_{j2}$ for some distinct $j_1, j_2 \in \{1, 2, . . . , n\}$. Suppose that ...
1 vote
47 views

### What does Quantum Circuit Wires and Separated mean?

From Quantum Circuits, there are two statements that are not clear. Quantum Circuits Quantum circuits are collections of quantum gates interconnected by quantum wires. The actual structure of a ...
1 vote
78 views

### How to interpret the circuit that measures stabilizers in the 5-qubit error correcting code

I would like to understand the exact role of the following circuit (By Vtomole - Own work, CC BY-SA 4.0) in the 5-qubit QECC. The image attached (from Wikipedia) is captioned "Quantum Circuit ...
1 vote
54 views

### Implementing $n$-bit Toffoli gate with $(2n-5)$ and $(4n-12)$ CCNOT gates

Papers such as Diao et al. "A Quantum Circuit Design for Grover’s Algorithm" implement an $n-1$ bit Toffoli gate with $2n-7$ gates and $n-3$ scratch bits. I want to know if there is a way to ...
1 vote
59 views

### How to interpret the encoding circuit for the 5-qubit QECC

I have a question on circuit which constitutes the sydnrome measurement for the 5-qubit error correcting code. If I focus on just a portion of the circuit: Reference for image. The full circuit can ...
1 vote
35 views

### Classical Fisher Information for 1-qubit vs 2-qubit in PennyLane

I'm attempting to examine the Classical Fisher Information (CFI) for a 1-qubit system in comparison to a 2-qubit system.(PennyLane) I anticipated that the CFI for the 2-qubit system would be double(at ...
135 views

211 views

### Output of my quantum circuit to create 3-qubit GHZ-like state does not make sense mathematically

I want to create the GHZ-like state, $|\Psi\rangle = \frac{1}{\sqrt{2}} \left(|011\rangle - |100 \rangle \right)$. I build my circuit in the following way. apply the x gate to the first and third ...
1 vote
93 views

### If Statement OpenQasm 2.0

in the documentation for OpenQasm 2.0 it says one can use an if statement like so: if(c_reg==int) Quantum Operation. However, I would like to execute the following: ...
29 views

### How to account for a partial derivative term in an Operator, in Qiskit?

The crystal momentum p1 = h bar * k and this is defined in the reciprocal momentum, I am guessing this p1 is not a real momentum since the reciprocal space is an imaginary space which we use for ...
1 vote
14 views

### How to get rid of the indices of qubits at the side of a custom gate when visualizing a circuit (IBM Qiskit)

I have written a function that applies the Hadamard gate to all qubits in a circuit, and use the draw() function to visualize the circuit. However, there is this ...
1 vote
142 views

### Can any Qiskit circuit be converted to a gate?

I am trying to convert the following qiskit QuantumCircuit to a gate using to_gate() method. ...
1 vote