Questions tagged [quantum-circuit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
3answers
367 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
198 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
48 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
35 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
38 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 ...
4
votes
2answers
48 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
54 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
19 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
100 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
71 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/...
1
vote
1answer
25 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
32 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
51 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
127 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
39 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
71 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 ...
4
votes
1answer
485 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 ...
6
votes
2answers
233 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
212 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
351 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
41 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-...