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.

Filter by
Sorted by
Tagged with
2
votes
1answer
48 views

Non-unitary gates in qiskit

We are programming with Qiskit and for our research project we need to insert non-unitary gates within a quantum circuit. Is the unitarity of gates a mandatory property required to run the code ...
3
votes
0answers
36 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. ...
1
vote
1answer
15 views

Is the error rate of IBMQ devices full-scale (% FS) or on percentage of reading (% RD)?

The error rates that I found on the calibration files are given in percentage, but I couldn't find whether it is calculated on full-scale (% FS) or on percentage of reading (% RD). If I do $20000$ ...
0
votes
1answer
25 views

Is the blackbox already a reversible operator, or are we the ones that convert it into one?

I've been studying quantum computing for a little while now (I'm still very new to it), and I'm now studying algorithms (Deutsch's and Simon's). But I'm having some trouble understanding what exactly ...
1
vote
1answer
35 views

Quantum Teleportation Algorithm Always Ends in State $|0\rangle$

I'm trying to put together a demo using the Quantum Teleportation example provided by qiskit. The quantum circuit runs as intended when it's initialized to the state $|0\rangle$, and the measured ...
0
votes
1answer
32 views

Error Model on id gate, is not giving any error

I am trying to play with NoiseModel of qiskit, and I noticed that error on id gate is not giving any error results, while error ...
2
votes
1answer
49 views

Representing Qubit Operator in Circuit

I am trying to represent a quantum circuit schematically with some operators in QISKIT. I know I can create some operator with Operator() in quantum_info from a ...
0
votes
1answer
44 views

Retrieve image from Histogram data of Qiskit

I am trying to understand the quantum image processing. Please refer the link- https://qiskit.org/textbook/ch-applications/image-processing-frqi-neqr.html. I am not able to understand how to process ...
0
votes
0answers
38 views

Quantum GAN implementation

