Skip to main content

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
1 vote
1 answer
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 ...
Muhammad Ikhwan Perwira's user avatar
0 votes
1 answer
60 views

Modify a quantum state prepared with HHL [closed]

I can prepare a state $|1\rangle|x\rangle|0\rangle$ using HHL. How do I prepare $|1\rangle|x\rangle|0\rangle+|0\rangle|y\rangle|0\rangle$ or simply $|1\rangle|x\rangle|0\rangle+|0\rangle|0\rangle|0\...
Shakir1ahmed3's user avatar
0 votes
0 answers
48 views

Find inner product or coefficient from a quantum state in quantum circuit and qiskit [closed]

From a 4 qubit circuit, I prepared state $|w \rangle = a|1000\rangle + b|1010\rangle +c|1110\rangle$. Now I need to find 'a' with sign(+/-), that is I want to find $\langle 1000|w\rangle$. How do I ...
tra sh's user avatar
  • 1
1 vote
0 answers
32 views

Forward propogation of rotated clifford gates in lattice surgery

In A Game of Surface Codes (arXiv), I have been trying to understand the process that is described for forward propogating rotated clifford gates through other rotated clifford gates, and either I am ...
GaussStrife's user avatar
  • 1,095
1 vote
1 answer
41 views

How would you write $ e^{i \frac{\pi}{4} \text{CNOT}}$ in ZX calculus?

How would you write $ e^{i \frac{\pi}{4} \text{CNOT}}$ operation in ZX calculus? Is there any simple method to write gates of the form $e^{i \frac{\pi}{4} \sigma_z^{(1)} \sigma_x^{(2)}} $?
HypnoticZebra's user avatar
0 votes
2 answers
54 views

Is there a generalized quantum teleportation for n-qubit entangled states? [duplicate]

