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.

213 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
84 views

Exponentiating Hermitian Matrix for use in QPE/HHL

I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$. Because I am currently ...
1
vote
0answers
64 views

Many jobs hanging after creating

I am running a VQE calculation running from a cluster using nohup. However, some of my jobs keep hanging with 'creating' and therefore my VQE is not converging/not working. However, at the same time,...
1
vote
0answers
48 views

Suggestions for hybrid factoring algorithm on DWave and Qiskit

I was wondering if the multi-prime factoring problem can be solved in a hybrid approach using DWave (to factor) and Shor's algorithm (in Qiskit)? Please let me know your thoughts. Thanks!
1
vote
0answers
98 views

'ERROR: QasmSimulator: Circuit cannot be run using available methods.'

I used the following code. Can anyone say what that error is about? ...
1
vote
1answer
212 views

Qiskit - Renormalize the qubit after measurement

I have a 2 qubits system, maximally entangled, and I performed measurement on one of the qubit. ...
1
vote
0answers
439 views

Job execution issue while using IBMQ Experience

I am trying to run QSVM algorithm on the IBMQ backend devices using the API_TOKEN. Below is the snippet of the code that I am running. The code fails the validation test and throws an exception after ...
1
vote
0answers
352 views

Please help: get_statevector gives wrong result in qiskit

I simulated the circuit below in qiskit and used the statevector simulator to extract the statevector: The resulting statevector that it gave me was: array([ 0.5+0.j, -0.5+0.j, 0.5+0.j, 0.5+0.j]) ...
1
vote
0answers
60 views

About a Qiskit Function

I want to understand this Qiskit function (a function for creating the gate CNX with Python): more specifically i don't understand what's the rotations (Y and Z) over the qubits for ? I added inline ...
1
vote
0answers
92 views

Exception encountered while running quantum-enhanced support vector machines

I am trying to run the code of the notebook example aqua/artificial_intelligence/qsvm_kernel_classification.ipynb. I save it in a python file and I have an exception at runtime the display of ...
1
vote
1answer
82 views

Why doesn't qiskit appear in "help("modules")" even though it is installed in python environment?

I have updated qiskit to the newest version using pip install qiskit --upgrade and all was done successfully, and when I write ...
0
votes
0answers
18 views

Measuring in qiskit collapses onto the Z-Plane. Why do any rotations other than Y matter?

We have the situation where a 50/50 split between $|1\rangle$ and $|0\rangle$. This was done using a $H$-Gate. Now, when measuring in qiskit, if my understanding is ...
0
votes
0answers
17 views

How to perform multi-class classification with qiskit's VQC?

I am following the tutorial given in qiskit's website Neural Network Classifier and Regressor. In the first part, classification, the third section refers to qiskit's VQC library. Everything works ...
0
votes
1answer
25 views

How to add label to custom operator (from matrix) controlled gate?

So here is what I'm trying to accomplish: I have made a gate out of a matrix, with a control: ...
0
votes
0answers
26 views

How does one get the right counts for the measurement of a single qubit in the presence of noise with qiskit?

I am using a single qubit in the IBM quantum lab running on ibm_armonk and it is simulated with real noise, however when I try to measure out a state where the coefficient of the 0 state is less than ...
0
votes
0answers
26 views

How to choose $\beta$ in Gaussian derivative component of DRAG pulse?

From definition of the DRAG pulse it is: $$f(x)=Gaussian+1j*\beta*(-(x-duration/2)/\sigma^2)Gaussian,$$ where $Gaussian(x, amp, \sigma)=amp*e^{-(1/2)*(x-duration/2)^2/\sigma^2}$. If I try it in ...
0
votes
0answers
30 views

Two body integral calculation taking too long

I'm running the most recent version of qiskit and am trying to run H2 in the cc-pvtz basis. However, it is taking an incredibly long time. This is what my code looks like: ...
0
votes
0answers
24 views

How do you access stored Ramsey experiment frequency?

What is the stored frequency for the Ramsey experiment and how can this stored frequency be accessed? Is there a backend.get(frequency) command for this frequency?
0
votes
1answer
20 views

Confusion about Mitiq folding for zero noise extrapolation

I'm reading the mitiq zero noise extrapolation documentation and I just can't make sense of how the scale_factor for folding work. "The minimum scale factor is one (which corresponds to folding ...
0
votes
1answer
24 views

have to process 512×512 pixel image will it be possible in Qiskit. what hardware requirement will be?

I'm working on Quantum image processing of satellite images. I'm completely a beginner also I'm learning it by my own that's why I need help. Can you please help me out I want to process the image of ...
0
votes
0answers
55 views

How can I create a Qiskit function producing a quantum circuit such that $\langle Z^{\otimes n}\rangle=J_{n-1}/2^{n-1}$?

Problem: Create a function circ(n) that returns an $n$-qubits quantum circuit that, when measured in the $Z^{\otimes n}$ basis, should yield the following ...
0
votes
1answer
51 views

How to create a quantum circuit to implement the same operations but acting on different qubits?

I want the draw the quantum circuit of the following Hamiltonian: $$H = - 4 \times X\otimes X\otimes X\otimes X - 4\times Z\otimes Z\otimes Z \otimes Z$$. I have been able to draw the circuits of $ - ...
0
votes
0answers
37 views

How's the depolarization channel applied to one qubit circuits?

Suppose that in all gates used in a one qubit circuit the depolarization channel is applied, i.e. ...
0
votes
0answers
26 views

How to run Qiskit's transpile in parallel in Windows?

