As of May 31, 2023, we have updated our Code of Conduct.

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)

81 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
259 views

What is a gate-level circuit used in the 2022 Jafferis et al. experiment on Sycamore?

A recently published Nature paper of Jafferis et al. describes an experiment with a handful of qubits performed on Google's Sycamore processor to explore the SYK model in the context of AdS/CFT and ...
Mark Spinelli's user avatar
5 votes
0 answers
71 views

What is the computational complexity of decomposing operators in terms of quantum gates?

I have recently worked on a problem involving a rather large Hamiltonian, which I wrote some Python code for its generation following the method in this paper. No when I used qiskits ...
greilchri's user avatar
5 votes
0 answers
100 views

How are Toffoli and a basis-changing single-qubit gate universal?

The Toffoli and Hadamard gates are universal for quantum computing: you can approximate any unitary up to arbitrary precision with a circuit built from these two gates. This is proved for example by ...
Chris Heunen's user avatar
5 votes
0 answers
49 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?
James Ellis's user avatar
5 votes
2 answers
159 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 ...
quantum's user avatar
  • 555
3 votes
0 answers
44 views

Is circuit cutting equivalent in anyway to quantum teleportation?

I've been introduced recently to circuit cutting, and after seeing the 4 orthogonal measurements with their 8 corresponding initializations but no initial transfer of classical info, the first thing ...
Guillermo Abad Lopéz's user avatar
3 votes
0 answers
83 views

Clifford gates constructed from CNOT, H and S gates

Trying to prove that all Clifford gates can be constructed with CNOT, H and S gates, I'm following the classical path by induction (Nielsen and Chuang, Quantum Computation and Quantum Information -- ...
JMark's user avatar
  • 43
3 votes
0 answers
74 views

Help Implementing a 4-qubit super dense coding algorithm

I am new to quantum computation, I have seen examples of super-dense coding; however, I am struggling in my attempts to scale the 2-qubit system to a 4-qubit, here is a visual of the 2-qubit super-...
ajhill1's user avatar
  • 31
3 votes
0 answers
90 views

How to construct a quantum circuit that given $|\psi_0\rangle,|\psi_1\rangle$ outputs $\frac{1}{c}(|\psi_0\rangle+|\psi_1\rangle)$?

Suppose I have two arbitrary quantum states $\lvert \psi_1 \rangle $ and $\lvert \psi_2 \rangle$. Further suppose that we know $U_1$ such that $\lvert \psi_1 \rangle = U_1 \lvert 0 \rangle$, but we ...
Jon Megan's user avatar
  • 455
3 votes
1 answer
139 views

How to design a RF-SQUID qubit by Qiskit Metal?

I am now learning how to use Qiskit Metal to design superconducting circuits. I found that there are only several transmon qubits in the library. Can I design an RF-SQUID qubit by using Qiskit metal? ...
qcnewbie23's user avatar
3 votes
0 answers
84 views

Writing circuits in Qiskit using only Clifford and T gates

Is there a way in Qiskit to write my circuit using only Clifford and T gates (CX, S, H, T and I think also $S^\dagger$ and $T^\dagger$)? With the function compile (with aer simulator) it gives me some ...
stopper's user avatar
  • 333
3 votes
0 answers
105 views

How to efficiently construct quantum circuits of oracles in multi-target quantum search?

In standard Grover's quantum search with only one target or its extension of multi-target quantum search, one of the two key parts is to quantize the boolean function $$f(x):\{0,1,\cdots,N-1\}\...
Chao-Hua Yu's user avatar
3 votes
0 answers
56 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 ...
BlackHat18's user avatar
  • 1,119
3 votes
0 answers
54 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 ...
Julio César JX's user avatar
3 votes
0 answers
130 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 ...
forky40's user avatar
  • 5,725
2 votes
1 answer
32 views

What is the probability of measuring in the following circuit?

So given the circuit and $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ above I would like to see what the probabilities of each possible measurement are. To do this I tried expanding the circuit ...
Piotr's user avatar
  • 21
2 votes
0 answers
34 views

Quantum circuit runtime

