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
0 votes
0 answers
6 views

Self referencing algorithms for multiplication of binary polynomials

Currently, I am going through the paper "Space-efficient quantum multiplication of polynomials for binary finite fields with sub-quadratic Toffoli gate count" by Iggy van Hoof. Two ...
Ash Ketchum's user avatar
2 votes
1 answer
124 views

Questions on multi-controlled Toffolis and their implementation in Qiskit

Is it possible to decompose an $n$-controlled Toffoli into $O(n)$ CNOTs without extra working qubits? If so, is such an decomposition currently available in Qiskit or any other (preferably Python and ...
mavzolej's user avatar
  • 1,852
1 vote
0 answers
19 views

How can I initialize a classic register in qiskit?

is there a way to initialize a classic register in qiskit? I will go quickly through my problem and then suggest one solution but I am not satisfied with that and ask if there is another solution. ...
Qubii's user avatar
  • 171
0 votes
0 answers
36 views

Parallelize estimation of expectation values in Qiskit

Edit I tried using python multiprocessing library. The result with 8 cores isn't always faster than the original script that uses only one core. How can i improve the algorithm? Suppose i've a matrix ...
ar3q5dr9's user avatar
0 votes
1 answer
29 views

In Qiskit, no state vector after measure and reset

The code below doesn't work. I am looking for a workaround. OK, I can save the state vector as numpy array, recreate the whole circuit and initialize it thanks to this array. It works, but any simpler ...
Maurice Clerc's user avatar
0 votes
1 answer
17 views

Passing a book-keeping parameter to Qiskit Ibm Runtime Estimator

I have a Qiskit.QuantumCircuit object circ which prepares the state $| \Psi \rangle$, and a ...
squareroottwo's user avatar
0 votes
0 answers
24 views

How to 'quantize' a classical code?

I have a class written in Python: ...
Ash Ketchum's user avatar
0 votes
0 answers
23 views

Remove a register from a quantum circuit

I am trying to make a function like this in Qiskit: ...
Ash Ketchum's user avatar
1 vote
2 answers
38 views

Access individual qubits of a quantum circuit in qiskit by qubit name

I am very new to quantum computing and only recently started learning Qiskit, so the question may sound a bit silly. Essentially, when I create a QuantumCircuit ...
Ash Ketchum's user avatar
0 votes
0 answers
6 views

QISKIT Metal Saves Error Generating Python Code

Background I'm testing out the ability of the Metal GUI to save a simple circuit but it keeps generating code that gives rise to various errors. In the below code for example generates an error show ...
Shadow43375's user avatar
1 vote
1 answer
19 views

Is qiskit.pulse.SamplePulse deprecated?

I'm currently following along the book "Learn Quantum Computing with Python and IBM Quantum Experience" by Rodert Loredo and I am at chapter 8 - Generating pulse schedules on hardware. The ...
Johannes Jyrgenson's user avatar
1 vote
1 answer
31 views

What is the difference between shot and iteration of the quantum circuit?

Hi this question is stem from What is meant with "shot" in quantum computation?. If we just look for the distribution of the result, is there any theoretical difference between method 1 and ...
JYLEE's user avatar
  • 21
0 votes
0 answers
15 views

How to deal with unused qubits in application specific quantum chips?

Background I am a complete novice to quantum hardware but am trying to give myself an introduction to Qiskit Metal. I have set myself the challenge of designing a custom quantum chip for the Bernstein-...
Shadow43375's user avatar
0 votes
0 answers
9 views

Quantum Annealing on IBMQ using Qiskit-Pulse

Qiskit-Pulse is the analog level control SDK of IBMQ hardware. Is it possible to implement an adiabatic annealing protocol/algorithm on IBMQ hardware using Qiskit-Pulse? Not asking about QAOA, which I ...
The Quantum Enthusiast's user avatar
1 vote
2 answers
94 views

Is there a way to perform Zero Noise Extrapolation with qiskit without using the runtime service?

Qiskit Runtime is capable of performing Zero Noise Extrapolation (ZNE) using the Estimator primitive. However, due to memory restrictions on IBM cloud, I would like ...
squareroottwo's user avatar
0 votes
1 answer
36 views

Frequency of qubits in qiskit simulators

I am trying to study the effect of dynamical decoupling sequences (Hahn Echo and CPMG) using qiskit's qasm_simulator with an added noise model from ...
Neelesh Vij's user avatar
1 vote
0 answers
10 views

Outputing classification probability from the Qiskit VQC

I am new to Qiskit. For the last few days, I have been trying to train my first VQC to do some classification task. Now the VQC is successfully running but it could only output a label whenever I ask ...
Zhelun Li's user avatar
1 vote
0 answers
20 views

Measuring a single-qubit PauliZ using Qiskit's EstimatorQNN

I am currently working with the EstimatorQNN from Qiskit to construct a Quantum Neural Network using a custom Parametrized Quantum Circuit. But I want to change the ...
yeray142's user avatar
0 votes
1 answer
45 views

Netlist of the transpiled circuit in Qiskit

I am new to running quantum circuits in Qiskit. In the IBM quantum learning lab, I transpiled a simple 4-qubit quantum circuit using a 7-qubit IBM quantum computer. I received a tranpiled circuit ...
mridula's user avatar
1 vote
0 answers
44 views

Increasing memory usage of simulation of quantum circuits in a "for" loop

I have the following code: ...
stopper's user avatar
  • 373
3 votes
0 answers
86 views

Estimating $\pi$ using Quantum Computing - why does it work only in simulator?

I followed the steps from the Qiskit tutorial on YouTube titled "How can I estimate Pi using a quantum computer? - 1 Minute Qiskit" The code uses Qiskit and apparently works successfully ...
Rodrigo Hjort's user avatar
1 vote
0 answers
31 views

Are there libraries based on qiskit that can trace over unentangled qubits?

Suppose I have a QuantumCircuit object qc, which contains some unentangled qubits, and a Hamiltonian whose expectation value I ...
squareroottwo's user avatar
1 vote
0 answers
11 views

Adding measurement circuits to the singlet state circuit and want to create single circuit

I am trying to add the measurement of Alice and bob's circuit to the singlet circuit. Actually, I am trying to build the e91 protocol. But it is giving me an error like this. ...
Bloodknofsky's user avatar
1 vote
1 answer
36 views

Simulator able to run SwitchCase in qiskit?

I am trying to run my circuit which is the following on a simulator. However, when I want to execute this on almost all the simulators the following error pops up: "The control-flow construct '...
Navid Elyasi's user avatar
1 vote
0 answers
43 views

Is there a publicly available compiler for OpenQasm3?

Today (Nov 2023) using OpenQasm3 in the IBM ecosystem can only be done by exporting OpenQasm3 programs to python QuantumCircuit object via qiskit.qasm3.load and qiskit.qasm3.loads or by exporting ...
Radu M.'s user avatar
  • 292
1 vote
1 answer
33 views

Mapping a QUBO onto an observable for use with Qiskit QAOA

Background I am attempting to understand the post-aqua way that external qiskit libraries are supposed to be used for solving QUBOs. To do so I am trying to work with the toy problem of minimizing $f(...
Shadow43375's user avatar
2 votes
2 answers
64 views

Conditioned gates with multiple classical bits

Consider a circuit where you have 6 qubits and apply some gates. Then, you measure qubits 1 , 2 , 3 with results $c_1 , c_2 , c_3$. Next you apply $X^{c_1}$ on the 4-th qubit, $X^{c_1 + c_2}$ on the 5-...
ar3q5dr9's user avatar
3 votes
0 answers
21 views

qiskit QAOA on Aer GPU giving errors

I am trying to run Qiskit QAOA algorithm on using aer simulator and device GPU. But I am not sure how to give this backend in the QAOA algorithm structure. Here is ...
to_batman's user avatar
2 votes
0 answers
76 views

Improve accuracy of fake backends while remaining realistic

If I run the code backend = FakeLima() nm = NoiseModel.from_backend(backend) print(nm.__dict__.keys()) I get the following output: ...
stopper's user avatar
  • 373
2 votes
1 answer
109 views

If_test() - Dynamic Circuits in qiskit

I am trying to run a dynamic circuit by having mid-measurement in my code as follows: ...
Navid Elyasi's user avatar
1 vote
0 answers
66 views

How to explain the output as $|-\rangle$

I am a complete newbie to quantum computing and qiskit. I am trying to implement $H$ gate in Measurement-Based QC architecture based on a paper "Qiskit As a Simulation Platform for Measurement-...
user27306's user avatar
1 vote
1 answer
69 views

Why doesn´t Grover's Algorithm work for my Qiskit circuit?

I built a circuit in Qiskit with two GHZ states. In the beginning, I created the superposition $\sim\bigg(|0000\rangle+|0101\rangle+|1010\rangle+|1111\rangle\bigg)$ with two $H$s, and two $CNOT$s. Now,...
Manuel's user avatar
  • 43
2 votes
0 answers
13 views

Understanding the Role of Qiskit's VQE Code in Light of Pre-calculated Zero-Point Vibrational Energy in Gaussian Files

In the context of quantum computational chemistry, the Qiskit VQE (Variational Quantum Eigensolver) code is often used to calculate the vibrational energies of molecules, including the zero-point ...
Akash Yadav's user avatar
1 vote
1 answer
39 views

How is a linear combination of pauli operators applied to a quantum circuit in qiskit?

Consider a quantum circuit of 2 qubit: quantumcircuit = QuantumCircuit(2) If one wishes to apply a Pauli-X operator to the first qubit, one writes: ...
Physkid's user avatar
  • 510
2 votes
1 answer
82 views

How to measure in $\sigma_x$ basis in Qiskit? [duplicate]

As we know, Qiskit can give us the results of our measurements in computational or, better to say, $\sigma_z$ basis. However, I am courageous about measuring the qubit in, for instance, $\sigma_x$ ...
Navid Elyasi's user avatar
1 vote
1 answer
37 views

QISKIT: ValueError: too many subscripts in einsum DensityMatrix()

I am trying to compute the entanglement entropy of a partition of a quantum system on qiskit. To do this, I call the function DensityMatrix(). If I go above 10 sites (e.g. 12), I get an error like: ...
Alberto Zorzato's user avatar
0 votes
1 answer
22 views

What does U mean in pulse schedules for superconducting quantum computers?

What does U channel mean in pulse schedules for superconducting devices? In the image you can see the schedule for a CX gate. I assume D stands for the drive channels. What does U mean, is it perhaps ...
Radu M.'s user avatar
  • 292
2 votes
0 answers
65 views

How to do modular exponentiation in qiskit with gates?

I understand the following code on why the specific swaps take place, but when I try to replicate it with $N=35$, I get confused. ...
James Garcia's user avatar
1 vote
1 answer
50 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 (...
codeit's user avatar
  • 69
2 votes
1 answer
110 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'...
Ruebli's user avatar
  • 85
1 vote
0 answers
30 views

Implementation of Quantum Random Projection

I want to implement quantum version of Random Projection Dimensionality Reduction Technique on a dataset. Even after using the latest version of Qiskit, it gives the following error: ...
Abhishek Choudhary's user avatar
1 vote
0 answers
37 views

PulseSchedule jobs not getting submitted on Pulse enabled machines on IBM Quantum

There was a recent migration, referring the below document: https://qiskit.org/ecosystem/ibm-provider/tutorials/Migration_Guide_from_qiskit-ibmq-provider.html Before this migration, I was using IBMQ ...
Amey Meher's user avatar
1 vote
0 answers
22 views

ZNE for mitigating errors in probability distribution results

Can ZNE be applied to mitigate errors for getting the probability distribution in the computational basis rather than mitigating errors for calculation of expectation values?
Amey Meher's user avatar
1 vote
1 answer
54 views

Phase shift on qiskit quantum teleportation simulation

I wonder in Qiskit why the phase shift occurred in my simulation and how I can turn it off. I posted another question regarding the same simulation here, and while I tried to solve this on my own, I ...
quantum_quantum's user avatar
3 votes
1 answer
41 views

Retrieving job result attributes in Qiskit

I am trying to optimize a Hamiltonian using QAOA in IBM Qiskit. I used the following 'minimize' function to get my result. (I am not including the whole code because it will get unnecessarily long). <...
Amrita's user avatar
  • 31
2 votes
0 answers
24 views

What is the mathematical rationale for the decompose() function of qiskit?

The decompose() function decomposes the encapsulated quantum module into sets of elementary quantum gates. But what is the math behind its operation? For example how is a diag[1,1,1,1,1-1,1,1,1,1] ...
Ren-Xin Zhao's user avatar
1 vote
1 answer
113 views

Get parameters of a CU gate for implementing an erroneous CX gate with fidelity = 0.81

Let's say the definition of an erroneous CNOT gate is given as - CNOT is a 2-qubit quantum gate when the control qubit is at state 0, applies identity operation on the target qubit, when the control ...
codeit's user avatar
  • 69
1 vote
1 answer
50 views

I have two Choi matrix I suspect be equivalent. Can I manipulate them?

I am performing a process tomography over a protocol I suspect to be equivalent to the $CS$ gate. To compare basic operators I usually compute the Choi matrix of the target gate -- which in this case ...
Daniele Cuomo's user avatar
1 vote
1 answer
59 views

Is Qiskit's Estimator Primitive running PauliStrings in Parallel?

I am trying to run the following code: ...
QuantumTheoretical's user avatar
1 vote
1 answer
33 views

Using "extern" functions in OpenQASM3

I am trying to understand on how to use "extern" functions in OpenQASM3 using Qiskit and the quantum devices from IBM. Judging from the link here (November 2023): https://docs.quantum-...
Radu M.'s user avatar
  • 292

1
2 3 4 5
44