Questions tagged [qiskit]

Quantum Software Development Kit for writing quantum computing experiments, programs, and applications. If appropriate, also use the [programming] tag.

Filter by
Sorted by
Tagged with
1
vote
1answer
52 views

Generic CNOT gate in qiskit from tensor product

I would like to use qiskit to verify for generalized CNOT gates that, e.g. for 4 qubits \begin{equation} \text{cu(0,3)} = |0\rangle\langle 0|\otimes1\!\!1\otimes1\!\!1\otimes1\!\!1 + |1\rangle\langle ...
2
votes
2answers
121 views

Was the Quantum Circuit Attribute “iden” renamed?

I'm going through some older tutorials for my employer and everything seems to be working fine except the "iden" attribute. The error is listed below. I assume the name was changed but I don'...
3
votes
2answers
78 views

Implementing Grover's oracle with multiple solutions in Qiskit

I want to turn a state $$ |\Psi_1⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩+|101⟩+|110⟩+|111⟩) $$ into $$ |\Psi_2⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩-|101⟩-|110⟩+|111⟩) $$ ...
1
vote
2answers
67 views

Q-Sphere representation of Bell States

I'm currently going through Lab1 of the Qiskit Quantum Computing Course, where one task is to create the Bell State $$\frac{1}{\sqrt{2}}\left(\vert01\rangle + \vert10\rangle\right)$$ Technically it ...
4
votes
2answers
285 views

What's the default value for a quantum register?

I've just started to learn Quantum computing with Qiskit: I'm reading the Qiskit documentation and the book "Quantum Computing in Practice with Qiskit® and IBM Quantum Experience®". In this ...
3
votes
1answer
30 views

Is there a 'retry' logic in job manager?

This is a follow-up question to my earlier post. I'm trying to filter a set of results obtained from job manager, and the following code works when my circuit list doesn't contain too many elements: <...
2
votes
1answer
58 views

API error when trying to access IBM Quantum Computer using IBMQ API Token

I'm trying to write a code so that if the token exists then it loads the account or else it asks the user for the API token. Below is the code for reference: ...
3
votes
1answer
51 views

Filtering a set of results obtained from job manager

I've already generated a filter for readout error mitigation: ...
2
votes
1answer
53 views

How to simulate the density matrix in Qiskit when using the qasm simulator?

When simulating a circuit using qasm simulator, if there is a depolarizing channel in the noise model, then the results could be mixed states. How can I calculate the density matrix of the mixed ...
4
votes
1answer
33 views

CERTIFICATE_VERIFY_FAILED after updating Python when trying to access results in IBM QE

I had a question earlier about the Numpy DeprecationWarning flooding issue. I just updated the Python in my regular jupyter notebook and have trouble running the following cell: ...
1
vote
1answer
34 views

Applying a projector to a qubit in a qiskit circuit

I'd like to be able to apply $|0 \rangle \langle 0|$ to project a qubit to the state $|0 \rangle$ in the middle of qiskit circuit (see, for example, the attached circuit). I wonder if, in general, ...
0
votes
2answers
44 views

How to fix an error : “ QiskitBackendNotFoundError: 'No backend matches the criteria' ”

I am trying to run the Quantum Teleportation Algorithm using Qiskit on Jupyter Notebook. Here is my code below where I am finding an error - ...
2
votes
1answer
66 views

proof that the gate U is equivalent to the given circuit mathematically

I have solved this question by this, but can't able to get my mistake in it.
0
votes
1answer
38 views

How to fix an error: 'module 'qiskit.result' has no attribute 'get_counts'' [closed]

execute(circuit, backend = simulator).result() plot_histogram(result.get_counts(circuit)) Error: module 'qiskit.result' has no attribute 'get_counts'
1
vote
1answer
26 views

Can I only use a 'subset' of calibration matrix to reduce measurement errors?

Suppose I have the following calibration matrix generated using 4 qubits: ...
1
vote
1answer
140 views

Numpy DeprecationWarning flooding in IBM Quantum Lab

I'm coding using the Jupyter Notebook in the IBM Quantum Lab. However, I don't know why I see the following repeated message every time when I execute a quantum circuit: This message shows thousands ...
1
vote
1answer
33 views

