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
1answer
33 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 ...
-1
votes
0answers
19 views

Coding with Qiskit S2 Ep4 & Ep5 [closed]

Not sure anyone has some advice on the following: S2 Ep4: a) I have issues with installing pyscf, as the error said something on tar file in some folder, and not in some other folder. Causing the ...
3
votes
2answers
55 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.
5
votes
3answers
139 views

Can I find the axis of rotation for any single-qubit gate?

Suppose I have an arbitrary qiskit $U_3$ gate: $U_3(\theta,\phi,\lambda)$. Is there a way I can find which axis the gate is rotating around? In other words, given any real numbers $\theta,\phi,\lambda$...
1
vote
1answer
96 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
61 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 ...
3
votes
1answer
135 views

Implementing QFT

I would like to know if there is a way to: Implement Quantum 'Functions' e.g the QFT of QFT* containing several single-qubit operations? Implement such operations on an arbitrary number of qubits and ...
4
votes
0answers
36 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
57 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!
6
votes
1answer
2k views

Evaluating expectation values of operators in Qiskit

I'm wondering how in Qiskit one can calculate the expectation value of an operator given as a WeightedPauli (or, at least, of a single ...
6
votes
2answers
560 views

How many ancilla qubits to use with Multiple-Control Toffoli (mct) gate in Qiskit?

The Multiple-Control Toffoli (mct) gate takes as input: 1. a register containing the control qubits, 2. the target qubits and 3. a register containing ancilla qubits. I don't know how many ...
5
votes
2answers
67 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 ...
1
vote
1answer
202 views

Qiskit - Renormalize the qubit after measurement

I have a 2 qubits system, maximally entangled, and I performed measurement on one of the qubit. ...
3
votes
1answer
71 views

When will Qiskit Runtime be available to all users?

IBM's Qiskit Runtime was recently made available to a select group of users. Have they announced when it will be available to all users or when they might open it back up to a second round of new ...
1
vote
1answer
49 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
1answer
53 views

Qiskit: set_frequency workaround in PulseSimulator

I am trying to run exercise 4 from the recent IBM Quantum Challenge using a PulseSimulator since the device used in the challenge is not available for public use. A snippet of what I am trying to run ...
2
votes
2answers
123 views

Transpilation on restricted topology does not yield an equivalent circuit in Qiskit

Here is an MWE: a simple circuit on three qubits with a CNOT acting on qubits 0 and 2. The coupling map prohibits a two-qubit gate between qubits 0 and 2 and so qubit 1 must get involved. ...
2
votes
0answers
35 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
28 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
45 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 ...
3
votes
1answer
80 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
vote
1answer
78 views

What is the convention of indices for the one and two-body integrals in qiskit

I was able to calculate the one and two-body integrals for the H2 with the following code ...
0
votes
1answer
45 views

How to re-execute failed jobs in qiskit?

When executing a batch of circuits using the IBMQJobManager and attempting to combine all the results of all jobs with combine_results I get the ...
2
votes
1answer
62 views

How to find the expectation value of several circuits using Qiskit aqua operator logic?

I am using the method from this SE answer to calculate the expectation value using qiskit aqua operator logic which works well for a single circuit. Here is a simplified code snippet to demonstrate ...
3
votes
0answers
116 views

Grover's algorithm for 3SAT problem gives erroneous results

I'm writing some code in python with Qiskit that implements Grover's algorithm to solve the 3-SAT problem, but when I run it it doesn't give the correct annswer. I've checked the circuit with the <...
3
votes
2answers
78 views

Source code for a Qiskit algorithm: HHL Algorithm

Is it possible to view the source code of one of the Qiskit's algorithm? Actually, I am trying to find how Qiskit implements the HHL algorithm. I want to see the source code for this algorithm.
1
vote
1answer
41 views

Running qiskit on jupyter notebook certverification error: unable to get local user certificate

I have code which runs on the IBMQ website perfectly, however copying and pasting the same code (and including my API token) the same code does not run when I try and run it on a real quantum computer ...
0
votes
1answer
44 views

Qiskit package installed locally, but not running in jupyter notebook

I believe I have installed qiskit on my computer. Running pip list or pip3 list in terminal returns: ...
2
votes
2answers
53 views

Transpiling with dynamical decoupling sequence

I am testing circuits which contain mid-circuit reset operations, using Qiskit and IBM Quantum hardware. For 2 qubit simulations, I have a reset operation on one of the qubits and would like to test ...
2
votes
1answer
49 views

Is there an efficient way to create entangled states using Qiskit?

