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
2 votes
1 answer
83 views

Quantum circuit implementation of shift operator in quantum walk

I'm considering discrete-time quantum walk on $2\times2$ grid with periodic quantum walk. In particular focus on shift operator which has the form : \begin{equation} S|i,j\rangle \otimes |x,y\...
Young Kindaichi's user avatar
3 votes
2 answers
342 views

AerError: 'unknown instruction: c-unitary' while using control unitary operator

I'm using the following code : ...
Young Kindaichi's user avatar
1 vote
1 answer
60 views

What is the unitary matrix for this two qubit circuit with $H$ and $I$?

Above is a circuit I am provided. I am asked to write down the matrix representation of a $4 \times 4$ matrix representation of a unitary matrix for this circuit. Using small endian notation (left to ...
Physkid's user avatar
  • 520
2 votes
1 answer
175 views

Why is this modular adder so complicated?

I'm trying to construct a controlled modular multiplication circuit and a subcomponent is a modular adder. However, it appears the basic Draper/Fourier adder is already modular. Shouldn't adding $N=2^...
Jackson Walters's user avatar
1 vote
1 answer
83 views

Compute the output of a quantum circuit with classically controlled operations

Consider the following circuit : where $|\psi\rangle$ is a qubit in $\mathbb{C}^2$, $|0\rangle= \begin{pmatrix}1 \\ 0 \end{pmatrix}$, $T= \begin{pmatrix}1 & 0\\ 0 & e^{i\pi/4} \end{pmatrix}$ ...
NotaChoice's user avatar
1 vote
0 answers
54 views

An unexpected result of the Implementation of a finding minimum values algorithm using a qRAM

Motivated by the article Quantum algorithm for finding minimum values in a Quantum Random Access Memory, I'm training to implement a simplified version of the proposed algorithm. But the output isn't ...
j__j's user avatar
  • 11
0 votes
2 answers
99 views

Help debugging implementation of Draper QFT adder

I am attempting to implement the adder found in this paper. Here is the code: ...
Jackson Walters's user avatar
1 vote
1 answer
169 views

Simplifying quantum circuits

I am very new to quantum circuits and am unsure how to simplify them. Say I'm given a very simple circuit: and I want to simplify it using basic quantum gates. I'm not looking for an answer, but more ...
Spike Spiegel's user avatar
3 votes
1 answer
221 views

4 qubit QFT decomposition in the qiskit textbook

I am reading about the quantum Fourier transform (QFT) in the qiskit textbook, but got stuck at the last part of it which shows a decomposed version of the 4 qubit QFT circuit. It seems that the ...
pilsungk's user avatar
1 vote
0 answers
31 views

Can the optimal synthesis of a parity matrix generate complex combinations of CXs?

Consider the method described in Optimal Synthesis of Linear Reversible Circuits. I am led to think that, for any parity matrix given in input to such a method, the output would be a sequence of CX ...
Daniele Cuomo's user avatar
1 vote
0 answers
114 views

MissingOptionalLibraryError: "The 'pdflatex' library is required to use 'LaTeX circuit drawing' [closed]

Trying to run the below code block in a jupyter notebook in Windows 10: ...
ulbgo lee's user avatar
3 votes
0 answers
85 views

Complexity of the quantum circuits that are needed to implement communication protocol?

Consider the following simultaneous communication problem. Alice and Bob do not share any entanglement or any common randomness, and cannot communicate directly with each other. As inputs, x is given ...
Ruben Hoba's user avatar
2 votes
0 answers
38 views

Error in repeated applications of a quantum channel?

Suppose I have two quantum channels. Assume they they consist of $r\in \mathbb{Z}$ applications of unitaries, $U$ and $V$ respectively. Let the error between the channels acting on some state $\rho$ ...
Hans Schmuber's user avatar
1 vote
1 answer
109 views

How to implement non-unitary operator in qiskit?

I am trying to make a operator for S-Box for AES. The matrix is non-unitary. When I use Operator command for declaring it as a function. It gives error, the matrix is non-unitary. Thus, the qiskit ...
Syed Shahmir Kazmi's user avatar
2 votes
1 answer
102 views

Quantum circuits, quantum Turing machine and universal quantum computer-comparing different models of quantum computations

Forgive me if this question was already asked somewhere on this site-I haven't found it but it is possible that I've overlooked it. So basically, I would like to summarize different notions of quantum ...
truebaran's user avatar
  • 133
1 vote
0 answers
30 views

Optimizing Selection of the Optimal Qubit in a 30-Qubit Quantum Circuit

I am working with a quantum circuit consisting of 30 qubits, and for each qubit, I have allocated a dedicated classical register to record individual measurement results. When I execute this circuit ...
Alaa eddine's user avatar
2 votes
1 answer
75 views

Computing the evolution of expectation values of the Pauli observable

I have a quantum state described by $N$ qubits, and I don't know anything about this quantum state except the expectation value of the single-qubit Pauli observables of the $i$-th qubit ($\langle X_i \...
stopper's user avatar
  • 393
0 votes
1 answer
147 views

How do I prove these gate identities?

How do I approach on solving the below two problems?
sriram Usc's user avatar
0 votes
2 answers
120 views

Conditional quantum circuits

Let's suppose that we have the following $\text{GHZ}$-state $$|\psi\rangle = \frac{1}{\sqrt{2}}|a_1a_2a_3a_4\rangle + \frac{1}{\sqrt{2}}|b_1b_2b_3b_4\rangle$$ By using quantum gates, can we evaluate $...
user avatar
3 votes
0 answers
47 views

Understanding circuit to Hamiltonian embedding where we do not have a separate clock register

I am trying to understand the clock construction given in this paper, to embed a circuit to a Hamiltonian, which doesn't need to access a separate clock register. The construction, at a high level, ...
BlackHat18's user avatar
  • 1,293
0 votes
0 answers
46 views

Quantum Crosstalk in gate scheduling with different gates

I am working on quantum crosstalk, specifically on CNOT and SWAP gate operations that lead to crosstalk. I have encountered works that decompose CNOT and SWAP with iSWAP and CZ gates. I would like to ...
Indu's user avatar
  • 9
1 vote
2 answers
247 views

How to design a circuit which produces the state $|\psi\rangle = \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle$?

The quantum state to achieve is: $$ |{\psi}\rangle= \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle $$ So far I know how to produce the $$\frac{1}{2}|{010}\rangle$$ state in qiskit as ...
Bob's user avatar
  • 11
3 votes
1 answer
345 views

Output of my quantum circuit to create 3-qubit GHZ-like state does not make sense mathematically

I want to create the GHZ-like state, $|\Psi\rangle = \frac{1}{\sqrt{2}} \left(|011\rangle - |100 \rangle \right)$. I build my circuit in the following way. apply the x gate to the first and third ...
molan li's user avatar
1 vote
1 answer
143 views

If Statement OpenQasm 2.0

in the documentation for OpenQasm 2.0 it says one can use an if statement like so: if(c_reg==int) Quantum Operation. However, I would like to execute the following: ...
Sam's user avatar
  • 31
0 votes
0 answers
33 views

How to account for a partial derivative term in an Operator, in Qiskit?

The crystal momentum p1 = h bar * k and this is defined in the reciprocal momentum, I am guessing this p1 is not a real momentum since the reciprocal space is an imaginary space which we use for ...
Jessica John Britto's user avatar
1 vote
0 answers
16 views

How to get rid of the indices of qubits at the side of a custom gate when visualizing a circuit (IBM Qiskit)

I have written a function that applies the Hadamard gate to all qubits in a circuit, and use the draw() function to visualize the circuit. However, there is this ...
John Levi's user avatar
1 vote
2 answers
300 views

Can any Qiskit circuit be converted to a gate?

I am trying to convert the following qiskit QuantumCircuit to a gate using to_gate() method. ...
squareroottwo's user avatar
1 vote
1 answer
248 views

Number of qubits in quantum circuits in ibm qiskit

How to find number of Qubits ? ...
Khilesh Chauhan's user avatar
0 votes
1 answer
115 views

"Mismatch between run_config.parameter_binds and all circuit parameters" when executing qiskit circuit

...
shc's user avatar
  • 15
1 vote
3 answers
448 views

Quantum Circuit not drawing?

I have coded this from a tutorial: ...
Sid Meka's user avatar
2 votes
3 answers
283 views

Controlled NOT gate which flips target when at least one of the control qubits is |1>

I would like to have a controlled NOT gate which flips my target qubit when at least one of the control qubits is |1>. I would like to be able to do this for arbitrary n. For a system with 2 ...
Q.Ask's user avatar
  • 195
2 votes
1 answer
109 views

Does subtraction circuit have a class like full or half Carry adder circuit in qiskit? one subtraction circuit code-example in qiskit?

I need a subtraction circuit to calculate Laplacian in edge processing, but I didn't find any class in qiskit.Do I have to write the code myself?
f h's user avatar
  • 21
0 votes
2 answers
186 views

Applying Suzuki-Trotter approximation to a Quantum Circuit in Qiskit

I am trying to apply the Suzuki-Trotter approximation to a quantum circuit in Qiskit. However, when I attempt to use the st.synthesize() method on my quantum circuit, I encounter the following error: <...
Hakan Akgün's user avatar
3 votes
1 answer
208 views

How to come up with Simon's Algorithm circuit for this 3 qubit system? (given truth table & s)

I have this truth table, knowing that the S = 110. However, how do I come up with a circuit by recognizing the pattern? It has taken me hours but my 2 brain cells don't seem to get it... I know there ...
Ryan Wang's user avatar
  • 247
0 votes
1 answer
79 views

In qiskit, how to consider only readings conditioned to some measurement outcome?

In a five qubit (q0, q1, q2, q3 and q4) quantum circuit, I need to consider only those measurement readings of q0, q1 and q2 for which q3 and q4 measures 0. More specifically, I am trying to implement ...
User3912's user avatar
2 votes
3 answers
255 views

How do we measure the probability of outcomes in a quantum computer if qubits collapse when measured?

I understand the idea behind Quantum Computing being that we superpose all possible states of a system of qubits and amplify the probabilities of whatever it is that we want depending on the circuit ...
Omeglac's user avatar
  • 89
0 votes
1 answer
96 views

What is the gate order in QuantumCircuit.data?

I'm trying to print the quantum gates in a circuit using the QuantumCircuit.data. However, the printed quantum gate order is not the same as the drawing. For example, in the QFT5 circuit generated ...
Amanli's user avatar
  • 35
1 vote
0 answers
36 views

Efficient classical simulation technique to execute this specific quantum circuit

I have a quantum circuit similar to the ones used in VQE methods. One difference is that the angles of the $R_y$ rotations are limited in the range $[0, 0.2]$ (and chosen randomly). In my case, I have ...
stopper's user avatar
  • 393
0 votes
1 answer
320 views

How to calculate the state overlap of two quantum circuits?

Given two parametrized circuits, is there a way of calculating the state overlap of the two of them? I have seen that with Qiskit you can do it through this class: https://qiskit.org/documentation/...
bjail66's user avatar
  • 155
1 vote
1 answer
90 views

How to read the result of this HHL algorithm circuit output?

I have computed the final states of a 1-qubit HHL circuit using initial conditions $$ A|x\rangle = |b\rangle$$ $$\begin{bmatrix} 8 & 6+i \\ 6-i & -1\end{bmatrix} |x\rangle = \begin{bmatrix} \...
James's user avatar
  • 475
1 vote
1 answer
182 views

Finding the Clifford circuit that implement a particular mapping of Paulis strings

Denote $P_N=\{\tau \}$ the set of Pauli strings, composed out of tensor products of Pauli matrices $\sigma_i^\alpha$ acting on $N$ qubits, e.g. $\tau=\sigma^x_1 \otimes \mathbb{1}_2 \otimes \sigma^y_3 ...
Nichola's user avatar
  • 392
4 votes
1 answer
259 views

What is the "additive error" of Swap Test?

I'm learning the Swap Test, a quantum circuit to calculate the inner product of two quantum states $|\langle \phi|\psi\rangle|^2 $: For the error analysis of this quantum circuit, according to Swap ...
Saul_better's user avatar
2 votes
1 answer
212 views

Trying to understand a quantum adder

I've implemented a quantum adder and, when I build the results table, I'm having some trouble to understand what's going on. First, I'm using the adder quantum circuit proposed in this paper, which ...
Herr Schrödinger's user avatar
1 vote
0 answers
67 views

how to convert a qiskit circuit to pauli strings

I have a qiskit quantum circuit that i want to convert to pauli strings (coefficients,observables) so that i can use it to build a hamiltonian. I did not see any methods in qiskit quantumcircuit ...
Dassen's user avatar
  • 11
2 votes
2 answers
330 views

How to get QASM code from an Amazon Braket circuit in Python?

As an example, consider the following Circuit defined by using the Python amazon-braket-sdk: ...
SimoneGasperini's user avatar
1 vote
3 answers
610 views

How to join different quantum circuits into one big circuit on specific qubits in qiskit?

I have a quantum circuit that loads the data and is acting on qubit q0,q1,q2 then another circuit that does the same on q3,q4,q5 ...
user avatar
1 vote
1 answer
95 views

How to convert a basic matrix into a quantum circuit?

Classical gates are not invertible, but larger expressions made from those gates can be invertible. One example of an invertible function is the function $f(A,B,C) = X,Y,Z$: $X = A \ B \ | \ \neg B \ ...
G S's user avatar
  • 13
2 votes
1 answer
201 views

How to convert a simple matrix into circuit? [duplicate]

Suppose you have an invertible matrix. How do you convert it into a circuit? Matrices have dimensions $2^n \times 2^n$, so a circuit representation is desirable. For example, the matrix below is a ...
user25425's user avatar
1 vote
2 answers
170 views

The amount of clbit arguments 0 does not match the instruction expectation (16)

I have a quantum circuit of 16 qubits, and I am running Amplitude Estimation on that, my final qubit to measure is 15th, so I do this ...
user avatar
1 vote
1 answer
42 views

How to best represent 5-Qbit codeword operator in Qiskit [duplicate]

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
2
3 4 5
10