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.

193 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
67 views

Can boson sampling be simulated in Qiskit?

In December 2020, there was this claim of quantum advantage/supremacy by a team of USTC using Gaussian boson sampling. Here is the paper and here is an explanatory news article in Nature. To get an ...
6
votes
0answers
60 views

AWS Braket Backend for Qiskit?

Is there a working AWS Braket backend provider for Qiskit 0.29 that can be used with the MinimumEigenOptimizer interface? The qiskit-aws-braket-provider package is unfortunately not working.
5
votes
1answer
55 views

Enforcing a particular layout mapping in Qiskit

I would like to ask how to set a particular layout during transpiling. I guess that the layout can be set by the initial_layout parameter in the transpiler. However,...
5
votes
1answer
136 views

Two qubit gate decomposition in using Qiskit

I am writing some python code to be able to optimise the total error in two qubit gate decomposition. I am using the Qiskit module qiskit.quantum_info.synthesis.two_qubit_decompose My question relates ...
5
votes
1answer
141 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
53 views

Extract the Crosstalk noise of a circuit in Qiskit

I'm new to Quantum Computing. How to extract the cross-talk noise of a quantum circuit using qiskit? Can someone provide an example code for this?
4
votes
1answer
190 views

Simulation of a helium molecule using Qskit

I am trying to compute the ground state energy of He-He using VQE. For this purpose I have utilized Qskit and have written the following script: ...
4
votes
0answers
71 views

Run VQE for parametrized quantum circuit with ancilla qubits

Let's say we have the following circuit (picture and code shown below), and now the $q_0$ is an ancilla qubit. If the system of interest has only two qubits, Is there a way to use only $q_{1,2}$ as my ...
4
votes
1answer
252 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?
4
votes
0answers
99 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
0answers
240 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
89 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 ...
4
votes
0answers
415 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
0answers
89 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 ...
4
votes
0answers
123 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
99 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
19 views

How to design a RF-SQUID qubit by Qiskit Metal?

I am now learning how to use Qiskit Metal to design superconducting circuits. I found that there are only several transmon qubits in the library. Can I design an RF-SQUID qubit by using Qiskit metal? ...
3
votes
0answers
37 views

Writing circuits in Qiskit using only Clifford and T gates

Is there a way in Qiskit to write my circuit using only Clifford and T gates (CX, S, H, T and I think also $S^\dagger$ and $T^\dagger$)? With the function compile (with aer simulator) it gives me some ...
3
votes
0answers
61 views

"503: Server Unavailable. Your server appears to be down. Try restarting it from the hub". Help

This message is popping continuously for 2 days in my IBM Quantum lab. I have tried logging out and in again, restarting the browser, changing the internet connection, and changing the device but this ...
3
votes
0answers
69 views

How exactly does the QuantumCircuit.decompose() method work?

From what I can understand from the source code, the circuit is converted into a DAG before the decomposition transpiler is performed onto the DAG circuit. How does converting to a DAG circuit help us ...
3
votes
1answer
120 views

How do I identify a VQE job run in real hardware?

I am running a VQEUCCFactory for H2 on a real hardware device. ...
3
votes
0answers
42 views

What are the correct eigenvalues to use in controlled rotation in HHL?

I'm studying the HHL algorithm from the qiskit textbook, but I don't understand what $\lambda$ we have to use. If my matrix $A$ has eigenvalues that can be written in a binary representation, then, ...
3
votes
0answers
98 views

Transpiler fails after 1000 iterations

I'm transpiling a set of quantum circuits using ibmq_5_yorktown. However, as the number of circuits gets larger, it shows me the following error message: ...
3
votes
0answers
134 views

Implemented QAOA returns wrong result

I try to apply QAOA algorithm to find minimal energy state of the Hamiltonian: $H_A = \frac{1}{2}\sigma_z^1 + \frac{1}{2}\sigma_z^1\sigma_z^2$ It is expected that with p=2 my variational should ...
3
votes
1answer
77 views

What are the possible gates that I can use to vary input states before CNOT?

We know that the noise of the $\text{CNOT}$ gate varies depending on the input state before it. What are the gates that I can put in the place of the 4 identity gates above to change the input state ...
3
votes
0answers
320 views

qiskit: Traveling Salesman Problem using QAOA fails for more than 3 cities

