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
13 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 ...
0
votes
1answer
24 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/...
1
vote
2answers
35 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 ...
0
votes
2answers
24 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
27 views

I don't get QISKIT aqua [closed]

I am really confused about how do I go about writing code in QISKIT aqua. I have been studying HHL algorithm from QISKIT textbook and after understanding the math I finally got to the code part, I am ...
3
votes
2answers
37 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
42 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
23 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
37 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
71 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
46 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
48 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
38 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 ...
0
votes
0answers
18 views

How to implement gapped phase estiamtion (GPE) on Qiskit [closed]

On Qiskit I'm trying to implement the gapped phase estimation from Childs, Kothari, Somma's Paper described here: How would I go on to do so?
2
votes
1answer
37 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
54 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 ...
-1
votes
1answer
40 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'. The backend'ibmq_athens' allows a maximum of 900 circuits. I don't ...
3
votes
3answers
77 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
36 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
96 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
64 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
68 views
4
votes
1answer
36 views

How to decompose/unroll a Qiskit Arbitrary initialization

I'm aware that to randomly initialize a quantum circuit with Qiskit, we can simply write qc.initialize(rand_state, q[0]...). However, when drawing the circuit, I see that the "initialize" ...
2
votes
1answer
36 views

Issue with Speed of Qiskit Arbitrary Initialization

