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

Meaning of 'O_i' and 'Δ_i' terms in PulseBackend Hamiltonians

For OpenPulse enabled backends, the Hamiltonian can be retrieved via its configuration. The configuration holds a dictionary containing for example the Hamiltonian as a LaTeX string. Example code: <...
1 vote
1 answer
36 views

Alternative to COBYLA.optimize in algorithms.optimizers

I was working on this qiskit tutorial, regarding simulation of VQE. In one of the code blocks they did this: from qiskit.aqua.components.optimizers import COBYLA ...
1 vote
0 answers
14 views

Parallel calculation of expectation values of operator for different quantum states qiskit on a QPU

I need to calculate the expectation values of an operator h for various quantum states ψ on an IBMQ quantum machine. This can be ...
  • 131
0 votes
1 answer
32 views

Cannot derive probability graph for Hadamard gate given in Qiskit textbook

I am reading the Qiskit textbook(beta) and they have explained Hadamard gate using an amplitude tree. To show how two H-gates on a qubit give the output as 0 everytime they said to consider that it ...
  • 3
-1 votes
0 answers
13 views

Problem with using DraperQFTAdder

Hi i wanted to ask how exactly are the adders supposed to be used. I have code in this form: ...
1 vote
1 answer
79 views

qiskit : can you get circuit from unitary matrix?

In qiskit you can get a unitary matrix from a circuit (circuit to unitary matrix example). Is the opposite direction possible? Can you input a unitary matrix and have qiskit come up with a circuit? If ...
  • 1,278
0 votes
1 answer
24 views

How can we represent a CNOT gate using a cascade of rotation gates?

I have been working using qiskit to implement the CNOT decomposition into a cascade of rotation gates from this source. After computing the unitary matrix, the resultant matrix is not the same as the ...
1 vote
2 answers
14 views

Retrieving jobs of an expired access device

I had private access to a quantum computer, but the access is expired. So Can I access to my jobs done on it ? The '''backend.retrieve_job('')''' ​can't work because I cant load the backend (no access)...
0 votes
1 answer
12 views

How can I instantiate a qiskit BackendConfiguration object from a dictionary?

I know that BackendConfiguration has the method from_dict(dict) but I don't know how to use it. Can someone give an example?
0 votes
1 answer
39 views

Difference between qiskit SPSA optimize and minimize in runtime program

I use this tutorial with pennylane-qiskit.vqe_runtime_runner to familiarize myself with qiskit runtime using pennylane. Thereby, I wonder: What is the difference between qiskit.algorithms.optimizers....
2 votes
0 answers
41 views

Parallel run of qiskit circuits

I am trying to run simulation instances of a parametrized circuit in parallel but my algorithm is extremely slow. Excuse my ignorance, but I just want to be sure that the circuits are indeed running ...
  • 189
3 votes
2 answers
67 views

Projective measurement operation in Qiskit

I would like to implement the operation $\pi = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$ on qiskit but I don't know how to do that. If I use the reset ...
  • 335
1 vote
1 answer
25 views

unexpected keyword argument in qiskit vqe

I want to find the estimate of the ground state energy of my Hamiltonian H that is implemented as PauliSumOp in my variable <...
0 votes
1 answer
82 views

About swap gate [closed]

As I was reading Qiskit textbook and there is this problem ... How can I swap a $|+\rangle$ to a $|-\rangle$ Qiskit textbook --> Basic Circuit Identities
  • 91
0 votes
1 answer
41 views

Expectation values of non-local operators in Qiskit

Is there a convenient way in Qiskit to calculate the expectation value for a non-local operator, i.e. I would like to calculate: $$ \langle \Psi|O|\Psi \rangle $$ More precisely, I would like to ...
0 votes
0 answers
21 views

What does it mean for a Qiskit pulse to have a negative amplitude?

I'm going through tutorials on Qiskit Pulse. From this documentation, I can see that it is possible to give a pulse, such as a Gaussian a few different parameters. One of the parameters that I can ...
5 votes
2 answers
67 views

Reasonable Circuit Depth

So I'm auto-constructing quantum circuits that are being auto-generated from dimacs files along with the addition of the amplification function. It's for a satisfiability problem where the number of ...
1 vote
1 answer
30 views

