Questions tagged [qiskit]

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

122 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
69 views

Is there a general order finding quantum algorithm for a given a and N?

I'm trying to construct a general circuit for Shor's algorithm in Qiskit. I understood the later parts of the circuit (inverse QFT and QPE), but can't really understand the order finding. For example, ...
4
votes
0answers
36 views

Can I partially collapse the wavefunction in Qiskit?

I'm trying to do something similar to this question, where I want to partially measure the system before getting the output. In particular, say I have 4 qubits. I want to measure two of them, and then ...
4
votes
0answers
78 views

Form and effect of the intrinsic Hamiltonian on the IBM machines

I want to understand the form of the intrinsic Hamiltonian of the IBM machines, such as ibmq_16_melbourne, and how this affects the data I get out when waiting ...
4
votes
1answer
167 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 ...
4
votes
0answers
198 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 ...
4
votes
0answers
111 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
36 views

IBMQ backends: How can I know the repetition rate and depth limits of real devices?

When trying to execute complex quantum circuits on IBMQ real devices, one can encounter a typical error (ERROR_RUNNING_JOB) with the message ...
3
votes
1answer
94 views

Implementing QFT

I would like to know if there is a way to: Implement Quantum 'Functions' e.g the QFT of QFT* containing several single-qubit operations? Implement such operations on an arbitrary number of qubits and ...
3
votes
0answers
127 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 ...
3
votes
0answers
97 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
0answers
74 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
338 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
77 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
125 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
79 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
75 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
510 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
28 views

Using Qiskit VQE for solving an eigenvalue problem

I am a new user of Qiskit and I believe there is a simple answer to my question but I have had a very hard time finding a straightforward answer. I am trying to transform a given $3 \times 3$ (...
2
votes
1answer
92 views

What is the best way to handle parametric circuits in Qiskit?

What is the best way to handle parametric circuits in Qiskit? When I create a variational form like TwoLocal and then do ...
2
votes
1answer
91 views

Is there a function in Qiskit to measure tensor products of Pauli operators?

Is there a function in Qiskit similar to this function in Q# which measures strings of Pauli operators applied to different qubits?
2
votes
0answers
46 views

What is the buffer time between gates of the ibmq_essex in nanoseconds?

This is a question that I asked on Qiskit ignis section of slack, with a very interesting answer by A Kapila, but I also need to get a short answer in nanoseconds. I want to evaluate decoherence in ...
2
votes
1answer
71 views

VQE jobs do not appear in queue

I am trying to calculate the ground state energy of some simple molecules using 'MolecularGroundStateEnergy' tools in qiskit. When I run the calculations for very small molecules (e.g. H2, HeH+) the ...
2
votes
0answers
59 views

QFT on timeseries Data and compare results with classical FFT

Intention - To learn and apply QFT on time-series data and compare the result with classical FFT. Data Used - Small timeseries data of 16 points - ...
2
votes
0answers
42 views

IBMQJob.result() returns KeyError: 'qObjectResult'

I'm running tomography job like I have done many times before. I send the job, and the job.status() is 'DONE'. But when I ask for ...
2
votes
0answers
36 views

How to simulate spin-1 systems with qiskit or on the IBMQ platform?

I am wondering how to simulate spin-1 systems with qiskit or on the IBMQ platform? I want to initialize a qudit (a spin-1 system), and then define the usual operations (such as Sx, Sy, and Sz) on the ...
2
votes
0answers
51 views

Easiest hash function to implement on Qiskit

Trying to build an Oracle circuit for Grover's algorithm that will try to find a desired input in order to get a certain output of a hash function. Was wondering if there were any 4 or 8 bit hash ...
2
votes
0answers
170 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 ...
2
votes
3answers
145 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}$ ...
2
votes
0answers
53 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 ...
2
votes
2answers
238 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 ...
2
votes
0answers
85 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
99 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
150 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
50 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 ...
1
vote
0answers
35 views

Getting Choi-matrix of a subsystem

In Qiskit, for a given QuantumCircuit object, you can computed its Choi-matrix via the corresponding Choi object, for example: <...
1
vote
0answers
52 views

HHL example solution on Qiskit

In the example on the Qiskit page (https://qiskit.org/textbook/ch-applications/hhl_tutorial.html#A.-Some-mathematical-background) section 3 for the HHL algorithm the author is trying to solve the ...
1
vote
1answer
47 views

ImportError when setting up PySCF driver

I have a problem when attempting to set up a PySCF driver for a hydrogen molecule from the QISKIT Chemistry tutorial: https://qiskit.org/documentation/tutorials/chemistry/01_electronic_structure.html. ...
1
vote
2answers
104 views

How to repeat circuit efficiently and reliably in IBM Qiskit?

I'm having a problem in IBM Qiskit with my qubit identities switching places during transpilation. I've been told by developers on the Qiskit slack server that there's currently no built-in way to fix ...
1
vote
1answer
43 views

Qiskit BasicAer & Aer

While I'm simulating grover's algorithm, I found that with BasicAer backend it works well but with Aer it is not. What is the difference between ...
1
vote
2answers
39 views

How to use VQE function in Qiskit

As part of a project I'm working on, I want to use VQE algorithm to calculate the minimal eigenvalue for given Hamiltonian. I use Qiskit on IBM UI online. The Hamiltonian is given as a sum of tensor ...
1
vote
0answers
37 views

qasm_simulator generating identical results repeatedly

I wish to run a very simple circuit on the qasm_simulator backend. My circuit is ...
1
vote
1answer
64 views

Why do the qasm_simulator runtimes vary significantly for different IBMQ CouplingMap/NoiseModels?

I have been running VQE experiments locally using the qasm_simulator with actual IBMQBackend NoiseModels as shown in the Qiskit Textbook. I have noticed that the ...
1
vote
0answers
36 views

Report measurement components for a given Hamiltonian measurement

I was wondering if there is a possibility to report measurement components when reporting the final expectation values of a qubit operator. For example, if we look at a simple Hydrogen molecule ...
1
vote
1answer
88 views

Unable to instantiate provider for research account locally

When I run IBMQ.load_account(). I have the error information: ...
1
vote
0answers
44 views

Deriving Expression For QAOA Optimal Trial State Parameters

I am going through the QAOA section in the Qiskit Textbook - QAOA and am stuck in one of the steps. In section 5.2, the method for getting the Optimal Trial State Parameters are discussed. I do not ...
1
vote
0answers
58 views

What is the advantage of QSVM over the classical SVM?

I am mainly talking about QSVM from Qiskit (https://qiskit.org/documentation/stubs/qiskit.aqua.algorithms.QSVM.html#qiskit.aqua.algorithms.QSVM) versus a classical SVM. Is it just a time complexity ...
1
vote
0answers
52 views

qiskit - MCMT - base gate acting on only one qubit

I want to reduce the depth of a ucrz gate acting on multiple qubits with ancilla qubits in qiskit. One way to do this could be the mcmt implementation with ...
1
vote
1answer
80 views

controlled-Z rotation gates in symmetrical fashion

I was going through the qiskit textbook and in this chapter, i came across a statement under the topic "Kickback with the T-gate" related to the Controlled-Z gate that "the controlled-...
1
vote
0answers
56 views

Changing the Basis

I am attempting to use a VQE algorithm to find the ground state of a deuterium nucleus by applying a constructed hamiltonian to an ansatz state with one parameter created by a circuit. While I am ...
1
vote
0answers
54 views

Help Understanding Line in Source Code

In Qiskit's implementation of the HHL algorithm, they have the following line at the end of their code that allows them to compute the global phase we need to add on to the solution. ...