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
163 views
2
votes
1answer
153 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
79 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
88 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
407 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
55 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 ...
3
votes
2answers
369 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?
1
vote
3answers
2k views

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

Which platform is the best for programming quantum computers? Which one is your personal favourite? If other mention which one it is and if possible few resources for it.
2
votes
3answers
676 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
181 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 ...
3
votes
1answer
749 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
333 views

How to get amplitudes only for chosen qubits?

For computation, I use N working qubits and M ancilla qubits. ...
2
votes
2answers
161 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
342 views

Qiskit plot_histogram and count not working

im 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 calling ...
1
vote
1answer
437 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
86 views

Why qiskit changed the order of gated applied to a circuit

Below I created a circuit and applied several gates to it: ...
0
votes
1answer
137 views

Qiskit - Renormalize the qubit after measurement

I have a 2 qubits system, maximally entangled, and I performed measurement on one of the qubit. ...
4
votes
3answers
426 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
2answers
618 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
147 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
93 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 ...
1
vote
1answer
233 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 ...
2
votes
1answer
172 views

Expected value of a product of the Pauli matrices in different bases

I'm trying to reproduce the results of this article https://arxiv.org/abs/1801.03897, using Qiskit and Xanadu PennyLane. Particularly, this part with expected values of the Pauli operators: For ...
1
vote
1answer
98 views

How to do subplots when plot_histogram etc. closes the figure

I would like to display two histograms next to each other, using something like matplotlib's subplot function. This doesn't seem to work because plot_histogram() closes the figure. It is possible to ...
1
vote
0answers
357 views

Job execution issue while using IBMQ Experience

I am trying to run QSVM algorithm on the IBMQ backend devices using the API_TOKEN. Below is the snippet of the code that I am running. The code fails the validation test and throws an exception after ...
1
vote
1answer
291 views

How do I interpret the readout error for a quantum computer?

For example, the ibmqx2 computer has the most recent readout error of $4.40 \cdot 10^{-2}$. Does this mean per 1000 measurements, 44 faulty results exist?
0
votes
0answers
208 views

Why does Qiskit swap gate accept registers, but cswap doesn't?

In Qiskit, I am trying to perform controlled-Swap (cswap) of two registers, but an error occurs: ...
5
votes
2answers
2k views

How to calculate an Expected Value of some operator acting on qubits?

I'm trying to implement the Variational Quantum Eigensolver in Qiskit. Suppose, I have an operator $A = \sigma_1^z\sigma_2^z$ acting on some two-qubit state $|\psi\rangle$. After a measurement I get ...
3
votes
1answer
224 views

Chose how to map virtual qubits to physical qubits

I'm currently trying to specify an initial_layout for a circuit on a IBM Q device. Looking at the device's topology I would like to use the less noisy qubits in order to have the best performance. ...
1
vote
1answer
129 views

How is it possible to perform a c-not on 4 qubits using the same control qubits on IBM Q computers?

I was wondering after seeing ibmq_16_melbourne layout how it is possible to perform this circuit : It seems when looking at ibm q computers that a qubits can at max target 3 qubits because the arrow ...
2
votes
0answers
50 views

Hybrid classical-quantum linear solver based on the Neumann-Ulam method

I read this article on quantum linear solver based on the Neumann-Ulam method (here is a lesson about it). But the article has not a lot of details. Therefore I don't understand what is the algorithm ...
2
votes
1answer
326 views

OpenPulse: Modifying pulse sequence for basic gates

I'm trying to familiarise myself with OpenPulse but I'm confused about a few things. Mainly, I would like to be able to take the pulse sequences that comprise standard gates on an IBMQ device and ...
1
vote
0answers
274 views

Please help: get_statevector gives wrong result in qiskit

I simulated the circuit below in qiskit and used the statevector simulator to extract the statevector: The resulting statevector that it gave me was: array([ 0.5+0.j, -0.5+0.j, 0.5+0.j, 0.5+0.j]) ...
1
vote
2answers
675 views

