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.

234 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
131 views

How many qubits would be needed to do boson sampling 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
145 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
70 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
214 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
180 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
55 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
2answers
163 views

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

I am running a VQEUCCFactory for H2 on a real hardware device. ...
4
votes
1answer
237 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
87 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
0answers
105 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
252 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
95 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
437 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
96 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
133 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
108 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
168 views

Does one measurement affect the following measurement errors in mid-circuit measurement?

Suppose I have a quantum circuit with a few measurements (say $N$) on a single qubit. Before all the measurements, I generated calibration circuits and the 2 by 2 calibration matrix for that qubit of ...
3
votes
0answers
55 views

How to impliment Projector Control-Not in Qiskit?

I want to impliment Projector Control-Not in Qiskit just like in this , which is a $|0\rangle\langle 0|$ projector found in the paper "Grand Unification of Quantum Algorithm" page 7. Also, ...
3
votes
0answers
28 views

Why the pulse scheduler produces a different output from the original circuit?

As part of a larger code, I have to convert a quantum circuit into a Pulse scheduler. The problem is that the scheduler output is incompatible with the circuit output. In particular, the difference ...
3
votes
0answers
35 views

Computing specific observable for a Clifford circuit

Given a clifford circuit, how can I simulate it efficiently to get the 2-RDM (reduced density matrix) $D^2=\langle a_i^\dagger a_j^\dagger a_k a_l\rangle$ in the presence of deplorizing error? The ...
3
votes
0answers
33 views

Is it possible to construct a QuantumCircuit object which only shows the 5 qubits and the classical bit where I store the measurement outcome?

I have a 5-qubit circuit on Qiskit, which applies some unitary. Then I have a second circuit which basically measures whether all the qubits are 1, and it does so through a 5-CNOT on an ancilla qubit, ...
3
votes
2answers
59 views

Enable qiskit editor in composer

For educational purposes I would like to make some circuits in the nice IBM quantum experience circuit composer GUI. The only problem is that the set of gates I can use here is quite limited (I would ...
3
votes
1answer
86 views

How can I run a VQE on one of IBMQ's Quantum Computers

I have implemented a VQE based on Qiskit's VQE function and want to run that on an actual quantum computer. My understanding was, that an IBMQ backend can be passed into the function as a Quantum ...
3
votes
0answers
42 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
47 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
72 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
0answers
51 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
103 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
1answer
233 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: ...
3
votes
0answers
148 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
91 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
419 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
268 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. ...
3
votes
1answer
168 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
199 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
130 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
240 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
137 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
633 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
136 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
102 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
557 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
27 views

Projection Operator in qiskit.opflow

I am looking for a way to implement a projection operator like $\mid +\rangle\langle+\mid$ in qiskits opflow module. I tried Plus @ ~Plus but this gives me an error ...
2
votes
1answer
31 views

Can the ancilla for Qiskit's mcx with mode="recursion" be dirty?

I think their implementation is close to the one from here which does use a dirty ancilla, but I just want to make sure
2
votes
0answers
49 views

Understanding Qiskit 0.32 's $\texttt{AmplificationProblem()}$ behaviour

This is related to my previous question. To apply amplitude amplification in Qiskit, one needs to use AmplificationProblem() or ...
2
votes
0answers
35 views

How to return phase angles as seen in IBMQ composer using qiskit?

I recently transitioned from using the IBMQ composer and am using qiskit in the IBM lab. To start, I wanted to learn how to reproduce the computational basis states, probabilities and phase angles as ...
2
votes
0answers
45 views

Getting the density matrix of a noisy state in Qiskit

Currently, it seems that qiskit can only compute the density matrix for a pure state. On the other hand, for noisy state, the known way to deal with it is to do sampling, which can induce great cost. ...
2
votes
0answers
39 views

How to convert code from QISKIT to QuEST using QASM

I have been working on this project which requires a lot of qubits. Originally we have made the whole project in QISKIT as we have been using it for a long time. But the maximum number of qubits that ...
2
votes
0answers
64 views

Eigenvalues and energy levels of 1D Heisenberg model using real Quantum Computers?

The 1D Quantum Heisenberg model is $$H_\textrm{Heisenberg} = -~J \sum_{\langle i\ j\rangle} \hat{S}_{i} \cdot \hat{S}_{j}$$ where each spin is an operator. For simple cases, for example, a system with ...
2
votes
0answers
79 views

Adding trainable weights to feature inputs for a CircuitQNN?

Currently I'm trying to get together a QNN that can be trained to classify the normalized (-1, 1) IRIS Dataset on all 3 classes. For this I am using Qiskit's ...

1
2 3 4 5