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

Strange output using Qiskit QFT example

I am trying to follow the examples of the QFT from the qiskit textbook (https://qiskit.org/textbook/ch-algorithms/quantum-fourier-transform.html), and I cannot figure out why I am getting 'Job ...
0
votes
0answers
6 views

Oracle with multiple solutions, Grover's Algorithm- Qiskit

Using qiskit, I want to build an oracle with multiple solutions. I am planning to use 10qubits. I don't know if i'm doing it right but where it goes: ...
1
vote
1answer
12 views

Difference between Aer.get_backend('aer_simulator') and AerSimulator()

In Qiskit, there are several ways to choose simulator: one is from qiskit import Aer backend = Aer.get_backend('aer_simulator') result = backend.run(circ).result() ...
0
votes
0answers
15 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
14 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 ...
4
votes
2answers
77 views

Why isn't $Ry(\pi/2)$ gate equivalent to Hadamard gate?

I've been experimenting with quantum circuits and can't quite fathom how the difference between states comes together. Speaking in terms of simulations using qiskit,...
1
vote
2answers
35 views

How does measurement change the effective transformation matrix?

I have simulated three cases in Qiskit and tried doing some manual calculations to verify the simulated results. Case 1: The initial state is $\psi_i = |00\rangle = \begin{Bmatrix}1 \\0 \\ 0 \\ 0\end{...
2
votes
1answer
38 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 a IBMQ backend can be passed into the function as a Quantum ...
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 ...
1
vote
0answers
23 views

Adding trainable weights to feature inputs for a CircuitQNN?

Currently I'm trying to get together a QNN that can be trained to classify the normalized (-1, 1) IRIS Dataset on all 3 classes. For this I am using Qiskit's ...
1
vote
2answers
46 views

Are we using the real-time error information in simulating noise on qasm?

I'm trying to run some quantum circuits on qasm simulator using the noise information from IBM Q quantum device: ...
1
vote
1answer
34 views

unsymmetric observable estimation by Qiskit

Assume $|i\rangle,i\in[1,m]$ is a set of state, 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 qubit ...
0
votes
1answer
39 views

How to separate initializing qubits from runing algorithm several times

I have read several papers about quantum computing. It looks like any algorithm consists of several phases. For example in Grover algorithm initially qubits must be initialized from reset state $|0\...
1
vote
1answer
43 views

How to set hyper parameters for a Variational Quantum Classifier (qiskit)?

I am trying to implement a Variational Quantum Classifier using qiskit's VQC. I have set the feature map to ZZFeatureMap and am using the ...
1
vote
0answers
36 views

Qiskit's classifier is not optimising the weights

I am using qiskit's VQC to build a classifier. Dimensionality of the data is 2 and number of classes are 4. The feature map I used is ZZFeatureMap and ansatz is the RealAplitudes. Then entanglement ...
0
votes
0answers
7 views

Qiskit's draw only shows the circuit's name and not the architecture [migrated]

Upon trying to draw a ZZFeatureMap instance, I only see the name "ZZFeatureMap" and not it's architecture. Please find the code snippet and output ...
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
1answer
50 views

How is transformation for measurement in an arbitrary basis derived?

I started with Qiskit today and find it very exciting. As a first question I want to understand how to measure an arbitrary state $|\Psi\rangle$ not in the basis of ...
1
vote
1answer
36 views

How to write a code to made envelope function equal to $\pi$ to result in an X gate?

$$ \hat U_d = \exp\Big( -i\underbrace{\frac{Q}{2}\int_0^T A(t^\prime)\mathop{dt^\prime}}_{\Theta(t)} \hat\sigma_x \Big) $$ This equation is a Unitary transformation applied to a qubit from time $t = 0$...
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?
1
vote
0answers
51 views

Working with higher energy states in Qiskit Experiments

I'm looking at the source code for the Qiskit Experiments module and see that the EFRabi class subclasses the Rabi class with the intent of calibrating rotations between the 1 and 2 states instead of ...
5
votes
2answers
315 views

What is the computational complexity in initializing a quantum register?

I'm trying to figure out what is the computational complexity of initializing a quantum register of N qubits. For my research, I have used the initialize method of qiskit, in which you set the ...
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 ...
1
vote
0answers
25 views

from hello_qiskit import run_puzzle results in error

I am working my way through the beta version of the Qiskit textbook. Everything was going fine until I got to the Visualizing Entanglement section and had some exercises to complete. All of the ...
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 ...
4
votes
1answer
42 views

Where does the "correction" in quantum error correction occur, specifically when using repetition codes?

I'm reading the part of the qiskit textbook that deals with this (https://qiskit.org/textbook/ch-quantum-hardware/error-correction-repetition-code.html) and so far it seems as though they're just ...
1
vote
1answer
125 views

Getting non-Clifford after performing several Clifford gates in qiskit

I'm trying to test Clifford gates in qiskit according to the table in Fault-tolerant SQ, page 101. I tried 4 Cliffords in the test $$-X/2 - X -X/2,Y/2,X/2 - -X/2,Y/2,-X/2$$ using the following code <...
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
1answer
37 views

Equivalent matrix for operators in qiskit

What is eqivalent matrix to qc.rx(np.pi, 0): ...
0
votes
3answers
78 views

Which quantum computing frame is suitable for optimization problems?

As in the computer world, not all programming languages are suitable for everything. Php = Backend Javascript = Frontend Data Analsys/ML = Python embedded systems = C Mobilphone/apps = Android / Swift ...
1
vote
1answer
65 views

Is it possible to perform $z$ rotation in Qiskit with just $x$ and $y$ rotations?

Is it possible to perform $z$ rotation in Qiskit with just $x$ and $y$ rotations? I tried the following: ...
1
vote
2answers
82 views

Find a unitary to prepare state $|0\rangle$ to a specific vector

I am working with Variational Quantum Linear Solver (VQLS) algorithm, where it needs to prepare a control_b circuit. Assume b is 1d with $ 2^n $ elements in it. $$ {\bf Ax = b} \tag{1}$$ I need to ...
1
vote
1answer
23 views

Qiskit noise model question (from textbook)

I'm reading the chapter Introduction to Quantum Error Correction using Repetition Codes and a code example demonstrates how to add depolarizing and pauli error. I have several questions. Is it not ...
1
vote
1answer
36 views

Can someone please explain how the syndrome bit still ends up being 0 in this quantum error correction circuit using repetition code?

I'm not too great at dealing with superpositions and applying the CNOT gate when superpositions are involved. Can you go through it in detail each gate using math/matrices etc. It's based on the ...
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. ...
-1
votes
0answers
24 views

Papers explaining how to use ShiftPhase(theta) instruction in Qiskit

When dealing with the energy states, if we apply a rotation in 0-1 space it will affect the space of 1-2 and contrary. However, I am lacking documents about this phase change between these spaces and ...
3
votes
1answer
87 views

Implement the classical shadow coding error?

I'm trying to reproduce the basic method of classical shadow, which is based on the tutorial of pennylane. However, I've met some realization problems here when I finish reading the tutorial of ...
3
votes
1answer
41 views

How to apply Euler's formula to $Z$ rotations such as $e^{i\pi/8 Z}$?

I was following the Qiskit textbook and wanted to show that $R_z (\pi/4) = e^{i \pi/8 Z}$. Plugging $\pi/4$ in for $\theta$ in the matrix from this page $ \begin{bmatrix} e^{-i \pi/8} & 0 \\ 0 &...
2
votes
1answer
52 views

Amplitude encoding: distinction between negative and positive real values

I want to encode two vectors into qubits and compute a distance between them that corresponds/is proportional to the euclidian distance of the real vectors. The encoding I use is A) qiskit ...
0
votes
1answer
49 views

Why in quatum coin toss, when starting from state $|1\rangle$, we get $|-\rangle$?

I was reading qiskit's text book, there I found that for a Double quantum coin toss, we have negative probability amplitude for $|1\rangle$ state when we starts from $|1\rangle$ state. Link : https://...
1
vote
2answers
42 views

Is it possible to use the mitigation process on a teleportation circuit?

Is it possible to use the mitigation process on a teleportation circuit? Sorry, i'm still starting, if someone can get me out of this doubt, I would appreciate it. The circuit I'm trying to make this ...
1
vote
1answer
59 views

How to apply gates based on a random decision on the IBM quantum computer?

I want to run a circuit on an IBM quantum computer, and this circuit involves gates that are either applied or not based on a (classical) random decision. As a minimal example, imagine a circuit with ...
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
1answer
56 views

Expected outcome of adding two PauliOp

first of all, I would probably report this as a bug if I was confident enough in my QC abilities. As it stands, I've just started out, so I'm phrasing it as a question. From what I can tell, adding ...
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
1answer
67 views

Does Qiskit transpiler execute multiple circuits in parallel? [closed]

I have something to ask about Qiskit's transpiler. Before that, please check this document. ...
5
votes
1answer
65 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,...

1
2 3 4 5
24