I want to estimate the execution time of some experiments, and I would be interested to know how the time needed to run a quantum circuit grows in function of the number of qubits and the parametric ...
barrieta's user avatar
2 votes
0 answers
32 views

Can we show that a quantum circuit with Poly(n) gates has a Hamitonian with Poly(n) terms?

It is already known that if the Hamiltonian is a sum of Poly(N) Pauli terms, it has an efficient implementation as a quantum circuit. This should mean that the circuit can be implemented with Poly(N) ...
Kira N's user avatar
  • 21
2 votes
0 answers
37 views

Converting from amplitude encoding to basis encoding

The question is inspired from Preparing a quantum state from a classical probability distribution which shows how basis encoding $\frac{1}{\sqrt n}\sum_{x=0}^{n-1}|x\rangle|p(x)\rangle$ may be ...
Philips's user avatar
  • 31
2 votes
0 answers
57 views

How to use stabilizers to simulate the circuit?

Sorry for this easy questions. That is a simple textbook question but I don't know how to solve it. I have the following circuit: The question was "use stabilizers to simulate the circuit" ...
quest's user avatar
  • 560
2 votes
0 answers
28 views

How to simulate these Floquet and Rotation operators for kicked top model?

In this and other papers relating to the kicked top model, it is mentioned that spin coherent states can be expressed as: $$\left|\theta,\phi\right>=R(\theta,\phi)\left|j,j\right>$$ for given ...
akkh's user avatar
  • 41
2 votes
0 answers
65 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 ...
Dwye's user avatar
  • 101
2 votes
0 answers
329 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 ...
Jaimin's user avatar
  • 158
