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

Qiskit not installing properly on pyCharm CE

I have installed qiskit through my terminal using pip3 install qiskit. But when I try to import all from it in my coding software, it returns a M...
0
votes
0answers
11 views

Error parameters from Qiskit backends

In order to build a custom noise model in Qiskit Aer, I requested the error parameters from different backends and got 3 (9) parameters for each single-qubit (two-qubit) gate as output. However, I ...
0
votes
2answers
31 views

How to perform operations like sin over Qiskit parameters

I want to create a parameter dependent gate in qiskit and I need to compute some complex operations as sympy.atan2 or sympy.sin ...
1
vote
1answer
24 views

$\lambda$ parameter for U3 gate in qiskit Bloch sphere visualisation

It is easy to see how $\theta$ (rotation from the positive z-axis) and $\varphi$ (rotation from the positive z-axis) affect the initial state of the qubit when looking at the Bloch sphere but I have ...
1
vote
1answer
28 views

Qiskit - Z expectation value from counts?

For a given state $|\psi\rangle$, how would I work out $\langle\psi|Z|\psi\rangle$ ? If I run a quantum circuit and get the counts dictionary on qiskit, I get observables in the Z basis. For n=1 ...
2
votes
1answer
38 views

Gate corresponding to $-I$

I am implementing a quantum circuit in Qiskit. I create the equal superposition state $$ -|00\rangle + |01\rangle + |10\rangle +|11\rangle $$ but I want to obtain the quantum state $$ |00\rangle - |...
4
votes
3answers
170 views

Quantum circuit to implement matrix exponential

I want to build a circuit which will implement $e^{iAt}$, where $ A= \begin{pmatrix} 1.5 & 0.5\\ 0.5 & 1.5\\ \end{pmatrix} $ and $t= \pi/2 $. We see that $A$ can be written as, $A=1.5I+0.5X$. ...
0
votes
1answer
34 views

Is there a limited number of features for QSVM in Qiskit-Aqua?

Why all tutorials that use QSVM from qiskit Aqua library have the number of features equal to 2? Thank you!
1
vote
0answers
32 views

How can I run programs in test folder Github Qiskit

I am new to GitHub/Python - please tell me how can I run programs in https://github.com/Qiskit/qiskit-aqua/tree/master/test and its sub directories in Jupyter. I am connected to IBM Q Expereince. I am ...
1
vote
1answer
45 views

Understanding the working of oracle in Deutsch - Josza Algorithm

Reading through the official Qiskit textbook, I fell onto the problem of Deutsch - Josza Algorithm, which seemed little mystical to me at first but as I tried out the example of its working, I was ...
1
vote
3answers
88 views

Error while running Quantum Teleportation Algorithm on real device using qiskit on IBM-Q

I am trying to implement Quantum Teleportation Algorithm on an actual device, I am using IBM-Q Jupyter notebook for the same purpose. The code is as follows: ...
3
votes
1answer
83 views

How does the teleportation circuit work after the initial entanglement?

I'm trying to understand why we do what we do when we teleport a state from Alice's first qubit to Bob's qubit. I understand the initial entanglement, but could use help walking through the program. ...
1
vote
1answer
59 views

Eigenvalue and eigenvector in Qiskit

I want to calculate eigenvectors and eigenvalues for real symmetric matrix or Hermitian matrix. Can I use this: https://qiskit.org/documentation/api/qiskit.aqua.components.eigs.Eigenvalues.html
1
vote
2answers
78 views

What is the risk factor on IBM's portfolio optimization notebook?

In the notebook "portfolio optimization" on IBM's platform the goal is to calculate the optimal stock selection using a classical and a quantum algorithm (VQE). A random portfolio is generated and ...
2
votes
1answer
111 views
2
votes
1answer
34 views

How to calculate state fidelity in Qiskit?

I have a circuit with different structures, now I'm trying to calculate the fidelity between those with the original one. How do I calculate the fidelity? I want also to initialize the state vector by ...
2
votes
0answers
54 views

How does Quantum Teleportation works? [duplicate]

I've started learning Quantum Computing from the Qiskit Textbook and was able to easily understand or work out everything until it came to the working of Quantum Teleportation I can understand the ...
2
votes
2answers
78 views

Mitigating the noise in a quantum circuit

I'm using Qiskit and I have a Quantum Circuit (say, circuit) that gives reasonable results when using the simulator, namely ...
1
vote
1answer
30 views

qiskit: IQFT acting on subsystem of reversed-ordered qubits state

I have a state psi as an ndarray of shape (2 ** 3,) s.t. psi[0]= amplitude of 000 ...
1
vote
1answer
31 views

In Qiskit, where is the floating point operation performed?

