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

Error when attempting to visualize controlled hadamard gate state matrix with qiskit

I'm trying to get used to the qiskit module and quantum circuits in general, before tackling a QML project. So I'm going through the tutorial on the documentation page regarding gates. I've gotten as ...
1
vote
1answer
58 views

Cannot Repeat HHL Result

There is an HHL example in IBM Qiskit https://qiskit.org/textbook/ch-applications/hhl_tutorial.html If I run on that website (click "Try") in Section 4 and set ...
1
vote
1answer
37 views

Can I use Quantum lab during IBM Quantum certification exam? [closed]

Hello I am about to take the IBM Quantum Qiskit dev exam. I don't know if I can use the quantum lab (Qiskit) during the exam. Does anyone know?
0
votes
0answers
65 views

How has your experience using Qiskit Metal so far? [closed]

I am interested in starting to use Qiskit Metal. I am wondering what the community thinks so far about this package.
0
votes
0answers
37 views

What does it mean to have a negative cost (aka loss) function?

In the Variational Quantum Linear Solver (VQLS) paper they define four cost functions (2 global and 2 local) and state in Appendix B that "all four cost functions are non-negative." However, ...
3
votes
1answer
70 views

Implementing 3-Qubit Grover Algorithm in Qiskit

The Qiskit tutorial on Grover's Algorithm shows an example of finding two marked solutions out of 8 items, produced by 3 qubits. Using the general diffuser code it provides, however, I realize that ...
1
vote
0answers
25 views

How to transform fermionic operators in qiskit

I encountered some problems when using the qiskit pakage to define the 2-electron reduced density matrix (2-RDM), which is a 4-index tensor, $\langle a_i^\dagger a_j^\dagger a_k a_l\rangle$. I need to ...
1
vote
1answer
36 views

How do I work with Gaussian in Qiskit?

I am trying to run this Qiskit Nature tutorial (Vibrational Structure) and it uses the GaussianForceDriver. Every time I run the Gaussian job from Qiskit I get this message: ...
0
votes
0answers
26 views

Source code for Hamiltonian measurement in qiskit [duplicate]

In variational quantum eigensolver, it is common to transform the Hamiltonian to a qubit form by Jordan-Wigner transformation, for example. After that, the algorithm needs to measure the qubit ...
2
votes
1answer
59 views

Can Qiskit decompose circuits into non-IBMQ basis gate sets?

Let circ be a QuantumCircuit object. Running circ.decompose() returns a circuit that ...
1
vote
2answers
66 views

How to measure a qubit Hamiltonian in qiskit

I am using qiskit to get some measurement results of observables similar to the Hamiltonian. Can someone provide the way how qiskit measures the Hamiltonian (Jordan-Wigner transformed) when using VQE? ...
0
votes
1answer
47 views

Compute measurement values of observables by Qiskit

Is there a way to get certain measurement results by variational quantum eigensolver in qiskit? More specifically, I want to get measurement results for certain operators, like $\langle a^\dagger_ia_j\...
1
vote
1answer
58 views

PyTorch and Qiskit example from the Qiskit textbook seems broken

After executing the proceeding code blocks, when I try to copy the same code from Qiskit textbook on my jupyter notebook, I get the error as ...
2
votes
1answer
117 views

Symbolic computation with quantum circuits

What are my options for computing symbolic results for quantum circuits? I have identified some possibilities: SymPy (Python library, see also this), unfortunately, the software forces you to encode ...
1
vote
1answer
38 views

Unable to use iSWAP in Qiskit TwoLocal entangling_block

I would like to use a general entangler in the entanglement_block of the TwoLocal function. The function seems to work with 'cz', 'cx', 'swap' gates, but it fails for 'iswap' gate. Below is the error ...
2
votes
2answers
84 views

Re-initializing qubits in a circuit without losing superposition

So recently I was building some circuit made of subcircuits. My subcircuits happen to use auxiliary qubits, that are always initialized in the state $|0\rangle$ and are not used after the calculation. ...
2
votes
1answer
49 views

Is there any way to assign a colour for a single gate in Qiskit?

I'm drawing with Qiskit a big circuit with some predefined and custom gates. I want to colour some of them in non-default colours for a better reading of it. Is it possible to do it for predefined ...
1
vote
2answers
76 views

