Skip to main content

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. Please include the version of Qiskit you use when using this tag.

Filter by
Sorted by
Tagged with
2 votes
2 answers
333 views

qiskit: IQFT acting on subsystem of reversed-ordered qubits state

I have a state psi as an ndarray of shape (2 ** 3,) s.t. psi[0]= amplitude of 000 ...
2 votes
1 answer
941 views

How can I get IBM's API token?

I need an API token to use IBM's real hardware(greater than 5 qubits) in Qiskit, where can I find the price?
2 votes
1 answer
58 views

IBM fake backend vs real backend

It is claimed that the fake backends of IBM will have noise similar to the real backends. However, to what extent can we expect them to produce the same results? I have run my quantum circuit on the ...
3 votes
0 answers
18 views

Gradient-free optimization in Qiskit without using pre-defined classes

Basically I want to build a gradient-free optimizer that classifies a very simple dataset (e.g. the sklearn make_moons) using scipy.optimize (Nelder-Mead or Powell ...
0 votes
2 answers
27 views

Quantum Computing - via Qiskit - error 403

A year ago, I registered in the IBM Quantum Computing app, which provides access to quantum computers and to simulators. I got an API key, and was able to run some programs. However, lately, I try to ...
1 vote
1 answer
71 views

How can I Combine Qiskit's VQE Tutorial and TSP Simulator to solve the TSP on a real backend efficiently?

I have a university project where I am trying to solve the Traveling Salesman Problem by using a real quantum backend, rather than just the VQE simulator, as in this tutorial. I found this code on ...
1 vote
1 answer
32 views

How to suppress long parameters list that appears in the initialize gate?

Below is a simplified code which I am using for a quantum circuit. ...
1 vote
1 answer
74 views

Simulator able to run SwitchCase in qiskit?

I am trying to run my circuit (shown below) on a simulator. However, the execution of the circuits fails with (almost) all the simulators, raising error ...
6 votes
1 answer
5k views

How to make circuit for n-control Z gate( i.e $C^3Z$ )?

I am trying to make circuit for $C^3Z$ gate I have seen a circuit for $C^2Z$ or $CCZ$ gate made by using $CCX$ gate so is there any way to make circuit for $C^3Z$ in this similar manner( i.e by using $...
0 votes
1 answer
48 views

Increase execution speed of qiskit based python code for qasm_simulator

When you run a qiskit based code on HPC system, do it really matters how many cores you are using? I am running a VQE based code on HPC system on ...
1 vote
2 answers
309 views

Random accuracy using VQC and Iris dataset

Using the same seed (seed_simulator and seed_transpiler) I get different accuracy when running it several times. In Aqua library (from qiskit.aqua.algorithms import VQC) I solved it adding ...
2 votes
1 answer
158 views

Does subtraction circuit have a class like full or half Carry adder circuit in qiskit? one subtraction circuit code-example in qiskit?

I need a subtraction circuit to calculate Laplacian in edge processing, but I didn't find any class in qiskit.Do I have to write the code myself?
1 vote
2 answers
402 views

Gradient descent for a quantum-classical hybrid neural network

I am working on implementing a quantum-classical hybrid neural network in qiskit where input data is encoded on a quantum circuit (with say 3 qubits) using a ...
5 votes
1 answer
686 views

Are Quantum Computers Bad at Addition?

I recently built a dynamic full adder gate with Qiskit. The gate essentially copies the classical computing method for a full adder by emulating the classical gates e.g. AND == Toffoli (Quantum AND ...
0 votes
0 answers
32 views

Calibrating qubits using Qiskit Pulse with Qiskit 1.0

I am trying to implement this notebook using the updated Qiskit 1.0. I have managed to update the code so that the job runs successfully on the IBM computer and I get the correct result. However, ...
1 vote
0 answers
51 views

State tomography in Qiskit on a subset of qubits of real QPU

Could anyone please explain how should I carry out a state tomography on a real device in Qiskit (version 0.43.2)? I have access to devices with 127 qubits, but I want to perform a simulation using ...
0 votes
1 answer
36 views

Density Matrix for a Quantum Circuit with Clifford Gates and a $T$ Gate in Qiskit

I am trying to analyze the impact of a single $T$ gate within a quantum circuit that primarily consists of Clifford gates. My goal is to understand the $T$ gate's role in $T$-design and Anti-...
1 vote
0 answers
29 views

Install error in Google Colab [migrated]

The following is my code: ...
0 votes
1 answer
210 views

Qiskit: Sum of Kraus operators are not equal to identity matrix

I know that one of the properties of the Kraus Operator is: $$\sum_k A_k^\dagger A_k=I\,.$$ So, in qiskit, I first converted my array to a super operator, and then I found my Kraus operators. However, ...
0 votes
1 answer
107 views

How to use backend.run() with a constant pulse shape in order to get the results of a measurement?

I have formed a constant pulse and then I ran a measurement on the pulse. Now, I want to run a job to access the results of the measurement. Attached is a picture of the pulse and measurement. Now, at ...
-1 votes
1 answer
229 views

Unable to instantiate provider for research account locally

When I run IBMQ.load_account(). I have the error information: ...
3 votes
1 answer
333 views

Why do the same circult yields very different results from different IBM backends?

I was running the IBM qiskit sample code and noticed that the results vary on different backends. I thought it was quantum noise, so I repeated the same calculation on many different backends and got ...
0 votes
1 answer
79 views

Implementing Custom Gates by using Qiskit Pulse in Qiskit 1.0.0

I'm using Qiskit 1.0.0. I'm trying to define a custom gate from a certain wavefunction and insert it in a quantum circuit that I want to run and measure the counts. The relevant code for the question ...
3 votes
0 answers
35 views

Failed - Internal Error when running on ibmq

I tried to apply a series of an inverse QFT on a single qubit depending on a previous measurement, but when a depth of a circuit became longer I encountered an internal error, ...
0 votes
1 answer
389 views

ModuleNotFoundError: No module named 'qiskit.extensions'

Environment Qiskit Finance version: 0.5.0 Python version: Using the Qiskit Lab v1.0.0 Operating system: Windows 11 Hi, technically I am new to this quantum computing stuff. I see that an upgrade of ...
0 votes
0 answers
29 views

CircuitTooWideForTarget error when using Clifford simulator in Qiskit

I want to use the local Clifford AerSimulator with the Estimator primitive in Qiskit to calculate expectation values on Clifford circuits, but I am getting a CircuitTooWideForTarget error: ...
1 vote
1 answer
126 views

AttributeError: 'ADAM' object has no attribute 'optimize'

I have imported ADAM optimizer in the following way: from qiskit.algorithms.optimizers import COBYLA, ADAM, SPSA, SLSQP, POWELL, L_BFGS_B, TNC, AQGD Afterwards, I ...
1 vote
1 answer
175 views

Qiskit spends a lot of time on method acquire of thread.lock objects

I am trying to run VQE algorithm with Qiskit, using the following code: ...
1 vote
2 answers
94 views

Using GPUs with Statevector Simulator in Qiskit 1.0

I'm trying to use the AerStatevector method with GPUs. I know that GPUs on my server are correctly configured, and indeed, if I use ...
2 votes
1 answer
100 views

Where to find the Grover's algorithm for Qiskit 1.0.2?

Can anyone please provide me with the latest version of qiskit 1.0.2 Grover's algorithm, as the earlier version is throwing an error.
1 vote
0 answers
43 views

Is this quantum circuit design more prone to noise?

I am designing a quantum circuit which uses one qubit as the control of many $\text{CSWAP}$ operations. And then, this qubit will be measured. Will the result be more prone to noise since all the ...
2 votes
1 answer
55 views

What does Qiskit AerSimulator(memory=True) do?

I followed this Qiskit course through Deutsch's algorithm and all seems clear to me except the use of the optional parameter memory=true when making the call to <...
2 votes
0 answers
47 views

Layout error with after compilation with custom Qiskit pass manager

I am trying to implement the custom Qiskit pass manager from this paper. The code from the authors is provided here on GitHub. I am able to get the pass manager working, and a compiled circuit is ...
1 vote
1 answer
52 views

Simulating Large Quantum Systems with Single T-Gate in Qiskit: Memory Error Beyond Certain Qubit Threshold

I'm currently conducting experiments on unitary t-designs, utilizing random Clifford and T gates within the Qiskit framework. My goal is to simulate quantum circuits that involve the application of a ...
0 votes
1 answer
262 views

How to assign new parameters to an existing quantum circuit?

Say I have a quantum circuit like this This is an ansatz for solving linear equation provided in the Qiskit's textbook In the textbook, it was shown how to find the optimal parameters of this ansatz ...
3 votes
1 answer
115 views

Where can I find a comprehensive list of gate decompositions used by transpilers?

Does anyone know of a web site, paper etc. that has a list of "gate decompositions" e.g. the kind of decompositions that occur when the transpiler decomposes non-native gates to native gates....
1 vote
1 answer
130 views

How to fix two flip-bit errors in a 3 qubit input

Aware of how a 1-bit flip can be fixed for 3-qubit input by having 2 Ancilla bits, encoding, and using the Toffoli gate to fix the error and decode. How can this idea be extended for a 2-bit flip (...
1 vote
0 answers
26 views

VQLS behaves badly under simulation with noise

I was studying VQLS in https://qiskit.org/textbook/ch-paper-implementations/vqls.html and since I could not understand the circuit created by the new Hadamard test (...
2 votes
1 answer
209 views

Coupling map in QISKIT transpile

I have a 3-qubit unitary represented by a circuit with the following dictionary: {'cx': 30, 'h': 22, 'rz': 15, 's': 4, 'sdg': 4}. I want to use this circuit on IBM ...
2 votes
1 answer
201 views

Inverse Quantum Fourier Transformation

I have the exercise to implement the Inverse QFT with Qiskit for any number of qubits without the swapping part. I tried to implement something like this for any $n$. Now I got this code but it doesn'...
2 votes
3 answers
301 views

Is there a way to use a fake backend for ibm_brisbane?

Is there a way to use a fake backend for ibm_brisbane? I tried this but it is giving me the error that the backend is not present: ...
1 vote
0 answers
25 views

How to combine a VQE circuit with normal qiskit quantum circuit without parameters and give the measured set of qubits to the estimator?

I want to use a parameterized quantum-circuit which is $\text{CNOT}$ with another quantum-circuit that has no parameters, then after a series of gates on the second quantum-circuit, I want to measure ...
3 votes
1 answer
350 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
0 answers
42 views

Failed to load program into HAL component

I'm getting this error message when I execute my qiskit code on one of the available quantum computers of IBM: ...
2 votes
1 answer
167 views

Comparative analysis of TensorFlow-Quantum, Pennylane, and Qiskit, to implement quantum CNNs

I am currently working on a project wherein I have to implement a Quantum Convolutional Neural Network. The best options for NISQ devices are hybrid algorithms, so I will try integrating quantum ...
0 votes
1 answer
48 views

Full result of qiskit sampler

In Qiskit, I have a quantum circuit of 20 qubits. Hence the measurement result I am expecting is a dictionary of size 2^20. However, the quasi_dists from ...
1 vote
0 answers
54 views

Two-level unitary gates are decomposed into single-qubit gates and CNOT gates

I am currently studying the following from the book 'QUANTUM COMPUTING: From Linear Algebra to - Mikio Nakahara' and trying to apply it to Qiskit. But there is one point that I don't quite understand....
2 votes
1 answer
93 views

I have a questions about the represented values in the chapter “Advanced single bit gates”

I don't understand what are the values of this table at the very end is representing. My question: Does decimal values in the table represent Frequency divided by shots?
1 vote
2 answers
74 views

How to calculate the expected value of a quantum operator in Qiskit (after deprecations)

Background In 2022 Qiskit released a very nice tutorial detailing how the expectation value of an operator could be found using CircuitOp. As of 2024, these ...
1 vote
2 answers
227 views

Invalid option cuStateVec_enable

I was trying to use qiskit with cuQuantum. And was able to build Qiskit Aer with cuQuantum without any errors, but cuStateVec is still not used for simulations. When I pass the ...

1
2 3 4 5
47