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
18 views

Am I doing anything wrong when trying to calculate the expectation value in Qiskit on the real hardware?

I am trying to use the method of calculating the expectation values of Pauli operators in Qiskit which I found here. However, the results obtained via IBMQ sampling differ significantly from the exact ...
2
votes
1answer
73 views

How to implement Cx mod N unitary

The following links provides circuts for $a\in\{2,7,8,11,13\}$ and $N=15$: https://qiskit.org/textbook/ch-algorithms/shor.html#3.-Qiskit-Implementation https://arxiv.org/abs/1202.6614v3. I am ...
1
vote
1answer
70 views

Why after transpiling a Qiskit circuit we obtain a different result?

I am trying to obtain the correct circuit transpiled for the ibmq_london device, as I want to know what the real gates applied in the quantum computer are. I am implementing the QFT circuit for 5 ...
0
votes
1answer
41 views

Feedback on Deutsch-Josza alg. homework prob. in Learning Quantum computation using Qiskit [closed]

In Learning Quantum Computation using Qiskit chapter 3.4 I encountered the Deutsch-Josza Algorithm. At the end of the chapter I was presented with a homework problem where the code: ...
0
votes
1answer
62 views

How the simulator work?

Recently I focused on how to simulate in classical computer, and I found Qiskit offers qasmsimulator and statevector simulator. ...
1
vote
1answer
55 views

What extra functionality is available to an IBM Q Network member over a regular IBM Q Experience user

I've been trying to figure out the extra functionality available to IBM Q Network members that are not available to normal ...
0
votes
1answer
38 views

Question About How Qiskit Reset Gate Affects Other Entangled Qubits

I am trying to understand how the reset gate in Qiskit affects qubits its entangled with. Consider the following circuit with qubits $q_0$ and $q_1$: Where circuit240 takes $|0\rangle$ to $a|0\rangle ...
-2
votes
0answers
32 views

I'm trying to import random_state from qiskit_textbook.tools but it gives error message [closed]

I am getting this error during import random_state from qiskit_textbook.tools: ...
3
votes
1answer
53 views

Expectation value of an operator error: Composition is not defined over operators of different dimensions,

I am trying to calculate the expectation value of a customized operator on two similar but differently constructed states $\phi = \phi_2 =\frac{1}{\sqrt{2}}\left( |001⟩ + |011⟩\right)$ which consist ...
1
vote
1answer
33 views

Does anyone know of Qiskit source code for a Bernstein Vazirani grover's algorithm for N bits? If so please share

I'm just getting started in the space of quantum computing, I've built a 5 qubit program for Bernstein-Vazirani, but am trying to figure out how to go about building an N bit version of Bernstein-...
1
vote
1answer
31 views

What is the difference between Qiskit execute and the IBMQJobManager?

I was researching how to submit multiple pulse schedules/circuits in the same job and came across 2 methods: Executing Experiments with qiskit.execute and ...
1
vote
2answers
252 views

Why are IBM QE backend results different from the qasm simulator for a simple quantum circuit?

I have looked at other questions that ask pretty much the same thing such as this and from what I gathered the significant difference in simulation and actual results is due to decoherence and ...
2
votes
0answers
30 views

How to do error mitigation on the ibmq_16_melbourne?

I'm trying to make a calibration matrix using CompleteMeasFitter as in here on IBMQ Melbourne, but I need to use all 15 qubits, which mean it has to run 32768 calibration circuit, far exceeding the 75 ...
0
votes
1answer
38 views

Why is import qiskit failing to import in Anaconda Jupyter Notebook

I recently downloaded Anaconda(Python 3.7) on Windows 10 and I am having difficulty importing Qiskit in jupyter notebook. I tried the following line: import qiskit ...
1
vote
2answers
41 views

Why is the number of solutions given in Qiskit textbook(Quantum Counting Algorithm) as N-M instead of M?

I'm following the Qiskit textbook for Quantum Counting. We have assumed $M$ as the number of states containing solutions throughout the algorithm but at last, $N-M$ has been taken as the solution. ...
1
vote
1answer
86 views

I want to create a depolarizing channel on IBM qiskit

