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
3
votes
1answer
49 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
36 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
34 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
43 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
40 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
0answers
41 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
25 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
50 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
63 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
58 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
vote
1answer
43 views

Is noise the only reason that makes the results of Quantum Support Vector Machine (QSVM) and Classical SVM differ, when we use a large dataset?

When I used and tested out the Quantum Support Vector Machine for just 120 samples of a large dataset (Training - 100 and Testing - 20). Its kernel classification results were quite close to the ...
3
votes
0answers
20 views

How to design a RF-SQUID qubit by Qiskit Metal?

I am now learning how to use Qiskit Metal to design superconducting circuits. I found that there are only several transmon qubits in the library. Can I design an RF-SQUID qubit by using Qiskit metal? ...
3
votes
0answers
37 views

Writing circuits in Qiskit using only Clifford and T gates

Is there a way in Qiskit to write my circuit using only Clifford and T gates (CX, S, H, T and I think also $S^\dagger$ and $T^\dagger$)? With the function compile (with aer simulator) it gives me some ...
2
votes
1answer
73 views

Is there a faster way to do real-time error mitigation in qiskit?

I'm working on the readout error mitigation on a set of results obtained from different quantum circuits. The method I want to apply is to generate the confusion matrix for each quantum circuit (as ...
0
votes
2answers
45 views

qiskit transpile initial_layout determination

So, I am fairly new to Qiskit, and I've been following Qiskit textbook recently. In the chapter 7, where the QC lab exercises are located, in the first lab when working on the real hardware it is ...
3
votes
1answer
81 views

Qiskit's QFT not returning the expected state

I'm currently going through the lab problems for the Qiskit course here. I'm trying to finish lab set number 3 on QPE but I can't seem to get the desired output, even from the solution notebook. I'm ...
3
votes
1answer
38 views