How can I adjust calibration figure size?

I'm hoping to obtain a larger picture of the calibration figure. The original command is meas_fitter.plot_calibration() I tried to use ...
2
votes
2answers
84 views

Qiskit order of multiplication and tensor product

Section 2.3 of the Qiskit textbook shows us that $$ CNOT|0+\rangle \ = \ \frac{1}{\sqrt2}(|00\rangle + |11\rangle)$$ which I was able to translate to a circuit as such: ...
2
votes
1answer
42 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 ...
4
votes
2answers
74 views

Preparing Bell state $(1/\sqrt{2}) (|01\rangle + |10\rangle)$ in Qiskit

I'm working through the Qiskit textbook right now, and wanted to complete part 1 of exercise 3.4, which asks me to use qiskit to produce the Bell state: $$\frac{|01\rangle + |10\rangle}{\sqrt{2}}$$ ...
2
votes
0answers
37 views

Calculating energy function with 1&2-RDM (reduced density matrix) in Qiskit

I am now working on designing quantum error mitigation with variational quantum eigensolvers (VQE). I need to get the 1&2-RDM from Qiskit, which has already been realized by Openchemist pakages ...
4
votes
1answer
51 views

HHL algorithm, How can I get result from register $|b\rangle$?

From the paper A survey on HHL algorithm: From theory to application in quantum machine learning , I use qasm code from here. I try to follow the example in page 7. with Ax = b and the answer x ...
2
votes
3answers
73 views

error when running VQE in Qiskit

I am running the code, which gets the ground state energy with different atomic distances of LiH. However, I encountered this error. The code is as follow ...
1
vote
0answers
36 views

Why Measurement Error Mitigation does not seem to improve the result of VQE?

I try to follow https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/algorithms/03_vqe_simulation_with_noise.ipynb to perform measurement error mitigation for calculating H2 energy with ...
3
votes
1answer
71 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: ...
3
votes
1answer
43 views

Visualizing nice circuits in Qiskit

This is what drawing a circuit looks like in the Qiskit textbook: and this is the ugly version I am stuck with in my own notebooks: On their Prerequisites page they write: However, there is no ....
0
votes
3answers
109 views

What qiskit version?

How do I find out what version of qiskit I am running?
8
votes
5answers
914 views

If quantum computing always return random measurement (or uncertain measurement), why do we still need it?

I am very new to quantum computing and currently studying quantum computing on my own through various resources (Youtube Qiskit, Qiskit website, book). As my mindset is still "locked" with ...
2
votes
1answer
50 views

Qiskit: getting QAOA expectation

Suppose I run the Qiskit's QAOA algorithm. qaoa = QAOA(operator=qubit_operator, p=p, optimizer=optimizer) result = qaoa.run(quantum_instance) There is a built-in ...
2
votes
1answer
33 views

Is it possible to modify pulse schedules in QASM?

Is it possible to modify a pulse schedule of a circuit compiled using QASM? I know this is possible using OpenPulse, but it seems none of the IBM backends support OpenPulse. So is it possible to do ...
2
votes
1answer
57 views

How to use Initial States in Qiskits QAOA?

The class QAOA from qiskit: https://qiskit.org/documentation/stubs/qiskit.aqua.algorithms.QAOA.html has the parameter initial_state from the type InitialState. https://qiskit.org/documentation/apidoc/...
2
votes
2answers
64 views

Error When Importing from qiskit.aqua

Qiskit Aqua raises the following exception: ImportError: dlopen: cannot load any more object with static TLS I don't understand what might be causing this. I ...
1
vote
2answers
27 views

Why did “job_manager” submit the same job twice and how to fix it?

