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
0
votes
0answers
40 views

Method to mark only when certain conditions are satisfied in the superposition states of qubits

I am Newbie in Quantum Computing World. While studying on my own, I was curious about one thing, so I asked this question. My question is as follows: When I configure the superposition states of ...
-1
votes
0answers
19 views

Circuit diagram that can produce the state $|\zeta_{ABE}$ in Eve’s laboratory

Consider the entanglement-based protocol that in each round Alice prepares a Bell state $(|\Phi_+\rangle= \frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)=\frac{1}{\sqrt{2}}(|++\rangle+|--\rangle)$ and ...
-2
votes
1answer
33 views

How to calculate quantum circuit with given quantum state?

I have task to calculate this quantum circuit Where psi is: ...
1
vote
0answers
32 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 ...
2
votes
1answer
71 views

Using principle of deferred measurement to replace gates conditional on classical bits (c_if)

I am trying to implement the Iterative Phase Estimation algorithm on one of Qiskit's labs. I can do it for a 'nice' phase, such as 1/4 : But if I want to implement the algo generally (as a subroutine ...
3
votes
1answer
89 views

Qiskit - Circuit drawing esthatics - can i force the measurements in my circuit show at the end?

I'm studying an introduction course to quantum computation at my uni and we got homework to draw a certain circuit using qiskit. I managed to understand how to do what is asked from me, and this is ...
4
votes
1answer
37 views

Understanding the quantum circuit for the quantum adder Toffoli gate

I am trying to understand the toffoli operation for the quantum adder below: (especially for the second toffoli gate) but I am stuck in understanding the calculation to get the correct outputs. The ...
1
vote
1answer
32 views

How to read QASM files for parametrized circuits (in QISKIT)? both from_qasm_file() and from_qasm_str() fail

I am trying to work with parametrized circuits in QISKIT. I can simply create parameterized circuits, bind value(s) to parameter(s), and execute/run all instances (after binding values for parameters) ...
1
vote
0answers
56 views

How to divide one quantum circuit into multiple sub-circuits in qiskit?

While I'm simulating one Big quantum circuit in Qiskit, I wonder how we can divide one big quantum circuit into several sub-circuits. I looked in Qiskit API documents, but I couldn't find it. Is there ...
2
votes
2answers
43 views

How to reason about absorbing Pauli Product rotations into measurements?

In this image, the orange box refers to the operator $\exp(-i P \frac{\pi}{4})$ and the blue box refers to the Pauli Measurement $P'$. The idea behind these rules is to show how all the Pauli Product $...
5
votes
1answer
47 views

Is there a way to use titles on circuit drawing?

As you may know, one can use barriers in Qiskit to seperate gates on a circuit in a proper way. So, I was wondering is there a way to give a title to these "sections" seperated by barriers? ...
0
votes
0answers
20 views

How to use 'RevLib' files in python?

RevLib is an online resource for benchmarks within the domain of reversible and quantum circuit design. It provides a database of functions with respective circuit realizations given in a appropriate ...
0
votes
1answer
44 views

How do I convert a Quantum Circuit into a qobj

I have a Quantum Circuit launched but I want to convert it into a qobj to use the function .run from qiskit, I've tried to use the function: ...
2
votes
1answer
42 views

Design NISQ Circuit with StrawberryFields

I am trying to design this circuits with strawberry fields. However I could not connect my first and second qubit mode: orange boxes are beam splitters, blue boxes are phase shifters. The green box ...
0
votes
0answers
25 views

Random Circuit Generation in Cirq

I am trying to improve an optimization method as describe in this paper: enter link description here For that I need to create many random equivalent circuits. In my experiment I have 6 beam splitters ...
2
votes
1answer
61 views

How to make a half adder for x number of qubits with min. cost?

How to make a half adder for N inputs and getting the output on another x+1 output. Where x ...
0
votes
0answers
43 views

3-qubit phase shift gate/circuit implementation without any Ancilla qubits

Hi, I need help me with figuring out the 3-qubit phase shift circuit without any ancillas similar to the 2-qubit circuit shown in below attached picture....... Please do let me know! Thanks in advance!...
0
votes
1answer
28 views

