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
0answers
64 views

Many jobs hanging after creating

I am running a VQE calculation running from a cluster using nohup. However, some of my jobs keep hanging with 'creating' and therefore my VQE is not converging/not working. However, at the same time,...
6
votes
3answers
831 views

What is the location of the Qiskit config file?

I'm trying to follow the instructions here https://qiskit.org/documentation/getting_started.html. It says The default backend for qiskit.visualization.circuit_drawer() or QuantumCircuit.draw() is ...
3
votes
1answer
199 views

In qiskit, doing 2 subsequent measurements of a Hadamard gate on the same qubit always gives 0 on the 2nd one

When I execute the following circuit, I expect that in both classical registers, the content is identical. ...
4
votes
0answers
243 views

Problem with measurement error mitigation using VQE

I am attempting to mitigate measurement error while running on one of IBM's real devices and am doing so by passing CompleteMeasFitter into ...
1
vote
1answer
723 views

Attribute error in Qiskit

Tried executing plot_histogram(result.get_counts(circuit)) where result has the job result and circuit is the Quantum circuit But an attribute error hits every ...
2
votes
1answer
155 views

Error on loading account with qiskit: "TypeError: __init__() missing 1 required positional argument: 'url'"

We are using an open account. We can not load the account even when we use the code on new notebook. The error message is: ...
5
votes
1answer
297 views

How to parallelly run a quantum circuit on IBMQ?

I am trying to implement the following circuit and my code is The above circuit has size 5 and depth 3. My question is, how can I run the circuit parallelly. I mean, the gate ...
1
vote
0answers
48 views

Suggestions for hybrid factoring algorithm on DWave and Qiskit

I was wondering if the multi-prime factoring problem can be solved in a hybrid approach using DWave (to factor) and Shor's algorithm (in Qiskit)? Please let me know your thoughts. Thanks!
3
votes
1answer
391 views

How to selectively apply noise in Qiskit simulations?

In Qiskit it is possible to specify noise models to apply to simulations. This allows noise to be defined for certain operations, like measurement or each type of gate. Is it also possible to change ...
5
votes
2answers
673 views

How to prepare a specific initial state of three qubits?

I would like to prepare the following initial state for variational quantum algorithms: $$ \sin\theta_1 \sin\theta_2 \sin\theta_3 |000\rangle + \sin\theta_1 \sin\theta_2 \cos\theta_3 |001\rangle + \...
2
votes
1answer
321 views

Implementing noise model in Qiskit using arbitrary basis gates

Consider the simplified code below. The code creates a quantum circuit and a simplified noise model. When I try to simulate this circuit using the noise model I get error message that the simulation ...
3
votes
1answer
83 views

Resources in Spanish to start learning quantum computing and quantum programming (Qiskit)

I’m starting an engineering degree in computer systems and I’m starting to get really interested in quantum computing. First of all, I don’t know where or how to start and I would really like to learn ...
4
votes
0answers
89 views

`execute()` hangs and eats memory

Used memory-profiler to check why I get memory spikes in what I though were small circuits. The circuit itself is constructed using ...
6
votes
2answers
613 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 ...
1
vote
0answers
98 views

'ERROR: QasmSimulator: Circuit cannot be run using available methods.'

I used the following code. Can anyone say what that error is about? ...
2
votes
1answer
98 views

When I load a saved account, I get a license-agreement error (links to old website)

I cobbled together a few programs with Qiskit several months back which worked fine on both the BasicAer simulators and the actual IBMQ computers. However, when I tried to revisit them recently, ...
4
votes
1answer
660 views

Is there a way to develop a multiple controlled X or Z gate on Qiskit without using ancillary qubits?

I know for instance I can derive a cccX gate using 2 Toffoli gates on 5 qubit wire or ccccX with 3 Toffoli gates and 7 qubits and so on. you will notice the depth is increasing as the number of ...
-3
votes
1answer
142 views

Exploring quantum computing with Qiskit [closed]

I'm prepared to explore quantum computing which is completely new to me. Searching for a while on the Internet, I found IBM Qiskit which is an Open Source software necessitated for Quantum Computing. ...
16
votes
1answer
4k views

What is a "barrier" in Qiskit circuits?

I just started studying IBM Qiskit, and cannot find details about the barrier method on the QuantumCircuit class. It is shown in the circuit drawing, but I never heard about it after reading quantum ...
2
votes
1answer
55 views

n-qubit circuit run with > n qubits?

I was reading the Qiskit tutorial on circuit properties and there is a section (Unitary Factors) which states that even though an example circuit is made of 12 qubits, it may not need 12 qubits to run....
-1
votes
1answer
90 views

What is ''524 Server Error''?

When running my code, sometimes I find this 524 Server Error: Origin Time-out for url and then my code stop. The error is in ...
0
votes
1answer
36 views

Quantum Circuit Properties typo (documentation bug?)

Just to report that the notebook "Quantum Circuit Properties" under the Tutorial uses a circuit named qc2 but afterwards the sample code still uses the ...
4
votes
3answers
443 views

How to plot custom gate labels in Qiskit?

How can I create a custom gate in qiskit that is plotted using latex formatting (or another type of formatting)? For example the following code generates a circuit diagram ...
8
votes
1answer
1k views

Is it possible to run a general implementation Shor's algorithm on a real IBM quantum computer at least for N = 15?

I need to make a general implementation of Shor's algorithm that factors, at least, N = 15. I have been able to perform an implementation that works in simulators, with ProjectQ, but when running it ...
2
votes
1answer
204 views

QAOA Maxcut for larger qubits

I am using QAOA to solve maxcut problem. It takes a very long time to simulate 10 qubits and I never get the results. Is there a way to simulate faster for larger qubit? Here is my code ...
1
vote
3answers
204 views