I tried to implement the traveling salesman problem (TSP) using QAOA with qiskit. I worked with this qiskit QAOA tutorial and this qiskit minimum eigen optimizer tutorial, where they implement a TSP ...
3
votes
1answer
157 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 ...
3
votes
1answer
147 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
116 views

Grover's algorithm for 3SAT problem gives erroneous results

I'm writing some 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 <...
3
votes
0answers
210 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
128 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
2answers
509 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 ...
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
0answers
92 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
539 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
31 views

Save output, wavefunction file and orbital information in Qiskit

I am going through LiH ground state energy calculation. I would like to know how to save the output file in Qiskit as one would do in classical computing using software like Gaussian or Psi4. Also, ...
2
votes
0answers
53 views

How can I add custom pulse gate to the Qiskit circuit?

I tried to make my pulse and get the pulse into the circuit. But it seems not working properly. The code and the result are below. Just change the 'x' to the 'h' (hadamard) with the same piecewise ...
2
votes
0answers
78 views

Applying projectors with mid-circuit measurements

I am trying to apply a non-unitary projector (see image) to my two-qubit quantum circuit using mid-circuit measurements. $$ \begin{pmatrix} 0 & 0 & 0 & 0 \ 0 & 1 & 0 & 0 \ 0 &...
2
votes
2answers
69 views

How to Implement a noisy identity gate on qiskit?

I can successfully implement the U gate (single qubit) on qiskit, but when I am trying for the identity operation it is not showing any differences with the ideal one .
2
votes
0answers
25 views

Managing memory while running a high depth circuit simulation (amplitude amplification) using Qiskit

I am running an instance of amplitude amplification using Qiskit (v 26) on Google Colab. The circuit is approximately 17 qubits in space and $O(ck)$ in depth where $k \in \left \{1,2,3....,22 \right \...
2
votes
0answers
47 views

Issues in calculating exact runtime on ibmq_16_melbourne

I am working on calculating the exact runtime of a quantum circuit on the ibmq_16_melbourne device. I am using the API ...
2
votes
0answers
41 views

How to turn a 'term' in a QuantumError into a QuantumError?

A QuantumError class may have many terms, and we can use .error_term(position) to have a look at each term. But it returns a list instead of another QuantumError ...
2
votes
0answers
70 views

How accurate are Qiskit’s unitary and Statevector simulators for very large circuits?

Background: I wrote a code that takes a Qiskit circuit C as an input and outputs a random circuit C’ such that C and C’ have the same unitaries. I tested my code using Qiskit’s Statevector simulator ...
2
votes
0answers
73 views

Iterative Phase Estimation with noise vs standard Quantum Phase Estimation with noise

I am doing Qiskit Lab 4 about Iterative Phase Estimation. I created a circuit implementing IPE for theta = 1/3 (phase of 2pi/3). Here's the circuit: It seems to do okay if I run it without noise in a ...
2
votes
1answer
75 views

How to solve TSP problem with more than 3 nodes in the tutorial of Max-Cut and Traveling Salesman Problem?

I had to try the example of qiskit’s Traveling Salesman Problem with 3 nodes and executing it at IBM backend called simulator_statevector.Can execute and get the result normally. But when trying to ...
2
votes
1answer
108 views

How fast is qiskit to_gate() method, which is used to convert circuit to gate?

I have prepared a quantum circuit, which is using 13 qubits. Now, I am converting this circuit to gate but it is taking around avg. 35s for conversion. It would have have been fine, if I require only ...
2
votes
0answers
29 views

What would be a real-life example of using a quantum workflow oriented tool/environment, such as through Orquestra?

Recently, a unified quantum software and hardware platform, Orquestra was released. My question is, what could be a real-life (step by step) example of using this kind of workflow? As existing quantum ...
2
votes
0answers
69 views

Calculating exact expectation values on ibmq_qasm_simulator

In order to calculate the exact expectation value of a Pauli operator in some state using local qasm_simulator, I do ...
2
votes
0answers
69 views

Qiskit CircuitStateFn.eval() on more than 16 qubits

The definition of Qiskit CircuitStateFn.eval() is as follows: ...
2
votes
1answer
142 views

API error when trying to access IBM Quantum Computer using IBMQ API Token

I'm trying to write a code so that if the token exists then it loads the account or else it asks the user for the API token. Below is the code for reference: ...