2 votes
0 answers
43 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}(...
Turbotanten's user avatar
2 votes
0 answers
180 views

Is there an efficient quantum circuit that create a random permuntation matrix?

Suppose we want to generate a random, random according to some probability distribution, unitary permutation matrix that is applied to an input of $n$ qubits. So is there an efficient polynomial time ...
Learner's user avatar
  • 65
2 votes
0 answers
46 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 ...
BlackHat18's user avatar
  • 1,119
2 votes
0 answers
163 views

Iterative Phase Estimation with noise vs standard Quantum Phase Estimation with noise

I am doing Qiskit Lab 4 about Iterative Phase Estimation. I created a circuit implementing IPE for theta = 1/3 (phase of 2pi/3). Here's the circuit: It seems to do okay if I run it without noise in a ...
Mykolas Sveistrys's user avatar
1 vote
1 answer
22 views

How to best represent 5-Qbit codeword operator in Qiskit

We learned that in the 5-Qibit error correcting code, the logical zero state $ | \bar{0} \rangle $ is encoded in the form of $ \frac{1}{4} (\mathbb{1}+M_0)(\mathbb{1}+M_1)(\mathbb{1}+M_2)(\mathbb{1}+...
Blackwidow's user avatar
1 vote
0 answers
31 views

Improving operator norm bound on total variation distance

Let $U$ be an $n$-qubit unitary and $P_U(x) = |\langle x |U|0^n\rangle|$ the probability of measuring $x$ after acting $U$ on $|0^n\rangle$. For two $n$-qubit unitaries $U$ and $V$, one can prove that ...
trillianhaze's user avatar
1 vote
0 answers
26 views

Question on circuit function evaluation

In this question, from what I understand, the circuit on the right hand side can not be evaluated for f(0) so depending on value of y, we will have two different f(0)s so this equality of circuits ...
Sanjana's user avatar
  • 11
1 vote
0 answers
32 views

Is it possible to design a swap test for three qubits? If it is possible how is it different from 2 and 4 qubits? share the design of the swap test?

Explain the swap test for 2 qubits to find the distance between qubits. Extend the swap test for 3 and 4 qubits. Will the design differ from each other and share the design for both the swap tests?
vector's user avatar
  • 11
1 vote
0 answers
45 views

How to roughly analyze computational complexity of quantum circuit?

I'm looking for just a few simple calculations to analyze complexity when comparing quantum circuits. I'll compare 2 scenarios, and I'd love for someone to critique or verify my analysis: Circuit of ...
IsalanOnkar's user avatar
1 vote
1 answer
33 views

Avoiding garbage amplitudes in block-encoding

Block-encoding is a technique to embed non-unitary operations in quantum circuits. Let's restrict it to just Hermitian operations. Suppose $H$ is some operation. To encode it into a quantum gate $U$, ...
Loic Stoic's user avatar
1 vote
0 answers
72 views

Removing barriers from a QuantumCircuit object in Qiskit

I find barriers useful for visualization purposes, naturally it helps observing a circuit that is separated to some logical segments than just watching a mixture of gates and qubits. However, before ...
Ohad's user avatar
  • 1,624
1 vote
0 answers
66 views

Having trouble trying to program the shor 9 qubit code

I am trying to program in python the following quantum circuit but for some reason when I write the matrix after the z gate, M8, the resultant matrix is zero. The code is: ...
LittleBlue's user avatar
1 vote
0 answers
105 views

qiskit.algorithms.optimizers callback function for all optimizers

I am aware that VQE and VQC factory supports callback functions which can allow us to store intermediate values during optimization through callbacks in its arguments. However my loss function is ...
Manas Sajjan's user avatar
1 vote
0 answers
55 views

IBM composer deletes my circuit

When I work on the IBM quantum composer and I switch to another circuit, my first circuit is destroyed and replaced by the second one. I thought it was a display bug, but when I restart the composer, ...
Jonah's user avatar
  • 23
1 vote
0 answers
43 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:
Oli's user avatar
  • 37
1 vote
1 answer
84 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 ...
Devesh's user avatar
  • 53
1 vote
1 answer
98 views

Qiskit implementation for projecting a hermitian operator and finding its eigenvalues

I'm brand new to quantum computing and have been learning Qiskit for a few weeks now. I am attempting to find the number of 0 eigenvalues of the following operator: $$ T = PHP$$ where $P$ is a ...
pokerfacegoatee's user avatar
1 vote
0 answers
19 views

Encode Matrix Elements on register

I am trying to construct a circuit which makes the following encoding $$O_H \left| i \right> \left| j \right> \left| z \right> = \left| i \right> \left| j \right> \left| z \oplus H_{ij} ...
consthatza's user avatar
1 vote
2 answers
248 views

Gradient descent for a quantum-classical hybrid neural network

I am working on implementing a quantum-classical hybrid neural network in qiskit where input data is encoded on a quantum circuit (with say 3 qubits) using a ...
Ananth_Rao's user avatar
1 vote
0 answers
105 views

Mapping $| y \rangle$ to $(-1)^{x \cdot y}| y \rangle$

I was checking some QC lecture notes by Ronald de Wolf and I came across this exercise that I can't solve. Page 27 (pdf page 35), question 5, part b link: https://homepages.cwi.nl/~rdewolf/qcnotes.pdf ...
user206904's user avatar
1 vote
0 answers
52 views

Equivalence of Topological Quantum Computing and the Quantum Circuit Model

It is my understanding that topological quantum computers are capable of executing an arbitrary quantum circuit with a polynomial overhead of translating the circuit to the native topological ...
Arthur-1's user avatar
  • 505
1 vote
0 answers
52 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 ...
V S's user avatar
  • 11
1 vote
0 answers
29 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 ...
Mohd. Farhan Hassan's user avatar
1 vote
0 answers
48 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 ...
Finn's user avatar
  • 111
1 vote
0 answers
131 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 ...
Ricardo's user avatar
  • 149
1 vote
0 answers
80 views

Working with higher energy states in Qiskit Experiments

I'm looking at the source code for the Qiskit Experiments module and see that the EFRabi class subclasses the Rabi class with the intent of calibrating rotations between the 1 and 2 states instead of ...
QuantumLearner's user avatar
1 vote
0 answers
96 views

Quantum Circuits for Time-Series Data

I am currently working with a dataset with autocorrelated features, i.e, x(t) affects the value of x(t+1) which affects the value of x(t+2). Suppose this is the circuit representing x(t): Does ...
Lakshit Dabas's user avatar