# 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)

149 questions
Filter by
Sorted by
Tagged with
28 views

### Quantum fourier transform with classical vibrations

Is there any difference in effect between a quantum circuit and a carefully constructed analogue one relying on interference? For example, why couldn't I take a series of $N$ carefully shaped pipes, ...
41 views

### Generalized push for $\land_{ab}(X)$ gate

EDIT: In the following I am using the Feynman notation for controlled operations - e.g. $\land_{ab}(X)$ is equivalent to a $CNOT$ with control qubit $q_a$ and target $q_b$. Ultimately, for any single-...
122 views

### What is the correlation between Toffoli and a more generic rotation shown in qiskit textbook

Can someone help me understand the correlation between the 2 diagrams in the qiskit textbook.
126 views

145 views

### Why are these two QFT circuits equivalent?

I am new to quantum computing and have been trying to understand the Quantum Fourier Transform (QFT). Through my research using both the Qiskit textbook and other sources, I see differences in how the ...
169 views

### Understand the circuit of Normal Distribution

This is the circuit for NormalDistribution(3, mu=1, sigma=1, bounds=(0, 2)). How do I understand what this circuit is doing?
102 views

### How do I find the state of each qubit at the end of the circuit?

I have this Quantum Fourier Transform (QFT) and I want to know how to find the final state of each qubit if q0, q1, ...
165 views

### How to construct a controlled $V$ gate in qiskit?

I have come across most of the quantum circuit which contains gate such as controlled $V$ and $V^{\dagger}$ but I dont know how to code it in Qiskit.
44 views

### Feynman method and polynomial time algorithm for XQUATH