Applying $R^{'\dagger}_{xz}$ in gate teleportation

In figure 4 of the paper Quantum Teleportation is a Universal Computational Primitive, the authors show a circuit for applying a unitary $U$ fault-tolerantly via teleportation. I'll paste the figure ...
-5
votes
1answer
165 views

Hi My Dears, I was working on the Quadratic Equation Solution Technique Using Quantum? [closed]

I was working on the Quadratic Equation Solution Technique Using Quantum ? But it seems to me that there might be no Quantum Benefit for it. If anyone can kindly code this in a cleaver way , Please do ...
0
votes
1answer
63 views

Error when running a VQE circuit in IBMQ backends

I want to run a VQE circuit of 4 qubits for a simple Hamiltonian with Qiskit. The circuit run smoothly in simulators. However, when I try to implement it on real IBM' quantum computers it gives me the ...
1
vote
0answers
33 views

Callback in VQC does not return correct float value for objective function evaluation

The callback for the VQC class is defined as: callback (Optional[Callable[[ndarray, float], None]]) – a reference to a user’s callback function that has two ...
0
votes
0answers
27 views

How to access/ read $\alpha$ and $\beta$ values of a certain qubit in a multi-qubit system in a for loop?

In order to rotate the qubit state I need first to be able to read the values of $\alpha$ and $\beta$ and based on their values I will apply the Q-Gate for rotating the states of the single Qubits in ...
3
votes
1answer
66 views

How is quantum transpilation scaled?

While thinking about a quantum transpiler's working I had a pretty basic doubt. Say that we are trying to transpile an $n$ qubit circuit where $n > 100$. What transpiler does is that it first tries ...
1
vote
1answer
36 views

Can I use `job_manager` to get memories for 3 parts of the experiment?

Here's part of the code I'm working on: ...
1
vote
0answers
23 views

What is the input for the interpret of Quantum Variational Regressors?

I'm trying to implement my first variational regressor using qiskit. I would like to understand how the interpret of a CircuitQNN works. I need to define an interpret that works on the amplitudes of a ...
1
vote
1answer
48 views

Qiskit: How did they use Haar measure in random_statevector?

I have read this article to understand sampling state vectors from Haar measure: Understanding the Haar Measure. Qiskit uses Haar measure to sample state vectors, but when I looked at the source code ...
2
votes
1answer
65 views

What is difference between qasm_simulator and ibmq_qasm_simulator?

There are many ways how to simulate a quantum circuit on IBM Q. However, in partiuclar I am interested in a difference between qasm_simulator and ...
1
vote
0answers
20 views

Generate certain depth Clifford random circuit by qiskit

To obtain knowledge about the pattern of errors occur in quantum circuits, random Clifford circuits are a good paradigm to use in that these kind of circuits can be efficiently simulated by a ...
0
votes
0answers
22 views

How can I obtain the numerical values of the density matrix elements in a state_city plot in qiskit [migrated]

I have run code following the documentation in the qiskit section on Entanglement Verification, up through the steps: [Earlier material from Entanglement Verification, followed by] ...
2
votes
0answers
32 views

Save output, wavefunction file and orbital information in Qiskit

I am going through LiH ground state energy calculation. I would like to know how to save the output file in Qiskit as one would do in classical computing using software like Gaussian or Psi4. Also, ...
1
vote
0answers
56 views

What is the right way to teleport qubits on a real quantum computer?

I've been using the teleportation protocol to teleport qubits and then using Qiskit state tomography for reconstructing my qubits. Using this circuit using open qasm I regularly obtain fidelity 0.9. ...
2
votes
1answer
85 views

How to calculate the Hartree-Fock energy in Qiskit?

I am wondering how to calculate the Hartree-Fock energy efficiently using Qiskit. For one can get the Hartree-Fock state efficiently in Qiskit, however, it seems that it is not so obvious to get the ...
0
votes
0answers
16 views

What is an example of numbers that when used for a Gaussian pulse, would result in a rotation about the x axis?

For the playing of a Gaussian pulse, what is an example of numbers that could be plugged in for duration, amp, and sigma that would result in the pulse rotating something about the x axis? Here is the ...
1
vote
1answer
49 views

Get the probability amplitudes of the 0 and 1 states of a single qubit in Qiskit considering a system of multiple qubits

I am looking for a method to get the values of $\alpha$ and $\beta$ probability amplitudes of each single qubit in a multiple qubit system. Is that possible? As you can see in the image, I have a 4-...
1
vote
1answer
99 views

Return only the measurements of a circuit

I have written the following program in jupyter: ...
3
votes
2answers
39 views

Normalization question in VQLS

I was studying VQLS in https://qiskit.org/textbook/ch-paper-implementations/vqls.html and run into the following normalization during the cost calculation. It says if $ |\Phi\rangle$ has a small norm....
2
votes
1answer
65 views

Quantum state inconsistency between book and IBM quantum composer

$ \newcommand{\ket}[1]{|#1\rangle} \newcommand{\tens}[1]{% \mathbin{\mathop{\otimes}\limits_{#1}} }$I'm trying to self-learn quantum information basics by reading Dancing with Qubits by Robert Sutor....
2
votes
3answers
432 views

Are these two circuits equivalent in performing controlled time-evolution?

I want to perform the controlled time-evolution of some 2 or 3-qubit Hamiltonian. Say we have this example: $$ H= Z_0\otimes Z_1 + Z_1\otimes Z_2 $$ The circuit performing the time-evolution ...
3
votes
1answer
48 views

How to obtain control and drift Hamiltonians for device in Qiskit?

I would like to play around with Qiskit OpenPulse and the publicly available IBMQ quantum computer that supports OpenPulse. My humble goal is to use Qutip's optimal control libraries to get a pulse ...
0
votes
1answer
42 views

Pad get_counts() with zeros for unmeasured states? (Qiskit)

After executing a job on qiskit, the typically procedure to get the measurement data from the quantum computer is to call get_counts() like so... ...
2
votes
1answer
30 views

Different statevectors with different quantity of complex numbers for same single-qubit states in Qiskit

I have several questions, but before ask, I want to write some theoretical. As we know, we can represent any single-qubit quantum state by the next representation: $$ |\psi\rangle=c_0|0\rangle+c_1|1\...
2
votes
1answer
28 views

Why can two target superconducting processors with the same layout get different transpilation results?

I compile and run the same small Grover circuit for 6 different processors. ibmq_santago, manila and bogota all have a linear layout, while quito, belem and lima have qubits arranged in a T-shape. I ...
0
votes
0answers
36 views

Import error to do with tweedledum

I am on MacOS 10.14.6. Installed Python3.9, create env with venv and installed qiskit. When I import qiskit, I get the ImportError, see below: ...
0
votes
1answer
29 views

How to get information about 'qubit location' or 'variable of qubit location' in qiskit docs?

I have something problem with using qiskit. I searched several qiskit docs to get 'qubit location' or 'variables' that represent qubit. I searched three documents below. ...
0
votes
1answer
39 views

How to execute a qiskit circuit from strangeworks hub? [closed]

I would like to execute a circuit in the strangeworks hub on IBM's "ibm_nairobi" system. Could someone just please send me a general layout of execute and provide a command for stangeworks ...
2
votes
1answer
96 views

How to formulate Dynamical Decoupling passes in Qiskit to improve result upon circuit execution

First, let me say that I am not familiar with the idea of Dynamical Decoupling. The goal of this question is to understand how to set up a circuit with dynamical decoupling to improve my hardware ...
2
votes
3answers
77 views

Saving statevector on more than one location in a quantum circuit in Qiskit

So, I'm fairly new to Qiskit, and I've been playing around and following the tutorials from the Qiskit textbook. However, there is one thing I fail to understand/implement: for a quantum circuit with ...
0
votes
0answers
28 views

Quantum check sample implementation

I've been trying to figure out how to create a simple circuit in Qiskit to create a check (cheque ) generation and verification as described in this paper. I started with 3 qubits, first one with the ...
2
votes
0answers
55 views

How can I add custom pulse gate to the Qiskit circuit?

I tried to make my pulse and get the pulse into the circuit. But it seems not working properly. The code and the result are below. Just change the 'x' to the 'h' (hadamard) with the same piecewise ...
1
vote
0answers
25 views

How to measure the error rate (or fidelity) of a particular gate (such a H, T) by Qiskit

We know the calibration data of IBM's quantum devices can be retrieved through the randomized benchmarking method, which is included in Qiskit. However, the calibaration data about gates just gives ...

1
2 3 4 5
23