Questions tagged [qiskit]

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

51 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
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 ...
4
votes
0answers
37 views

Vary parameter between shots

Is it possible to tell Qiskit to execute a parameterized gate where the parameter varies between shots? Let's say, for whatever reason, I'd like to speed up the dephasing of a qubit during a run. I ...
4
votes
0answers
402 views

Is it possible to run a general implementation Shor's algorithm on a real IBM quantum computer at least for N = 15?

I need to make a general implementation of Shor's algorithm that factors, at least, N = 15. I have been able to perform an implementation that works in simulators, with ProjectQ, but when running it ...
4
votes
0answers
85 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 ...
3
votes
0answers
53 views

Use Qiskit in other programming languages (C#, JavaScript and Lua)

I am exploring using Qiskit in other programming languages for game development, such as C# (for Unity game engine), JavaScript (Phaser.io) and Lua (LÖVE2D). Is there a general way to call Qiskit ...
3
votes
0answers
32 views

How does batching work in the optimizer loop of the VQC algorithm in Qiskit Aqua?

I've playing around with a binary classification problem with a dataset of size 1000 examples and 5 features. I'm using the VQC algorithm from the Qiskit package the that uses a feature map and a ...
3
votes
1answer
215 views

Qiskit installation failing: VC++ 2017 not found

I tried to follow the web instructions to load Qiskit, including VC++ 2017 Redistributable, but I get many errors upon installation. The gist seems to be that VC++ 2017 wasn't found. Some results ...
3
votes
0answers
55 views

`execute()` hangs and eats memory

Used memory-profiler to check why I get memory spikes in what I though were small circuits. The circuit itself is constructed using ...
3
votes
0answers
85 views

Is there a way to develop a multiple controlled X or Z gate on Qiskit without using ancillary qubits?

I know for instance I can derive a cccX gate using 2 Toffoli gates on 5 qubit wire or ccccX with 3 Toffoli gates and 7 qubits and so on. you will notice the depth is increasing as the number of ...
3
votes
0answers
195 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 ...
3
votes
0answers
65 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
0answers
111 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
0answers
61 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
0answers
62 views

What are reasonable noise/dephasing parameters for QuEST to emulate state-of-the-art quantum computers?

The QuEST code allows for simulation of quantum computers taking dephasing and depolarizing noise into account via one and two qubit dephasing and depolarization. What are realistic parameters for ...
3
votes
0answers
454 views

Qiskit Python program cannot connect to QE API

I am just getting started with Qiskit and IBM Quantum Experience, so please forgive my newby question. I have a IBM Quantum Experience account and I generated an API token. I used the generated ...
2
votes
0answers
49 views

Simulation for the [5,1,3] stabilizer code in Qiskit

Sorry that I keep asking questions for the same subject. It is driving me crazy. I have followed the [5,1,3] stabilizer code circuit designed by Gottesman in page 35 in his paper (also illustrated in ...
2
votes
0answers
88 views

Problem with measurement error mitigation using VQE

I am attempting to mitigate measurement error while running on one of IBM's real devices and am doing so by passing CompleteMeasFitter into ...
2
votes
1answer
87 views

How can we construct a square root of NOT gate in Qiskit and IBMQ circuit composer using universal gates?

I have tried it with decomposing controlled S then conjugating with H gate. But I want to construct it using a minimum number of gates.
2
votes
0answers
56 views

Is it possible to simulate or replicate a cryptographic algorithm using Qiskit?

I would like to know if it is possible to recreate or simulate a cryptographic encryption algorithm like DES or AES using the quantum computing platform Qiskit from IBM?
2
votes
0answers
66 views

Running HHL tutorial on real backend

I tried to follow the HHL tutorial. Since the 8x8 problem is not realistically simulable (I stopped after a few minutes), I tried to make it run on another backend, starting on the easiest example: <...
2
votes
0answers
118 views

Error ERROR_TRANSPILING_JOB when trying to simulate the circuit

I'm trying to implement an algorithm (https://dl.acm.org/citation.cfm?id=1128034, basically a simple Grover Algorithm in which the oracle is made of a Fitness operator- some CNOT gates- and 2 adders) ...
2
votes
0answers
49 views

Hybrid classical-quantum linear solver based on the Neumann-Ulam method

I read this article on quantum linear solver based on the Neumann-Ulam method (here is a lesson about it). But the article has not a lot of details. Therefore I don't understand what is the algorithm ...
2
votes
0answers
458 views

Qiskit SDK problem

So I am getting this error when I fire the command on Ipython or Jupyter Notebook ...
1
vote
0answers
40 views

Openfermion to qiskit

Is there a direct way to go from an object generated in openfermion to objects usable in Qiskit. I can't find anything about any plugin. It's not too hard to translate into pyQuil and then to Qiskit ...
1
vote
0answers
38 views

Grover's algorithm for 3SAT problem gives erroneous results

I'm writing a code in python with qiskit that implements Grover's algorithm to solve the 3-SAT problem, but when I run it it doesn't give the correct annswer. I've checked the circuit with the ...
1
vote
3answers
63 views

Pauli I in eoh procedure doesn't become a global phase gate in qiskit evolution_instruction method. Possible consequences

If one has two qubits in arbitrary stats and wishes to apply a controlled version of some global phase gate $P(\varphi) = \begin{pmatrix} e^{i\varphi} & 0 \\ 0 & e^{i\varphi} \end{pmatrix}$ ...
1
vote
0answers
33 views

OpenPulse: Where to get current pulse definitions for standard gates?

Is backend.defaults().cmd_def and backend.defaults().pulse_library kept updated regularly? Is this the correct place to pull the best calibrated pulses for the standard gates? I am working on a ...
1
vote
0answers
31 views

Exponentiating Hermitian Matrix for use in QPE/HHL

I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$. Because I am currently ...
1
vote
0answers
36 views

In Grover, how to implement oracle and amplification using Qiskit?

I found some examples of implementing the oracle when the marked state is $|000\rangle$. But how can we know what gate we should use inside of the oracle? Besides, for the part implementation, the ...
1
vote
0answers
55 views

Many jobs hanging after creating

I am running a VQE calculation running from a cluster using nohup. However, some of my jobs keep hanging with 'creating' and therefore my VQE is not converging/not working. However, at the same time,...
1
vote
0answers
36 views

Suggestions for hybrid factoring algorithm on DWave and Qiskit

I was wondering if the multi-prime factoring problem can be solved in a hybrid approach using DWave (to factor) and Shor's algorithm (in Qiskit)? Please let me know your thoughts. Thanks!
1
vote
0answers
69 views

'ERROR: QasmSimulator: Circuit cannot be run using available methods.'

I used the following code. Can anyone say what that error is about? ...
1
vote
0answers
229 views

Job execution issue while using IBMQ Experience

I am trying to run QSVM algorithm on the IBMQ backend devices using the API_TOKEN. Below is the snippet of the code that I am running. The code fails the validation test and throws an exception after ...
1
vote
0answers
174 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
0answers
59 views

Quantum based protein folding, prototype

Where I can read about protein folding on quantum computer (Qiskit will be ideal variant) with simple examples? Thanks
1
vote
0answers
50 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 ...
1
vote
0answers
527 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. ...
1
vote
0answers
71 views

Exception encountered while running quantum-enhanced support vector machines

I am trying to run the code of the notebook example aqua/artificial_intelligence/qsvm_kernel_classification.ipynb. I save it in a python file and I have an exception at runtime the display of ...
0
votes
1answer
7 views

How to obtain the noise of a circuit in Qiskit?

I referred to the following Qiskit's document: state_fidelity. The inputs of state_fidelity are quantum state vectors or density matrices. For example, $|00\rangle$...
0
votes
0answers
44 views

deliver a quantum register to/from a function in qiskit

Can I create a function in qiskit which receive a quantum register as an argument, and/or returns a quantum register? In the example below, I created a quantum register, and a quantum circuit which ...
0
votes
0answers
23 views

How to preprocess data to fit Qiskit QSVM

I want to start experimenting with quantum machine learning using Qiskit library, but I have come across an issue. All tutorials I have seen so far like this one import datasets using custom packages. ...
0
votes
0answers
38 views

A question about qiskit's WeightedPauliOperator.evolve method for IPEA (IQPE) implementation

I'm doing an implementation/tutorial of the iterative phase estimation algorithm (IPEA) and have a problem. My Hamiltonian is a diagonal matrix $H = \begin{pmatrix} E_1 & 0 \\ 0 & E_2\end{...
0
votes
0answers
47 views

Number of columns mismatch

So I have the following code qgan = QGAN(real_data, bounds, num_qubits, batch_size, num_epochs, snapshot_dir=None) with num qubits being defined as ...
0
votes
0answers
47 views

What is the URL of the result?

This answer states that: Once it is submitted, your job will be in queue. You will have to request by GET this job ID to get the answer from the backend. The GET URL is: https://quantumexperience....
0
votes
1answer
192 views

Qiskit plot_histogram and count not working

im trying to plot a histogram of my code but when i run plot_histogram(results.get_counts(circuit)) it gives me a traceback error This is what i had before calling ...
0
votes
1answer
70 views

Qiskit - Renormalize the qubit after measurement

I have a 2 qubits system, maximally entangled, and I performed measurement on one of the qubit. ...
0
votes
0answers
126 views

Why does Qiskit swap gate accept registers, but cswap doesn't?

In Qiskit, I am trying to perform controlled-Swap (cswap) of two registers, but an error occurs: ...
0
votes
1answer
153 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
175 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. ...
0
votes
0answers
43 views

What is the need of Operator module from qiskit.aqua?

My question is two-fold: a) Why is it that Pauli takes two arguments (z,x). What is the role of x? In the max_cut module, z is initialized as an np array of size=no of nodes in graph with False dtype ...