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
1
vote
0answers
47 views

Time to prepare for Fundamentals of Quantum Computation Using Qiskit v0.2X? [closed]

I am a novice programmer with some skills in C++, C#, and Python. Would anybody have an idea about the average time needed to prepare for this certification? (Fundamentals of Quantum Computation Using ...
3
votes
1answer
92 views

Saving vectorized circuits in Qiskit

Is there a way to save vectorized images in Qiskit? I am using circuit.draw('latex', filename='./file.pdf') They type of the image is a pdf, but it looks like a ...
2
votes
1answer
33 views

What may I read from DensityMatrix charts when running simple Qiskit code?

Let's say I am running this code and I obtain picture below using Qiskit DensityMatrix class. ...
1
vote
1answer
41 views

Running qiskit on jupyter notebook certverification error: unable to get local user certificate

I have code which runs on the IBMQ website perfectly, however copying and pasting the same code (and including my API token) the same code does not run when I try and run it on a real quantum computer ...
0
votes
1answer
44 views

Qiskit package installed locally, but not running in jupyter notebook

I believe I have installed qiskit on my computer. Running pip list or pip3 list in terminal returns: ...
4
votes
1answer
85 views

How to calculate the generators of a list of stabilizer?

Let's say we have a list of stabilizers: {'YZY*', 'XYY*', 'YZYZ', 'Z*Z*', '*XZ*', 'XZX*', 'ZX*Z', 'XZXZ', 'YYX*', 'Z*ZZ'}. Is there any existed formula or function (eg. in qiskit) that can calculate ...
2
votes
1answer
68 views

Set the bounds for ansatz parameters in VQE

