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
0
votes
0answers
3 views

PennyLane operations - Kerr, Displacement and Squeeze

I am familiar with the quantum gates of qiskit, but I become very confused when looking at the continous variable (CV) operations in the pennylane documentation. I am especially interested in the Karr,...
0
votes
1answer
14 views

How to obtain the noise of a circuit in Qiskit?

I referred to the following Qiskit's document: state_fidelity. The inputs of state_fidelity are quantum state vectors or density matrices. For example, $|00\rangle$...
0
votes
1answer
21 views

Return the value of a selected Qubit from Qiskit

I have a quantum circuit and the job has been run on the "statevector" backend, which runs only 1 shot. Therefore is there a way to return the qubit state (0 or 1) specifically when selected ...
-1
votes
0answers
26 views

Calculating the md5 of a text

I cannot see any libraries for Qiskit to calculate md5 hashes, is there one? How could I go about calculating the md5 hash of text?
1
vote
1answer
63 views

Vey different results between qasm_simulator and quantum computer

I've started playing around with circuits only recently and decided to try out and implement a 4-qubit Grover's search using qiskit. When I run my python script using the qasm_simulator, I get the ...
0
votes
2answers
70 views

'IBMQFactory' object has no attribute 'load_accounts'

I am following this qiskit workshop from https://colab.research.google.com/github/mtreinish/qiskit-workshop/blob/master/Workshop.ipynb . After adding my API key I had encountered the error ...
1
vote
1answer
43 views

How is quantum error applied to the qubits?

I am trying to check the way qiskit has the noise implemented. I have read how is this theoretically done using quantum channels (see Nielsen and Chuang chapter 8) and I want to verify if qiskit ...
0
votes
2answers
33 views

Right way to use Quantum Phase Estimation using aqua

I have been experimenting with Qiskit lately, but I have found the implementation of algorithms in Aqua extremely confusing. Currently I am trying to implement a very simple circuit that will return ...
1
vote
0answers
40 views

Openfermion to qiskit

Is there a direct way to go from an object generated in openfermion to objects usable in Qiskit. I can't find anything about any plugin. It's not too hard to translate into pyQuil and then to Qiskit ...
0
votes
1answer
42 views

More broken older Qiskit code

I am persuing some older code as below ...
0
votes
2answers
25 views

UCCSD in qiskit deprecated?

Is this now deprecated or moved? I've been looking for it. It was in from qiskit.chemistry.aqua_extensions.components.variational_forms import UCCSD
1
vote
0answers
50 views

IBM qiskit vs Microsoft QDK [closed]

I am new to both IBM Qiskit and Microsoft QDK. I wish to understand which framework would be best suited for someone new to this field. I am lookig for the pros and cons of both frameworks.
2
votes
1answer
58 views

How to make a Shor's algorithm for an arbitrary number of qubits with Qiskit on a IBM machine?

So suppose you want to do a Shor algorithm on an arbitrary number of qubits using an arbitrary $a$ (the base number in the periodic function $a^x \mod c$) and $c$ ( the factored number). Making the ...
1
vote
0answers
38 views

Grover's algorithm for 3SAT problem gives erroneous results

I'm writing a 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 ...
1
vote
3answers
148 views

How to realize this quantum error correction circuit on real hardware?

I want to realize this error correction circuit. To do that, I created a circuit: However, I cannot execute on real hardware. How can I create a circuit to realize this correction on real hardware?
3
votes
0answers
53 views

