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

570 questions
Filter by
Sorted by
Tagged with
1 vote
69 views

### Why does quantum circuit need to be run even though the probability is already in the formula?

In classical computing, it's clear by intuition why we need to run a program code to check whether a large odd integer number is prime or not. It can be computed manually for such large number, but of ...
60 views

• 1,557
19 views

### Custom pulse with fake backend not running for Cross Resonance Pulse

I am trying to create a cross resonance pulse by driving the control qubit at a non resonant frequency. My code runs but does not stop running. ...
67 views

### Reconstruction of the probability of the uncut state fails

I tried to follow the example from the paper "CutQC: Using Small Quantum Computers for Large Quantum Circuit Evaluations" (https://arxiv.org/abs/2012.02333). Some hints were also given in ...
• 11
1 vote
59 views

### States that verify behaviour of Pauli operators in Clifford circuits

I have a circuit composed of Clifford gates and Pauli-basis measurements. I am also told that a set of Pauli operators $P = \{ P_1, P_2, ..., P_n\}$ commute with the circuit. When I say that $P_i$ ...
• 13
1 vote
95 views

### How does qiskit implement a given superposition in the actual quantum computer?

My question is phrased in 2 parts: Is there a quantum circuit to implement the following 4-qubit state: $$\frac{1}{2}(|1000 \rangle + |0100 \rangle + |0010 \rangle + |0001 \rangle)$$ When we use the ...
57 views

### How to convert from choi to chi matrix in qiskit

I have done a quantum process tomography experiment on a two qubit system. ...
44 views

### Qiskit's Integer Comparator

Does the IntegerComparator from qiskit.circuit.library works fine, or am I doing something wrong in understanding it's working? I'm working with this simple ...
34 views

### Why does a random circuit produce an XEB fidelity of $\chi \approx 2$? [duplicate]

Background In this paper (section 10), the linear cross-entropy benchmark (fidelity) for a random circuit $C$ and samples $s_i$ taken from that circuit is defined as \chi := \frac{2^n}{k}\sum^k_{i=1}...
• 894
1 vote
53 views

### How is projective measurement usually handled in matrix product state-based simulators?

I decided to write my own matrix product state (MPS)-based quantum circuit simulator. I've got my head all wrapped around the usual things for this like gate application and how Schmidt decomposition ...
• 11
1 vote
83 views

### Different notations for measurement gates: what is meant by $0$ after a measurement?

I am relatively new to quantum computing I am confused with different notations for measurement gates in quantum computing as shown below https://arxiv.org/pdf/2205.00081 I really donot understand ...
• 53
97 views

### Which 5-qubit QEC circuits can simulate magic state distillation?

Theoretically, any 5-qubit error correction code's decoding circuit should be able to implement magic state distillation, but I have tried many circuits for simulating magic state distillation, and ...
• 21
1 vote
61 views

### Parametric circuits and QASM3 in Qiskit v1.1.0

I am currently exploring Qiskit v1.1.0 and its handling of QASM3. The following snippet demonstrates the creation of a parametric circuit and the generation of its corresponding QASM3 code. ...
• 293
1 vote
58 views

### State and observable decomposition into a sequence of native/universal gates

Given a quantum register $q_{0},\dots, q_{n-1}$ composed of $n$ qubits, I wonder if there exists a general mathematical framework to generate the quantum circuit to put this quantum register in a ...
• 321
42 views

### Defining quantum computer without reference to a classical computer

In the definition of an "efficient quantum computer", there is a uniformity condition that suggests to me that the notion of an efficient quantum computer is not independent of the notion of ...
• 519
30 views

### Solving variables in symbolic unitary to get a desired real-valued unitary using qiskit or qympy, qiskit-symb/pytket

I am trying to decompose a 4x4 unitary into 2 qubit circuit using U3 and CNOT gates but the circuit implementation qiskit gives me is not optimized. So I started looking at qiskit-symb and qympy to ...
1 vote
203 views

### How to implement a quantum multiplier in Qiskit 1.0

I am looking at the homepage of Qrisp, and they have an example of how to multiply two registers with Qiskit: ...
1 vote
48 views

### Verifying block encoding by computing inner products

Assume that we know each matrix element $A_{ij}$ of a $n$-qubit matrix $A$, and we are given an $(n+m)$-qubit unitary $U_A$ that we would like to verify is a $(1,m)$-block encoding of $A$. To do this, ...
• 559
90 views

### Why is the matrix representation of CNOT gate valid

$\begin{bmatrix}1&0&0&0\newline 0&1&0&0\newline 0&0&0&1\newline 0&0&1&0\end{bmatrix}$ Obviously, given any $4\times 1$ matrix, it fixes the first two ...
1 vote
38 views

### Will my custom gate actually spin when I run it on real hardware?

I am trying to create a custom gate using Qiskit Pulse and use it in my quantum circuit. Below is the code I have written so far. ...
• 21
1 vote
108 views

### An equivalent classical circuit for Hadamard gate

In principle, we can simulate any Quantum circuit via a classical circuit. However, this simulation could be inefficient. (Church-Turing thesis) Together, Hadamard and Toffolli are universal gate sets ...
• 827
125 views

### Unable to extract the quantum registers information from qiskit quantum circuit data

Consider the following code: ...
33 views

### methodology for design quantum circuits according to a given unitary

This is a general question. Given an arbitratry unitary matrix. How to desigin a quantum circuit to implement it? I am not asking for a specific unitary matrix, but for a general methodology to tackle ...
• 171
17 views

### How to plot a histogram of a pulse-level quantum circuit simulation in QuTiP?

The qutip_qip package allows for pulse-level quantum circuit simulation, compared to for instance the gate-level quantum circuit simulation found in Qiskit (to understand the difference, scroll to the ...
• 101
811 views

### Where do I create my first circuit?

I want to get the result of this code: ...
73 views

### Interpretation of a circuit that yields the same result for initializations $|+\rangle$ and $|-\rangle$

How can I interpret a quantum circuit that results in the same state for the initialization $\newcommand{\ket}[1]{|#1\rangle}\newcommand{\bra}[1]{\langle #1|}\ket{+}$ and $\ket{-}$? For example, the ...
• 311
1 vote
24 views

### Highly-efficient $n(n+1)$?

Appendix G of this paper provides a highly-efficient way of squaring integer numbers. (LMK if anything more advanced is already available.) I'm wondering if this approach can be easily modified to ...
• 2,081
1 vote
39 views

### A maximally distant unitary from a parameterized circuit

I have a parameterized circuit that includes a certain number of rotation gates, each parameterized by an angle. By sampling over these angles, I can obtain various unitaries. What are the unitaries ...
• 141
42 views

### Is there a fix for the varying numerical gradients calculated in the optimizer with qiskit?

I am currently trying to train a quantum circuit on Qiskit using an Azure QPU. I have some parameterized gates that I optimize using ADAMs. However, as the output of the circuit $f(x)$ is not ...
• 53
90 views

### Showing the Toffoli gate can be constructed from one-qubit gates using computer matrix multiplication

I need help coming up with the code that I can use in a computer algebra system like Sage, Python, or Mathematica that can evaluate the circuit. I am not a programmer and used ChatGPT to try to help ...
• 351
34 views

### Two Quantum State Density Matrices with Unequal Off-Diagonal Elements but Equal Magnitudes

I recently read Kitaev's paper on magic state distillation. I want to verify whether the circuit for the [5,1,3] encoder can map a single qubit state T_0 to the logical state T_1 in the encoded space. ...
• 21
28 views

### Difficulties Encountered in Simulating Quantum Purification Circuits for Magic State Distillation

Recently, I've been studying Kitaev's paper on magic state distillation. Referring to Nathan Babcock's presentation, I wrote a program in MATLAB to simulate the purification circuit. Instead of the ...
• 21
Suppose I have operator $U_f$ that maps state $|x\rangle|y\rangle|0\rangle$ to another state $|x\rangle|y\rangle|f(x, y)\rangle$. The function $f$ has its internal state, that changes on each ...