29 votes
Accepted

An impossible quantum adder claimed by a journal article?

it's from International Journal of Theoretical Physics - reputable journal Consider this paper your lesson in how reliable "reputability" is. Look at Figure 5 from the paper: Specifically ...
  • 24.8k
18 votes
Accepted

What's meant by the depth of a quantum circuit?

The depth of a circuit is the longest path in the circuit. The path length is always an integer number, representing the number of gates it has to execute in that path. For example, the following ...
  • 12.8k
11 votes
Accepted

How to check if a quantum circuit can be constructed for a given matrix representation?

Correct, unitarity is a sufficient and necessary condition. From Nielson and Chuang page 18: Amazingly, this unitary constraint is the only constraint on quantum gates. Any unitary matrix specifies a ...
  • 1,928
10 votes
Accepted

How to distinguish between collapsed and uncertain qubits in a quantum circuit?

Consider a quantum circuit on one qubit initialized in the state $|0\rangle$ and consisting of two Hadamard gates where we can insert a measurement between the Hadamards. The input state is $|0\rangle$...
  • 14.8k
10 votes
Accepted

Building a controlled NOT gate which is controlled by the qubit it is acting on

The operation you want is impossible, because it is not reversible. It sends both |1> and |0> to |0>, so afterwards if you see |0> you can't tell if it came from |1> or from |0>. So ...
  • 24.8k
8 votes
Accepted

How could one implement a circuit using Grover's algorithm to solve a linear system of equations?

You certainly could use Grover's search. You would create 2 registers. This first, of 3 qubits, would effectively store the $\{s_0,s_1,s_2\}$. This is the standard register for Grovers on which you ...
  • 48.2k
7 votes

Superposition of quantum circuits

As Davit Khachatryan's answer points out, the task is impossible / ill-defined, since the desired target state is generally not normalized and it depends on the relative global phases of the two ...
7 votes

How to check if a quantum circuit can be constructed for a given matrix representation?

Right. But when you build a quantum computer, you want to have a certain set of gates that you want to implement, and all other gates (unitary matrices) can be built from that set of gates. This is ...
  • 12.8k
7 votes
Accepted

Qiskit - Circuit drawing aesthetics - Can I force the measurements in my circuit to show at the end?

You can add a barrier before the measure ...
  • 4,264
7 votes
Accepted

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

The same could be said about any classically computable function. We could use the Cook-Levin theorem to unroll any Turing machine into a single but complicated $n$-input gate, and then claim it's $o(...
  • 7,921
7 votes

Apply readout error mitigation to mid-circuit measurement

That's a very interesting question, I haven't thought about it before, thanks for that! Now, the way I see this, you have 2 different potential paths to investigate. 1 The first one would be the same ...
  • 2,413
7 votes
Accepted

Why is depth complexity relevant?

Circuit depth matters because qubits have finite coherence time. You could imagine two circuits, each with $N$ gates, where the first circuit can implement them all in parallel and thus finish in one ...
  • 1,276
7 votes
Accepted

Minimum number of 2 qubit gates to build any unitary

Theoretical lower bound In contrast to the answer by Bertrand, I will assume that along with a $CNOT$ gate we have arbitrary single-qubit unitaries on our disposal. In this case, one can derive the ...
7 votes
Accepted

Why do we care about the number of $T$ gates in a quantum circuit?

If you are trying to implement a fault-tolerant quantum computation, you need to implement unitary gates that act on logical qubits. You typically have a finite set of these gates available, and what ...
  • 48.2k
7 votes
Accepted

What is this circuit doing?

The first part of the circuit is to create a GHZ state $$|\psi\rangle = \dfrac{|000\rangle + |111\rangle}{\sqrt{2}} $$ The second part of the circuit is to change the basis of measurement to $XYY$. ...
  • 12.8k
7 votes

What is this circuit doing?

This looks like one case of a GHZ bell test. It's preparing a GHZ state and then measuring the qubits in the X, Y, and Y bases respectively. In the full experiment the three players prepare the state ...
  • 24.8k
7 votes
Accepted

Transforming a Quantum State to a superposition of its inverse

It's not possible to build such a quantum gate. First of all, what would be the inverse of: $$|+\rangle=\frac12\left(|00\rangle+|01\rangle+|10\rangle+|11\rangle\right)$$ ? You can convince yourself ...
6 votes

How to compute the measurement probability in swap test?

It's a fantastic question because the typical measurement intuition we apply no longer is sufficient - it's really necessary to formalize measurement. Specifically, we create a set of nonlinear ...
  • 1,531
6 votes
Accepted

How to reason about absorbing Pauli Product rotations into measurements?

First of all, let us consider an arbitrary unitary $U$. If we first apply $U$ and then measure a POVM $\{E_a\}$, then this is equivalent to doing nothing and measuring the POVM $\{U^\dagger E_a U\}$ ...
6 votes

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

As mentioned in the other answer, the Hadamard gate is a pi rotation (180 degree) around the $X + Z$ axis. That is, it is a 180 degree rotation around the purple axis indicated in the below figure: ...
  • 12.8k
6 votes
Accepted

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

The first diagram is a generic construction showing how it is possible to build a $\mathsf{CC}\mathbf{U}$ gate, which is the gate that applies $\mathbf{U}$ to the third qubit only if both first qubits ...
6 votes
Accepted

Initial state preparation for Hadamard test

You could almost do it. In fact, the following circuit would work: You can convince yourself that what you do is in fact applying the unitary $\mathbf{VUV^\dagger}$, which will allow you to evaluate ...
6 votes

Finite subgroup of $U(4)$ containing a non-Clifford gate and all local Cliffords

This partial answer places additional restrictions on $U$. Constructing unitaries with infinite order By KAK decomposition, $U$ can be written as $$ U=(A_1\otimes A_0)e^{i\alpha X\otimes X + i\beta Y\...
  • 14.8k
6 votes
Accepted

Finite subgroup of $U(4)$ containing a non-Clifford gate and all local Cliffords

No. There is no way to add a non Clifford gate to the local Clifford group $ Cl_1^{\otimes 2} $ and get a finite group. Definitions: A subgroup $ G $ of $ GL_n(\mathbb{C}) $ is reducible if we can ...
5 votes
Accepted

Unknown quantum circuit symbol

The picture has two parts: The first goes until the dots. It is simply three $|0\rangle$ states. (The ground state.) You will recognize that the same picture -- but only until the dot -- is used in ...
5 votes

Superposition of quantum circuits

A counterexample that shows that this is not possible in the general case (here I am neglecting post-selection possibility discussed in the comments of the question and in the accepted answer): $$ C_1 ...
5 votes
Accepted

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

At the start of the circuit you're right that you only need two parameters. This is actually easy to show if you decompose into a sequence of rotations starting with a Z rotation, because Z rotations ...
  • 24.8k
5 votes

Why is depth complexity relevant?

Great answer by chrysaor4! To give another example: implementing Toffoli gates in a fault-tolerant quantum computer. The most time-consuming gate to implement in a fault-tolerant setting will be the T ...
5 votes
Accepted

Does QFT exploit entanglement?

Yes, the formula you have shows that applying QFT to a given computational basis state $|j\rangle = |j_1 j_2 \dots j_n\rangle$ results in an unentangled output state. However when applied to ...
  • 5,067
5 votes
Accepted

What is the fastest classical simulator for quantum circuits with only Clifford gates?

As far as I know, the current fastest simulator for stabilizer circuits is my simulator Stim (source code on github, paper in Quantum, python package on pypi). This is especially true if you're doing ...
  • 24.8k

Only top scored, non community-wiki answers of a minimum length are eligible