Symmetric Universal Quantum Cloning Machine (UQCM) N --> M for unknown states

Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM N--> M for unknown states? If yes, does anyone know a Qiskit implementation of it?
1
vote
1answer
47 views

Qiskit: is there a quick way to work out the spherical coordinates for a given qubit statevector?

I am trying to calculate the spherical coordinates of different qubit states (i.e. working out $\theta$ and $\phi$ from: $|\psi\rangle = e^{-i\phi/2}\cos(\theta/2)|0\rangle + e^{i\phi/2}\sin(\theta/2)|...
2
votes
1answer
42 views

Qiskit: how can you use a different state for each shot in a quantum circuit? [duplicate]

I am trying to run a quantum circuit many times, each time using a different random state - a single qubit i.e. $|\psi\rangle= a|0\rangle + b|1\rangle$ with different $a$ and $b$. Once each qubit has ...
1
vote
2answers
49 views

In quantum adiabatic simulation, is the $s$ in $(1-\frac{s}{T})H_{in}+\frac{s}{T} H_{cl}$ related to the $t$ in $e^{-iHt}$?

I just want to do a whole adiabatic calculation on quantum circuit. To prepare two Hamiltonian of $H_{initial}$ and $H_{classical}$ and solve $H_{classical}$ using adiabatic calc like quantum ...
3
votes
1answer
64 views

How can I create an ADD gate for two quantum states? [duplicate]

I want to create an ADD gate like this: in qiskit using elementary gates. Can it be done?
2
votes
1answer
57 views

Parametric circuit to prepare the most general single-qubit state [closed]

I am highly confused with this statement and spent a lot of time understanding it.
5
votes
1answer
68 views

Pennylane: creating QNodes for large numbers of circuits that only differ by number of wires

Take the following simple quantum function: ...
2
votes
1answer
68 views

proof that the gate U is equivalent to the given circuit mathematically

I have solved this question by this, but can't able to get my mistake in it.
9
votes
2answers
493 views

How to check if a quantum circuit can be constructed for a given matrix representation?

Let's say I have a matrix representation, e.g. $$ \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}. $$ How ...
5
votes
3answers
402 views

Why can I not apply a control gate/function to a gate like T, S, S dagger, … (using IBM Quantum Experience)? Is there another option?

I am trying to use the circuit composer of the IBM QE. I am doing the inverse QFT on 3 qubits and therefore need a control on T and S dagger gates, but it won't let me. Does anyone know why or know a ...
6
votes
1answer
218 views

Distinguishing collapsed and uncertain qubit in a quantum circuit

I have been through the Young's double slit experiment. It's a direct proof or instance of showing that a wave is collapsed via observation or measurement, and shows no interference patterns. I want ...
1
vote
2answers
53 views

An issue in plotting the quantum circuit using latex

Here's the code I'm working on: !pip install pylatexenc !pip install pillow qc = QuantumCircuit(2) qc.x(0) qc.cz(0,1) qc.x(0) qc.draw('latex') However there's an ...
0
votes
1answer
56 views

how to plot probability histogram and/or bloch sphere of single qubit in multi-qubit quantum circuit in Qiskit?

How can I get statevector and/or blochsphere representation of qubits of my choice. For example I have 3 qubits with different gates being applied on each qubit. the qiskit state_vector simulator ...
3
votes
1answer
47 views

Weird Grover's Algorithm Behavior

I am attempting to use Grover's to find elements in an array that satisfy a comparative query (=, <, >, etc). I am using Qiskit, and am using a qRAM to encode my array. I have experimented with ...
3
votes
2answers
68 views

Show that the two circuits are equivalent mathematically

This exercise wants me to prove the equivalence of the two circuits using their mathematical representations. Circuit 1: Circuit 2: Circuit 1 (q1 CNOT ...
2
votes
1answer
70 views

How does this represent modular multiplication

How does this circuit map $|x\rangle$ to $|7x \space mod15\rangle$? Looking into Shor's and I thought that phase kickback causes the modular exponentiation part to be mapped onto the measurement ...
0
votes
1answer
22 views

How can I fix this parametrization error in Qiskit?

I'm trying to use the parametrized circuits to run a single model of quantum circuit with different values. Here's part of my code: ...
2
votes
3answers
125 views

Computing the CDF with QAE in Qiskit

I want to load a lognormal distribution and then use an IntegerComparator to flip a qubit ($|0\rangle$ to $|1\rangle$) if its value is less than a threshold. Then I want to use an Quantum Amplitude ...
5
votes
1answer
86 views

Unknown quantum circuit symbol

I was reading DiCarlo, L., Reed, M., Sun, L. et al. Preparation and measurement of three-qubit entanglement in a superconducting circuit. Nature 467, 574–578 (2010). https://doi.org/10.1038/...
2
votes
1answer
40 views

Is Noise model for quantum prototypes accurate in Qiskit

We know that in Qiskit noise models modeling specific quantum machine prototypes exist and can be inserted into the code. However, are these models fixed in nature or they continuously improve ...
0
votes
1answer
41 views

Device Repitition Rate on Melbourne

I've been receiving "Circuit runtime is greater than the device repetition rate [8020]" errors when running a relatively simple circuit on ibmq_16_Melbourne, but have had no issues ...
1
vote
1answer
62 views

A CNOT between two Hadamard gates: why does the CNOT changed the output of the second Hadamard gate?

Applying the Hadamard gate twice in a row, it restores the original input: https://algassert.com/quirk#circuit={%22cols%22:[[%22H%22],[%22H%22]]} However, if a CNOT control is added between the two ...
1
vote
2answers
132 views

Question about a circuit from “Quantum Computing for Computer Scientists”

I am trying to implement a basic quantum computing emulator. In the chapter on Grover's algorithm, we're shown the following circuit: They demonstrate Grover's algorithm with a function $f$ that ...
2
votes
1answer
48 views

How to understand the circuits used for magic state distillation in surface code?

I'm reading about surface code theory recently (Phys. Rev. A 86, 032324). When I come across the magic state distillation part, it is difficult for me to understand the circuits. In addition, I have ...
3
votes
2answers
86 views

Transforming $|100\rangle$ state into $|000\rangle + |111\rangle$ state using only Hadamard and CNOT gates

Hi, How to convert $|100\rangle$ 3-qubit quantum state into $\frac{1}{\sqrt{2}}(|000\rangle + |111\rangle)$ state using only Hadamard and CNOT gates? Also, is output state an entangled one?
1
vote
1answer
28 views

How to change the names of the registers displayed with circuit_drawer (output='mpl')

I am trying to change the appearance of the circuit_drawer in output='mpl' mode. The registers of the Quantum Circuit are named like ($q0_0$, $q0_1$, $q1_0$, $q2_0$, $q2_1$,..) but I'd like to name ...
8
votes
1answer
669 views

What's meant by the depth of a quantum circuit?

I'm using Qiskit to create quantum circuits wherein I've this attribute called depth. The documentation states it is the length of the critical path here. What does ...
7
votes
2answers
268 views

How to compute the measurement probability in swap test?

The figure of a circuit and the state are as follows. The final state before the measurement is $|O_{out}\rangle=\frac{1}{2}|0\rangle(|\phi\rangle|\psi\rangle+|\psi\rangle|\phi\rangle)+\frac{1}{2}|1\...
0
votes
2answers
222 views

Should C-NOT gate affect “input” qubit or not?

In MS presentation, they describe the process CNOT gate working with state machine diagram. At first they drew CNOT gate in ...
10
votes
3answers
402 views

Superposition of quantum circuits

Given a quantum circuit $C_1$ that generates a state $\vert\psi\rangle$ and another circuit $C_2$ that generates $\vert\phi\rangle$, is there a way to construct a circuit that outputs $$\frac{1}{\sqrt{...
0
votes
1answer
46 views

Quantum circuit, Fourier Transform/Decomposition?

Broadly speaking, can we say that quantum circuits are like Fourier Transform/Decomposition? We use qbit like waves, tune it with quantum gates, to find answer. https://ars.els-cdn.com/content/image/3-...
0
votes
1answer
108 views

What do we mean by “derive full operator of a quantum circuit” and to describe the mapping from input quantum registers to output quantum registers?

There is a quantum circuit with several Controlled NOT and Controlled swap gates, with two 2-qubit input registers X,Y and two 2-qubit output registers X',Y' where we have to find the mapping of the ...