# 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.

150 questions
Filter by
Sorted by
Tagged with
7k views

### How can I implement an n-bit Toffoli gate?

I want to create a Toffoli gate controlled by n qubits, and implement it in QISKit. Can this be done? If so, how?
2k views

### Evaluating expectation values of operators in Qiskit

I'm wondering how in Qiskit one can calculate the expectation value of an operator given as a WeightedPauli (or, at least, of a single ...
970 views

### Big Endian vs. Little Endian in Qiskit

I've noticed that Q# favors Little Endian. Meaning that most operations are designed for this type of encoding. Is is it the same with Qiskit?
1k views

### How is the Grover-Algorithm applied to a database?

Question I want to use the Grover-Algorithm to search an unsorted database for an element $x$. Now the question arises, how do I initialize index and value of the database with the qubits? Example ...
218 views

### Can I find the axis of rotation for any single-qubit gate?

Suppose I have an arbitrary qiskit $U_3$ gate: $U_3(\theta,\phi,\lambda)$. Is there a way I can find which axis the gate is rotating around? In other words, given any real numbers $\theta,\phi,\lambda$...
6k views

128 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? ...
131 views

### A problem with application of multi controlled rotation gates [closed]

This message pops up when I run an mcrx gate The mcrx gate needs a single qubit as target. Here is a part of code I run: ...
3k views

### How to calculate an Expected Value of some operator acting on qubits?

I'm trying to implement the Variational Quantum Eigensolver in Qiskit. Suppose, I have an operator $A = \sigma_1^z\sigma_2^z$ acting on some two-qubit state $|\psi\rangle$. After a measurement I get ...
4k views

### How to quickly calculate the custom U3 gate parameters $\theta, \phi$ and $\lambda$ for any unitary?

In IBM Qiskit and Quantum Experience, the custom U3 gate is defined as  U(\theta, \phi, \lambda) = \begin{pmatrix} \cos\left(\frac{\theta}{2}\right) & -e^{...
619 views

### How good is basic_device_noise_model() simulating the noise in the quantum computer?

Is there any paper or article about the performance of the noise model using basic_device_noise_model()? For example, like the noise model in the code below. ...
166 views

### How can I load a probability distribution using a quantum circuit in Qiskit?

Can someone suggest me a way to load a distribution (for example a discretized Gaussian distribution) into a quantum computer using a quantum circuit? I tried to implement the code using Qiskit.
565 views

### Does conditional gate collapse controller's superposition?

I've created a simple circuit in Q-Kit to understand conditional gates and outputted states on each step: In the beginning there is clear 00 state, which is the input The first qubit is passed ...
118 views

### What are some current applications of Quantum Computing in drug discovery? Are there any test examples of this?

I am interested in applying the power of Quantum Computing to drug discovery. Although I realize that quantum computing is limited in regards to modeling drug-like compounds and their interactions ...
1k views

### Qiskit - Z expectation value from counts?

For a given state $|\psi\rangle$, how would I work out $\langle\psi|Z|\psi\rangle$ ? If I run a quantum circuit and get the counts dictionary on qiskit, I get observables in the Z basis. For n=1 ...
1k views

### Access results from an experiment without having to run the script again

I have ran an experiment in one of the IBM processors and the work has finished. However, I can not obtain the data as histograms or counts in the qiskit notebook because the experiment was concluded ...
137 views

### Is there a general order finding quantum algorithm for a given a and N?

I'm trying to construct a general circuit for Shor's algorithm in Qiskit. I understood the later parts of the circuit (inverse QFT and QPE), but can't really understand the order finding. For example, ...
410 views

### Checking value of variable using quantum approach

A beginner question after watching few videos. Say, var=a; var can be either of two values, ...
2k views

### Comparing run times on IBM Quantum Experience

I have run this program - ...
325 views

### How to measure in the bell basis?

The question is quite straightforward, I have some two qubit state and I want to measure it in the Bell basis. This question answers me partly, but I still have some doubts because, I thought that ...