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
84 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 ...
0
votes
1answer
75 views

Which Qiskit Aer ideal quantum circuit simulator to use when aer_simulator is no longer available?

Some Qiskit tutorials have aer_simulator in the code and I have noticed that this simulator is no longer available. ...
1
vote
2answers
84 views

Random accuracy using VQC and Iris dataset

Using the same seed (seed_simulator and seed_transpiler) I get different accuracy when running it several times. In Aqua library (from qiskit.aqua.algorithms import VQC) I solved it adding ...
0
votes
0answers
33 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
2answers
91 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
50 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? ...
1
vote
1answer
32 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: ...
2
votes
3answers
95 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&...
1
vote
1answer
49 views

how can we save a model using qiskit_machine_learning?

How can we save a trained model using Qiskit Machine Learning library? I've built a VQC classification model and once finished, I'd like to save the different models to be loaded later. There is a <...
0
votes
1answer
45 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
57 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 ...
0
votes
0answers
48 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
1answer
59 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
2answers
89 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 ...
0
votes
0answers
54 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 ...
1
vote
5answers
206 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
91 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
41 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.
1
vote
1answer
62 views

Trying to connect IBM Quantum to External API

Is it possible to connect a quantum computer to openlibary.org API? How do I find the public IP address to my quantum instance?
0
votes
1answer
46 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 ...
0
votes
0answers
82 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
40 views

HLL Algorithm results interpretation

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

How to assemble two quantum circuits which has each own qubit mapping state?

I'm curious about something. I tried to do some qubit mapping using SABRE algorithm. Suppose I have two quantum circuits and apply SABRE algorithm to both of them. Then each of them has its own qubit ...
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 ...
0
votes
0answers
57 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
74 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 ...
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 ...
1
vote
1answer
39 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
2answers
94 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} &...
3
votes
0answers
69 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
1answer
66 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 ...
6
votes
1answer
196 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 ...
0
votes
1answer
73 views

QuantumInstance object has no attribute "name" [closed]

I follow qiskit tutorial "Portfolio optimization". When I executed this cell, I encounter the attribute error as the title(picture showed below). Do anyone know how to fix this problem? It ...
2
votes
2answers
133 views

Why are these two QFT circuits equivalent?

I am new to quantum computing and have been trying to understand the Quantum Fourier Transform (QFT). Through my research using both the Qiskit textbook and other sources, I see differences in how the ...
1
vote
2answers
140 views

Understand the circuit of Normal Distribution

This is the circuit for NormalDistribution(3, mu=1, sigma=1, bounds=(0, 2)). How do I understand what this circuit is doing?
1
vote
2answers
81 views

How do I find the state of each qubit at the end of the circuit?

I have this Quantum Fourier Transform (QFT) and I want to know how to find the final state of each qubit if q0, q1, ...
4
votes
1answer
198 views

How does one access data from retired backends?

I am having trouble retrieving data using Qiskit from jobs I ran on a currently retired system. However, I can still retrieve the same data from the dashboard (GUI), so I think the data are still ...
1
vote
1answer
80 views

How to check accuracy of SABRE algorithm?

I'm studying the qubit mapping algorithm called SABRE. SABRE is an algorithm for solving qubit mapping problem effectively. It uses multiple SWAP gates to execute quantum circuit on real quantum ...
3
votes
2answers
109 views

How to construct a controlled $V$ gate in qiskit?

I have come across most of the quantum circuit which contains gate such as controlled $V$ and $V^{\dagger}$ but I dont know how to code it in Qiskit.
4
votes
0answers
53 views

Extract the Crosstalk noise of a circuit in Qiskit

I'm new to Quantum Computing. How to extract the cross-talk noise of a quantum circuit using qiskit? Can someone provide an example code for this?
3
votes
2answers
59 views

Are job IDs unique across backends?

Are job IDs unique across backends, or is it possible that two jobs on two different backends have the same job ID? I'd like to use the job ID as primary key in a database. Thanks in advance!
1
vote
1answer
131 views

How to get measurement result on Qiskit

I want to get measurement result from my circuit output, like '00', '01', '10', or '11' because want to process it further classically. Any suggestion? We can see the highest probability '01'. How I ...
1
vote
1answer
78 views

Why qiskit transpiler makes different results everytime? (Non-deterministic)

I tried to do qubit mapping called 'SABRE' and execute transpiled quantum circuit. I use FakeTokyo backend which has some noise because it is mock version of IBMQ 20-Tokyo. I know using this backend ...
1
vote
1answer
55 views

IBMQ.load_account() is failing

When I try IBMQ.load_account or IBMQ.delete_account gives an error in the ubuntu machine and the error is, ...
2
votes
0answers
47 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
35 views

Grover's algorithm outputting random/incorrect results

I am sorry if this question is trivial, I am relatively new to QC. Here is my grover's circuit, as you can see it is displaying that it has a 100% probability of measuring 100 however when placed ...
1
vote
0answers
59 views

Implementation of the Phase Estimation algorithm

I've been working on implementing quantum phase estimation in Qiskit for a $2^n \times 2^n$ Hamiltonian as part of my bachelor project, I'm using Trotterization as my Hamiltonian simulation of choice ...
5
votes
2answers
72 views

Cascade/Feedforward quantum circuits

I would like to know if it is possible implement the following situation in Qiskit (either using the simulators or real quantum computers). Consider this illustrative toy example: The arrows ...
3
votes
1answer
103 views

Understanding Grover’s Oracle for 3-SAT

First of all I'm very new to the quantum computing world so this might seem trivial to you, but it's a hump I was unable to get over for days now. So I'm talking about the version that Qiskit has ...

1 2
3
4 5
23