Questions tagged [qiskit]

Qiskit is an open source SDK for working with quantum computers at the level of pulses, circuits and application modules. If appropriate, also use the [programming] tag.

Filter by
Sorted by
Tagged with
2
votes
1answer
387 views

OpenPulse: Modifying pulse sequence for basic gates

I'm trying to familiarise myself with OpenPulse but I'm confused about a few things. Mainly, I would like to be able to take the pulse sequences that comprise standard gates on an IBMQ device and ...
1
vote
0answers
352 views

Please help: get_statevector gives wrong result in qiskit

I simulated the circuit below in qiskit and used the statevector simulator to extract the statevector: The resulting statevector that it gave me was: array([ 0.5+0.j, -0.5+0.j, 0.5+0.j, 0.5+0.j]) ...
1
vote
3answers
1k views

How to initialize classical register in Qiskit?

I'm working on a Hybrid classical-quantum linear solver. For this, they make a loop on a quantum circuit (ie. below), and each time they change the value of the classical register and apply a X gate ...
2
votes
2answers
517 views

How to represent an ensemble of pure quantum states in Qiskit?

I was going through the Qiskit documentation to see if there was a way to represent a mixture of quantum states as a density matrix or otherwise. Is there a way to do it? If so, how?
0
votes
1answer
620 views

Measurements in Qiskit

What is the difference between 2 types of measurements depicted below? At the end of unitary evolution, qubits are in superposition of states, and after measurement I get a set of probabilites ...
1
vote
1answer
537 views

Qiskit No backend matches the criteria

I am trying to run a circuit with 32 qubit on a local hpc (not IBM Q HPC) using statevector_simulator backend. but i got the following error: ...
0
votes
1answer
280 views

ERROR_RUNNING_JOB with 32 qubit circuit running on ibmq_qasm_simulator backend

I recently made a quantum circuit that uses 32 qubits and try to run it on IBM Q Experience qasm_simulator backend. But it always ends with ERROR_RUNNING_JOB. ...
2
votes
2answers
85 views

Measuring the effect of energy relaxation with IBMQ Experience

I want to investigate the effect of the decoherence time on a qubit, and I followed the tutorial here. https://quantumexperience.ng.bluemix.net/proxy/tutorial/full-user-guide/002-...
5
votes
3answers
812 views

How to create an Ising coupling gate with Qiskit?

I'm trying to apply a time evolution algorithm for a physical system I'm trying to simulate on QISkit, however, in order to do that, I need to use the so-called Ising coupling gate: $I=\begin{pmatrix}...
0
votes
2answers
497 views

How to reset classical register on QISKit

I want to do a feedforward on a quantum circuit using the simulator of Qiskit. For example, measure qubit_1 to bit 1 and do some operator on qubit_2 if the result of measuring qubit_1 is 0 and if ...
-1
votes
1answer
71 views

edit a program on IBM Q experience

Can I edit a program with python numpy and scipy and of course qiskit in the IBM Q experience, using code? (I am not interested in drugging gates) and I can't find the way to edit my own program
2
votes
1answer
571 views

Controlled-Initialize instruction

I'm trying to build a new instruction for my circuit. This instruction needs both a controller qubit qctl and an arbitrary register ...
2
votes
3answers
1k views
6
votes
3answers
4k views

What does fidelity mean?

I am learning qiskit software and this term keeps popping up and I am unable to get a grasp on the technical definition given by wikipedia. For example, the functions state fidelity and process ...
1
vote
1answer
403 views

The meaning of the city plot in Qiskit

I read the documentation of qiskit and I can't understand the meaning of the city plot, like this: Why do we need a 3D plot? Why can't we just use a 2D plot, where $ | 00\rangle$, $ | 01 \rangle$, $ ...
3
votes
1answer
327 views

Draw "Initialize" circuit as sequence of single gates

I have just tried to apply initialize function to a simple circuit. There is any way to display how is done internally the initialization circuit instead of a ...
3
votes
3answers
177 views