I want to replicate the depolarizing noise channel for a 4 qubit circuit system, where p is the probability for an error. I tried doing this: But I get the error ...
1
vote
1answer
21 views

Error code: 3458

I ran my qsvm code on the quantum computer and I'm facing the following error: ...
1
vote
1answer
28 views

Qiskit textbook install error

I'm trying to install the qiskit_textbook repository (https://github.com/qiskit-community/qiskit-textbook) and I keep getting this error ...
5
votes
2answers
96 views

Representation of rotation operators $e^{-i\theta(I-Z_1\otimes Z_2 \otimes Z_3)}$ about arbitrary axis for $3$ qubits

I was wondering in how to interpret and represent the operator $e^{-i\theta(I-Z_1\otimes Z_2 \otimes Z_3)}$ for a 3 qubit system in a circuit using qiskit. I was thinking I could just perform an ...
2
votes
0answers
31 views

How do I optimize HHL algorithm in Qiskit?

How do I optimize HHL algorithm in Qiskit? I tried to follow this tutorial on HHL in Qiskit. My project requires solving a very specific type of linear equations $Ax=b$ like the one below. ...
1
vote
1answer
26 views

How to append an Instruction to a QuantumCircuit with variable length of QuantumRegisters as qargs?

I think it is a bug but I'm not really sure. Basically, what I'm trying to do is the following: I have an Oracle Instruction which I want to append to my QuantumCircuit, looks as follows: ...
0
votes
0answers
65 views

Is it possible to express u1(λ) through the gates rx, ry, rz while maintaining the phase? In Qiskit for example

Is it possible to express gate u1(λ) through the gates rx, ry, rz while maintaining the phase? Both in principle and in practice (in Qiskit for example)? The single gate rz(λ) is not suitable, because ...
1
vote
2answers
57 views

Why do I get positive amplitudes when I create a qiskit StateVectorCircuit from only negative amplitudes?

I am using amplitude encoding to encode my features in a quantum circuit. With this I expect to encode e.g. 32 features in five qubits. For the encoding I use qiskit's ...
1
vote
1answer
40 views

Quantum error correction on IBM devices?

I'm wondering if the gate errors on any of the IBM devices are low enough so that we could use some error correcting codes which do not require too many qubits? (such as 5- or 7-qubit codes). Even ...
1
vote
1answer
40 views

Installing Qiskit Error: Building wheel for ecos error

How can I fix this error? I am installing the newest version of Qiskit.
5
votes
3answers
409 views

XOR gate for n control qubits in qiskit

I am currently creating a blackbox for a grover search algorithm to solve the graph colouring problem with qiskit. One of my search criteria is that one node can only have one color. Therefore, with ...
1
vote
0answers
55 views

Example of Simple phase Change Using 2 Qubits [closed]

I need to manipulate phases in 2 qubits. I will eventually create 34 distinct phase sets to map to an alphabet I built. I see https://github.com/oreilly-qc/oreilly-qc.github.io/blob/master/samples/...
2
votes
1answer
49 views

The maximum depth possible on quantum computers

I hope you don't mind me having two questions. Firstly, I was running a Qiskit HHL simulation on a 12x12 matrix and a 12x1 vector, leading to a 16x16 matrix after expansion, and it resulted in a ...
2
votes
1answer
84 views

Unable to use qiskit_textbook module

When I tried to use the Qiskit textbook module, it threw the following error: Command was: ...
1
vote
1answer
49 views

Trotterizing a Pauli sum in Qiskit

In Qiskit, how do I construct a circuit corresponding to the Trotter expansion of a Pauli sum $A+B+C+\ldots$ given as a WightedPauliSum object? $$ \operatorname{e}^...
2
votes
1answer
43 views

Jordan-Wigner $\leftrightarrow$ Bravyi-Kitaev transformation in Qiskit