Quantum teleportation for single qubit is a fairly simple algorithm to follow. Even its extensions into the transportation of $n$ qubits is fairly simple: repeat the process $n$ times (or run $n$ ...
Alan Whitteaker's user avatar
2 votes
1 answer
194 views

How to prepare a superposed state?

Given two arbitrary states, $|\psi\rangle\ \text{and}\ |\phi\rangle$ that are possibly unknown to the preparer, is there a way to prepare the superposition $|\psi\rangle+|\phi\rangle$ of them? (If it'...
Shadumu's user avatar
  • 343
-1 votes
1 answer
107 views

Does this quantum circuit reproduce the oracle in Deutsch's algorithm?

This seems to me a fine quantum oracle for the balanced one bit function $f(x)=x$, but putting it in Deutsch's algorithm circuit will give the result $|0\rangle$, i.e. the function is evaluated as ...
Rafi Moor's user avatar
0 votes
0 answers
20 views

Encoding electron-phonon interactions in a quantum computer

I am trying to encode superposition of coherent-like states, that represent electron-phonon couplings on a chain, in a quantum computer. Specifically, I would like to (approximately) generate states ...
Arnab's user avatar
  • 221
1 vote
0 answers
24 views

Parameterized Gates [duplicate]

I am trying to create my own custom parameterized gate and then transpile it to the AerSimylatorGate. I have been able to create the virtual circuit but in the transpilation to the backend basis set ...
Guillermo's user avatar
0 votes
1 answer
45 views

Uniformly sampling a random 3 qubit clifford gate

I try to uniformly sample 3 qubit clifford gates and apply them to my circuit. I'm using python language. I'm following this paper https://arxiv.org/abs/quant-ph/0406196 (Supplementary Materials 1....
Hui's user avatar
  • 1
3 votes
1 answer
275 views

Is the outcome of this quantum circuit correct and if so why?

I am very novice with quantum computing and try to understand it. I thought I was getting a handle on it until I built the quantum circuit (1) below. The app I used to build it allows me to measure ...
user3635700's user avatar
0 votes
1 answer
69 views

Decrease the entangled state space

I have a circuit containing two entangled qubits in a 4D vector $\begin{bmatrix} A \\ 0 \\ 0 \\ B \end{bmatrix}$, Is there a way to encode the amplitudes $A$ and $B$ into a single qubit? I want to ...
Medulla Oblongata's user avatar
1 vote
0 answers
15 views

How to use GoemansWilliamsonOptimizer from qiskit_optimization.algorithms?

I have created a big instance of a max cut problem, which is in a QuadraticProgram. Now when I try to do this: ...
Another Random Guy's user avatar
2 votes
1 answer
95 views

Efficient creation of a modular multiplicative inverse gate using Fermat's Little Theorem

I'm wondering if anyone has ever stumbled upon an efficient way to create a gate that can calculate the multiplicative modular inverse in $\mathbb{Z}_p$, it may even be that somebody has stumbled upon ...
LukasM's user avatar
  • 73
3 votes
0 answers
49 views

Do we really apply both single-qubit and two-qubit gates in the same layer in experiments?

I'm doing experiments using superconducting computers, and my question is as follows: Performing quantum gates requires isolating the coupling between a target qubit and other neighboring qubits. To ...
jtlearner's user avatar
0 votes
0 answers
21 views

Process Tomography and transpiler not running and eventually crashing kernel

I am running a Quantum Process Tomography on a circuit with a custom pulse added to a calibation for a CNOT gate. Upon running the circuit, running it on the backend takes forever and eventually ends ...
idislikecoding's user avatar
1 vote
0 answers
26 views

QMA-QCMA oracle with quantum gates

While reading the QMA-QCMA paper by Aaronson and Kuperberg I wondered how their result extends to quantum circuits. Suppose you have an oracle $O$ such that $O\left|\psi\right>=-\left|\psi\right>...
nippon's user avatar
  • 1,557
0 votes
0 answers
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. ...
idislikecoding's user avatar
0 votes
0 answers
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 ...
HGS's user avatar
  • 11
1 vote
1 answer
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$ ...
Paulo's user avatar
  • 13
1 vote
1 answer
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 ...
Soumyadeep sarma's user avatar
0 votes
1 answer
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. ...
idislikecoding's user avatar
0 votes
0 answers
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 ...
Another Random Guy's user avatar
2 votes
0 answers
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}...
qubitzer's user avatar
  • 894
1 vote
0 answers
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 ...
whooie's user avatar
  • 11
1 vote
1 answer
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 ...
Manu's user avatar
  • 53
2 votes
0 answers
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 ...
Lucas H's user avatar
  • 21
1 vote
1 answer
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. ...
user3116936's user avatar
1 vote
2 answers
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 ...
deb2014's user avatar
  • 321
2 votes
0 answers
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 ...
trillianhaze's user avatar
0 votes
0 answers
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 ...
AishM's user avatar
  • 1
1 vote
2 answers
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: ...
Amir Naveh's user avatar
1 vote
1 answer
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, ...
SescoMath's user avatar
  • 559
-5 votes
1 answer
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 ...
martinrhan's user avatar
1 vote
0 answers
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. ...
Lee's user avatar
  • 21
1 vote
1 answer
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 ...
Manish Kumar's user avatar
0 votes
1 answer
125 views

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

Consider the following code: ...
Vikram Dorbala's user avatar
3 votes
0 answers
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 ...
tangyao's user avatar
  • 171
0 votes
0 answers
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 ...
playdis's user avatar
  • 101
0 votes
2 answers
811 views

Where do I create my first circuit?

I want to get the result of this code: ...
Ritvik Chowdary's user avatar
3 votes
3 answers
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 ...
upe's user avatar
  • 311
1 vote
0 answers
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 ...
mavzolej's user avatar
  • 2,081
1 vote
0 answers
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 ...
trurl's user avatar
  • 141
2 votes
0 answers
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 ...
Rij's user avatar
  • 53
2 votes
1 answer
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 ...
user2521987's user avatar
0 votes
1 answer
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. ...
Lucas H's user avatar
  • 21
0 votes
0 answers
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 ...
Lucas H's user avatar
  • 21
0 votes
0 answers
20 views

How can I find out how compatible a quantum circuit is to a backend without executing the circuit

Say I have multiple backends, I need a score to determine how well a backend is suitable for that particular circuit, I have it's noise model too, I tried transpiling the circuit and calculating noise ...
Vishnu Vardhan's user avatar
1 vote
1 answer
57 views

Quantum circuit of stateful oracle

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 ...
Georgii Firsov's user avatar

1
2 3 4 5
12