I am trying to implement Grover's search using Qiskit. And I would like to create entangled states so I could search for the index of a specific value in a list. For example, if the third element in ...
4
votes
1answer
99 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 ...
6
votes
2answers
251 views

Apply readout error mitigation to mid-circuit measurement

I'm trying to construct a quantum circuit with 3 mid-circuit measurements, here's an example: ...
3
votes
1answer
52 views

Qiskit: total number of parameters after composing parametrized circuits

I'm trying to use the .compose() method to join two parametrized circuits, specifically TwoLocal instances from the ...
2
votes
3answers
89 views

Shor's implementation problem on qiskit

If q4-7 are all supposed to be eigenstates of the operation, why is it just that q7 is in $|1\rangle$? Shouldn't all qubits 4 to ...
2
votes
1answer
43 views

From Qiskit QuadraticProgram to problem model accepted by d'wave ocean

Is there a way to convert QuadraticProgram (qiskit.optimization.problems.QuadraticProgram) to BQM used in D'wave ocean (e.g. <...
6
votes
2answers
128 views

Is there a general order finding quantum algorithm for a given a and N?

I'm trying to construct a general circuit for Shor's algorithm in Qiskit. I understood the later parts of the circuit (inverse QFT and QPE), but can't really understand the order finding. For example, ...
2
votes
1answer
136 views

quantum label classification using qiskit

I am generating points for classification. Some will be above the main diagonal, while others will be below (blue or red). ...
1
vote
0answers
50 views

Are inconsistent results between different VQE runs justified?

I made this post a while ago, where I learned I could use qiskit's VQE to calculate (or approximate) the Transverse Field Ising Hamiltonian and other similar Hamiltonians. After working with my code ...
2
votes
1answer
56 views

IF statement in OpenQASM2.0 on IBM Quantum Experience — error

I have written the following toy .qasm file, which has some adaptive measurements: ...
4
votes
2answers
205 views

How to repeat circuit efficiently and reliably in IBM Qiskit?

I'm having a problem in IBM Qiskit with my qubit identities switching places during transpilation. I've been told by developers on the Qiskit slack server that there's currently no built-in way to fix ...
1
vote
0answers
91 views

Qiskit Tomography and Noise Mitigation with a Measurement Mid-Execution

I'm struggling to get a program running where I have a circuit with a measurement and reset mid-execution and I want to use noise mitigation and state tomography together. The circuit is defined ...
5
votes
3answers
289 views

How do I get out 2 measurements from the same execution on Qiskit?

Here's my circuit, trying to checkout the effect of measurement on the IBM Q circuit. Here you can see I do 2 different measurement at different time, and I hope to be able to see both results. ...
1
vote
1answer
66 views

Qiskit - lesson 3 - with Abe

Coding for Qiskit I watched this video: https://www.youtube.com/watch?v=RrUTwq5jKM4 Using Mac OS Big Sur Using Jupyter 2.0.8 Using Python 3.8 The below code did not work and therefore installed ...
3
votes
1answer
53 views

How do I identify a VQE job run in real hardware?

I am running a VQEUCCFactory for H2 on a real hardware device. ...
1
vote
1answer
76 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
1answer
130 views

Transpilation into custom gate set in qiskit

In qiskit, I can transpile a given circuit into a some predefined gate set as follows (just an example) ...
2
votes
1answer
90 views

Quantum circuit for the ZZ feature map

Havlicek et al. propose a feature map for embedding $n$-dimensional classical data on $n$ qubits: $U_{\phi(x)}H^{\otimes n}$, where $$ U_{\phi(x)} = \exp (i \sum_{S \subseteq [n]} \phi_S(x) \prod_{i \...
5
votes
1answer
101 views

Use one_body_integrals to know which orbitals to freeze in ElectronicStructureProblem

In exercise 5 of the this year's IBM Quantum Challenge, you need to use the FreezeCoreTransformer (along two_qubit_reduction and ...
1
vote
0answers
72 views

How to load time-series stock data into quantum amplitude estimation

Now I got some time-series data as showing example below: I have spent a period of time realizing the QAE from qiskit, and I found that the tutorial used uncertainty model to reproduce data, while I ...
2
votes
1answer
57 views

QPE Circuit test on Quantum Computer ('ibmq_16_melbourne')

After several atempts, I cannot mitigate the error when running the code on a NISQ, via the qiskit library (more specifically on the 'ibmq_16_melbourne'). I've already mapped the connected qubits and ...

1
2 3 4 5
20