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)

Filter by
Sorted by
Tagged with
0
votes
1answer
51 views

The statevector of the quantum circuit

I have tried to solve this problem many times. But I can't solve this. Please somebody help me. (prep has no meaning) ${O_1}$ : $O_2$: What is the state vector $|\psi\rangle$ (for qubits 1 and 2) ...
0
votes
0answers
23 views

What is the quantum leap / advantage of quantum computers? [duplicate]

I have read up several times on various sources about the advantage of quantum computers but still, I can only reproduce statements without really understanding them. Why are quantum computers able to ...
3
votes
2answers
29 views

How to find $\langle Z_1...Z_{N-1} \rangle$ knowing $\langle Z_1...Z_{N} \rangle$ and $\langle Z_i \rangle$

I have a quantum circuit with $N$ qubits represented by the unitary $U$. The initial state is $| 00...0\rangle$ and $\psi=U|00...0\rangle$. Given $\langle\psi| Z_1...Z_{N} |\psi\rangle$ and $\langle \...
0
votes
1answer
43 views

Visualize full UCC circuit in qiskit

I am experimenting with the UCC module in qiskit nature. From pyscf, I got 1-body and 2-body integrals (I need to use custom integrals) and thus created a mapped ...
4
votes
1answer
63 views

Question regarding the output probability of a quantum circuit

Consider a quantum circuit $\text{Q}$, run on $|0^{n}\rangle$. For a specific $x \in \{0, 1\}^{n}$, let's say we are interested in the probability $$p_x = |\langle x|~\text{Q}~|0^{n}\rangle|^{2}.$$ ...
4
votes
1answer
65 views

Confusion with the number of CNOTs in a circuit

I am a bit puzzled on the following circuit. According to this Quantum Computing SE thread it holds that $$ e^{i(Z\otimes Z)t} = {\rm CNOT} (I\otimes e^{iZt}){\rm CNOT} \qquad (1) $$ As a result we ...
2
votes
1answer
44 views

Simulating the Ising-like model as a quantum circuit

We are interested in simulating the 1d Ising model Hamiltonian using a Quantum Circuit (QC). A similar question was posted before with no answers. Here we will assume, for simplicity, 3 lattice sites ...
2
votes
1answer
29 views

Error : Cannot unroll the circuit to the given basis

I want to run the circuit given below, but I am getting the following error. QiskitError: "Cannot unroll the circuit to the given basis, ['u1', 'u2', 'u3', 'cx', 'id', 'unitary']. Instruction ...
5
votes
2answers
65 views

How many quantum gates are needed to prepare an arbitrary state?

In this paper there is this sentence: [...] the description of a $2^n\times2^n$ unitary matrix $U$ (which is a poly($n$)-size quantum circuit) According to the meaning of "which" in ...
1
vote
0answers
30 views

Quantum circuit error in QISKIT

I am trying to build a simple 16-qubit Quantum circuit where I am appending an 8-qubit quantum circuit to the first 8-qubits of my custom circuit. Then I measure all the qubits. However when I execute ...
1
vote
2answers
183 views

Are input/output nodes only a fiction?

When running quantum algorithms, are input and output nodes of any gate in a quantum circuit two separate sets of (physical qubit) nodes, or are we only mutating/overwriting one fixed set of nodes? ...
3
votes
1answer
115 views

Is it possible to recover a marked bitstring from a superposition?

