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
0 answers
15 views

How to introduce non-linearity into a quantum circuit?

What are the known ways to encode or introduce non-linear functions/operators into a quantum circuit?
ty.'s user avatar
  • 143
1 vote
1 answer
22 views

How to suppress long parameters list that appears in the initialize gate?

Below is a simplified code which I am using for a quantum circuit. ...
Shravan Patel's user avatar
0 votes
0 answers
16 views

BQSkit Selecting Starting Circuit Structure

Background On the BQSKit repository, there is a nice example of using the qfactor algorithm to instantiate a 3-qubit Toffoli circuit. For this to work, however, it is first necessary to specify an ...
Shadow43375's user avatar
0 votes
0 answers
34 views

Proof that if W is the image of a Unitary operator with an $n^O(1)$ size quantum circuit, then $R_W$ has an $n^O(1)$ circuit as well

I have been working on the following problem Suppose $H$ is the Hilbert space of n qubits. Let $W_0$ be the subspace of $H ⊗ H$ with basis $|x_0⟩$, x = 0,...,N −1 where $N = 2^n$. Suppose $U$ is a ...
user145282's user avatar
1 vote
0 answers
33 views

How to convert QUBO (with non-zero diagonal elements) to Maxcut?

I want to solve QUBO with non-zero diagonal elements in matrix Q using QAOA. But I want to solve for a large enough problem size (30+ variables) and hence want to divide my circuit into subcircuits. ...
Oleksii's user avatar
  • 11
1 vote
1 answer
41 views

Why are qubits initialized to $|0\rangle$ in parametrized quantum circuits?

Given a paramterised quantum circuit with adjustable gates, why do you need (why is it common) to initialise the qubits of the circuit at $|0\rangle$. What is the classical interpretation of this?
Rij's user avatar
  • 23
2 votes
0 answers
46 views

Layout error with after compilation with custom Qiskit pass manager

I am trying to implement the custom Qiskit pass manager from this paper. The code from the authors is provided here on GitHub. I am able to get the pass manager working, and a compiled circuit is ...
greelious's user avatar
  • 121
1 vote
1 answer
51 views

Simulating Large Quantum Systems with Single T-Gate in Qiskit: Memory Error Beyond Certain Qubit Threshold

I'm currently conducting experiments on unitary t-designs, utilizing random Clifford and T gates within the Qiskit framework. My goal is to simulate quantum circuits that involve the application of a ...
Asim Sharma's user avatar
3 votes
1 answer
42 views

In what limit does the estimator sample variance converge to the Cramer-Rao bound?

