Questions tagged [qiskit]

Quantum computing framework for writing programs and applications

Qiskit is a quantum computing framework for writing programs and applications, and performing quantum experiments.

120 questions
1
vote
1 answer

The Universtal Gate U(theta, phi, lamda) in Open QASM vs Qiskit

I have noticed that Open QASM and Qiskit define the universal single-qubit gate U(lambda, theta, phi) differently. The difference causes a phase difference in RZ, for example. Has anyone come across this problem? Which should one choose?
1
vote
0 answers

How is data encoded in an oracle on a quantum circuit?

I'm specifically looking at implementing Durr, Hoyer, A Quantum Algorithm for Finding the Minimum in qiskit, finding the index with the smallest value in a list using grover's algorithm. Say you have a list L, [1, 4, 0, 2] for example, and an oracle…
phildo
  • 11
  • 1
1
vote
1 answer

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

I am working on a program for Qiskit, but I am getting a strange error (one that I have not gotten in the past) when I try to simulate a circuit. Here is a minimal example producing the error: from qiskit.circuit import QuantumCircuit from qiskit…
Owen D
  • 35
  • 4
1
vote
1 answer

How to do a zipped SWAP in Qiskit?

I have a circuit with two registers, m, and q. from qiskit import execute, Aer, IBMQ, QuantumCircuit m = QuantumRegister(3, "m") q = QuantumRegister(3, "q") cl = ClassicalRegister(2, "cl") circ = QuantumCircuit( m, q,cl) circ.x([q[0],q[1],q[2]])…
user9318
  • 111
  • 2
1
vote
2 answers

installing requirements-dev.txt from Qiskit raises an error with SQNomad

I am trying to install the following requirements with…
1
vote
0 answers

qubit/cbit arguments does not match gate expectation

I am trying to use the code tutorials/finance/09_credit_risk_analysis.html for 3 assets. Face problem in running line 13: # define the registers for convenience and readability. The error: ---> state_preparation.append(agg.to_gate(), qr_state[:] +…
Aryabhat
  • 11
  • 2
1
vote
1 answer

IBM quantum simulators run on cloud or locally?

Do qiskit simulators run locally or on IBM cloud servers? It seems that each time I have used them, my computer goes into max CPU, and sometimes the simulation runs out of memory, exiting with out of memory error message.
creet
  • 13
  • 4
1
vote
1 answer

ValueError: numpy.ndarray size changed on importing qiskit

While trying to run the following commands on Jupyter from qiskit import QuantumCircuit, Aer, BasicAer, execute from qiskit.visualization import plot_histogram I am encountering the following error.I am using python 3.8. Does anyone have any idea…
Osama Younus
  • 115
  • 6
1
vote
1 answer

Can I change the byte ordering from little endian to big endian in qiskit?

The regular Matrix representation of a CNOT gate as found in literature is: CNOT = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0 \end{bmatrix} However in…
1
vote
1 answer

Failed Qiskit installation with Anaconda on Windows

I'm attempting to install Qiskit via pip and Anaconda on my machine. Here's my process 1.) Install Anaconda 2.) Open Anaconda 3 prompt 3.) Create a virtual environment using conda create -n python=3 command (I've created the…
1
vote
1 answer

Visualizing circuits in qiskit with matplotlib

I'm learning how to use qiskit and I'm using the jupyter notebook, but everytime I try to visualize the circuit with the attribute draw I get this error: import qiskit from qiskit import * from qiskit import IBMQ qr = QuantumRegister(2) cr =…
SAR_90
  • 45
  • 3
1
vote
2 answers

The class MatplotlibDrawer needs pylatexenc. to install, run "pip install pylatexenc"

I am using colab for qiskit and even after installing pylatexenc using pip this still comes as an error, I also used !pip.Here's the full pic
1
vote
0 answers

Why can't we add 'rx'(Rotation around X-axis) and 'ry' gates to the noise model basis gates in Qiskit?

I can easily add any Unitary gate which I create using Qiskit but it gives a warning when I try to add these rotation gates to the noise model basis gates. It might be a problem with the labelling(I used 'rx' and 'ry') or some other issues which I…
1
vote
1 answer

Python quantum Fourier transform

This is the inverse quantum Fourier transform. What changes do I have to do to obtain the quantum Fourier transform (not the inverse)? Is this in the right path at all? How would I encode values x1,x2,x3,x4 into the basis state? from math import …
1
vote
0 answers

My Bloch sphere is appearing as an ellipse/oval

I tried to plot a Bloch vector. However, my Bloch sphere is appearing as an ellipse/oval instead of a circle. I am having the same issues with qsphere also.Jupyter notebook on my Mac(Safari) from qiskit.visualization import…