How to initialize classical register in Qiskit?

I'm working on a Hybrid classical-quantum linear solver. For this, they make a loop on a quantum circuit (ie. below), and each time they change the value of the classical register and apply a X gate ...
2
votes
2answers
312 views

How to represent an ensemble of pure quantum states in Qiskit?

I was going through the Qiskit documentation to see if there was a way to represent a mixture of quantum states as a density matrix or otherwise. Is there a way to do it? If so, how?
0
votes
1answer
433 views

Measurements in Qiskit

What is the difference between 2 types of measurements depicted below? At the end of unitary evolution, qubits are in superposition of states, and after measurement I get a set of probabilites ...
0
votes
1answer
284 views

Qiskit No backend matches the criteria

I am trying to run a circuit with 32 qubit on a local hpc (not IBM Q HPC) using statevector_simulator backend. but i got the following error: ...
0
votes
1answer
244 views

ERROR_RUNNING_JOB with 32 qubit circuit running on ibmq_qasm_simulator backend

I recently made a quantum circuit that uses 32 qubits and try to run it on IBM Q Experience qasm_simulator backend. But it always ends with ERROR_RUNNING_JOB. ...
2
votes
2answers
74 views

Measuring the effect of energy relaxation with IBMQ Experience

I want to investigate the effect of the decoherence time on a qubit, and I followed the tutorial here. https://quantumexperience.ng.bluemix.net/proxy/tutorial/full-user-guide/002-...
4
votes
3answers
371 views

How to create an Ising coupling gate with Qiskit?

I'm trying to apply a time evolution algorithm for a physical system I'm trying to simulate on QISkit, however, in order to do that, I need to use the so-called Ising coupling gate: $I=\begin{pmatrix}...
0
votes
2answers
335 views

How to reset classical register on QISKit

I want to do a feedforward on a quantum circuit using the simulator of Qiskit. For example, measure qubit_1 to bit 1 and do some operator on qubit_2 if the result of measuring qubit_1 is 0 and if ...
-1
votes
1answer
70 views

edit a program on IBM Q experience

Can I edit a program with python numpy and scipy and of course qiskit in the IBM Q experience, using code? (I am not interested in drugging gates) and I can't find the way to edit my own program
2
votes
1answer
370 views

Controlled-Initialize instruction

I'm trying to build a new instruction for my circuit. This instruction needs both a controller qubit qctl and an arbitrary register ...
1
vote
3answers
489 views
6
votes
3answers
2k views

What does fidelity mean?

I am learning qiskit software and this term keeps popping up and I am unable to get a grasp on the technical definition given by wikipedia. For example, the functions state fidelity and process ...
1
vote
1answer
229 views

The meaning of the city plot in Qiskit

I read the documentation of qiskit and I can't understand the meaning of the city plot, like this: Why do we need a 3D plot? Why can't we just use a 2D plot, where $ | 00\rangle$, $ | 01 \rangle$, $ ...
3
votes
1answer
193 views

Draw “Initialize” circuit as sequence of single gates

I have just tried to apply initialize function to a simple circuit. There is any way to display how is done internally the initialization circuit instead of a ...
1
vote
0answers
70 views

Quantum based protein folding, prototype

Where I can read about protein folding on quantum computer (Qiskit will be ideal variant) with simple examples? Thanks
0
votes
1answer
276 views

Problem with initial_layout on Qiskit/IBMQ: 'Not enough qubits in CouplingGraph'

I am trying to run an execution on IBMQx2 where I can specify the physical qubits to which I apply gates. The execution without the initial_layout runs fine, but ...
0
votes
1answer
413 views

Creating and running parallel circuits in Qiskit

I'm trying to create and run parallel execution using the instruction here. However, when I implement it, it tells me that I shouldn't be using compile anymore ...