ModuleNotFoundError when running Qiskit RNG

I'm trying to generate random numbers using IBMQ backends with the following code: ...
1 vote
1 answer
38 views

State tomography with Pauli basis measurements for a high number of qubits

My end goal is to recover the quantum state in its computational basis or reduced density matrix of a high number qubit circuit in a real QPU. Taking into account that the number of qubits will be ...
0 votes
1 answer
26 views

What is the structure of Qiskit's amplitude-encoded quantum circuit?

A problem that has been ignored before is that Ansatz does not know that classical data becomes quantum data. Although Qiskit provides the Initialize() function that can be initialized directly. I'm ...
  • 390
0 votes
0 answers
42 views

How can the result of 1 million transformations on a qubit be verified to be correct?

I tried to do almost a million transformations on a qubit. I made a three qubit circuit with equal superposition of |0> and |1> (using Hadamard gate) and on the first qubit (qubit 0), added one ...
  • 1
0 votes
0 answers
16 views

How to stretch duration of standard gates of an IBM Backend?

I want to stretch the duration of standard gates of an IBM backend to amplify noise (as proposed in one of the earliest implementations of zero noise extrapolation (ZNE) (https://arxiv.org/abs/1805....
  • 389
0 votes
2 answers
39 views

What can I use instead of mct (multi-controlled Toffoli)? (Grover's algorithm)

I implemented the general diffuser (for arbitrary qubits) in Grover's algorithm in terms of an Multi-controlled Toffoli (MCT) gate (it flips target when all controlled gates are 1). However, this gate ...
  • 1
0 votes
1 answer
64 views

Why a Fourier Adder Gives Multiple Faulty Results?

I followed this tutorial and wrote a code that implements the following circuit: By writing the following code: ...
1 vote
2 answers
90 views

get_statevector() not working with Qiskit Aer's statevector simulator

I'm trying to understand how result.get_statevector() works. Using BasicAer, the following code gives the result for the statevector: ...
  • 33
1 vote
1 answer
50 views

ModuleNotFoundError: No module named 'qiskit_aer'

I am trying to perform some noise simulations using the Aer Provider. I read through a tutorials here, but I am not able to really implement the qiskit_aer. When I ...
  • 339
1 vote
1 answer
60 views

Implementing QAOA Hamiltonian for MAX-3-SAT in Qiskit

I have read about how QAOA is used to tackle the MAX-CUT problem and wanted to test my understanding by trying to implement some code to approximate the MAX-3-SAT problem. To do so, I considered the ...
1 vote
1 answer
51 views

Difference between run, measure, transpile, execute?

quite new to quantum computing and I have to do a small presentation on quantum gates using python code(notebook).Also, please review the small code I have written for its correctness. I have some ...
1 vote
0 answers
46 views

Simple Maths Operators implementation in Quantum

I am a newbie in quantum programming and trying to learn implementing some simple classical programs in quantum, just as a starting point. The thing I am kind of struggling in is availability of ...
  • 181
0 votes
1 answer
37 views

What is the purpose of the various qiskit libraries? [duplicate]

I can't find much resources about how Qiskit API libraries are organised. We could see versions by using: ...
0 votes
1 answer
25 views

QuantumKernel.construct_circuit:How to automatically build a quantum kernel circuit according to the QISKIT file?

This link https://qiskit.org/documentation/machine-learning/stubs/qiskit_machine_learning.kernels.QuantumKernel.construct_circuit.html#qiskit_machine_learning.kernels.QuantumKernel.construct_circuit ...
  • 390
0 votes
0 answers
15 views

An algorithm for solving LDEs: How find non-zero indices of Vs1 operator?

I am using qiskit to implement the second part of this algorithm which can be found on page 7: "$A$ is non-unitary" section of the appendix. Basically, it expands the solution of the ODE $x(...
  • 189
3 votes
1 answer
60 views

Building a realistic noise model in Qiskit

I am trying to build a realistic noise model in Qiskit for a quantum computer that might be available 2-3 few years from now on. I tried to start from an existing noise model generated from a fake ...
  • 157
0 votes
0 answers
21 views

How can I graph the time evolution of an initial state under a given hamiltonian in Qiskit?

I'm trying to compare the graphs of the time evolution of a state under the action of a given hamiltonian (Heisenberg, Ising). I have the graphs of the classical simulation using the ~ and @ ...
1 vote
1 answer
58 views

AttributeError: 'list' object has no attribute 'values' [closed]

While implementing a code, getting the below error: ...
  • 187
1 vote
3 answers
46 views

What is the maximum number of qubits to execute a circuit on real hardware with IBM Quantum Experience and Qiskit?

I can't find anything that says about this. I know that on some simulators there are a limit of 32 qubits (quasi simulator) or more. But on real hardware ?
0 votes
1 answer
23 views

How simulation of noisy quantum circuits is done in Qiskit using the statevector method

While performing VQE calculations of medium-sized molecules like H2O, using Qiskit AerSimulator with noise, I noticed that even for a large number of shots, the speed of simulation using statevector ...
  • 157
1 vote
0 answers
25 views

How MCMT is implemented in Qiskit, what is the initiution behind it?

I have read about and used the MCMT qiskit gate (Multiple Control Multiple Target). But I wonder how they have implemented it, how is a gate (like CCCZ for example) is decopmosed into basic gates and ...
2 votes
1 answer
48 views

get.statevector() error: Failed to load qobj: Duplicate key "statevector" in save instruction

I'm building a mini tutorial to introduce the construction of composite systems using qiskit. While doing so I am demonstrating multiple ways to construct and view the statevector, but I have come ...
  • 328
1 vote
1 answer
37 views

Insufficient memory to run circuit using the statevector simulator

I am a newbie to quantum and have been trying qiskit library for learning quantum computing (in order to explore quantum effects on cryptography). I am basically ...
  • 181
3 votes
1 answer
239 views

is cirq suitable for simulation of quantum error correction?

I experimented with stim and qiskit for QECC simulations. They both have limitations : for example stim has no support for non-clifford operations (qiskit does); qiskit has no support for multiple ...
  • 1,278
1 vote
2 answers
58 views

How do I draw a multi control cz gate or do I have to make my own gate?

I want to build a diffuser and an oracle so that's why I wanted a multi control cz gate but I looked everywhere I didn't get any
  • 91
4 votes
1 answer
106 views

How to represent a statevector in Dirac notation form using Qiskit?

I am learning from qiskit textbook, and I was wondering how may I get a statevector of the following form: $$ \frac{\sqrt{2}}{2}|00\rangle + \frac{\sqrt{2}}{2}|10\rangle $$ If I run code for this in ...
  • 91
0 votes
2 answers
113 views

Building Unitaries in TSP Quantum Phase Estimation Qiskit?

In the paper [https://arxiv.org/pdf/1805.10928.pdf] 2 published by IBM, they use Quantum Phase Estimation to solve the TSP problem. I don't understand the reason why they can decompose the diagonal ...
0 votes
1 answer
35 views

How to get more qubits, with less noise, with qiskit

I have a quantum ciruit, a qiskit application, that uses four qubits and has a depth of a few dozen operations (unitary transformation). It gives correct results when run on the simulator backend but ...
0 votes
1 answer
30 views

How to run qiskit circuit in the cloud - qiskit runtime

Last night I created an IBM Cloud account. I can run the "sampler': ...
-1 votes
0 answers
39 views

how to solve the error given by backend=provider.get_backend('ibmq_vigo')

I try to run a quanum circuit with noise. I get an error at backend=provider.get_backend('ibmq_vigo'). I am not sure what causes the error. Could anybody help me ...
-1 votes
1 answer
29 views

how to fix module not find error

how to fix 'module not find error' ModuleNotFoundError Traceback (most recent call last) Input In [4], in <cell line: 1>() ----> 1 import ...
  • 27
0 votes
1 answer
94 views

qiskit : how to measure multiple pauli strings

This seems like a basic operation, but I can't see how it's done in qiskit. The solution here Measuring tensor products of Pauli operators doesn't work anymore. I get an error "qiskit has no ...
  • 1,278
1 vote
1 answer
23 views

how to fix error 'QiskitBackendNotFoundError' [closed]

This is my code: from qiskit import IBMQ IBMQ.load_account() provider = IBMQ.get_provider('ibm-q') qcomp = provider.get_backend('ibmq_16_melbourne') ...
  • 27

1
2 3 4 5
34