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
1 answer
16 views

Is this Quantum Neural Network overfitting?

In the accuracy graphs (attached the graph images below) shown in this code (Binary Classification for Fraud Detection): validation loss is greater than training loss training accuracy is greater ...
0 votes
0 answers
9 views

Get qiskit-native gates from a circuit containing custom gates

I have a custom gate in qiskit defined as follows: ...
0 votes
0 answers
6 views

Number of Qubits in UCCSD Ansatz Shows as 0

I'm trying to run a VQE using the UCCSD ansatz; however, when I initialize the ansatz, I get that there is no qubits that the ansatz acts on, while there should've been 4. The related excerpt from my ...
1 vote
0 answers
16 views

On the Qiskit Txtbk page for TSP, how does the initial phase matrix work?

I am looking over the TSP on Qiskit's Textbook, link below: https://qiskit.org/textbook/ch-paper-implementations/tsp.html#Building-the-Components- In the general strategy part of the documentation, ...
0 votes
1 answer
19 views

Why does qutip run without errors, but cannot output a Bloch sphere graph?

This is the official demo(https://nbviewer.ipython.org/github/qutip/qutip-notebooks/blob/master/examples/visualization-exposition.ipynb). But after I run it, there is no error, but I can't output the ...
1 vote
1 answer
43 views

training parametric circuits in Qiskit

The following is an official example of qiskit training simple parameter circuits (https://learn.qiskit.org/summer-school/2021/lab4-introduction-training-quantum-circuits). But they mainly focus on ...
3 votes
1 answer
136 views

How to solve TSP problem with more than 3 nodes in the tutorial of Max-Cut and Traveling Salesman Problem?

I had to try the example of qiskit’s Traveling Salesman Problem with 3 nodes and executing it at IBM backend called simulator_statevector.Can execute and get the result normally. But when trying to ...
1 vote
1 answer
43 views

CNOT chain vs CNOT fountain in qiskit

I was going through qiskit's synthesis module, their methods take an argument called cx_structure which has two possible values, ...
0 votes
1 answer
25 views

Pennylane:WireError: Did not find some of the wires <Wires = [0]> on device with wires <Wires = [tensor(18, requires_grad=True)]>

My proj is from https://pennylane.ai/qml/demos/tutorial_rotoselect.html In verifying the application of this theory in more complex circuits, the following problems occurred. How to fix this, I tried ...
1 vote
1 answer
216 views

Why do the qasm_simulator runtimes vary significantly for different IBMQ CouplingMap/NoiseModels?

I have been running VQE experiments locally using the qasm_simulator with actual IBMQBackend NoiseModels as shown in the Qiskit Textbook. I have noticed that the ...
1 vote
1 answer
36 views

Clarification on the usage of class UCC of qiskit_nature

I am trying to develop a customized VQE algorithm in which I am making use of the class UCC of qiskit_nature. I am having trouble understanding the outputs of the methods of the class. I have ...
-1 votes
0 answers
37 views

IBM Certified Associate Developer - Quantum Computation - ASSESSMENT EXAM [closed]

I got a question concerning the Assessment Exam for the IBM qiskit quantum developer certification. How often do the assesment exams get updated? I already did one but like to do another one. Will I ...
1 vote
2 answers
45 views

which device had the best Average coherence time?

These are the IBM backend overview, do: Avg.T1/T2: here stand for the Average decoherence time or coherence time?
2 votes
0 answers
29 views

How to calculate Quantum Discord for two qubit system using Qutip?

Quantum discord of a bipartite system can be determined as: $${D_A}({\rho _{AB}}) = I({\rho _{AB}}) - {J_A}({\rho _{AB}}),$$ The subscript of $A$ denotes that the measurement has been performed on the ...
0 votes
1 answer
35 views

Compilation error occurred in qiskit natural gradient case

https://learn.qiskit.org/summer-school/2021/lab4-introduction-training-quantum-circuits ...
0 votes
0 answers
13 views

Performing QN-SPSA on hybrid quantum-classical neural networks

I had a question on the TorchConnector module in qiksit_machine_learning (based on this tutorial). If I'm not wrong, is ...
1 vote
1 answer
75 views

Conditional measurement using classical bit in qiskit

I am trying to implement Figure 6 in Implementing a distance-based classifier with a quantum interference circuit by Schuld et. al The specific part that I'm struggling with is the controlled (on |0&...
1 vote
0 answers
25 views

The relationship between number of shots and performance of quantum agent

What is the relationship between number of shots and the performance of quantum agent in Quantum neural network? and what is the limit of number of shoots in QASM simulator?
1 vote
0 answers
30 views

Does training a quantum circuit require the derivative of each quantum parameter?

https://www.youtube.com/watch?v=mEfyCvwcSkQ&list=PLOFEBzvs-VvqJwybFxkTiDzhf5E11p8BI&index=19 This doubt comes from Lab-4, the 2021 Qiskit Quantum Machine Learning Summer School. The specific ...
0 votes
2 answers
49 views

How to repeatedly initialize a fixed quantum circuit, and the initialization vector is random?

I need to repeatedly input one random quantum state after another into a quantum circuit that has been designed and assigned parameters, and these quantum states will be used as input. I have tried ...
1 vote
0 answers
18 views

Applications that support low fidelity qubits generated by UQCM

I am studying Universal quantum cloning machines. I have found that two imperfect clones can be generated with fidelity of 83.33%. Where can we use these imperfect clones in quantum worlds? Can we use ...
0 votes
1 answer
29 views

How does CircuitQNN in qiskit machine learning calculate output probabiltiies?

This is a question I have based on this previous question on calculating quantum gradients in quantum-classical hybrid circuits. I would like to understand the output of the ...
0 votes
2 answers
30 views

qiskit from Anaconda spyder: Missing module error

I'm a newcomer to qiskit, when I tried to import qiskit, it followed a ModuleNotFoundError: No module named 'qiskit._accelerate'. I've tried creating a new virtual environment and re-install qiskit, ...
-1 votes
1 answer
46 views

How to use matplotlib to draw a city state in Qiskit

How to use matplotlib to draw the following image, hoping that the 3D histogram is at the coordinate intersection? I can only do it as follows
2 votes
1 answer
74 views

Qiskit custom multi controlled gate

I'm building a 3 qubit circuit with the control-ry rotation gate. The code is the following: ...
1 vote
1 answer
20 views

What is "time in system" for a given job and how to retrieve?

I noticed that there is "time in system" for each job. For example: I was wondering what does this mean? I am guessing this means the time of the first shot starts on the quantum devices ...
1 vote
0 answers
39 views

Does Qasm Simulator add noise by default?

I am wondering if Qiskit QasmSimulator adds noise by default or not. I am asking because I have 2 circuits: circuit 1: computes cosine similarity between two vectors circuit 2: computes cosine ...
0 votes
2 answers
41 views

Qiskit - How to get statevector for each shot?

I have a simple circuit which I run for 10 shots: ...
0 votes
1 answer
37 views

How to get statevector of qubits after running quantum circuits on IBMQ real hardware to calculate the fidelity of all qubits individually?

Is it possible to get the statevector while running quantum circuits on IBMQ real hardware? If getting the statevector is not possible can I still calculate the fidelity of a qubit somehow?. What I ...
1 vote
1 answer
33 views

how to get the backend_status using qiskit?

I was preparing for the exam and I was confused about how to get job and backend status using qiskit, do we use Job_monitor for both of them?
1 vote
1 answer
61 views

Gradient descent for a quantum-classical hybrid neural network

I am working on implementing a quantum-classical hybrid neural network in qiskit where input data is encoded on a quantum circuit (with say 3 qubits) using a ...
-1 votes
1 answer
51 views

How to map classical data onto a Hamiltonian

training for the Hamiltonian. And our general QNN neural network training starts from the classical data set. The general method is to program the classical data into a quantum state, so what if I ...
-2 votes
1 answer
42 views

How to train a custom parameterized circuit with multiple parameters and intermediate measurements?

...
1 vote
1 answer
53 views

When factoring N=21 on IBMQ Devices with Shor's algorithm, does the quantum subroutine require modular exponentiation?

I am currently working on Qiskit code implementing Shor algorithm in the form of a quantum circuit. I am factoring $N = 21$ (into 3 and 7) using 5 qubits, with 3 qubits in the work register and 2 in ...
4 votes
1 answer
321 views

Simulation of a helium molecule using Qskit

I am trying to compute the ground state energy of He-He using VQE. For this purpose I have utilized Qskit and have written the following script: ...
2 votes
3 answers
210 views

Pauli I in eoh procedure doesn't become a global phase gate in qiskit evolution_instruction method. Possible consequences

If one has two qubits in arbitrary stats and wishes to apply a controlled version of some global phase gate $P(\varphi) = \begin{pmatrix} e^{i\varphi} & 0 \\ 0 & e^{i\varphi} \end{pmatrix}$ ...
1 vote
1 answer
57 views

How well different featuremap encode the data?

Recently, I was doing research on QML. Qiskit gave detailed steps on how to encode data into quantum states, but I was confused about one point: there are different feature mapping methods under ...
0 votes
1 answer
32 views

Circuits acting on subsets of qubits in other circuits

I am trying to figure out what is the best way of dealing with registers while constructing circuits from abstract blocks. Consider the following subcircuit: \begin{equation} U|x\rangle|y\rangle|z\...
1 vote
1 answer
28 views

About the modification and naming of qiskit parameters?

Is the parameter angle of the above picture the same, that is, each door rotates by an equal angle? How to assign different parameters to them, such as a[0], a1 of the same name? Is it possible to ...
-3 votes
1 answer
34 views

Question about qiskit optimizer in Portfolio Optimization

we tried running the Portfolio Optimization code using qiskit with the optimizer:Sequential Least SQuares Programming optimizer. FOr 10 stocks, it ran fine, For, 21 stocks it hung up. COuld anyone ...
1 vote
1 answer
16 views

AttributeError: 'QuantumCircuit' object has no attribute 'save_statevector'

Hi i know the question was already asked but my case is slightly different. I am trying to do the qiskit tutorial: ...
2 votes
1 answer
88 views

A fundamental question on multiple rotation of a qubit using $SU(2)$

I am trying to implement qubit rotations using $SU(2)$ from scratch in order to understand and debug what happens under the (physical) hood. The reason why gates and high-level APIs are omitted here ...
1 vote
2 answers
85 views

Stepwise $SU(2)$ Rotations on the Bloch Sphere from $\pi$ to $2\pi$

Based on the useful straight-forward answers to both of my former questions, on multiple rotations of a qubit and bloch sphere subplots, I was able to implement the following $SU(2)$ rotations: At ...
0 votes
0 answers
50 views

IBM Quantum Lab - Server unavailable or unreachable. Would you like to restart?

In the following circuit, I want to perform tomography on the qubits 0,1,2,3 after qubits 4,5,6,7,8,9 are measured. I run the circuit using with measurement gates on qubits 4,5,6,7,8,9 with the ...
1 vote
2 answers
236 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 ...
1 vote
1 answer
177 views

How to get running time for each circuit executed on IBM's quantum processors in one round?

I want to execute multiple circuits in one round on IBM's backends, especially the 16-qubit one, to save time. For instance, ...
1 vote
0 answers
40 views

What is the concrete difference between qiskit thermal_relaxation_error and phase_amplitude_damping_error?

What is the concrete difference between those two error models in qiskit.providers.aer.noise? For phase_amplitude_damping_error ...
1 vote
1 answer
45 views

Qiskit optimization_level values

Is there a clear explaination of how exactly optimization_level choice in qiskit's transpile() method affects on circuit? I expected to see some mathematical operations with the gates that similifies ...
0 votes
0 answers
37 views

How to retrieve the "counts" data as integers?

I'm trying to plot the counts for the same tensor state (00, say) over many runs, but I'm not sure how to access the data from the "counts" variable in a numerical format that is usable (...
1 vote
1 answer
36 views

Qiskit: Get number of iterations for Iterative Amplitude Estimation

Trying to count the number of uses of my circuit $A$ in Grover iterate circuit $Q= -AS_0A^{\dagger}S_x$. However, Qiskit's amplitude estimation algorithms such as IAE or FAE accept only precision ...

1
2 3 4 5
31