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

Get qiskit-native gates from a circuit containing custom gates

I have a custom gate in qiskit defined as follows: ...
user avatar
0 votes
0 answers
3 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 ...
user avatar
  • 126
0 votes
0 answers
6 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 ...
user avatar
  • 1
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, ...
user avatar
  • 21
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 ...
user avatar
  • 159
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 ...
user avatar
  • 159
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 ...
user avatar
  • 159
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 ...
user avatar
  • 13
-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 ...
user avatar
  • 21
2 votes
0 answers
28 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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 159
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 ...
user avatar
  • 159
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?
user avatar
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 159
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, ...
user avatar
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 ...
user avatar
  • 11
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 ...
user avatar
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: ...
user avatar
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?
user avatar
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: ...
user avatar
-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 ...
user avatar
  • 159
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 ...
user avatar
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 ...
user avatar
-2 votes
1 answer
42 views

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

...
user avatar
  • 159
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 ...
user avatar
  • 21
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 ...
user avatar
  • 159
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: ...
user avatar
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 ...
user avatar
-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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
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 (...
user avatar
  • 1
-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
user avatar
  • 159
0 votes
1 answer
29 views

Does qiskit_ionq have the possibility of simulating quantum circuits with noise?

I'm using qiskit_ionq API for simulating quantum circuits on ionq devices. Currently, I'm using the ionq_simulator backend, but I think it performs noiseless ...
user avatar
0 votes
1 answer
38 views

Why does qiskit's density matrix output obscure the text, can it make this picture better?

Obviously, the histogram here has covered the coordinate markers. Is there any way to make this state diagram look better?
user avatar
  • 159
0 votes
1 answer
39 views

References for two-local forms in QISKIT

I am using 'Two local' form of QISKIT as a waveform ansatz in VQE to compute ground state. QISKIT documentation does not provide references to all the entangling options. Is there any other place ...
user avatar
  • 35
1 vote
1 answer
37 views

How to declare non-binary decision variables in an optimization problem?

I am working on a logistics problem which require me to find the optimum quantity of product to be manufactured and also to be shipped to satisfy the customer demand. I have made a decision variable $...
user avatar
2 votes
1 answer
126 views

How to implement subplots (several blochsphere plots) using qiskit?

Qiskit seems to use matplotlib for rendering bloch spheres under the hood. Therefore, it would be nice if we could also make use of matplotlib's subplot technique. I would like to implement subplots, ...
user avatar
1 vote
0 answers
40 views

What's the best way to design a circuit with logic gates that use the same input lines?

I am implementing a Carry Select Adder, the problem is that the circuit is quite complex to translate in Qiskit. I need to use one (or multiple) line(s) as input for two (or more) gates. In particular,...
user avatar
  • 11
2 votes
2 answers
68 views

Calculating the probability of a result after measurement using Ry, Rz, and Rx matrices

Broadly: I have noticed on the qiskit developer (assessment) exam there are many questions asking to calculate the probability after measurement however I generally have no idea how to do this without ...
user avatar
0 votes
2 answers
54 views

Better plot_bloch_multivector within Qiskit?

I'd like the plot_bloch_multivector function (or some other function that I can use in Qiskit) to display a Bloch sphere in a way that makes it clear whether the arrow points toward the front of the ...
user avatar
  • 33
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?
user avatar
0 votes
1 answer
24 views

Clarification about QTF proof regarding equality of QFT application and circuit application

I'm self learning quantum computing through IBM's Qiskit's learning section (which I really like), and I've stumbled across an inequality that I don't quite understand fully. This must be really easy, ...
user avatar
1 vote
1 answer
32 views

Implementing deutsch_problem(seed=None) and deutsch() from qiskit text

I'm attempting to work through the exercise at the end of https://learn.qiskit.org/course/ch-gates/phase-kickback#phase-8-0 where I am to build and implement Deutsch's algorithm. I understand that <...
user avatar
  • 13
0 votes
3 answers
40 views

How to get precise angle values in Qiskit while using initialize() function to generate arbitrary quantum state?

Is there any way to get the quantum gate values more precisely in qiskit? For example, if I want to create 1/√3[|00⟩+|01⟩+|11⟩]. By using initialize() I get the following circuit by using the draw() ...
user avatar
0 votes
1 answer
83 views

Help on PySCF library

I am a student and I am trying to use qiskit nature in order to calculate the ground state energy of a molecule. My probelm is that when I try to run the simulation an error message comes out: ...
user avatar

1
2 3 4 5
31