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
1answer
86 views

(solved(?)) Quantum circuit in a loop increasing qubit ids throughout despite attempts to reset

I have a parameterized circuit attempting to classify a set of features for various samples. I need to reencode the features per sample, but through the epochs, the computations slow down considerably ...
5
votes
1answer
154 views

Two qubit gate decomposition in using Qiskit

I am writing some python code to be able to optimise the total error in two qubit gate decomposition. I am using the Qiskit module qiskit.quantum_info.synthesis.two_qubit_decompose My question relates ...
0
votes
1answer
38 views

How to perform a plot histogram for a circuit?

I have created a circuit and I don't know how to plot a histogram. I tried to plot a histogram but it gives me output for 0000 case only, how to get to know the probability for all of the cases. The ...
1
vote
2answers
135 views

How to build a QAOA Ansatz

I saw there is a qiskit package called "QAOAAnsatz" https://qiskit.org/documentation/stubs/qiskit.circuit.library.QAOAAnsatz.html. But I didn't find out any tutorial related, so I have no ...
1
vote
0answers
35 views

How do you verify the output of an X Gate within the Pulse gates framework?

I have found out how to create an X gate for a constant pulse within the Pulse gates framework found on this link: https://qiskit.org/documentation/tutorials/circuits_advanced/05_pulse_gates.html My ...
0
votes
1answer
53 views

JSONDecodeError with backend.run

I'm trying to follow tutorial on pulse simulation described in qiskit.org. The generated PulseQobj is well executed with AER simulator, but it throws JSONDecodeError when using real backends (ex. ibmq-...
2
votes
0answers
29 views

Managing memory while running a high depth circuit simulation (amplitude amplification) using Qiskit