How many classical registers are there on (IBM) quantum computers?

I have a circuit where I only use 3 qubits but need to utilize hundreds of classical registers. My questions are: what is the maximum number of classical bits on the current IBM Qs? What is the ...
2
votes
2answers
146 views

How to unpickle a Result object returned by an IBMQ experiment?

I have executed an experiment using IBMQ and receive a Result object. I am writing the ASCII repr of the result with f.write(res)...
3
votes
3answers
816 views

How can we construct a square root of NOT gate in Qiskit and IBMQ circuit composer using universal gates?

I have tried it with decomposing controlled S then conjugating with H gate. But I want to construct it using a minimum number of gates.
-2
votes
1answer
204 views
3
votes
1answer
290 views

In Qiskit, when creating multi-bit quantum and classical registers, what is the ordering of MSB to LSB?

When creating multi-bit quantum and classical registers, what is the ordering of MSB to LSB? For instance, I created a quantum register via ...
2
votes
0answers
113 views

Is it possible to simulate or replicate a cryptographic algorithm using Qiskit?

I would like to know if it is possible to recreate or simulate a cryptographic encryption algorithm like DES or AES using the quantum computing platform Qiskit from IBM?
2
votes
0answers
132 views

Running HHL tutorial on real backend

I tried to follow the HHL tutorial. Since the 8x8 problem is not realistically simulable (I stopped after a few minutes), I tried to make it run on another backend, starting on the easiest example: <...
1
vote
1answer
501 views

Backend Warning: The skip Qobj validation does not work for IBMQ provider. Disable it

I am using QAOA to solve the max-cut problem. On my machine, 10 qubits already takes a minute or two to simulate. I'm hoping that the ibmq-qasm-simulator could simulate 32 qubits faster than my laptop ...
1
vote
1answer
59 views

Question on using the Collect2qBlocks() and ConsolidateBlocks() optimizations

I'd like to run the optimizations from Qiskit's level 3 transpiler pass on some example programs for benchmarking, but when I try to include the Collect2qBlocks() and ConsolidateBlocks() passes I get ...
5
votes
2answers
1k views

Big Endian vs. Little Endian in Qiskit

I've noticed that Q# favors Little Endian. Meaning that most operations are designed for this type of encoding. Is is it the same with Qiskit?
4
votes
3answers
4k views

Overview of Cirq, qiskit, q#, ibmq(circuit board), other [closed]

What is the difference between these frameworks or languages? What are the pros and cons of each of these? Do you know any similar framework/platform/language that gives some more advantages?
2
votes
3answers
1k views

AttributeError: 'AerJob' object has no attribute 'get_counts'

result = execute(circuit, backend=simulator) plot_histogram(result.get_counts(circuit)) I used the above code to plot a histogram for a simple entanglement ...
1
vote
1answer
229 views

How to understand run_algorithm() inputs in qiskit

I'd like to better understand the Max-Cut algorithm from the qiskit tutorials. Particularly, the run_algorithm function inputs. The inputs are two dictionaries, but I can't find any documentation or ...
4
votes
1answer
1k views

IBMQ.load_account from stored ACCOUNT is failing on Qiskit 0.9.0

The following statement is causing an error in Qiskit Version 0.9.0: provider = IBMQ.load_account() Error Message: ...
1
vote
2answers
466 views

How to get amplitudes only for chosen qubits?

For computation, I use N working qubits and M ancilla qubits. ...
3
votes
2answers
326 views

In Grover's Algorithm, does the exact solution need to be given to the oracle?

From my understanding, the oracle function in Grover's algorithm is used as a way to check for the desired outcome. I have looked at this example which implements the Exactly-1 3-SAT problem and the ...
0
votes
1answer
597 views

Qiskit plot_histogram and count not working [closed]

I'm trying to plot a histogram of my code but when I run plot_histogram(results.get_counts(circuit)) it gives me a traceback error. This is what I had before ...
1
vote
1answer
698 views

How to obtain qubit's amplitude in qiskit

For example, I have some circuit circuit = QuantumCircuit(2) After operations: circuit.h(0) circuit.cx(0, 1) probability ...
2
votes
2answers
150 views

Why qiskit changed the order of gated applied to a circuit

Below I created a circuit and applied several gates to it: ...
1
vote
1answer
212 views

Qiskit - Renormalize the qubit after measurement

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

Access results from an experiment without having to run the script again

I have ran an experiment in one of the IBM processors and the work has finished. However, I can not obtain the data as histograms or counts in the qiskit notebook because the experiment was concluded ...
1
vote
3answers
1k views

Loading Qiskit account in the Jupyter notebook gives RequestsApiError error

I successfully installed qiskit, yet am unable to load my account in the Jupyter notebook. Each time I load my account in Jupyter notebook here is the response I get RequestsApiError: 401 Client ...
2
votes
0answers
163 views

Error ERROR_TRANSPILING_JOB when trying to simulate the circuit

I'm trying to implement an algorithm (https://dl.acm.org/citation.cfm?id=1128034, basically a simple Grover Algorithm in which the oracle is made of a Fitness operator- some CNOT gates- and 2 adders) ...
2
votes
2answers
117 views

Using Qiskit with Blender

I want to use Blender and Blender Python Scripts working with Qiskit. (want to make 3D creations) (www.blender.org) How can I do this ? (because when I try to install Qiskit inside Blender Python, it ...
2
votes
1answer
577 views

qiskit - measure only 1 of the register out of n registers

I have created a 9 qubit register: q = QuantumRegister(9) c = ClassicalRegister(9) qc = QuantumCircuit(q, c) I want to measure only 1 of the register(let's ...