In order to avoid the problem posted in Why "job_manager" did not submit some of the jobs?, (the current issue is related but quite different, so I think it is more appropriate to ask ...
-3
votes
1answer
50 views

Query on the HHL Algorithm in the Qiskit Aqua Library [closed]

This is a question regarding the Qiskit Aqua package. I have been studying HHL algorithm from QISKIT textbook and after understanding the math I finally got to the code part, I am having a hard time ...
3
votes
2answers
42 views

Why “job_manager” did not submit some of the jobs?

I tried to submit around 2000 circuits with "job_manager", and it turns out that some jobs are not submitted. Please see the code and error message below. I understand that we can submit max ...
1
vote
0answers
43 views

Measurement of any qubit state in Y-basis [duplicate]

how can I measure any qubit state in Y-basis in qiskit. there is this solution here How to measure in another basis but it gives the qubit's position on bloch sphere in z-axis where as I think it ...
0
votes
0answers
24 views

Why do I get the error 'IBMQManagedResultDataNotAvailable'?

I'm trying to use IBMQ job manager to submit a list of quantum circuits (300 of them in total) to 'ibmq_16_melbourne'. This is what the job status looks like on IBM Quantum Experience: I don't know ...
1
vote
0answers
43 views

Why qiskit.execute runs much slower for inputs with multiple circuits, and how to speed it up?

I am using the "execute" in qiskit to run experiments for two circuits, and it turns out that "execute" runs much slower if the two circuits are run simultaneously, compared to if ...
2
votes
1answer
78 views

Quantum teleportaion seems to occuring without entanglement in circuit (what's wrong)

Please, pardon the caption. No intention of making new theories. I am a bit confused about the quantum teleportation. I missed a hadamard gate before CNOT gate for creating the EPR pair. But the ...
2
votes
1answer
72 views

Can I access device specifications of IBMQ paying devices?

I need to perform some tests for my thesis in real quantum computers, however, I only have access to IBM's free quantum devices (the maximum number of qubits I can use is 15, in ...
1
vote
2answers
50 views

An issue in plotting the quantum circuit using latex

Here's the code I'm working on: !pip install pylatexenc !pip install pillow qc = QuantumCircuit(2) qc.x(0) qc.cz(0,1) qc.x(0) qc.draw('latex') However there's an ...
0
votes
1answer
47 views

how to plot probability histogram and/or bloch sphere of single qubit in multi-qubit quantum circuit in Qiskit?

How can I get statevector and/or blochsphere representation of qubits of my choice. For example I have 3 qubits with different gates being applied on each qubit. the qiskit state_vector simulator ...
2
votes
1answer
41 views

Is there an error on Qiskit.org textbook with the superdense coding section?

The textbook on Qiskit.org has When the H-gate is applied to first qubit, it creates superposition and we get the state $|0+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$ Shouldn't it be: $$|...
0
votes
1answer
75 views

Qubit ordering in qiskit

I am confused about the qubit ordering in circuit diagrams and endianness used in qiskit. As far as I understand, qiskit uses little endian (least significant qubit is rightmost) and while drawing ...
-2
votes
1answer
54 views

How to deal with job submission error in IBM? [closed]

I keep on getting this error no matter how many circuits I run in the backend 'ibmq_athens'. It says 'Max retries exceeded with URL'. Can someone explain why I am getting this error message. The main ...
4
votes
3answers
107 views

Writing state $ |\Psi⟩ =\frac{1}{\sqrt{2}}|00⟩+\frac{i}{\sqrt{2}}|01⟩$ as separate qubits (qiskit textbook)

While going through the IBM qiskit textbook online, I came across the following question in section 2.2: Write the state: $ |\Psi⟩ =\frac{1}{\sqrt{2}}|00⟩+\frac{i}{\sqrt{2}}|01⟩$ as two separate ...
0
votes
1answer
51 views

A problem with application of multi controlled rotation gates [closed]

This message pops up when I run an mcrx gate The mcrx gate needs a single qubit as target. Here is a part of code I run: ...
2
votes
1answer
107 views

Job fails when using PulseSimulator: Job Status: job incurred error

I'm trying to simulate a basic circuit using the PulseSimulator in Qiskit. The following Qiskit Pulse code works when I run it on the real device, but not when ...
2
votes
1answer
78 views

Qiskit's c_if and conditioned operations on a real quantum computer

Can Qiskit's c_if be used on a real quantum computer of IBM? And if it can, can it put a condition only on Qiskit gates like X, H, U1, U2, etc, or is there some way ...
1
vote
2answers
77 views

1
2
3 4 5
17