I am running an instance of amplitude amplification using Qiskit (v 26) on Google Colab. The circuit is approximately 17 qubits in space and $O(ck)$ in depth where $k \in \left \{1,2,3....,22 \right \...
2
votes
0answers
50 views

Issues in calculating exact runtime on ibmq_16_melbourne

I am working on calculating the exact runtime of a quantum circuit on the ibmq_16_melbourne device. I am using the API ...
1
vote
1answer
43 views

Use of Data loaders or State Initialization Circuits

I have recently started working on qiskit and I am struggling to use qc.initialize API in any practical or useful application. I have read at multiple places that ...
2
votes
1answer
243 views

Qiskit BasicAer & Aer

While I'm simulating grover's algorithm, I found that with BasicAer backend it works well but with Aer it is not. What is the difference between ...
1
vote
2answers
118 views

Simulation of Noise in a particular quantum computer

I wish to be able to model a quantum computer with all the noise sources of an IBM quantum computer. For a given set of T1, T2, readout_errors, U2_errors and CNOT errors I want to know how to include ...
3
votes
0answers
65 views

"503: Server Unavailable. Your server appears to be down. Try restarting it from the hub". Help

This message is popping continuously for 2 days in my IBM Quantum lab. I have tried logging out and in again, restarting the browser, changing the internet connection, and changing the device but this ...
1
vote
2answers
94 views

How do you map an X gate to a constant pulse?

I was wondering how to map an X gate to a constant pulse shape. This https://qiskit.org/documentation/tutorials/circuits_advanced/05_pulse_gates.html is the link that I am working off. It shows an ...
3
votes
1answer
78 views

Get the gates after fusion optimization in Qiskit statevector simulator

I tried to obtain the gates after fusion in Qiskit-aer statevector simulator. What I can find now is that it provides a backend option saying fusion_verbose (bool): Output gates generated in fusion ...
3
votes
3answers
187 views

How can I get the qiskit module

I have successfully installed qiskit. However, when I try to run a simulation I get the error "No module named 'qiskit' ...
1
vote
2answers
82 views

How to use VQE function in Qiskit

As part of a project I'm working on, I want to use VQE algorithm to calculate the minimal eigenvalue for given Hamiltonian. I use Qiskit on IBM UI online. The Hamiltonian is given as a sum of tensor ...
3
votes
1answer
126 views
2
votes
3answers
121 views

How to describe the evolution of a density matrix using the Choi matrix?

How do I apply the Choi matrix on a Density matrix. Say my process is a Hadamard gate, and my input state is the ground state on 1 qubit (qubit id 0). $U = H = \dfrac{1}{\sqrt{2}} \begin{bmatrix}1&...
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 ...
1
vote
1answer
51 views

Custom labelling of randomly generated unitaries in Qiskit

I'm writing a program in Qiskit involving the generation of Haar-random unitaries. Is there a way to label each unitary such that the label appears instead of 'unitary' when I draw the circuit? ...
0
votes
1answer
51 views

Manual measurement error mitigation returning a negative number of counts

I have a simple 2 qubit circuit which I am trying to protect from errors using the measurement error mitigation technique laid out here: https://qiskit.org/textbook/ch-quantum-hardware/measurement-...
1
vote
0answers
66 views

Error when computing the self-designed gradient in qiskit

I had question with the way to define a new kind of gradient to improve the performance of VQE. The gradient formula I used consists of multiply energy (measurement result of the Hamiltonian) with the ...
1
vote
2answers
120 views

How to convert the output column vector or matrix into bra ket notation using python?

When using qiskit, we normally get the output inform of column vectors or matrix. But is it possible to convert then into bra ket notation using some python code? Can someone help me with this?
1
vote
1answer
35 views

Qiskit: rounding with get_statevector does not work?

I am trying to follow some tutorials for Qiskit and came to the point where I wanted to get some statevector containing $1/\sqrt{2}$ with the following line of code: ...
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
1answer
64 views

Get the inverse of a Hermitian operator for measurement in qiskit

I am using qiksit to measure the Hamiltonian H, which isbasically sum of Pauli strings, say something like 2*X^X+0.5*Z^Y. For ...
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 ...
1
vote
0answers
35 views

Quantum Machine Learning: how to get effective time of training/scoring

I am trying to examine the potential of Quantum Machine learning in terms of performance and time compared to classical algorithms. I am using both Qiskit's QSVM and scikit's SVM with Qiskit Quantum ...
0
votes
2answers
92 views

How to assemble two quantum circuits whose qubit mapping states are different each other?

I uploaded similar question before, but the answer was not I want. I think I should show you in more detail about my question. I use SABRE algorithm which can do qubit mapping for executing quantum ...
1
vote
5answers
213 views

How can I get the number of measurements where any specific qubit is equal to 0?

Say I am using a 100 qubit quantum computer, but my circuit is such that I am only interested in the output of a particular qubit. So for example I want to know how many outcomes had a result of 0 on ...
5
votes
1answer
101 views

What is the correlation between Toffoli and a more generic rotation shown in qiskit textbook

Can someone help me understand the correlation between the 2 diagrams in the qiskit textbook.
1
vote
1answer
43 views

How do you create a square pulse in Qiskit?

I am wondering how to create a square pulse in Qiskit. I am working off this Qiskit documentation but still cannot figure out how to create a square pulse.
2
votes
1answer
76 views

How to solve TSP problem with more than 3 nodes in the tutorial of Max-Cut and Traveling Salesman Problem?

I had to try the example of qiskit’s Traveling Salesman Problem with 3 nodes and executing it at IBM backend called simulator_statevector.Can execute and get the result normally. But when trying to ...
1
vote
1answer
152 views

Why do the qasm_simulator runtimes vary significantly for different IBMQ CouplingMap/NoiseModels?

I have been running VQE experiments locally using the qasm_simulator with actual IBMQBackend NoiseModels as shown in the Qiskit Textbook. I have noticed that the ...
0
votes
1answer
51 views

How can I simulate the Avg CNOT Error on IBMQ Backends?

I want to know exactly how to estimate the Avg CNOT Error rate for IBMQ Backends? For instance, I tried to estimate the Avg CNOT Error rate for Belem Backend; I randomly prepared the 00,01,10,11 ...
-1
votes
1answer
45 views

HLL Algorithm results interpretation

I have the following HLL qiskit implementation and really need some help interpreting the results! CODE ------------------------------ ...
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?
-1
votes
1answer
33 views

What is this pulse experiment showing?

The following results in the figure were achieved using Qiskit pulse by doing the following pulse sequence; { $\frac{\pi}{2}$, delay $\tau$, $\pi$, delay $\tau$, $\frac{\pi}{2}$} The figure is the ...
9
votes
2answers
215 views

Quantum implementation of arcsin

I am looking to implement a quantum version of the arcsinus function. Such a problem is motivated by the HHL algorithm where $x\mapsto 1/x$ and $\arcsin$ can be used to get $1/x$ from the ...
1
vote
0answers
28 views

Difference in HLL applications

I am new to Qiskit and I have seen two types of simple 2X2 $Ax=b$ system solutions. I am wondering what the difference is exactly. They both occur on a simulator backend, but the first gives me a ...
2
votes
1answer
211 views

Error when running HHL algorithm in Qiskit

I tried to solve a simple system of two simultaneous linear equations in with HHL algorithm in Qiskit. In particular the system is $Ax=b$, where $$ A = \begin{pmatrix} 1.5 & 0.5 \\ 0.5 & 1.5 \...
2
votes
2answers
107 views

How to implement parametric iSWAP gate in Qiskit?

I'm trying to implement the parametric $\text{iSWAP}$ gate, also known as $\text{XY}(\theta)$, in Qiskit. $$ \text{XY}(\theta)= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos{\theta/2} &...
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 ...
2
votes
1answer
95 views

What is the maximum number of qubits that can be simulated by Qiskit using any method?

I'm looking to write an algorithm (potentially) using Qiskit, and am trying to find out what the maximum number of Qubits is that Qiskit can support with various simulation methods. From reading other ...
4
votes
1answer
201 views

Simulation of a helium molecule using Qskit

I am trying to compute the ground state energy of He-He using VQE. For this purpose I have utilized Qskit and have written the following script: ...
2
votes
2answers
410 views

How to fix “QiskitChemistryError:PySCF is not installed”

I’m trying to simulate LiH using VQE. But I keep getting the error QiskitChemistryError:PySCF is not installed And I tried several ways to see whether my driver for the molecule was typed wrong. But ...
2
votes
1answer
73 views

Is it true that QasmSimulator is much slower than StatevectorSimulator, or am I doing something wrong?

I'm trying to calculate the expectation value of some operator for a state that comes out of a quantum circuit using Qiskit. I was initially using ...
3
votes
0answers
70 views

How exactly does the QuantumCircuit.decompose() method work?

From what I can understand from the source code, the circuit is converted into a DAG before the decomposition transpiler is performed onto the DAG circuit. How does converting to a DAG circuit help us ...
2
votes
3answers
183 views

Pauli I in eoh procedure doesn't become a global phase gate in qiskit evolution_instruction method. Possible consequences

If one has two qubits in arbitrary stats and wishes to apply a controlled version of some global phase gate $P(\varphi) = \begin{pmatrix} e^{i\varphi} & 0 \\ 0 & e^{i\varphi} \end{pmatrix}$ ...
6
votes
1answer
208 views

How efficient is Qiskit's unitary decomposition?

In Qiskit's extension package we have the UnitaryGate module that you can initialize using a unitary matrix and then add it to your circuit. How efficiently is this ...

1
3 4
5
6 7
24