# Questions tagged [qiskit]

Quantum Software Development Kit for writing quantum computing experiments, programs, and applications. If appropriate, also use the [programming] tag.

268 questions
Filter by
Sorted by
Tagged with
3k views

### How can I implement an n-bit Toffoli gate?

I want to create a Toffoli gate controlled by n qubits, and implement it in QISKit. Can this be done? If so, how?
828 views

### How is the Grover-Algorithm applied to a database?

Question I want to use the Grover-Algorithm to search an unsorted database for an element $x$. Now the question arises, how do I initialize index and value of the database with the qubits? Example ...
397 views

### Does conditional gate collapse controller's superposition?

I've created a simple circuit in Q-Kit to understand conditional gates and outputted states on each step: In the beginning there is clear 00 state, which is the input The first qubit is passed ...
276 views

### Submitting jobs to IBM devices without Python

Qiskit can be used to submit jobs to IBM devices using Python (or Swift and JavaScript). But what if I want to use a different language? For example, suppose I have a specific circuit I want to run. ...
881 views

### Quantum algorithm for linear systems of equations (HHL09): Step 2 - Preparation of the initial states $|\Psi_0\rangle$ and $|b\rangle$

This is a continuation of Quantum algorithm for linear systems of equations (HHL09): Step 2 - What is $|\Psi_0\rangle$? In the paper: Quantum algorithm for linear systems of equations (Harrow, ...
400 views

### Composing multiple quantum circuits in single quantum program in QISKit

I was wondering if there is a way to compose a program with multiple quantum circuits without having the register reinitialized at $0$ for each circuit. Specifically, I would like run a second ...
279 views

I'm trying to program a controlled gate as the figure below in Qiskit. Should it be sufficient to separate and control individually the Hadamard gates?
464 views

### Qubits specification on IBMQ devices

As it is shown here, CNOT gates between different qubits have different error rates. I have the following questions: 1) While defining a circuit on QISkit, does ...
837 views

### Phase-Shift Gate in Qiskit

How to implement the phase shift gate in qiskit or ibmq? Phase Shift Gate : $$\begin{pmatrix}e^{ia} && 0 \\ 0 && e^{ia}\end{pmatrix} = e^{ia}I$$
471 views

### There was an error in the circuit!. Error = 'QISkit Time Out'

I've got the following quantum code using QISKit (based on hello_quantum.py): ...
600 views

### How to delete pending jobs on IBM Quantum Computer to retrieve units?

I am trying to run some code using qiskit, but I get the error message, that I have run out of necessary Experiment Units. I ...
2k views

### Visualization of Quantum Circuits when using IBM QISKit

I have followed the installation steps, regarding QISKit working environment. For circuit visualization, I've installed latex as in addition to poppler to convert from PDF to images. Afterwards, I ...
319 views

### Why do we need a Classical Register for carrying out Quantum Computations?

I've just started to mess about with QISKit on Python and one thing is confusing me a fair bit. Given that we are building Quantum Circuits what is the need for a classical register ? Is it because ...
415 views

2k views

105 views

### What does the error rate on the IBMQ website mean？

How is the error rate pointed by the arrow defined? How did you get it? thanks!
269 views

### What is the purpose of the TDG gate in QISKit?

The QISKIT documentation doesn't explain what a TDG gate does and I can't find it anywhere else online.
266 views

### Understanding quantum teleportation algorithm from qiskit tutorials

I am very new to quantum computing and I have recently started to experiment with qiskit module in python, by following tutorials and implementing simple algorithms....
803 views

### What is Qconfig in QISKit and how do I set it up?

To use certain things in QISKIt, such as acessing the real quantum processors, it seems that there is a file 'Qconfig.py'. That needs to be set up. How do I do this?
172 views

### Status of software packages for quantum compiling

By "quantum compiling", what I mean is classical algorithms to solve the following problem: given a $SU(D)$ matrix $U$ (the goal) and a set of $SU(D)$ unitary matrices $V_1 \cdots V_N$ (the gates), ...
270 views