Consider the Feynman algorithm for simulating quantum circuits, as given here. Consider the XQUATH conjecture for random quantum circuits from here, given by (XQUATH, or Linear Cross-Entropy Quantum ...
89 views

### Exercise 4.41 in N&C book QCQI: how can i implement $R_z(\theta)$ using the circuit shown and $Z$?

I'm studying Nielsen and Chuang's book. I cannot solve one of the questions in the exercise 4.41. The question is the last one that is Explain how repeated use of this circuit and Z gates may be used ...
43 views

### Query complexity on Quantum Pattern Matching of Mateus Algorithm

I am trying to understand the complexity of the Mateus and Omar algorithm for quantum pattern matching, it is clear to me from the pseudocode that the query complexity is $O(\sqrt{N})$, apart from the ...
36 views

### Marginal output probability of first bit for constant-depth circuits

Consider a constant depth $1\text{D}$ quantum circuit, which is applied to the input state $|0^{n}\rangle$, and whose output is measured in the standard basis. You can assume that the gates of the ...
328 views

### How to visualize Hadamard gate as $X$-$Z$-$X$ decomposition?

In the book Quantum Computation and Quantum Information by Nielsen and Chuang, chapter 4, exercise 4.4 (pg. 175), the author has asked to express Hadamard gate as product of $R_x$, $R_z$ rotations and ...
92 views

I would like to know if it is possible implement the following situation in Qiskit (either using the simulators or real quantum computers). Consider this illustrative toy example: The arrows ...
53 views

### How can I write unit tests for a pennylane circuit?

I have several mixing unitary circuits written using Pennylane to be used in the QAOA algorithm. Furthermore, I'd like to write unit tests for these mixing circuits to ensure that the code is doing ...
142 views

### Transpilation on restricted topology does not yield an equivalent circuit in Qiskit

Here is an MWE: a simple circuit on three qubits with a CNOT acting on qubits 0 and 2. The coupling map prohibits a two-qubit gate between qubits 0 and 2 and so qubit 1 must get involved. ...
69 views

### Can an arbitrary circuit be represented using two commands (qsel package)?

I was watching this entertaining video by David Bacon (as in "Bacon-Shor code", Cirq, ...) : video of talk where he mentions the package he wrote: (qsel), that describes simulating quantum ...
51 views

### How can a Sagnac interferometer be described by a quantum circuit?

I am looking to translate interferometric processes onto a quantum circuit model and am running into issues regarding feedback and the reuse of circuit elements. My question is framed in terms of a ...
314 views

34 views

### What are standard/most popular data formats to represent quantum circuits including hardware specifications?

On an abstract level one draws a circuit diagram with wires and gates. Different software frameworks like qiskit, circ etc. ...
52 views

### Is there a way to within a quantum circuit work out if a qubit is in a superposition or not?

Preferably using the gates found in QASM/Qiskit and the qubit stays in the superposition and no measurement is made, i.e. the output of if it is in a superposition or not is a binary answer in another ...
55 views

### In quantum circuits, why does $UNU^\dagger$ act on states in the same way $N$ acts before the operation?

I understand that the Schrodinger picture changes the quantum states, while the Heisenberg picture changes the operators. In this paper The Heisenberg Representation of Quantum Computers, in equations ...
96 views

### Does Qiskit Statevector has actual speed up for Grover Search?

From Qiskit document, the Statevector can be used to specify the oracle of Grover Search. After seeing the source code of the operators, it seems a statevector is converted to a rank-1 projector ...
96 views

### What is the significance of the phase angle? [duplicate]

I've the following circuit which gives an output of 1 with a phase angle of 3π/4. When we measure the circuit all we get is the ...
69 views

### What is the shortest-circuit-depth quantum-benchmarking algorithm?

An algorithm implementing a model whose results are known, and from the known results, the benchmarking of the device could be done. What is the currently known shortest circuit depth algorithm that ...
109 views

### How to represent a CNOT gate operating on three-qubit states as a matrix? [duplicate]

I am wondering how to represent these kinds of circuits as a matrix. Is there any formula for doing this?
119 views

### How to calculate the amount of entanglement for each qubit in a quantum computer

I am an electrical engineer and am learning about quantum computing. I am writing a simulator in Python to help with the learning process. The code that I have can simulate up to 10 qubits. I have (so ...
55 views

### What are some standard ways to visualize non-unitary processes

In quantum computing, quantum circuits are a common model for visualizing unitary evolution. If I want to represent a unitary $U$ acting on a $2$-qubit state $|00\rangle$ followed by a measurement in ...
51 views

### Is there a quantum implementation like HashSet?

There are many data structures in classical computers, like Tree, HashSet, etc. These data structures give convenience to the performance (time complexity) of algorithms. I am wondering how to create ...
46 views

### Transform circuit with 3 CNOTs in one with limited interactions on the first qubit

Is it possible to translate the above circuit into an equivalent one where the number of interaction gates with the first qubit is 1?
44 views

### From QUBO problem to quantum circuit [duplicate]

Can you describe how to convert some QUBO problem $$f(x_1, ..., x_n) = \sum\limits_{1 \le i < j \le n} \alpha_{i,j} \, x_i \, x_j$$ into its equivalent quantum circuits? Is it preferrable to start ...
33 views

### In a Swap Test why is the control qubit influenced and aren't the target qubits altered?

I am in a study group learning about quantum computing using O'Reilly - Programming Quantum Computing. I'm a developer, not a physicist. :) I feel like my question is rudimentary but I can't seem to ...
52 views

### How does $|00\rangle$ evolve through an Hadamard and a CNOT gate?

If we have this given circuit: So the output for $|0\rangle$ will be: $\frac{1}{\sqrt{2}}\left(|00\rangle + |11\rangle\right)$ And we have this given circuit: What will be the output for $|00\rangle$...
58 views

### Method to derive Matrix description of a circuit [duplicate]

This question is about finding a matrix description of a specific circuit. I am learning quantum computing through edX's Quantum Information Science lecture series. The question below is the one I am ...
54 views

### Simon's Algorithm - Equivalent Oracles Giving Different Results

In Simon's algorithm, is it possible to have two different oracles that return the same results on their own but cause Simon's algorithm to return different results from one another? In what sort of ...
47 views

### Worst Case Asymptotic Complexity of Berstein-Vazirani

How would one determine the worst-case asymptotic complexity ($\theta$) of a Bernstein-Vazirani circuit encoding the secret 1111?
116 views

### Is the complexity of a quantum circuit constant in the depth of the circuit?

Take a quantum circuit on $n$ qubits, you have some sequence of gates. You can represent these gates as hermitian matrices, and then with some padding, you could take the product of these matrices, by ...
61 views

### Why are 3, rather than 2 gates used in quantum variational circuits?

In the hello many worlds tensorflow tutorial and in the lockwood paper (2020) I have seen that often in QVC the following combination of gates is used: $R_z(\theta), R_y(\theta), R_x(\theta)$ I am ...
131 views

### What does it mean for a circuit to be a valid instance of the Bernstein-Vazirani problem?

What does it mean for a circuit to be a valid instance of the Bernstein-Vazirani problem? It's not clear to me in the above circuit what the X gate is doing on the $b$ qubit. I guess it's just ...
119 views

### How do I construct the oracle for a general Bernstein-Vazirani circuit?

Say I have a secret of length $n$, $s = |x_{n-1}x_{n-2}...x_0 \rangle$. If I want to construct an oracle for this problem would I just insert a CNOT gate on every qubit where the secret's value is 1? ...
Given the following system: \begin{bmatrix}0 & 1 & 0\\1 & 1 & 1\\1 & 0 & 1\end{bmatrix} \begin{bmatrix}s_2\\ s_1\\ s_0\end{bmatrix} = \begin{bmatrix}0\\ 0\\ 0\end{bmatrix}\$...