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
1
vote
2answers
46 views

Qiskit's PauliTrotterEvolution yields weird gates

I am trying to work with Qiskit's PauliTrotterEvolution() module, but the resulting circuits contain weird gates that I know nothing about. Here is a simple example: I want to implement the fermionic ...
4
votes
2answers
84 views

Why aren’t repetition codes used to encode qubits in superposition states?

I just finished reading the section of the qiskit textbook on quantum error correction using repetition codes(https://qiskit.org/textbook/ch-quantum-hardware/error-correction-repetition-code.html) and ...
2
votes
2answers
70 views

How can I initialize a state like, $|00\rangle$ or $|01\rangle$ or $|10\rangle$ or $|11\rangle$ in Qiskit?

Many thanks in advance for your help. I am a beginner in Qiskit. I want to implement a circuit that uses the position of an element/item, of the form (x,y) and I would like to represent it as a state $...
3
votes
2answers
59 views

Enable qiskit editor in composer

For educational purposes I would like to make some circuits in the nice IBM quantum experience circuit composer GUI. The only problem is that the set of gates I can use here is quite limited (I would ...
0
votes
0answers
33 views

Problems when computing the two-electron reduced density matrix (2-RDM) by qiskit

The definition of a 2-RDM is $D_{ijkl}=\langle\psi|a_i^{\dagger}a_j^{\dagger}a_k a_l|\psi\rangle,i,,j,k,l\in[0,N-1]$, where $N$ is the number of qubits/ orbitals in the quantum system.I am trying to ...
0
votes
0answers
61 views

Correct implementation of Qiksit QAOA

I've been dealing with a QAOA implementation of a QUBO problem. In order to do this, I converted my QUBO matrix to a QuadraticModel. Once done, I have used ...
2
votes
0answers
64 views

Eigenvalues and energy levels of 1D Heisenberg model using real Quantum Computers?

The 1D Quantum Heisenberg model is $$H_\textrm{Heisenberg} = -~J \sum_{\langle i\ j\rangle} \hat{S}_{i} \cdot \hat{S}_{j}$$ where each spin is an operator. For simple cases, for example, a system with ...
1
vote
1answer
56 views

How to select the statevetor of a qubit in a multiqubit circuit in qiskit?

I need to use and plot the state of the first qubit in my multiqubit circuit, but the issue is that I need to use post selection - I want only the results of which the other qubits in the circuit are ...
0
votes
1answer
66 views

Calculating measurement probabilities from a quantum circuit

Currently I'm trying to calculate the circuits I'm building and show that they work as intended. Somehow, my measurments do not, at all, represent my calculated expectancies. This is my circuit in <...
0
votes
1answer
39 views

How to differientate the noise functions in qiskit?

In Qiskit, there are many different Quantum Error Functions. From my understanding, pauli_error represents the error rate of $X, Y, Z$ independently, and ...
2
votes
1answer
70 views

How to create known quantum state in Qiskit (or any other platform) comprising of two or more bits?

Is there there any way to create a known quantum state in Qiskit (or any other platform) comprising of two or more than two bit? For example if I want to create $\frac{1}{\sqrt{3}}[|00\rangle+|01\...
1
vote
0answers
39 views

Solving Particle in Box problem using Qiskit

I am new to quantum computing, I would like to ask how can I solve simple particle in box problem using qiskit which allows to compute the bound states in finite quantum well. Finite quantum well
3
votes
1answer
142 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
30 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
33 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 ...
5
votes
2answers
163 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,...
2
votes
2answers
71 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{...
3
votes
1answer
86 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 an IBMQ backend can be passed into the function as a Quantum ...
1
vote
1answer
33 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
33 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
35 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 ...
2
votes
0answers
79 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
50 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: ...
2
votes
1answer
60 views

unsymmetric observable estimation by Qiskit

Assume $|i\rangle,i\in[1,m]$ is a set of states, 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 ...
0
votes
1answer
53 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
72 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
53 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
36 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
61 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 ...
2
votes
1answer
48 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
26 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
54 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
333 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 ...
1
vote
1answer
34 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 ...
1
vote
1answer
40 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
58 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
61 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
58 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
154 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
65 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
43 views

Equivalent matrix for operators in qiskit

What is eqivalent matrix to qc.rx(np.pi, 0): ...
0
votes
3answers
122 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
103 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
96 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
39 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
37 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
47 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. ...
3
votes
1answer
115 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
45 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
138 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 ...

1 2
3
4 5
26