Can anyone provide a good link to understand how to implement qgan using pytorch in qiskit. Trying to understand this ( https://qiskit.org/documentation/machine-learning/tutorials/...
1
vote
1answer
26 views

Kernel ridge regression with qiskit's FeatureMap shows nonlinear patterns outside [0,1] range

I'm implementing a kernel ridge regressor using qiskit's FeatureMap and QuantumKernel to compute the alpha parameters of the solution. If I try to fit my model with non-normalized features I obtain ...
0
votes
1answer
26 views

combine_results() attribute error

When I tried to execute the below program, The attribute error hits me every time, which is; name 'combine_result' is not defined What is the problem here? Did I miss a module? ...
1
vote
1answer
73 views

Qiskit simulation not taking in the basis gates listed in pass manager

I was trying to simulate some circuits using the QASM simulator via IBM Quantum Computing Lab online. ...
1
vote
1answer
29 views

How can I save IBM Quantum API token to local environment?

I have an IBM Quantum account. How can I save the IBM Quantum API token to local environment so that I can access services including real quantum systems, simulators and Qiskit Runtime programs on my ...
1
vote
1answer
32 views

How can I retrieve Qiskit Runtime jobs that I have submitted to IBM Quantum?

I have submitted Qiskit Runtime jobs. How can I retrieve the old jobs to check the status and results?
2
votes
1answer
53 views

How to construct a Hamiltonian containing Pauli string by qiskit?

There is a Hamiltonian I want to construct by a Python package, which is the following: $$ H = 5.9I + 0.21Z_0 - 6.12 Z_1 - 2.14(X_0X_1 + Y_0Y_1) + 9.6(I-Z_2) - 3.9(X_1X_2 + Y_1Y_2) $$ It is very easy ...
1
vote
1answer
44 views

Quantum Image Processing Application

I have been reading about Quantum Wavelet transform and finding some problems. One of its application is that image is given as input and same image is retrieved as output with reduced size(Please ...
1
vote
1answer
37 views

Qiskit Encoding of a Hamiltonian

I am not sure if this is a trivial question and I am just stuck or this is worth posting. I have a Hamiltonian, which is written in terms of Pauli matrices, such as H = 4.5$I$ - 16 $X_1$ - 16 $X_2$ - ...
2
votes
1answer
52 views

Which backends implement the if-else operation?

On which backends (Basic, AER, Simulation, IBMQ) is the qiskit.circuit.controlflow.if_else Operation implemented currently? I want to create a circuit depending on qubit states, e.g.: ...
1
vote
1answer
32 views

What happens to the elements of the simulated state vector when we set a qubit to $|0\rangle$?

In IBM's Qiskit online simulator, we have the (non-reversible) ability to set a specific qubit to $| 0\rangle$. This is convenient but I'm left confused as to what happens to the elements of the ...
1
vote
2answers
49 views

Is it true that $Ry(\pi/2)\sigma_zRy(-\pi/2)=\sigma_x$?

I saw in a qiskit document that said $Ry(\pi/2)\sigma_zRy(-\pi/2)=\sigma_x$ To confirm this I decided to create the matrix representations of these operations and multiply them together to see if I ...
2
votes
2answers
93 views

Is there a function in qiskit that allows me to insert quantum gates at certain indices of a circuit?

Here's my quantum circuit with mid-circuit measurements: ...
3
votes
1answer
169 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
57 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, ...
1
vote
2answers
39 views

How to extract a solution to HHL from the full statevector?

I am having a difficult time trying to extract an HHL matrix inversion solution from the full system statevector. I have a 32x32 size matrix A and a 32x1 vector b, and I ran HHL on 13 qubits. HHL ...
0
votes
1answer
31 views

Is it possible for public users to run experiments using Qiskit's surface code?

I'm an undergrad who would like to run some experiments using the surface code. I've been able to use their quantum repetition code (https://qiskit.org/textbook/ch-quantum-hardware/error-correction-...
0
votes
2answers
25 views

Qiskit's draw method is moves the gates on the qubit wires

Well,it is not very important problem and I actually did what I wanted but I just noticed that when I want to draw circuit, qiskit draw method is not drawing the circuit with the correct order.. I ...
0
votes
1answer
68 views

Visualize full UCC circuit in qiskit

I am experimenting with the UCC module in qiskit nature. From pyscf, I got 1-body and 2-body integrals (I need to use custom integrals) and thus created a mapped ...
2
votes
2answers
187 views

Density Matrix of 3 Qubit Quantum Circuit (Qiskit Density Matrix)

If I have a one gate circuit like in the following image: I can calculate the density matrix by following steps: However, I want to do it for the Toffoli gate circuit: and I am confused with the ...
3
votes
1answer
56 views

Bias in the results of superposition measurements on IBMQ Backends, qiskit

Dear people on this forum, I was doing some research, and I created this circuit in qiskit Please bear in mind that I am really new to this field, and I do not retain much knowledge yet. Therefore I ...
0
votes
2answers
89 views

Given this code fragment, what is the probability that a measurement would result in $|0\rangle$?

Trying to understand below probability how it occured? qc = QuantumCircuit(1) qc.ry(3 * math.pi/4, 0) A. 0.8536 B. 0.5 C. 0.1464 D. 1.0 And the answer is C. But I ...
1
vote
2answers
33 views

How does one use the Qiskit CDMKRippleCarryAdder?

How does one use (call from a main program) Qiskit's CDKMRippleCarryAdder in a quantum circuit, or for that matter, any other Qiskit library of a similar nature? ...
2
votes
1answer
30 views

Error : Cannot unroll the circuit to the given basis

I want to run the circuit given below, but I am getting the following error. QiskitError: "Cannot unroll the circuit to the given basis, ['u1', 'u2', 'u3', 'cx', 'id', 'unitary']. Instruction ...
0
votes
2answers
71 views

Qubit identities get swapped in IBM Qiskit

Edit: Improved code a bit This is a condensed description of the IBM bug that was a problem here, to make it more clear. The following code compiles to a correct circuit when the measurement is ...
-1
votes
1answer
29 views

How to make qiskit jupyter plot and draw properly [closed]

The problem: You try to plot or draw more than once within a cell, or you try to plot or draw within a code block,but nothing comes out and you're going nuts... :)
0
votes
3answers
52 views

I want to initialize any 3 qubit state in Qiskit

The state of interest is (1/sqrt(2))|000> + (1/sqrt(2))|111>. How do I initialize this state in Qiskit ? I know if I plot a histogram it will have 50% probability for |000> and 50% ...
1
vote
0answers
30 views

Quantum circuit error in QISKIT

I am trying to build a simple 16-qubit Quantum circuit where I am appending an 8-qubit quantum circuit to the first 8-qubits of my custom circuit. Then I measure all the qubits. However when I execute ...
2
votes
2answers
78 views

How to compute the unitary from the $\chi$ matrix obtained from QPT

I am trying to do quantum process tomography for one qubit and obtain the unitary for the gates that are applied on the qubit. I have studied the theory on process tomography from mike and ike and the ...
3
votes
1answer
40 views

What is the number of transition amplitudes needed to describe an $n$-qubit state?

In describing quantum computers page in the fourth quick quiz it asks "An n-qubit state vector can contain up to $2^n$ amplitudes. What’s the largest number of transition amplitudes we’d need to ...
3
votes
1answer
80 views

Calculating the quantum euclidean distance between vectors

I am trying to get the distance using the swap test circuit. , With the help of the codes I shared, I can only estimate the distance between two vectors. Can it calculate the distances of many vectors ...
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 ...
1
vote
0answers
56 views

When I try to transpile circuit with Qiskit, how can I use $Ry(\pi/2)$ as a basis gate?

When I try to transpile circuit with Qiskit, I can use 'ry' as a basis gate. But I want to set one of the basis gate as $R_y(\pi/2)$. How can I do that? Edited: <...
0
votes
0answers
29 views

How can I delay the construction of the power of a gate in a parametric circuit?

I want to implement the parametric power of a gate. I know that the parametric power is impractical to implement (cf https://github.com/Qiskit/qiskit-terra/issues/4751). So, I want to delay the ...
1
vote
1answer
42 views

Qiskit **Param - Power of Parameter [closed]

Trying to create gate, that its angle is parametrized, where my parameter is k, and I want to assign to theta = 1/2**k - 2 in the power of k. Looks like: ...
3
votes
1answer
52 views

How to order results after multi-circuit qiskit.execute parallel run?

I'm kinda new to qiskit and I find really fascinating its parallelization capabilities, then I'm trying to creating all the needed circuits for my application at once and transpile, assemble and ...
1
vote
1answer
57 views

What does a statevector with 3 elements (in Qiskit) represent?

I wasn't quite sure where to post this as I don't know if this is a Qiskit specific thing or not, but I'm not sure how to interpret this result I got from running a simulation. from result.data(): <...
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 ...
1
vote
0answers
26 views

How to formulate QUBO as summation quadratic and linear parts of K-graph coloring problem?

While trying to understand the graph coloring problem with VQE using the QUBO Formulation mentioned section "5.2 Graph Coloring". Mentioned article prepared the QUBO directly in to matrix ...
5
votes
1answer
48 views

Can D-Wave machines solve QUBO problems more efficiently than gate model devices?

I'm new to quantum annealing and D-Wave computer. I saw that it has about 5000 qubits which can solve a QUBO problem with 5000 variables. From my understanding, if we use a gate model device, say, an ...
3
votes
1answer
58 views

Simulators vs Real Backends

I am using Qiskit to run some circuits and a question arises in my mind. I know that when we run in the simulators we are running in "ideal" environments. This means there is no noise that ...
1
vote
0answers
27 views

I can not extract the final statevector when using a binded Parametric Controlled gate

I'm trying to implement a Parametric Hadamard Test. I have already my parametric evolution gate $\exp(-i\theta H)$ where $\theta$ is the parameter. When I defined the controlled-gate with Gate.control(...

1
2 3 4 5
26