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.

307 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
0 answers
181 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 ...
user avatar
  • 1,175
7 votes
1 answer
88 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,...
user avatar
  • 71
5 votes
0 answers
80 views

How linear combination of unitaries gradient work (Qiskit, PennyLane)?

I'm trying to implement linear combination of unitaries(LCU) gradient from Qiskit Gradient Framework but on PennyLane. First, i looked through the source code in Qiskit. In Qiskit LCU gradient if we ...
user avatar
5 votes
1 answer
315 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 ...
user avatar
  • 131
5 votes
0 answers
103 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 ...
user avatar
  • 830
5 votes
0 answers
114 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 ...
user avatar
5 votes
0 answers
139 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 ...
user avatar
4 votes
0 answers
41 views

Predator–prey theory

We have a project where we are supposed to simulate the predator–prey theory in qiskit. Can anyone help or suggest of any ways to start from somewhere because we are kinda lost.
user avatar
4 votes
0 answers
65 views

How to implement a gate that generate a uniform superposition of all permutation of element

I'm looking for a quantum circuit that permits generating a uniform superposition of all possible permutations for example if we have as input $|0123\rangle$ the output will be the uniform ...
user avatar
4 votes
0 answers
111 views

Quantum State Tomography Implementation in IBMQ

I am working to understand quantum state tomography, specifically using the algorithm presented in PRL 108, 070502. This paper is referenced in IBMQ implementations of QST, both in old deprecated ...
user avatar
4 votes
1 answer
208 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 ...
user avatar
  • 41
4 votes
0 answers
74 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?
user avatar
4 votes
1 answer
321 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: ...
user avatar
4 votes
0 answers
109 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 ...
user avatar
4 votes
0 answers
152 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 ...
user avatar
4 votes
0 answers
274 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 ...
user avatar
4 votes
0 answers
97 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 ...
user avatar
  • 141
4 votes
0 answers
460 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 ...
user avatar
4 votes
0 answers
122 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 $\...
user avatar
  • 103
3 votes
0 answers
28 views

How to set the meas_level and optimization_level in Quantum Azure IonQ provider?

I am performing a benchmark process using the Azure Quantum IonQ provider. I use Qiskit in the Azure platform, and I was trying to see how to control the transpiling and compiling process. It seems ...
user avatar
  • 284
3 votes
0 answers
36 views

Why does running a pulse schedule for Bell circuit give incorrect counts?

As part of another project I need to be able to run a custom pulse schedule for a bell ciruit and measure the counts. However I am having a problem where running the scheduled circuit is giving counts ...
user avatar
3 votes
0 answers
62 views

What is the most efficient method to update the binary encoded values inside a quantum state?

We're implementing a QML algorithm in which we have to update the value stored inside a quantum state which is strictly unknown to us, by multiplying it with a real number classically stored with us. ...
user avatar
3 votes
1 answer
199 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 ...
user avatar
  • 2,218
3 votes
0 answers
36 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 ...
user avatar
3 votes
1 answer
48 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
user avatar
  • 316
3 votes
0 answers
46 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 ...
user avatar
3 votes
0 answers
36 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, ...
user avatar
3 votes
1 answer
70 views

unsymmetric observable estimation by Qiskit

Assume $|i\rangle,i\in[1,m]$ is a set of states, like the Fock states for Fermions. The question is how to compute the quantity,$\langle i |H|j\rangle,i,j\in[1,m]$, in qiskit. The $H$ here is the ...
user avatar
3 votes
0 answers
57 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? ...
user avatar
3 votes
0 answers
58 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 ...
user avatar
  • 151
3 votes
0 answers
75 views

Generate certain depth Clifford random circuit by qiskit

To obtain knowledge about the pattern of errors occur in quantum circuits, random Clifford circuits are a good paradigm to use in that these kind of circuits can be efficiently simulated by a ...
user avatar
3 votes
0 answers
81 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 ...
user avatar
  • 73
3 votes
0 answers
55 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, ...
user avatar
  • 118
3 votes
1 answer
136 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 ...
user avatar
  • 31
3 votes
0 answers
106 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: ...
user avatar
  • 2,218
3 votes
0 answers
162 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 ...
user avatar
3 votes
1 answer
105 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 ...
user avatar
  • 79
3 votes
0 answers
540 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 ...
user avatar
  • 145
3 votes
1 answer
418 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. ...
user avatar
  • 61
3 votes
1 answer
225 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 ...
user avatar
  • 57
3 votes
0 answers
356 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 ...
user avatar
3 votes
0 answers
145 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 <...
user avatar
3 votes
0 answers
285 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 ...
user avatar
  • 535
3 votes
2 answers
838 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 ...
user avatar
  • 1,263
3 votes
0 answers
137 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: ...
user avatar
3 votes
0 answers
109 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 ...
user avatar
  • 131
3 votes
0 answers
576 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 ...
user avatar
2 votes
0 answers
29 views

How to calculate Quantum Discord for two qubit system using Qutip?

Quantum discord of a bipartite system can be determined as: $${D_A}({\rho _{AB}}) = I({\rho _{AB}}) - {J_A}({\rho _{AB}}),$$ The subscript of $A$ denotes that the measurement has been performed on the ...
user avatar
2 votes
1 answer
81 views

How can I know the number of qubits used in a job in qiskit?

How can I know the number of qubits used in a job in qiskit? I can always do something like ...
user avatar
2 votes
0 answers
69 views

What phase should I expect from pauli X?

Here's an example I found that implements the phase estimation algorithm: Here the eigenvector is initialized to the $|+\rangle$ state, which is an eigenvector of Pauli X with eigenvalue 1. The ...
user avatar
  • 305

1
2 3 4 5
7