Which qiskit backend is faster in execution of the quantum circuit prepared?

I have a quantum circuit of 40 qubits with mutliple gate operations being applied to many of the qubits. Currently I am using qasm simulator which for shots=1 took 10 hour of time. Is there any other ...
0
votes
1answer
35 views

Getting the current variational parameters in Qiskit

I am right now using variational quantum eigensolver (VQE) to calculate the ground state of some molecules, like H2, by qiskit. The quesiton is that how to get the current parameters of the varaional ...
0
votes
0answers
36 views

Question on qiskit.circuit.library.PiecewiseChebyshev Qiskit circuit library

This question follows the post https://quantumcomputing.stackexchange.com/posts/15070/edit. I am working on an implementation of HHL algorithm, to do so, I need to map $|\lambda\rangle\mapsto |\arcsin(...
2
votes
1answer
45 views

What is the physical unit of the energy calculated using VQE on Qiskit?

Suppose there is any arbitrary ansatz producing variational energy for any arbitrary Hamiltonian. What is the physical unit corresponding to the energy? Since numerical algorithms only output a ...
-2
votes
1answer
34 views

How to calculate quantum circuit with given quantum state?

I have task to calculate this quantum circuit Where psi is: ...
-1
votes
1answer
44 views

Optimising Angle Code in Qiskit - Using the QAOAVarForm

I’ve got a bit of an elongated plea for aid here! I’ve got some code that finds the optimum angles for QAOA on the Maximum Independent Set Problem. It does however seem about ~10x slower than related ...
1
vote
0answers
33 views

Iterative Phase Estimation with noise vs standard Quantum Phase Estimation with noise

I am doing Qiskit Lab 4 about Iterative Phase Estimation. I created a circuit implementing IPE for theta = 1/3 (phase of 2pi/3). Here's the circuit: It seems to do okay if I run it without noise in a ...
1
vote
0answers
47 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 ...
0
votes
1answer
54 views

Calculating the expected value of a weighted Pauli Operator in Qiskit

Following UT course on Quantum Machine Learning, they have a notebook on QAOA. As part of their lecture, they perform QAOA using Qiskit. Unfortunately, it seems the new versions of Qiskit have changed ...
1
vote
2answers
61 views

How do I get the Unitary matrix of this circuit without using 'unitary_simulator'? [duplicate]

I am using jupyter notebook and qiskit. I have a simple quantum circuit and I want to know how to get the unitary matrix of the circuit without using 'get_unitary' from the Aer unitary_simulator. i.e.:...
4
votes
1answer
69 views

I don't understand unitary of ${e^{iAt}}$ from HHL algorithm

I tried to implement the following circuit in the image below but with the red circled gates replaced with a unitary controlled ${e^{iAt/2}}$ and controlled ${e^{iAt/4}}$ The image came from this ...
0
votes
1answer
26 views

Why is my unitary matrix using linear algebra not matching the 'get_unitary' simulation?

I am using jupyter notebook and qiskit. I have a simple quantum circuit and I want to know how to get the unitary matrix of the circuit without using 'get_unitary' from the Aer unitary_simulator. i.e.:...
2
votes
4answers
114 views

How do I get the Unitary matrix of a circuit without using the 'unitary_simulator'?

I am using jupyter notebook and qiskit. I have a simple quantum circuit and I want to know how to get the unitary matrix of the circuit without using 'get_unitary' from the Aer unitary_simulator. i.e.:...
3
votes
1answer
91 views

Qiskit - Circuit drawing esthatics - can i force the measurements in my circuit show at the end?

I'm studying an introduction course to quantum computation at my uni and we got homework to draw a certain circuit using qiskit. I managed to understand how to do what is asked from me, and this is ...
0
votes
2answers
42 views

Issue in running the qiskit tutorial for QSVM

I am trying to run this QSVM tutorial using qiskit from my Python environment using Jupyter Notebook Firstly it gives me an error that I have to install ...
1
vote
1answer
37 views

how to implement Quantum tomography on an arbitrary state using Qiskit?

Can quantum tomography helps to reconstruct the state? How is this possible with arbitrary quantum state? For example if I have a $$|\psi\rangle= (0.24506+0.9633i)|0\rangle + (0.0046238+0.10943i)|1\...
0
votes
1answer
48 views