### Quantum SVM Algorithm Error on import

I am experimenting with some Qiskit ACQUA AI algorithms which require the following import statement: from datasets import * However, ...
291 views

### Checking value of variable using quantum approach

A beginner question after watching few videos. Say, var=a; var can be either of two values, ...
361 views

### Get result measurement into a circuit with Qiskit

I'm trying to implement the three qubit bit flip code in Qiskit. Therefore, I need to get the result of a measure of two ancilla qubits, to deduce which gate I need to use do recover my logical qubit....
369 views

### Quantum algorithm for linear system of equations (HHL) - Final Step: How can I find my vector of solution $|x\rangle$?

I'm working on solving a linear system with the quantum algorithm HHL. I don't understand how I can recover my vector $|x\rangle$ of real solution of the system starting from the states measured with ...
207 views

### Entanglement state preparation by using amplitude values

I have an algorithm that uses QRAM, after accessing the given QRAM that store M d-dimensional classical vectors, the state of the index register and the data register become entangled. But for now I ...
299 views

### Is there a common set of modules for user-defining-quantum-gate for QISKit

I am wondering if there exists a common library or a set of modules for user-defining-quantum-gate for QISKit. If it does, could you tell me? By referring to Define Quantum Gates and How to define ...
78 views

### Graphing the decoherence of qubits being used to perform an algorithm

How would I be able to graph the decoherence of qubits being used to perform an algorithm? I'm working with the IBMQ Qiskit framework and I'm trying to write a program that allows me to find the ...
554 views

### What is a “barrier” in Qiskit circuits?

I just started studying IBM Qiskit, and cannot find details about the barrier method on the QuantumCircuit class. It is shown in the circuit drawing, but I never heard about it after reading quantum ...
807 views

### How to quickly calculate the custom U3 gate parameters $\theta, \phi$ and $\lambda$ for any unitary?

In IBM Qiskit and Quantum Experience, the custom U3 gate is defined as  U(\theta, \phi, \lambda) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{...
1k views

### ImportError: cannot import name 'QuantumProgram' from 'qiskit'

I get below error when I run a code on spyder environment: File C:/MYPYTHON Programs/My Quantum Programs/Shor algo.py, line 4, in from ...
88 views

### How to implement the CCH gate in quantum computers available in clouds?

How to implement CCH gate in quantum computers available in clouds? If there is not any gate directly available for it, what are the possible ways to represent CCH?
162 views

### How to draw Qiskit's HHL algorithm as a circuit?

Qiskit Aqua has a module that implements the HHL algorithm: https://qiskit.org/documentation/_modules/qiskit/aqua/algorithms/single_sample/hhl/hhl.html How does one draw the implemented circuit? * ...
432 views

### About the Qiskit draw function

Where does Qiskit put the rendered figure created by circuit.draw(output='mpl')?
1k views

### How to create an arbitrary state in QISKit for a local_qasm_simulator?

I would like to play with a quantum circuit local_qasm_simulator in QISKit, but I do not want to implement a separate quantum circuit that would prepare an initial ...
91 views

### Getting a layout for qubits in Qiskit

I'm trying to use Qiskit's built in transpiler passes to do the following. I would like to take a quantum circuit and allocate the logical qubits to physical qubits. The tutorial doesn't really ...
127 views

### How to parallelly run a quantum circuit on IBMQ?

I am trying to implement the following circuit and my code is The above circuit has size 5 and depth 3. My question is, how can I run the circuit parallelly. I mean, the gate ...
158 views

### How to plot custom gate labels in Qiskit?

How can I create a custom gate in qiskit that is plotted using latex formatting (or another type of formatting)? For example the following code generates a circuit diagram ...
The real devices used as backends for Qiskit have calibration data that quantifies errors ($T_1$ and $T_2$, gate fidelities, etc). This can be accessed by, for example ...