Is it possible to recover a marked bitstring from a superposition? For example, consider the state $$\lvert \psi \rangle = \frac{1}{2}\left(\lvert 00 \rangle \lvert 0 \rangle + \lvert 01 \rangle \...
4
votes
0answers
39 views

Is there a convention in quantum circuit diagrams for specific quantum measurements?

Is there a convention in quantum circuit diagrams for specific quantum measurements? For example, how could one express the measurement $|0\rangle \langle 0|$ in a circuit diagram?
2
votes
1answer
87 views

How can I fix this parametrization error in Qiskit?

I'm trying to use the parametrized circuits to run a single model of quantum circuit with different values. Here's part of my code: ...
3
votes
1answer
79 views

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

What is the fastest classical simulator for quantum circuits with only Clifford Gates? And is there any "friendly" implementation e.g. in Python (or in some well-known libraries like Qiskit)?...
2
votes
1answer
390 views

Is a quantum circuit with a controlled-T gate possible?

This diagram comes from the textbook, Quantum information (Author: Stephen Barnett), fig. 6.13. The problem is what I know that T gate isn't a multi-qubit gate, so is it possible that T gate becomes ...
1
vote
0answers
19 views

Getting different sets of plots for the teleportation algorithm in Composer and Lab

I tried recreating the quantum teleportation circuit (in the Qiskit Foundation Youtube Playlist) both in Lab and Composer and getting different plots for each. Here is circuit and histogram from ...
1
vote
0answers
29 views

Calculate Outputs of a Teleportation Circuit

In this question, I assume we use matrix representation to calculate what each output could be? For example, for the middle qubit in state: $$|00\rangle$$ After the first Hadamard and CNOT gate (so ...
1
vote
1answer
66 views

Show that the effect of a Controlled Unitary on qubits followed by a measurement is unchanged depending on when measurement is taken

I understand that a Controlled Unitary is just a generalization of a control gate, such as CNOT etc, and that it is given in state representation as $$\hat C_U = |0\rangle\langle0|\otimes\mathbb{I} + |...
5
votes
1answer
154 views

Does QFT exploit entanglement?

I was studying the quantum circuit for the Quantum Fourier Transform (QFT) on the Mike & Ike, and they write the result of the transformation as a product state. More precisely they wrote the ...
3
votes
2answers
62 views

How to create superposition of states with fixed parity with a quantum circuit?

I'm searching for a circuit to generate, starting from the $|00\, ...\,0\rangle$ state, an arbitrary superposition of all states with either even or odd parity. The gate choice is irrelevant for now, ...
5
votes
1answer
553 views

Understanding quantum circuit diagrams: a circuit that compares two states $|YX\rangle$ and $|AB\rangle$

I have a quantum circuit which I would like to understand, which compares two standard basis states $|YX\rangle$ and $|AB\rangle$. It operates on the corresponding bits in each of the two states: i.e.,...
3
votes
1answer
119 views

Block encoding technique: what is it and what is it used for?

I was wondering if someone could explain to me what this technique called "block encoding" does, and what it is used for at a high level, found in arXiv:1806.01838. It is in section 4.1, ...
3
votes
1answer
76 views

How to create a Bell state with asymmetric amplitudes using single-qubit and CNOT gates?

Is there a systematic way - in terms of a quantum circuit with single qubit and CNOT gates - to create a bell state with asymmetric amplitudes, e.g., $$ \alpha |00\rangle + \beta|11\rangle $$ where $\...
3
votes
1answer
63 views

How does a quantum circuit capture the "non-halting ability" of classical Turing machines?

It is claimed that a quantum Turing machine is "computationally" equivalent to the circuit model. Quantum computing also includes all classical computing. However, we know that there are ...
2
votes
1answer
52 views

What is the difference between the two entanglement circuits?

For a three qubits system to be in an entanglement(GHZ) state, the circuit can be built as per Qiskit, Here, the control bit of the second X gate is on q0. what if the control bit is shifted to q1. ...
2
votes
1answer
49 views

From the final quantum state to the quantum circuit composition

When I build a quantum circuit and my initial state is the one composed only by zeros ($|000\ldots 0\rangle$), I have a final state $|\psi\rangle$ that is the result of the application of the quantum ...
1
vote
1answer
55 views

Symmetric Universal Quantum Cloning Machine (UQCM) N --> M for unknown states

Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM N--> M for unknown states? If yes, does anyone know a Qiskit implementation of it?
2
votes
2answers
80 views

Compute the output of this Approximate Quantum Cloning three-qubit circuit

Above is a circuit for "Approximate Quantum Cloning" The preparation state is given by $$|\psi\rangle =\alpha|0\rangle+\beta|1\rangle$$ The gates labelled $\theta_i$ denote single qubit ...
1
vote
0answers
27 views

How should I think about circuit metrics like "qubit count," "circuit depth," and "gate count" when dealing with the OpenQASM 3 `ctrl` modifier?

It seems like circuit metrics like qubit count, circuit depth, and gate count are pretty useful. Qubit count determines whether a it's even possible to run a program on resource-limited quantum ...
1
vote
1answer
55 views

Tweak the parameter `p` of QAOA in qiskit

I am solving a QUBO using QAOA. It works flawlessly with default parameters for smaller instances of the problem, but my RAM is saturated when I try to solve a problem of size 15. I suspect this can ...
2
votes
1answer
64 views

How to tranfer given superposition to quantum circuit?

Let's say I have a superposition of qubit defined as $\frac{1}{2} (| 000 \rangle + | 001 \rangle + | 111 \rangle + | 110 \rangle)$ (as given in the answer here: Explanation of output produced by the ...
0
votes
1answer
65 views

How to create a quantum circuit to implement the same operations but acting on different qubits?

I want the draw the quantum circuit of the following Hamiltonian: $$H = - 4 \times X\otimes X\otimes X\otimes X - 4\times Z\otimes Z\otimes Z \otimes Z$$. I have been able to draw the circuits of $ - ...
4
votes
2answers
99 views

Are there ''interesting'' examples of circuits where gates can all commute each other?

Are there ''interesting'' examples of circuits where gates can all commute each other? More formally, there may be some group of circuits where gates and, particularly, CNOTs (as the only two-qubit ...
1
vote
1answer
81 views

How to determine the basis state with maximum amplitude without measurement?

Suppose I have two quantum registers described respectively by the quantum states $| \psi_1 \rangle = \sum_i \alpha_i |i \rangle$ and $|\psi_2 \rangle = |0\rangle$. I would like to implement a CNOT ...
2
votes
1answer
39 views

How to Construct Swap Gates from Permutation Matrix?

This is a follow-up question from here. Let's say after an LUP decomposition, we have an 8x8 permutation matrix: $ P^{-1} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ ...
1
vote
0answers
68 views

Evaluating the derivative of a Quantum Circuit

After this post this weekend which got an excellent response, I've been trying to get into the solution that is given by the paper and applying it to my circuit. My original circuit is far bigger and ...
0
votes
0answers
51 views

What exactly is the "quantum singular value decomposition"?

I know what is singular value decomposition, meaning given a matrix and write it as multiplication three different matrices, and middle matrix being diagonal and entries are singular values. So, what ...
7
votes
2answers
292 views

Apply readout error mitigation to mid-circuit measurement

I'm trying to construct a quantum circuit with 3 mid-circuit measurements, here's an example: ...
0
votes
1answer
82 views

Is there a quantum circuit builder package that allows you to import/export a circuit as a JSON?

I've done a superficial search in each of the qiskit, cirq, and braket open source repositories for such a feature, but can't find any explicit examples of this functionality. I'm wondering if anyone ...
0
votes
0answers
17 views

FRQI wrong interpretation

I try to use FRQI https://qiskit.org/textbook/ch-applications/image-processing-frqi-neqr.html with the same circuit. Suppose I have the following image: and the flatten representation is [0 100 200 ...
8
votes
2answers
365 views

Minimum number of 2 qubit gates to build any unitary

Any unitary $U$ acting on $N$ qubits can be decomposed in a finite product $U=U_1U_2...U_n$ where every $U_i$ acts on only 2 qubits, for example through decomposition in CNOT, phase shifts and 1 qubit ...
0
votes
0answers
21 views

FRQI for 8x8 image

I read the paper A flexible representation of quantum images for polynomial preparation, image compression, and processing operations and found a scheme for 2x2 images which looks like this: I tried ...
0
votes
1answer
52 views

Understanding Constant Multiplication Circuit for Binary Field - How to Construct Quantum Circuit from Linear Mapping

I was thinking to ask this on Math Stackexchange, but maybe here would be better since I also hope the answers also explain from quantum computation context. Problem So I was reading the paper "...
0
votes
0answers
28 views

Measuring in qiskit collapses onto the Z-Plane. Why do any rotations other than Y matter?

We have the situation where a 50/50 split between $|1\rangle$ and $|0\rangle$. This was done using a $H$-Gate. Now, when measuring in qiskit, if my understanding is ...
4
votes
1answer
70 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 ...
0
votes
0answers
43 views

Four-qubit error correction code

$\newcommand{\ket}[1]{\left|#1\right>}$ Consider the following 4-qubit code which allows you to detect a bitflip and/or a phaseflip. The logical 0 and 1 are encoded as: \begin{align*} \ket{0}_{...
3
votes
1answer
551 views

Understanding the implementation of Grover's diffusion operator using the oracle qubit

I have two gates here for the Grover diffusion operator. The first gate is completely understandable for me, so I implemented it myself after submitting some papers that I read. This is the first ...
1
vote
0answers
25 views

How to detect and correct swap errors in a quantum circuit?

Let's assume that I have a density matrix $\rho$ that consists of $N$ qubits. If this density matrix undergoes an error-channel that swaps any two qubits with an equal probability, i.e. $$ \mathcal{E}(...
5
votes
1answer
57 views

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

When reading this question and quickly reading some of the linked papers, I wondered why was the number of $T$ gates specified along the number of controlled-$X$ gates. I've often read that ...