I am using Qiskit - the simple circuits I am writing can either run on the hardware backend (using least_busy) or the QASM simulator backend. If I have statements like the following - (...
4
votes
1answer
86 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 ...
0
votes
2answers
43 views

Does anyone know how to get a list of all the Qiskit ML datasets, and if they can also be used for classical machine learning?

I am trying to create a Quantum Classifier and would like to try to test it out using a Qiskit ML dataset. However, I only know of the breast cancer dataset and I would like to try it on another ...
2
votes
1answer
117 views

How many Qubits does the qiskit implementation of Shor's Algorithm need to factor N=15?

I know there is a documentation for qiskit.aqua.algorithms.Shor that explains that they used this reference for implementing the actual circuit. It says that the number of qubit needed is 2n+3. So to ...
2
votes
2answers
63 views

How to measure in the bell basis?

The question is quite straightforward, I have some two qubit state and I want to measure it in the Bell basis. This question answers me partly, but I still have some doubts because, I thought that ...
2
votes
1answer
46 views

How to calculate the Von Neuman entropy on qiskit with the module quantum_info?

I am trying to wrap my head around he quantum_info module on qiskit, since most of the functions on qiskit.tools are going to be ...
1
vote
1answer
46 views

from qiskit.aqua import… ImportError: DLL load failed: The specified module could not be found

Dear team and developers. I am using qiskit on Python 36, windows 64bits I have the same identical problem of Import from qiskit-aqua error But the suggested solution (installing Numpy+mkl, I did ...
3
votes
2answers
330 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 ...
2
votes
1answer
47 views

Finding optimal values of depth and max_trials parameters in vqe algorithm

I am running vqe algorithm in qasm_simulator and cannot get the optimal solution. Are there any methods for finding the optimal value of depth for variational form and max_iter for optimizer ...
-2
votes
0answers
57 views

How to solve error AttributeError: 'numpy.ndarray' object has no attribute 'keys' in Qiskit? [closed]

I obtained error shown below. Does anybody know what does it mean and how to solve it? ...
0
votes
2answers
33 views

What do the numbers of the operation object in QuantumCircuit.data outputs?

When you have a quantum circuit and use QuantumCircuit.data you get a list with objects of this type (this is the one for a X gate acting on qubit 0 y a 2 qubits Quantum Circuit): (qiskit.extensions....
3
votes
1answer
35 views

Make a doubly controlled gates from existing operations

I'm trying to implement an modular adder mentioned here with qiskit. I have already built the $\Phi ADD$ gate. But in order to build a modular adder like in figure 5 in the paper, I need to build a ...
0
votes
1answer
30 views

Why doesn't qiskit appear in “help(”modules“)” even though it is installed in python environment?

I have updated qiskit to the newest version using pip install qiskit --upgrade and all was done successfully, and when I write ...
1
vote
1answer
17 views

Qiskit visualizations module not installed but qiskit package installed. Why?

I am trying to set up my qiskit environment but I seem to have run in trouble that I have no idea how to solve. I have installed the qiskit packages as can be seen by running ...
2
votes
1answer
38 views

Modifying Qiskit Hamiltonian

I'm fairly new to the Qiskit API. I was wondering if I could get some assistance with trying to implement our technique of projecting out a new Hamiltonian from the ground-state Hamiltonian. The ...
1
vote
1answer
55 views

Qiskit statevector_simulator returns different results

I'm running VQE algorithm from qiskit aqua on statevector_simulator and each time I run it I get different results which are sometimes correct and sometimes not. I'...
1
vote
1answer
32 views

VQE with error dim. mismatch using qiskit.aqua.vqe

when i try to call the VQE from qiskit I get an error of dimmismatch. The input matrix is of a 16x16 shape and I could not find out what where I introduce the error. In the picture The input matrix ...
0
votes
0answers
29 views

State fidelity in Qiskit

Can someone provide me an example for finding state fidelity of two circuits? For example, if I have a Toffoli gate with two different approaches of decomposition then how do I calculate fidelity ...
1
vote
1answer
46 views

Are $\mathrm{cRz}$ with angle $\pi$ and $\mathrm{cZ}$ equal on the IBM Quantum Experience?

I was trying to implement the 2-qubit Grover algorithm without the auxiliary bit. Before finding the gate symbol for the controlled $\mathrm{Z}$, I worked with the controlled $\mathrm{Rz}$. The gate ...
1
vote
1answer
39 views

How to deal with the relative phase from the evaluation of the not interacting qubit?

Every qubit is a realization of some two-level quantum system with $\left| 0 \right\rangle$ and $\left| 1 \right\rangle$ states. These states have their energies $E_0$ and $E_1$ respectively. By ...
4
votes
1answer
150 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 ...
0
votes
0answers
38 views

How can I find the fidelity of preparation?

I want to know the fidelity (or error rate) of the preparation ($|0\rangle$) How can I have it?
2
votes
2answers
71 views

How to read the elements of a circuit in qiskit?

I would like to know if there is a way to read the elements of a circuit. What I mean is if I have a QuantumCircuit object, can I obtain the gates that are applied ...
1
vote
1answer
44 views

How do I know in which state the qubit is in each step of the circuit for the simulator in qiskit?

I would like to know how to know in which state a qubit is (I am talking about single-qubit errors), because in order to apply a non unitary gate in the simulator I have to renormalize the state or ...
2
votes
1answer
129 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
130 views

How to use external .csv data file in quantum support vector machine qiskit python code?

I am new to python programming and Qiskit. I would like to ask can we use sklearn for adding external .csv data file before Qiskit libraries, or without sklearn, we can do or is there any other Qiskit ...
1
vote
1answer
41 views

IBMQ: `from qiskit import QISKitError` gives 'cannot import name QISKitError'

When I run: from qiskit import QISKitError I get the error: ImportError: cannot import name 'QISKitError' I need ...
1
vote
0answers
31 views

Loading old results for Data reprocessing

I want to process some old data again. How do I load old data retrieved from IBM-Q into a new program? I've downloaded the relevant .json file, but I don't know how to use it like I would have a new ...
1
vote
1answer
32 views

Toffoli gates with Hadamard coins (QISKIT)

I am creating the following circuit with Qiskit (2Toffoli gates controlled with coins) And to set the coins for one iteration of the circuit i do the following : ...
1
vote
0answers
40 views

Implementing QFT

I would like to know if there is a way to: Implement Quantum 'Functions' e.g the QFT of QFT* containing several single-qubit operations? Implement such operations on an arbitrary number of qubits and ...
2
votes
1answer
172 views

How to make circuit for randomly selected gate?

I am trying to make a circuit for the randomly selected gates from a gate_list but I don't know how to put these selected gates in front of ...

1
2 3 4 5
7