Where I can read about protein folding on quantum computers with simple examples?

Where I can read about protein folding on quantum computer (Qiskit will be ideal variant) with simple examples? Thanks
0
votes
1answer
376 views

Problem with initial_layout on Qiskit/IBMQ: 'Not enough qubits in CouplingGraph'

I am trying to run an execution on IBMQx2 where I can specify the physical qubits to which I apply gates. The execution without the initial_layout runs fine, but ...
0
votes
1answer
727 views

Creating and running parallel circuits in Qiskit

I'm trying to create and run parallel execution using the instruction here. However, when I implement it, it tells me that I shouldn't be using compile anymore ...
2
votes
1answer
690 views

How do I check my remaining IBM Q credits?

I've already tried the approach in this answer, but I'm getting this error: ...
1
vote
0answers
59 views

About a Qiskit Function

I want to understand this Qiskit function (a function for creating the gate CNX with Python): more specifically i don't understand what's the rotations (Y and Z) over the qubits for ? I added inline ...
5
votes
3answers
318 views

How do I get out 2 measurements from the same execution on Qiskit?

Here's my circuit, trying to checkout the effect of measurement on the IBM Q circuit. Here you can see I do 2 different measurement at different time, and I hope to be able to see both results. ...
1
vote
1answer
717 views

CRZ and CRY Gates

I am trying to understand the CRZ and CRY gates functions : what do they actually used for ? why we require a certain angle rotation around z or y Axis on a Qubit ? and what does it yield ? ...
4
votes
1answer
152 views

How to upload .py file to new online Qiskit Notebook

I'm trying to run a program in the Qiskit Notebook on the IBMQ Experience. I need to import some .py files that I've done in order to run my main program but the notebook won't accept .py files. I've ...
1
vote
1answer
138 views

Qiskit Aqua cannot import 'QasmQobj'

I have an error when I use Quantum SVM kernel algorithm from Qiskit aqua. This is my code section with imports: ...
1
vote
1answer
651 views

import error :No module named 'qiskit_aqua'

I have an error when I use Quantum SVM kernel algorithm from Qiskit aqua. This is my code section with imports: ...
4
votes
0answers
419 views

Measuring Coherence Length for T1 and T2 values with IBMQ Experience

So I'm currently working on a little program to measure how long the coherence time of a qubit is. Basically the idea is to initialise a qubit with a X or H gate then stick in a varying amount of ...
4
votes
1answer
715 views

What does a quantum circuit look like after qiskit.compile() has been applied?

IBM-Q states that the real devices available for public use have a set of "basis" gates consisting of u1,u2,u3 and CNOT. However in Qiskit the circuit can be built with many gates which are not ...
1
vote
1answer
176 views

How can I build a controlled gate for this matrix in qiskit?

How can I build a controlled version of the below matrix in qiskit?$$ \begin{pmatrix} e^{i\theta} & 0\\ 0 & e^{i\theta} \end{pmatrix} = e^{i\theta}I $$
2
votes
1answer
375 views

Using Quantum Fourier Transform in adding two 2-bit numbers

I am trying to use Qiskit to write a code that uses QFT to add 2 numbers. I am referring to this paper: https://iopscience.iop.org/article/10.1088/1742-6596/735/1/012083 I have a few questions: 1) Is ...
4
votes
1answer
147 views

How to do randomised benchmarking for non-Clifford gates on Qiskit?

For my summer research internship I'm looking to randomized benchmark (RB) non-Clifford gates for a single qubit. Since I found out that Qiskit ignis allows for the RB of Clifford gates, naturally I ...
-2
votes
1answer
372 views

What does it mean to get 403 error when running a code on Qiskit? [closed]

I have been using Qiskit over the last few weeks to run different programs. But right now, whenever I try to run any code, it gives me a 403 error stating that I am out of credits. I am creating a ...
4
votes
0answers
90 views