How can I make intervals for free parameters when I use VQE function? (https://qiskit.org/documentation/stubs/qiskit.algorithms.VQE.html) I have built a parametrized ($\theta_1,...,\theta_n$) circuit ...
2
votes
1answer
218 views

Add FreezeCoreOrbitals on ElectronicStructureProblem

I want to freeze core orbitals of my molecule and I know ElectronicStructureProblem has the possibility (es_problem = ElectronicStructureProblem(driver=driver, q_molecule_transformers=...
3
votes
1answer
89 views

Replacement of FermionicOperator from qiskit.chemistry in qiskit_nature

qiskit.chemistry.FermionicOperator here is very useful for converting fermionic operators to qubits operators. qiskit.chemistry ...
1
vote
1answer
45 views

Qiskit Portfolio Optimization : Does the resulting matrix show the stock combination to select?

The IBM Qiskit Portfolio Optimization sample finally provides an array similar to [1,0,1,1] representing the 4 digits as the stocks. So does the ...
2
votes
1answer
44 views

Time result for my algorithm

I've used the function result.time_taken to know the amount of time used to execute a task on the real chip, but I don't understand if the result is in seconds or ...
1
vote
1answer
29 views

How to import circuit libraries into qiskit

Im trying to put the QFT circuit in my qiskit circuit but im having trouble: ...
0
votes
0answers
51 views

How to simplify a circuit with repeated same parts?

If I have a circuit with 3 qubits and repeated gates as follow: ...
1
vote
1answer
59 views

Is there a way I can reduce the code for generating simple circuits with the same structure?

here's the code I'm using to generate 3 quantum circuits with the same structure (They're only differed by the first U3 gate on the qubit): ...
3
votes
2answers
52 views

Inverse of Statevector.from_label in Qiskit

In Qiskit I can construct a computational basis statevector in the following fashion ...
2
votes
1answer
66 views

configuration of FakeOpenPulse2Q

Can you help me to configure the FakeOpenPulse2Q() to produce more realistic pulses? The code below instantiates 2 circuits and generates the waveforms for each. ...
3
votes
1answer
72 views

Qiskit: Transpilation and the CircuitSampler

I am using Qiskit's opflow and its CircuitSampler to evaluate matrix elements / expectation values. Now, going beyond ...
2
votes
1answer
45 views

How do you compute the compiled unitary of a quantum circuit comprised of different $n$-input gates?

Given a quantum circuit consisting of two qubits, how is the compiled unitary of the circuit computed when we have different input type gates? (X-gate, H-gate are single-input gates, CNOT is a 2-input ...
2
votes
1answer
65 views

Qiskit logical to physical qubit mapping

I want to run a simulation using qasm with a realistic noise model from a backend, specifying a coupling_map as well as an ...
2
votes
1answer
52 views

Pulse waveform for 2-qubit circuit

I'm trying to reproduce the Bell-state pulse display as shown in this tutorial. The code is very short: ...
1
vote
1answer
60 views

Is there any way to obtain the number of qubits of a given backend in Qiskit?

I'm testing out a program in different IBMQ mock backends, and I want the program to use the maximum number of qubits in each case. Is there any function/method to extract the number of qubits of a ...
3
votes
2answers
268 views

Drawing the circuit in Qiskit - how to set same style as in Composer?

A quantum circuit can be visualized in Qiskit with circuit.draw. A drawing style can be set with parameter output which can have ...
3
votes
1answer
71 views

Why does running my circuit on Quantum Hardware produce such unexpected resultss?

I am using Jupyter Notebook with Qiskit. I have created a program that can add two 3-bit numbers together. When I simulate this program on a qasm_simulator it works as expected and I can add any two 3-...
2
votes
1answer
78 views

Why I am gettting this error when I try to open the Quantum Lab in the IBM Quantum experience?

I am using quantum labs in IBM Quantum Experience to my circuits. But from yesterday onwards (May-03-2021) this error message is being shown on my screen. Does anyone have any idea about this issue?
1
vote
0answers
91 views

Qiskit Tomography and Noise Mitigation with a Measurement Mid-Execution

I'm struggling to get a program running where I have a circuit with a measurement and reset mid-execution and I want to use noise mitigation and state tomography together. The circuit is defined ...
5
votes
1answer
82 views

What is the superop simulator in Qiskit for?

I'm trying to understand what the use case of a superop simulator would be. My understanding is that density matrix is generally more resource intensive than state vector, but it has additional ...
2
votes
1answer
44 views

Can I use the same qiskit account on two laptops?

I have two laptops with different accounts of Jupyter Notebook. I'm wondering can I use the same qiskit account (with the same token) on both laptops? I'm worried that if I run the token on my new ...
2
votes
2answers
75 views

Qiskit: count the type of gates on the qubit with the largest number of gates in a multi-qubit circuit

I would like to know the number and type of all the gates on the wire/qubit with the largest operations in a quantum circuit with multiple qubits. Is there any inbuilt functionality, or what is the ...
3
votes
1answer
69 views

Why does applying a Hadamard gate three times to $|0\rangle$ result in a tiny imaginary component in the $|1\rangle$ amplitude?

I'm using qiskit with the online IBM Quantum Lab and when I run the following code ...
3
votes
0answers
34 views

What are the correct eigenvalues to use in controlled rotation in HHL?

I'm studying the HHL algorithm from the qiskit textbook, but I don't understand what $\lambda$ we have to use. If my matrix $A$ has eigenvalues that can be written in a binary representation, then, ...
2
votes
0answers
41 views

How to turn a 'term' in a QuantumError into a QuantumError?

A QuantumError class may have many terms, and we can use .error_term(position) to have a look at each term. But it returns a list instead of another QuantumError ...
2
votes
1answer
30 views

Bernstein Vazirani Algorithm widget (bv_widget) in the Qiskit documentation

I'm new to quantum computing and Qiskit, so please be patient with me. I'm going through the info on Bernstein Vazirani. Here is the link to the section: https://qiskit.org/textbook/ch-algorithms/...
6
votes
1answer
86 views

Does Grover's algorithm always give the correct answer with 100% certainty for two-qubit states?

In the Qiskit tutorial on Grover's algorithm it is stated that with a 2 qubit algorithm the chance of measuring the "right" state is already 100%. But I thought that the algorithm would ...
2
votes
0answers
65 views

How accurate are Qiskit’s unitary and Statevector simulators for very large circuits?

Background: I wrote a code that takes a Qiskit circuit C as an input and outputs a random circuit C’ such that C and C’ have the same unitaries. I tested my code using Qiskit’s Statevector simulator ...
0
votes
1answer
45 views

Qiskit QFT matrix does not match with DFT matrix

The unitary matrix associated with the QFT circuit in Qiskit does not match the actual DFT matrix. In fact, all the imaginary components have their sign flipped (...
3
votes
1answer
46 views

Measuring second excited state |2> using “calibrations” not Open Pulse

I am tying to measure the second excited state in a system that does not support Open Pulse. Instead I am using calibrations. The method detailed here does not work. I get the error ...
5
votes
1answer
84 views

What algorithm does Qiskit use to decompose arbitrary n-qubit unitaries on Rotations + CNOT?

I found that Qiskit uses Unroll3qOrMore in the transpiler class function to decompose an arbitrary $n > 2$ unitary and represent it as a directed acyclic graph (DAG). But I can't find an algorithm (...
5
votes
1answer
143 views

Does the circuit with qubit-wise CZ gates compute the inner product of two states? If not, is there another circuit that does?

I've been searching for a quantum algorithm to compute the the inner product between two $n$-qubit quantum states, namely $\langle\phi|\psi\rangle$, which is in general a complex number. One can get $|...
0
votes
1answer
66 views

How to use qiskit transpile with Clifford + T basis? [duplicate]

How can I transpile using universal $Clifford + T$ gates set? I have only seen examples using rotations + $CNOT$. This is what I have tried ...
1
vote
1answer
81 views

How to keep angles in degrees into quantum circuit using qiskit?

Qubit in polar form $$\left|\psi\right\rangle=\cos(\theta/2)\left|0\right\rangle+\sin(\theta/2)\left|1\right\rangle $$ Now lets say i want to keep $\cos(\theta/2) = 50.400 $ degrees angle and $\sin(\...
1
vote
1answer
126 views

In the HHL alghoritm, how can I transform my hermitian matrix into a unitary operator?

I'm studying the HHL algorithm and I'm trying to do an his implementation but, there are some points that I don't understand how I can transform my hermitian Matrix into its unitary operator? In ...
3
votes
1answer
105 views

Calculating the ground states of an Ising Hamiltonian on a real quantum computer

I have followed this tutorial and based on it, I've written the following function in qiskit, which can explicitly calculate the ground states of a transverse-field Ising Hamiltonian. ...
2
votes
2answers
66 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
56 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
54 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
107 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
38 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
52 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
84 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
2
3 4 5
20