A couple of questions regarding the conversion between Jordan-Wigner (JW) and Bravyi-Kitaev (BK) states in Qiskit. The JW $\rightarrow$ BK conversion matrix I refer to below is the one from equation (...
3
votes
2answers
71 views

How to run an approximate simulation, and why

I'm looking at the Qiskit getting started documentation, https://qiskit.org/documentation/getting_started.html. They create a quantum circuit and run an approximate simulation on it 1000 times: Why ...
1
vote
0answers
84 views

How can I initialize a state with chosen amplitudes in Qiskit?

I was trying to initialize to an arbitrary state of n qubits with the initialize() from Qiskit but it doesn't generate a state with the same amplitudes passed as an ...
5
votes
1answer
82 views

How to not optimize the quantum gates in a qiskit circuit when running it in the real device?

I have been trying to run two circuits in the ibmq_london device, the one resulting of applying one X gate on qubit $0$ and the one that applies two X gates. I know that applying two X gates is the ...
0
votes
1answer
34 views

Transpiler Error: Number of qubits greater than maximum in coupling map [closed]

Transpiler Error: Number of qubits (2) in circuit11 is greater than maximum (1) in the couplings map ...
0
votes
1answer
73 views

Problem with code in 'Learning quantum computation using qiskit

I've started learning quantum computing using 'Learn quantum computation using qiskit', and I've stumbled upon what I think is a bug in the code in chapter 1.3: Representing Qubit States when I ...
0
votes
1answer
26 views

Install qiskit in django project

I was wondering if it's possible to use qiskit inside a django project. I found some ways to install jupyter notebooks, but I am not sure what is happening with qiskit. Ideally I would like to import ...
0
votes
1answer
78 views

How to obtain the density matrix using tomography in the real device?

I am trying to run the QFT algorithm for n=5 (n number of qubits). The number of experiments that it generates is bigger than the one allowed by the IBM devices (i.e. 75). Therefore, I have tried to ...
1
vote
1answer
13 views

Problem with the API-token from IBM TypeError

English/Englisch: Hi, could anyone help me please?I have a problem with the API-token ...
2
votes
2answers
51 views

Generic 2-qubit gate in qiskit

I need to implement a 2-qubit gate of the following form in qiskit (I've barely started using it, so I'm happy to try a different package if that's worth it) $$ A(\vec c)=\prod_{j=1}^3[I\otimes I\cos(...
1
vote
1answer
23 views

Conversion of python code on Machine learning to realise on quantum processor

I need to realise a Python code program on Qiskit. It works on fuzzy logic. How should I realise the same using quantum processors using Qiskit? Is there any support on realising Python code for Fuzzy ...
2
votes
0answers
47 views

How to construct a multi-qubit controlled rotation with variable angle?

I'm trying to construct a circuit that performs the quantum transformation : Where $f$ is some function. Is there a way to do it without going through every possible value of $i$ ?
3
votes
1answer
41 views

Graphing T1 using Qiskit

I am trying IBM's code for graphing T1 and I keep getting the following error: ...
3
votes
2answers
41 views

IBMQfactory._initialize_providers Error

After a successful first run without problems, I found that I cannot connect any longer. Code: ...
0
votes
1answer
22 views

Modifying measurements in a Qiskit circuit

Assume my function Qiskit receives a certain circuit as an input. How do I check if this circuit already has some measurements appended to it? If so, how can I ...
0
votes
1answer
55 views

Angles of rotation in HHL example

I am trying to implement the 4-qubit example outlined in https://qiskit.org/textbook/ch-applications/hhl_tutorial.html#2.-The-HHL-algorithm (showed in Section 3 of the article). Does anyone know what ...
3
votes
1answer
34 views

How to plot custom labels for quantum registers in Qiskit?

How can I plot custom labels for specific qubits on the left and right side similar to the picture shown here (A, B, Sum ...):
1
vote
0answers
25 views

How to ignore spins is Qiskit chemistry package?

Is it possible to use built-in qiskit.chemistry tools, such as VQE, UCCSD, etc., without ...
3
votes
1answer
119 views

Quantum circuit for Szegedy quantum walk on a cyclic graph

I'm trying to implement an efficient circuit for the Szegedy quantum walk on a cyclic graph with number of nodes N = 8. I found the circuit in this thesis (page 39), the two images below show graph ...

1
2 3 4 5
9