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
2
votes
1answer
94 views

Couldn't connect to IBMQ server

When I access IBM Q backend with qiskit code, an error occurs. from qiskit import IBMQ qt = 'xxxxxxxxx' IBMQ.save_account(qt) IBMQ.load_accounts() The error ...
3
votes
1answer
215 views

Qiskit installation failing: VC++ 2017 not found

I tried to follow the web instructions to load Qiskit, including VC++ 2017 Redistributable, but I get many errors upon installation. The gist seems to be that VC++ 2017 wasn't found. Some results ...
0
votes
1answer
43 views

How can I implement a kraus_error in qiskit?

I have successfully run bit_flip_error in Qiskit by function pauli_error, but I can not find how to implement a ...
0
votes
0answers
47 views

What is the URL of the result?

This answer states that: Once it is submitted, your job will be in queue. You will have to request by GET this job ID to get the answer from the backend. The GET URL is: https://quantumexperience....
2
votes
1answer
79 views

How good is basic_device_noise_model() simulating the noise in the quantum computer?

Is there any paper or article about the performance of the noise model using basic_device_noise_model()? For example, like the noise model in the code below. ...
1
vote
0answers
31 views

Exponentiating Hermitian Matrix for use in QPE/HHL

I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$. Because I am currently ...
4
votes
2answers
162 views

How to draw Qiskit's HHL algorithm as a circuit?

Qiskit Aqua has a module that implements the HHL algorithm: https://qiskit.org/documentation/_modules/qiskit/aqua/algorithms/single_sample/hhl/hhl.html How does one draw the implemented circuit? * ...
4
votes
0answers
37 views

Vary parameter between shots

Is it possible to tell Qiskit to execute a parameterized gate where the parameter varies between shots? Let's say, for whatever reason, I'd like to speed up the dephasing of a qubit during a run. I ...
4
votes
1answer
75 views

Why is the order reversed on measurement?

Why is the order reversed on measurement? ...
1
vote
1answer
37 views

qiskit - Creating your own ExperimentResultData object

Could someone guide me on how to create my own qiskit.result.models.ExperimentResultData object? I would simply like to create an object with some self-created dict ...
1
vote
1answer
58 views

Strange circuit with multi-qubit 'unitary' gates after transpiler with optimization level 3

Recently, I used the transpile() function with the level 3 preset pass manager to compile a very long and complex circuit on a real device coupling map. I was curious to see how much the depth of the ...
3
votes
2answers
155 views

How to decompose this two-qubit unitary matrix to the standard gate set?

I have read some of the other decomposition questions here however still don't understand how to do it manually. The matrix I wish to decompose is the following for 2 qubits: $M=\frac{1}{\sqrt2}\...
1
vote
0answers
36 views

In Grover, how to implement oracle and amplification using Qiskit?

I found some examples of implementing the oracle when the marked state is $|000\rangle$. But how can we know what gate we should use inside of the oracle? Besides, for the part implementation, the ...
2
votes
1answer
47 views
0
votes
1answer
59 views

How does one get the attributes of a circuit from its DAG in qiskit?

I have the following code, which runs properly. ...
-1
votes
1answer
400 views

Problem in installing Qiskit

When I try to install Qiskit using Pip install Qiskit I get the error as shown in the attached snapshot. Any help will be highly appreciated.
2
votes
1answer
148 views

Quantum pricing of financial derivatives (call option) in Qiskit Aqua

In finance, a European call gives the buyer the right to buy some underlying asset such as a stock at some pre-determined strike price at a specific expiration date. The Black-Scholes equation is a ...
-1
votes
2answers
77 views

How do you pass input to a circuit? [closed]

I've implemented Grover's search algorithm in qiskit, and I'd like to pass in an input to run through the circuit. How is that done?
1
vote
1answer
91 views

Trying to make irreversable operation in the quantum circuit

I want to make a 2 qubit circuit such that the non-unitary program will transform the regular basis in the way that: $|0 0\rangle \to |00\rangle$ $|0 1\rangle \to |01\rangle$ $|10\rangle \to |01\...
0
votes
1answer
43 views

What is the time zone for the time returned by backend.properties()?

For example, backend.properties() returns following: ...
1
vote
2answers
140 views

How do I find out which stable Python version Qiskit will be compatible to?

Recently I've got a new machine and had to start over again (Qiskit installation). As this was not my first time in creating a Qiskit environment on Anaconda, I was able to work out the errors. ...
1
vote
0answers
55 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,...
2
votes
1answer
102 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 ...
2
votes
1answer
148 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. ...
2
votes
0answers
88 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
78 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
67 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: ...
4
votes
1answer
127 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
36 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!
4
votes
1answer
105 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 ...
2
votes
2answers
139 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
80 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 ...
4
votes
1answer
70 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 ...
3
votes
0answers
55 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 ...
2
votes
1answer
92 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
69 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
63 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, ...
3
votes
0answers
85 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
129 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. ...
4
votes
1answer
554 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
45 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
67 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
33 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
158 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 ...
4
votes
0answers
402 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
94 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
107 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
106 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)...
2
votes
1answer
87 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
109 views