I've been using a circuit that needs a specific initialization in the beginning, and to do so I've been using qc.initialize() as mentioned in previously asked similar questions (How can I create an ...
2
votes
1answer
83 views

Qiskit installation

I'm trying to get started with Qiskit but the installation process has been horrendous and the official instructions are unusable. The latest python doesnt work with the install instructions at: https:...
1
vote
1answer
53 views

Braket and Q# Simulators

I have implemented Shor's algorithm in Qiskit, and everything works as expected within the IBM Q experience for both the IBM qasm_simulator and real hardware. However, after I've implemented Shors in ...
4
votes
0answers
89 views

Implemented QAOA returns wrong result

I try to apply QAOA algorithm to find minimal energy state of the Hamiltonian: $H_A = \frac{1}{2}\sigma_z^1 + \frac{1}{2}\sigma_z^1\sigma_z^2$ It is expected that with p=2 my variational should ...
3
votes
1answer
38 views

Weird Grover's Algorithm Behavior

I am attempting to use Grover's to find elements in an array that satisfy a comparative query (=, <, >, etc). I am using Qiskit, and am using a qRAM to encode my array. I have experimented with ...
1
vote
0answers
45 views

How can I fix the BrokenProcessPool error in Qiskit?

I'm running a set of quantum circuits using the ibmq_qasm_simulator. However, sometimes my code works for the simulation, but sometimes it doesn't, and the system ...
2
votes
2answers
48 views

Qiskit Controlled S and Controlled T Gates

I was implementing controlled S and T gates in qiskit and was wondering if there is any difference between using the cu1 and crz ...
3
votes
1answer
29 views

Qiskit PauliWeightedOperator in the matrix representation?

Suppose we have a PauliWeightedOperator object from Qiskit. Is there any built-in method to convert it to the matrix representation in the computational basis? My search in the docs was not successful....
3
votes
0answers
29 views

Run VQE for parametrized quantum circuit with ancilla qubits

Let's say we have the following circuit (picture and code shown below), and now the $q_0$ is an ancilla qubit. If the system of interest has only two qubits, Is there a way to use only $q_{1,2}$ as my ...
1
vote
1answer
51 views

how to generate a random sequence [duplicate]

...
3
votes
1answer
38 views

How do Hadamard and CNOT gates work on Qiskit SDK? Why is the output reversed?

Here is the code that I have been using on IBM Q Experience (should be the latest version of Qiskit). From my understanding it seems like the outputs of Hadamard and CNOT gates are reversed in a 2-...
3
votes
1answer
43 views

How can I run a set of circuits, each of which has 100 shots?

I'm running simulations of my quantum circuit, which includes both parametrized variables and random numbers. The question I'm trying to solve is that for each parameterized variable, I will generate ...
2
votes
1answer
55 views

How does this represent modular multiplication

How does this circuit map $|x\rangle$ to $|7x \space mod15\rangle$? Looking into Shor's and I thought that phase kickback causes the modular exponentiation part to be mapped onto the measurement ...
0
votes
1answer
19 views

How can I fix this parametrization error in Qiskit?

I'm trying to use the parametrized circuits to run a single model of quantum circuit with different values. Here's part of my code: ...
1
vote
2answers
56 views

Shor's implementation problem on qiskit

If q4-7 are all supposed to be eigenstates of the operation, why is it just that q7 is in $|1\rangle$? Shouldn't all qubits 4 to ...
3
votes
0answers
125 views

Qiskit issues with Apple Silicon?

Edit/summary: Everything below this first paragraph is my original question posted several days ago and involves a lot of speculating on a problem I knew less about at the time. The purpose of this ...
0
votes
2answers
36 views
1
vote
1answer
30 views

Increase maximum shots on IBM Hardware when running Quantum Variational Algorithms

I am interested to know whether there is a quick and elegant way of increasing the number of shots (more than 8192 shots) on IBM hardware when running variational algorithms like VQE or QAOA. I know ...
3
votes
1answer
36 views

Kernel stopping when solving water molecule ground state

I'm new to QISKIT Aqua and I'm trying to follow the Ground State tutorial to solve the Water molecule ground state, but when I execute the calculations the kernel stops. I'm using IBM Q Experience ...
2
votes
1answer
53 views

What are the possible gates that I can use to vary input states before CNOT?

We know that the noise of the $\text{CNOT}$ gate varies depending on the input state before it. What are the gates that I can put in the place of the 4 identity gates above to change the input state ...
3
votes
1answer
44 views

XY Hamiltonian in a 1D Heisenberg Chain

I've been trying to implement the 1D Heisenberg chain (i.e. the XXZ model) on Qiskit but have been having trouble. To recap, the Heisenberg hamiltonian is as follows: $$H_{XXZ} = \sum^{N}_{i = 1} [J(S^...
2
votes
3answers
100 views

Computing the CDF with QAE in Qiskit

I want to load a lognormal distribution and then use an IntegerComparator to flip a qubit ($|0\rangle$ to $|1\rangle$) if its value is less than a threshold. Then I want to use an Quantum Amplitude ...
2
votes
2answers
58 views

Callback function in VQE do not return the intermediate values of the parameters

I tried to save all the intermediate values of the parameters when running the built-in VQE in qiskit. The callback function can save the mean values and counts, however it seems only save the very ...
2
votes
0answers
72 views

qiskit: Traveling Salesman Problem using QAOA fails for more than 3 cities

I tried to implement the traveling salesman problem (TSP) using QAOA with qiskit. I worked with this qiskit QAOA tutorial and this qiskit minimum eigen optimizer tutorial, where they implement a TSP ...
2
votes
1answer
43 views

Is it possible to measure “aux_operators” in built-in VQE with backend “qasm_simulator”

I am trying to measure the number operator, together with the ground state energy with the built-in VQE on Qiskit. However, if I pick the backend to be ...
4
votes
1answer
69 views

Expected value in a VQE qiskit

I'm learning VQE(variational quantum eigensolver) of qiskit, but I have a question about how it measures the expected value of the energy ($\left \langle H \right \rangle$). I saw in other question ...
1
vote
1answer
48 views

Trying to perform Quantum Phase Estimation on T-gate

I'm trying to perform QPE on the T-gate in Quirk but I'm not getting the correct result. For the T-gate, I should be measuring (001) with 100% probability, but instead, I'm getting the following: I'...

1
2 3 4 5
15