In the context of a single phase estimation problem of a quantum photonics experiment (related post). For example consider a 3-photon quantum circuit (such as the Mach-Zehnder which depends on some ...
John Doe's user avatar
  • 881
2 votes
1 answer
64 views

Getting rid of extra qubits without changing phase

If I have the state $\frac{1}{\sqrt2}|0000\rangle + \frac{e^{i\phi}}{\sqrt2}|1111\rangle$ and need to get $\frac{1}{\sqrt2}|0\rangle + \frac{e^{i\phi}}{\sqrt2}|1\rangle$, does anyone have any ideas ...
bruhcobell's user avatar
1 vote
0 answers
19 views

qml.StronglyEntanglingLayers custom CNOT placement

The qml.StronglyEntanglingLayers function works great for what I need. However, I'd like to modify so that for each layer, only the first qubit is the control and the rest are targets of the control ...
TuktukTaxi's user avatar
0 votes
2 answers
69 views

Help finding mistake when modifying $T$ injection protocols

I am a little confused about where I am going wrong when computing the action of the following circuit: My understanding is that the CNOT gate acts on the second qubit as a control and the first ...
am567's user avatar
  • 569
1 vote
1 answer
70 views

How do I get the unitary matrix of a circuit?

I'm studying on this textbook but the library has changed meanwhile and running those instructions on my IBM quantum learning notebook will result in errors. What's the current way to draw the unitary ...
Antonio's user avatar
  • 13
4 votes
1 answer
113 views

Can you decompose a 4-qubit Toffoli gate (CCCX) into basic gates without an ancillary state?

I have a problem relevant to the circuit depth of a $\text{CCCX}$ gate, but I can't find any literature on decomposing this gate into basic gates without an ancillary qubit. Is this possible, and are ...
Braedin Tabler's user avatar
0 votes
1 answer
98 views

Hello world program in Qiskit 1.0 [closed]

How do I write a "Hello world" program in Qiskit 1.0, which should be run on IBM cloud and require less than 600 seconds for implementation?
Ausaf Hussain Akhlaq's user avatar
0 votes
0 answers
38 views

How to decompose a permutation matrix into two-level unitary matrices?

Assume a have a SBox and want to make quantum circuit for it. The unitary transform matrix for a SBox is special - a permutation matrix. I found an algorithm to decompose any unitary matrix into two-...
Huy By's user avatar
  • 83
1 vote
1 answer
102 views

What is the formula for the matrix representation of a general controlled gate?

Suppose I have $n$-qubit circuit. I have a single-qubit gate (e.g. a Pauli gate) at qubit $a$ and it is controlled by the qubit $b$. What is the matrix representation for this controlled gate? The ...
user1747134's user avatar
1 vote
1 answer
47 views

Circuit equivalence for cotrolled-controlled-$R_y$ gate

Could someone explain the following equivalence to me? I can build an example for the case when the first two lines of qubits are equal to 1. However, what happens if they are both equal to 00, 01 or ...
aghin00's user avatar
  • 129
0 votes
1 answer
33 views

Synthesizing quantum circuits from unitary matrices vs quantum state vectors, and determining qubit entanglement

I'm studying how to build quantum circuits and understand qubit entanglement. The following are my two confusing questions. I would greatly appreciate any assistance or insights regarding these ...
Jayce's user avatar
  • 1
-1 votes
1 answer
91 views

How to calculate a density matrix of a given circuit?

I want to find the density matrix of the following quantum circuit, is it correct: [[0.12499999+0.j 0.12499999+0.j 0.12499999+0.j 0.12499999+0.j 0.12499999+0.j 0.12499999+0.j 0.12499999+0.j 0....
Frank Hansen's user avatar
1 vote
1 answer
84 views

How to find an equivalent circuit without ancilla qubits?

$\newcommand{\ket}[1]{|#1\rangle}$ I have the following quantum circuit: (The inner qubits are both initialized to $|i\rangle$. $U$ is a arbitrary quantum gate.) But I am only interested in the ...
upe's user avatar
  • 223
2 votes
0 answers
56 views

Modelling Mach-Zehnder and saturating Cramer-Rao bound

I am simulating (using Mathematica) a Mach-Zehnder interferometer, with photon counting measurements at the end (based on the setup described in the recent post) for the input state $|\psi\rangle:=|0,...
John Doe's user avatar
  • 881
3 votes
1 answer
39 views

Unexpected Rotations in QFT Implementation with Qiskit vs. Expected Behavior in Quirk

I'm working on implementing the Quantum Fourier Transform (QFT) using Qiskit. I've encountered an issue where unexpected rotations occur in the presence of a Hadamard circuit, which contrasts with the ...
Alessio Puppi's user avatar
2 votes
1 answer
57 views

Fisher information from likelihood function for discrete quantum case

In the context of a single phase estimation problem of a quantum photonics experiment. For example consider a 3-photon quantum circuit (such as the Mach-Zehnder which depends on some phase shift ...
John Doe's user avatar
  • 881
0 votes
0 answers
40 views

How to calculate the state vector of a circuit using sampler().run()

I run a circuit using: jobCircuit = Sampler(backend).run(circuit) resultCircuit = jobCircuit.result() How can I access to a state vector of the circuit? I tried ...
alejandra's user avatar
0 votes
0 answers
54 views

How to Correctly Measure All Qubits in a Quantum Circuit?

Description: I'm currently working on a project that involves running quantum circuits as a hybrid job on the aws tensor network simulator 'tn1'. Error on the Cloudwatch logs:...
Neel's user avatar
  • 11
3 votes
1 answer
66 views

Understanding how to solve group isomorphism given the state $\sum_{\pi \in S_n} |\pi(G) \rangle$

Let $G=([n],E)$ be an undirected graph, which is represented by a $n \choose 2$ bit string, by indicating for each $i < j$ if $(i,j) \in E$. And let $| G \rangle$ be the $n \choose 2$ qubit state ...
Gabi G's user avatar
  • 199
0 votes
1 answer
66 views

Ancilla qubit error spreading to multiple data qubits?

In this paper, the author considers a four qubit stabilizer circuit shown below. Note that the first four qubits from the top are data qubits and can be in any state (here we just put them in $\vert ...
user1936752's user avatar
  • 2,925
1 vote
2 answers
47 views

How to Properly Run a Circuit with Qiskit on AWS Braket, AttributeError: 'AwsDevice' object has no attribute 'configuration' by Current Implementation

Description: I'm currently working on a project that involves running quantum circuits as a hybrid job on the aws tensor network simulator 'tn1'. However, I'm encountering some issues when trying to ...
Neel's user avatar
  • 13
1 vote
1 answer
59 views

How can fault tolerance be understood from the perspective of detecting regions in a circuit?

The language of detectors and detecting regions in the context of quantum error correction is introduced in https://arxiv.org/pdf/2302.02192.pdf. Detecting regions seem to be capable of specifying ...
Ezequiel Rodriguez Chiacchio's user avatar
1 vote
0 answers
15 views

Action of below circuit using heisenberg representation

Can someone please explain how the above gate affects logical operators? My understanding is that the circle indicates that we are measuring the second qubit? My initial guess is that it is equivalent ...
am567's user avatar
  • 569
1 vote
1 answer
27 views

Reusing Parameters for Multiple Runs with Qiskit's SPSA Optimization

I am using Qiskit's SPSA optimization algorithm to find the ground state energy of various lattices (Fermi-Hubbard model) by running different circuits through it and having the algorithm modify the ...
Nidhish Sharma's user avatar
1 vote
1 answer
70 views

How to figure out the action of a circuit form its effect on logical operators?

I am looking at the following circuit from "The Heisenberg Representation of Quantum Computers" by Daniel Gottesman. I understand how the circuit acts on the logical operators. I understand ...
am567's user avatar
  • 569
2 votes
0 answers
23 views

How can i label input and output ports of my QuantumCircuit in qiskit?

I made quantum circuits as quantum gates then later used these gates in a larger circuit. Here, the input ports of the block (which is the gate) are labelled by integers but i want to custom label ...
Syed Shahmir Kazmi's user avatar
1 vote
1 answer
32 views

What is the explicit action of the following circuit?

Would somebody please be able to explain the action of this circuit to me? (Taken from Arthur Pesah's blog post "Computing with Quantum Codes using Transversal Gates") I understand overall ...
am567's user avatar
  • 569
3 votes
1 answer
42 views

Can I postpone a Pauli gate $X$ over a conditioned measurement $Y$ or $X$?

The above circuit shows a first measurement, which is $\langle X \rangle$ or $\langle Y \rangle$, depending on the outcome of a second measurement. Assuming now that a third measurement decides ...
Daniele Cuomo's user avatar
0 votes
0 answers
32 views

How can I measure output distributions at different count intervals? (i.e. measure output at 100 shots, at 200, etc...)

So, this is more of a code question rather than a theoretical question. I am working on project and I need to measure the output distributions at various shot intervals. I am currently using a simple ...
lookreachbrush's user avatar
1 vote
1 answer
130 views

How to make sense of `Pauli observables` in the gate cutting code here?

I am following the tutorial mentioned in the circuit-knitting-toolbox. This tutorial explains how you can replace non-local gates with local operations in the superoperator representations and ...
user avatar
-1 votes
1 answer
34 views

Transpiled circuit with optimization level 3 error in IBMbackend.run() method. (Key Error 16, 22)

when I try to use the method backend.run() with a transpiled circuit with optimization level 1-3 an error occurs. My code: When I don't specify any optimization level it works. The backend.name is ...
QuantumS's user avatar
2 votes
1 answer
83 views

How to find a quantum circuit to generate a target state?

I am starting in Quantum Computing, but I am pretty lost, sorry... let's say I need to design a quantum circuit to generate some given quantum states in Dirac's notation, as in the following example, ...
xCovelus's user avatar
  • 123
2 votes
1 answer
420 views

How to construct a quantum circuit for quantum Fourier transform in a prime dimensional Hilbert space?

This problem is given as a problem in Nielsen and Chuang. Consider a Hilbert space of dimension $p$ where $p$ is a prime number. Quantum Fourier transform (QFT) in this space is defined as $$ |j\...
Abu Saleh Musa's user avatar
1 vote
1 answer
41 views

Reducing the text content inside a custom quantum gate in Qiskit

I have prepared a parameterized custom quantum gate in qiskit by converting a quantum circuit into a gate through QuantumCircuit.to_gate(). However, the text ...
user9043261's user avatar
2 votes
1 answer
53 views

Advantage of backward analysis of a circuit over forward analysis in Stim

I'm trying to understand the theory behind how a Stim Detector Error Model is created from a circuit. It is mentioned in the documentation that during analyzing the errors in the circuit, the circuit ...
curiousquantum's user avatar
0 votes
1 answer
60 views

What are the purposes of circuit gates in addition to matrix presentation

If quantum circuit gates can be presented as a matrix, are there any other qualities for the circuit gates except for a compact presentation of a matrix?
Avi's user avatar
  • 153
1 vote
2 answers
136 views

Can any matrix be translated into a quantum circuit?

Can any matrix be translated into quantum circuit? Is there any limitation to the qubits length or any other constraints to the matrix? Can any matrix be presented by a unique quantum circuit or are ...
Avi's user avatar
  • 153
4 votes
1 answer
271 views

Qiskit reverse_bits is not equivalent to swapping qubits

For three qubits, I thought swapping the first and third qubit is equivalent to vertically flipping the circuit. However, performing one and then the other in Qiskit returns two different operators, ...
Dylan VanAllen's user avatar
3 votes
1 answer
136 views

How to devise a flag qubit scheme for concatenated codes?

This flag qubit idea was introduced by Rui Chao and Ben Reichardt, last year when I read the paper [arXiv:1705.02329] I thought I understood fully. But today as I revisit I found myself still a bit ...
AndyLiuin's user avatar
  • 165
2 votes
1 answer
64 views

How to compute the gate matrix for an operation on qubits not next to each other

I have a quantum circuit with 4 input qubits, A, B, C, and D. A is at the top, D is at the bottom. If I wanted to do a CNOT between B and C and leave A and D alone, I know the gate matrix for this ...
Pro Q's user avatar
  • 993
0 votes
1 answer
55 views

Would anything change if a qubit was made out of anti-matter?

If you had a QC system with an arbitrary number of qubits and an arbitrary number of anti-qubits (qubits made of anti-matter, e.g. a positron), how would the interactions (e.g. gates) and the circuit ...
K0mp0t1k's user avatar
1 vote
1 answer
39 views

How to compute the state resulting from measuring a single photon in a cluster state?

I was reading the book ''Introduction to Optical Quantum Information Processing" by Pieter Kok and Brendon Lovett and on page 199 they talk about cluster states and the circuit model of Quantum ...
physics22's user avatar

1
2 3 4 5
11