Use Qiskit in other programming languages (C#, JavaScript and Lua)

I am exploring using Qiskit in other programming languages for game development, such as C# (for Unity game engine), JavaScript (Phaser.io) and Lua (LÖVE2D). Is there a general way to call Qiskit ...
1
vote
1answer
51 views

Is it possible to get the $\alpha$ and $\beta$ (amplitudes) of a qubit in Qiskit?

Is it possible to get the $\alpha$ and $\beta$ (amplitudes) of a qubit in Qiskit, i.e. not only probabilities after measurement but complete quantum state?
2
votes
1answer
43 views

max_cut in qiskit aqua

Happened on some code, which I was hoping would run out of the box. However fails on the import from qiskit.aqua.translators.ising import max_cut I've not been ...
3
votes
1answer
43 views

Is qiskit_backend_monitor magic function depricated?

I've upgraded qiskit for the first time in a while and I've discovered that the magic function for displaying backend information doesn't seem to work properly. Here's what I've tried running: <...
2
votes
0answers
49 views

Simulation for the [5,1,3] stabilizer code in Qiskit

Sorry that I keep asking questions for the same subject. It is driving me crazy. I have followed the [5,1,3] stabilizer code circuit designed by Gottesman in page 35 in his paper (also illustrated in ...
4
votes
2answers
88 views

How to implement the CCH gate in quantum computers available in clouds?

How to implement CCH gate in quantum computers available in clouds? If there is not any gate directly available for it, what are the possible ways to represent CCH?
1
vote
3answers
63 views

Pauli I in eoh procedure doesn't become a global phase gate in qiskit evolution_instruction method. Possible consequences

If one has two qubits in arbitrary stats and wishes to apply a controlled version of some global phase gate $P(\varphi) = \begin{pmatrix} e^{i\varphi} & 0 \\ 0 & e^{i\varphi} \end{pmatrix}$ ...
1
vote
2answers
78 views

Qubit measurement is followed by instructions. Error code: 7006 [duplicate]

Trying quantum teleportation in https://github.com/Qiskit/qiskit-textbook/blob/master/content/ch-algorithms/teleportation.ipynb Succesful runs in 'qasm_simulator', but when switching to IBMQBackend('...
1
vote
1answer
150 views

How to implement if statement based on measurement results in qiskit?

I tried to implement three qubit bit flip code in qiskit and need to get the result of measurements and then apply recovery quantum operations conditioned on the measurement results. The following is ...
3
votes
1answer
90 views

Qiskit in Julia language?

Is it possible to use Qiskit in Julia language? Or is there any wrapper that can be used to call the package from Julia language?
-3
votes
1answer
58 views

Help me understand this warning while running qiskit command IBMQ.load_account() [closed]

Getting this warning, help me understand this "C:\Users\XYZ\Anaconda3\lib\site-packages\qiskit\providers\models\backendconfiguration.py:337: UserWarning: dt and <...
0
votes
0answers
44 views

deliver a quantum register to/from a function in qiskit

Can I create a function in qiskit which receive a quantum register as an argument, and/or returns a quantum register? In the example below, I created a quantum register, and a quantum circuit which ...
0
votes
0answers
23 views

How to preprocess data to fit Qiskit QSVM

I want to start experimenting with quantum machine learning using Qiskit library, but I have come across an issue. All tutorials I have seen so far like this one import datasets using custom packages. ...
1
vote
1answer
74 views

Print data() with statevector and qasm simulator - Qiskit

I am new to Qiskit and I am trying to implement some very simple 1-qubit gates. I want to initialize the state of the qubit (to 0 and then to 1) and then apply the gate and print the new state of the ...
2
votes
1answer
112 views

Quantum Phase Estimation implementation

I tried implementing quantum phase estimation in qiskit, however, I'm not getting the expected results. I choose a controlled $U1$ gate. First of, I implemented inverse QFT operation (basically a ...
2
votes
1answer
90 views

How to plot histogram or Bloch sphere for multiple circuits?

I have tried to plot a histogram for the multiple circuits for the code given below. I think I have done it correctly but don't know why it's not working. Please help me out. If possible please solve ...
0
votes
1answer
53 views

How to use Qiskit visualization in Python IDLE 3.X (Python 3.X 64-bit)? [closed]

Why doesn't Qiskit visualization work on Python IDLE 3.X like circuits.draw(), plot_histogram() and ...
0
votes
1answer
52 views

run() got an unexpected keyword argument 'seed'

I am new in quantum computing. I was going through the user guide of IBM Q so I was just trying to run the python code they have provided at the end of this page enter link description here while ...
2
votes
1answer
55 views

How to use parallel executions of circuits?

I am trying to run multiple circuits in parallel using the documentation here. My codes are: ...
1
vote
1answer
38 views

AttributeError: 'Result' object has no attribute 'get_data'

Below is the code that I am trying to execute on Google Colab using Qiskit. I'll also paste the error that I am getting. Code ...
0
votes
0answers
38 views

A question about qiskit's WeightedPauliOperator.evolve method for IPEA (IQPE) implementation

I'm doing an implementation/tutorial of the iterative phase estimation algorithm (IPEA) and have a problem. My Hamiltonian is a diagonal matrix $H = \begin{pmatrix} E_1 & 0 \\ 0 & E_2\end{...
0
votes
0answers
47 views

Number of columns mismatch

So I have the following code qgan = QGAN(real_data, bounds, num_qubits, batch_size, num_epochs, snapshot_dir=None) with num qubits being defined as ...
3
votes
1answer
60 views

Why can different technology transpile the quantum gate to different representations?

I saw that qiskit was just incorporated in a trapped ion device. I transpiled my circuit to 2 backends: ibm superconducting device and aqt trapped ion device. I noticed that for ibm, the $X$ gate is ...
0
votes
1answer
61 views

QISKit Connection

I ve beeen trying to use the qiskit package from spyder IDE inisde anaconda (Python version 3.7) but when i try to acces my account I get the following error: ...
2
votes
1answer
83 views

Why is there only one line for the classical register?

So I am wondering why this "Quantum Teleportation Algorithm" from Qiskit - Programming on Quantum Computers Ep 5 is represented differently when I draw it (on the left in the image above) compared to ...
1
vote
1answer
57 views

IBM Q experience - error code 520

I have been running a variational circuit optimizing the parameters on the "melbourne" device. The system launches multiple jobs in parallel, and only gets the jobs accepted that my credit allows. The ...
5
votes
1answer
105 views

What does the error rate on the IBMQ website mean?

How is the error rate pointed by the arrow defined? How did you get it? thanks!
3
votes
1answer
146 views

Quantum random number generator

Can we generate quantum random numbers through Qiskit? I want to try the random number generator without using optics or noise.
1
vote
0answers
33 views

OpenPulse: Where to get current pulse definitions for standard gates?

Is backend.defaults().cmd_def and backend.defaults().pulse_library kept updated regularly? Is this the correct place to pull the best calibrated pulses for the standard gates? I am working on a ...
4
votes
1answer
91 views

Getting a layout for qubits in Qiskit

I'm trying to use Qiskit's built in transpiler passes to do the following. I would like to take a quantum circuit and allocate the logical qubits to physical qubits. The tutorial doesn't really ...
2
votes
1answer
98 views

How to specify the CNOT gate direction (control qubit to target qubit) in Qiskit?

If I act a CNOT gate on quantum circuit: from qiskit import QuantumCircuit qc = QuantumCircuit(2, 2) qc.cx(0, 1) it means that qubit_0 is the control qubit, and ...
2
votes
1answer
61 views

Is there a way to output a circuit from Qiskit to the IBM Q Experience circuit composer?

I can't seem to find anything, but this seems like something that should be possible.
3
votes
0answers
32 views

How does batching work in the optimizer loop of the VQC algorithm in Qiskit Aqua?

I've playing around with a binary classification problem with a dataset of size 1000 examples and 5 features. I'm using the VQC algorithm from the Qiskit package the that uses a feature map and a ...
1
vote
0answers
54 views

Ripple Adder using Full Adder [closed]

I have been trying to implement a ripple carry adder using qsikit in IBM Q Experience. I was able to implement full carry adder but I am having trouble with ripple carry adder. I am able to add 100 + ...
5
votes
1answer
266 views

Understanding quantum teleportation algorithm from qiskit tutorials

I am very new to quantum computing and I have recently started to experiment with qiskit module in python, by following tutorials and implementing simple algorithms....