Bell State 11 not working for parity curve

I am currently writing a script to automate the creation of parity curves for a 2 qubit bell state and then calculate fidelity and proving entanglement from that (inspired by this paper). It was going ...
3
votes
1answer
557 views

Implementing a complex circuit for a Szegedy quantum walk in qiskit

Problem definition I'm implementing a quantum circuit in qiskit for a Szegedy quantum walk, (reference, Fig 21.). It uses two registers of dimension $N$ ($N=3$) each one. The challenges I'm facing are:...
5
votes
1answer
2k 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....
9
votes
2answers
604 views

How to program a controlled Hadamard-Hadamard gate?

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?
4
votes
1answer
1k views

About the Qiskit draw function

Where does Qiskit put the rendered figure created by circuit.draw(output='mpl')?
3
votes
0answers
135 views

Measurement inconsistency in Qiskit

I am using Qiskit in an algorithm. In the end, I am measuring exactly a register of 4 qubits but the histograms show states with 5 qubits. This is the code I used: ...
3
votes
2answers
972 views

Can't draw figures with Qiskit in Visual Studio

I'm using Qiskit in Visual Studio 2019. I want to draw quantum circuits, but it only shows their sizes with text instead of figures. The output on the interactive window is like this. ...
4
votes
0answers
124 views

Results from looped experiments on IBM Q different than individual experiments

I'm experiencing an issue while using Qiskit where the counts from a job return vastly different values when ran in a loop or as an array of circuits as opposed to single experiments when run by ...
4
votes
0answers
102 views

How can I express controlled unitary operation in QPE of this implementation of HHL?

I have found this implementation of HHL, and I don't understand why the controlled unitary operation is expressed in the form of $\exp(i t_0 A/2)$ and $\exp(i t_0 A/4)$. The rotation of $\pi$ and $\...
3
votes
1answer
528 views

How to implement the XY Heisenberg interaction using IBMQ and Qiskit?

A possible way to implement the 2 qubit Heisenberg XYZ model using a Quantum computer is to decompose the Hamiltonian as follows: $$H_{XYZ} = H_{XY} + H_{YZ} + H_{XZ}$$. In this case, these operators ...
7
votes
1answer
1k views

How to calculate the fidelity of a certain gate of a IBMQ device in Qiskit using randomized benchmarking/tomography?

For example, I want to calculate the fidelity of a 1-qubit and 2-qubit gates (similar to the result shown in figure 2 in this paper). Is there any way to do that in Qiskit? I've gone through the ...
6
votes
1answer
432 views

Defining qubit operator from scratch

I'm a beginner with Qiskit and the Python language at all. Here is my question: One of the VQE function arguments is qubit operator (qubitOp). I saw some examples ...
2
votes
0answers
978 views

How to run quantum SVM algorithm from Qiskit in real IBM Quantum Computer using IBMQ?

I'm trying to run QSVM algorithm in IBMQ experience, want to run in one of those real quantum computers. ...
2
votes
1answer
524 views

How to construct a CCY gate in Qiskit

How can one construct a CCY gate using gates which are native to Qiskit (CCX and single qubit gates). I was able to find the answer for CCZ gates, however guessing and testing until I can figure out ...
9
votes
3answers
4k 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^{...
5
votes
2answers
499 views

Transform matrix into a combination of simple quantum gates

I am trying to transform this matrix into a combination of quantum gates but I cannot find any such functionality on Qiskit or anywhere else. I have tried to use Quirk but I do not understand it. $$\...
3
votes
2answers
2k views

IBM QISKit: creating a variational algorithm from zero

I would like to implement a variational algorithm (similar to VQE but with another cost function, no expectation of a Hamiltonian involved) from zero. Is there any tutorial explaining how to implement ...
8
votes
1answer
424 views

How does measurement calibration work?

One of the possible ways to improve the results of an experiment on the IBM machine using the Qiskit language is to use the measurement calibration methods. This is the link to the documentation. I ...