I want to execute qiskit transpile function in parallel. My experiment environment OS is Windows, and the Qiskit version is 0.29.1. I already asked one question here, and I also changed the file ...
0
votes
0answers
16 views

Exacting specific results in running a list of tomography circuit

I run a test on tomography of two circuits like this: ...
0
votes
0answers
27 views

How to access/ read $\alpha$ and $\beta$ values of a certain qubit in a multi-qubit system in a for loop?

In order to rotate the qubit state I need first to be able to read the values of $\alpha$ and $\beta$ and based on their values I will apply the Q-Gate for rotating the states of the single Qubits in ...
0
votes
0answers
16 views

What is an example of numbers that when used for a Gaussian pulse, would result in a rotation about the x axis?

For the playing of a Gaussian pulse, what is an example of numbers that could be plugged in for duration, amp, and sigma that would result in the pulse rotating something about the x axis? Here is the ...
0
votes
0answers
53 views

Import error to do with tweedledum

I am on MacOS 10.14.6. Installed Python3.9, create env with venv and installed qiskit. When I import qiskit, I get the ImportError, see below: ...
0
votes
1answer
29 views

How to get information about 'qubit location' or 'variable of qubit location' in qiskit docs?

I have something problem with using qiskit. I searched several qiskit docs to get 'qubit location' or 'variables' that represent qubit. I searched three documents below. ...
0
votes
0answers
29 views

Quantum check sample implementation

I've been trying to figure out how to create a simple circuit in Qiskit to create a check (cheque ) generation and verification as described in this paper. I started with 3 qubits, first one with the ...
0
votes
0answers
37 views
0
votes
1answer
31 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 ...
0
votes
0answers
21 views

How would you measure an X gate with qiskit.pulse.builder.measure?

I am using this link: https://qiskit.org/documentation/stubs/qiskit.pulse.builder.measure.html for reference. How would you use the measure command in order for an X gate to be measured within the ...
0
votes
1answer
41 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?
0
votes
1answer
42 views

Active space chosen for VQE in qiskit

I encountered a problem when learning from the qiskit tutorial about solving electronic structure problem with VQE. Under the "Running VQE on a Statevector Simulator" part, the code provided ...
0
votes
1answer
62 views

Measuring the accuracy of a circuit output?

I have created a circuit and got the output which matches the truth table but, I'm not understanding the measuring the circuit output in terms of the probabilities, power or error. This is the circuit ...
0
votes
0answers
35 views

How does Qiskit's VQE encode binary digits into a solution from a given Hamiltonian?

So far I have been working with the VQE on different Hamiltonians that happened to have degeneracies, that is there were always at least two different global minima, because the Hamiltonians I was ...
0
votes
0answers
50 views

How to solve a linear equation of qubit operators in qiskit?

I am trying to repeat the results from Peng and Kowalski (Eq 11) which solves the analytical form of an equation consisting of powers of the Hamiltonian (moments): The $K$-th order PDS formalism is ...
0
votes
0answers
56 views

Qiskit equivalent of get_expectation_value() in ProjectQ

Is there a corresponding function that has the same function as function get_expectation_value() in Project Q? Get the expectation value of qubit_operator w.r.t. the current wave function ...
0
votes
0answers
156 views

Where can we find Qiskit exercises solution/answers?

Where can we find Qiskit Exercises solution/answers, is there any website for it? Or any alternative way to check our answer/solution?
0
votes
0answers
61 views

Qiskit State Tomography with Additional Classical Register

For a circuit with a classical register like in the image, I cannot apply StateTomographyFitter(result, tomography_circuits).fit() method for the second and third ...
0
votes
1answer
57 views

Qiskit package installed locally, but not running in jupyter notebook

I believe I have installed qiskit on my computer. Running pip list or pip3 list in terminal returns: ...
0
votes
0answers
55 views

How to simplify a circuit with repeated same parts?

If I have a circuit with 3 qubits and repeated gates as follow: ...
0
votes
0answers
63 views

What does it mean to have a negative cost (aka loss) function?

In the Variational Quantum Linear Solver (VQLS) paper they define four cost functions (2 global and 2 local) and state in Appendix B that "all four cost functions are non-negative." However, ...
0
votes
1answer
140 views

Compute measurement values of observables by Qiskit

Is there a way to get certain measurement results by variational quantum eigensolver in qiskit? More specifically, I want to get measurement results for certain operators, like $\langle a^\dagger_ia_j\...
0
votes
1answer
119 views

Qiskit not finding CPLEX

I'm trying to use the CPLEX library alongside Qiskit but keep getting the error. ...
0
votes
0answers
93 views

How can I represent Pauli Measurements in Qiskit's QuantumCircuit object?

Is there a way to represent measurements in other bases in Qiskit? The default measurement is in the Z (computational) basis. Can I also depict measurement in X, Y and general Pauli Measurements? I ...
0
votes
1answer
68 views

How do I get sate vector for each shot running on a quantum computer?

I was running this code on a quantum computer how can I generate a state vector for each shot while running on a quantum computer? qikit code ...
0
votes
1answer
39 views

Symmetric Universal Quantum Cloning Machine (UQCM) N --> M for unknown states

Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM N--> M for unknown states? If yes, does anyone know a Qiskit implementation of it?
0
votes
0answers
71 views

IBMQ - Total samples exceeds the maximum number of samples for channel [8002]

I'm trying to run some pulse schedules on ibmq_bogota but I'm running into this error: There are 99 "circuits"/pulse schedules in this job. When I try to ...
0
votes
0answers
60 views

HHL algorithm Qiskit version

...