How to get_statevector() with defined gates in Qiskit?

I'm learning Qiskit for my QC lectures and I'm not able to run the following code: ...
0
votes
1answer
48 views

Error “too many subscripts in einsum”, UnitaryGate()

I'd like to build a multi qubit controlled gate in the following way. The circuit has $n+1$ qubits, the first qubit is the control qubit, and the operation on the rest $n$ qubits is the tensor product ...
1
vote
1answer
61 views

From logical universal gate set to physical one, Qiskit

Among the several universal gate sets, the Clifford$+T$ set seems the most important one (since it should provide fault-tolerant computing). However, that set is logical and it differs from physical ...
1
vote
1answer
46 views

Quantum SVM with large feature set

I am trying to practice QSVM from the following tutorial Introduction into Quantum Support Vector Machines The author has used 2 feature_dimension with 2 component PCA ...
2
votes
1answer
76 views

Bloch Sphere of Qiskit logo

Trying to plot the Bloch Sphere of the IBM Qiskit logo ...
2
votes
2answers
38 views

What is the minimal delay between gates on IBM devices?

Suppose I create the very simple circuit OPENQASM 2.0; include "qelib1.inc"; qreg q[1]; x q[0]; barrier q[0]; x q[0]; and submit it to an IBM backend. ...
1
vote
0answers
12 views

Need Help in QGAN function to load higher dimentional data

I have a query that I am using qiskit.aqua.algorithms.QGAN library and using the qgan function and I am having difficulty in loading data of dimension 1000 rows x 10 columns. I am following qiskit's ...
1
vote
1answer
47 views

How fast is qiskit to_gate() method, which is used to convert circuit to gate?

I have prepared a quantum circuit, which is using 13 qubits. Now, I am converting this circuit to gate but it is taking around avg. 35s for conversion. It would have have been fine, if I require only ...
1
vote
1answer
73 views

In quantum teleportation, Is it possible for bob to just see the state vector after receiving it from Alice without measuring it?

I was reading about quantum teleportation using Qiskit. Alice wants to teleport some quantum state to Bob. My question is Is it possible for bob just to see the state vector after receiving it from ...
1
vote
3answers
147 views

Incorrect rendering of a circuit by draw method

Executing from qiskit import * circuit = qiskit.QuantumCircuit(3, 3) circuit.draw(output="mpl") in ipython notebook gives the following image Which ...
0
votes
1answer
49 views

How the arguments of $U_3$ gate are converted when they're not lying in the expected range?

From the qiskit documentation (here), a general form of a single qubit unitary is defined as $$ U(\theta, \phi, \lambda) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{i\lambda} \sin\...
2
votes
1answer
91 views

Grover's algorithm for the real problem of finding the index of an array element

Good day. I am interested in an IMPLEMENTED, not theoretical, example of code for solving the problem of finding the INDEX of an element in an uncorrected array using Grover's Algorithm. The task ...
0
votes
1answer
36 views

Make a controlled gate from a QuantumCircuit that uses append in Qiskit

Here is a minimal example for what I want to do: ...
1
vote
1answer
34 views

How do I export the rightmost state of circuit wires (qbits and cbits) in a qiskit simulation

qiskit has a quantum teleportation tutorial which winds up with this simulation code: ...
1
vote
2answers
75 views

Finding Eigen Values from Quantum Phase Estimation - Using qiskit

I am trying to use the quantum phase estimation(EigsQPE) of qiskit to find the eigen values of a matrix. As I am new to quantum computing so I am confused what to measure in the circuit to derive the ...
2
votes
1answer
48 views

Function in Qiskit to get the quantum circuit

Is there any way to view the quantum circuit of pre implemented quantum algorithm in Qiskit? In the Qiskit textbook, there is an example given for HHL algorithm. Is there any function in Qiskit which ...
1
vote
1answer
62 views

What is Qiskit's Transpiler method for unitary synthesis?

As I could found in here how the transpile works in qiskit, I understood that transpile gets arbitrary Unitary gate $U$ and some set of basis gates as input, and produce some quantum circuit of $U$ ...

1
2 3 4 5
18