Questions tagged [qiskit]

Quantum computing framework for writing programs and applications

Qiskit is an open-source software development kit (SDK) for working with quantum computers at the level of circuits, pulses, and algorithms.

237 questions
3
votes
1 answer

Install qiskit on MacOS HighSierra Error: No such file or directory: 'qiskit.egg-info'

I was trying to install QISKit via the pip method as mentioned on their webpage. However, after many trials, this method doesn't seem to work and I am getting the following error on the terminal. Compiling QISKit C++ Simulator creating out …
2
votes
0 answers

'RecursionError: maximum recursion depth exceeded' when training with QuantumKernelTrainer inside a QisKit IBM Runtime Session

I am encountering a RecursionError when using the QuantumKernelTrainer class during the fitting process of a TrainableFidelityQuantumKernel object from the qiskit_machine_learning package within a Qiskit IBM Runtime session. To train the classifier…
Rober
  • 21
  • 2
2
votes
1 answer

Where is Qiskit's RepetitionCode class now?

Now that Qiskit's ignis module has been deprecated, where does qiskit.ignis.verification.topological_codes.RepetitionCode or its equivalent reside now?
bisarch
  • 1,388
  • 15
  • 31
2
votes
3 answers

PyCharm does not show Qiskit vizualization

I cannot get a histogram from Qiskit to show using PyCharm, even though I am getting the numbers correctly. Code is the following: import numpy as np from qiskit import QuantumCircuit, transpile from qiskit.providers.aer import QasmSimulator from…
82Hrh
  • 23
  • 6
2
votes
1 answer

Qiskit: 'no counts for experiment'

Although I imported plot_histogram, I am not getting the output as expected. Here is my code: a = QuantumCircuit(1) a.z(0) a.x(0) a.h(0) a.sdg(0) a.t(0) backend = Aer.get_backend('qasm_simulator') result = execute(a, backend).result() counts =…
Vish
  • 35
  • 4
2
votes
1 answer

Ruling out state |000> with a 3 qbits circuit executed on a real backend - statevector seems inconsistent

I am trying to rule out the state |000> for a simple 3 qbits quantum circuit executed on a real quantum backend. The code exctract below is unelegant but I guess it does the trick and for the time being the value |000> hasn't come up. Still I don't…
BCayzac
  • 21
  • 2
2
votes
1 answer

How do you change the backend.run() command?

This is code from Chapter 6.1 of the qiskit textbook, which shows a job being run. How would you change the first line of the backend.run() command, the schedules parameter, in order to use it for a measurement for a constant pulse shape. The…
Brian Lynch
2
votes
1 answer

Why do I get an import error when importing Qiskit?

Whenever I import qiskit, I get the following error. Anyone know why? ImportError: dlopen(/opt/anaconda3/lib/python3.8/site-packages/tweedledum/_tweedledum.cpython-38-darwin.so, 2): Symbol not found: _aligned_alloc Referenced from:…
A. Fattal
  • 77
  • 3
2
votes
1 answer

qiskit VQC with Amplitude Encoding for state preparation

I am trying to implement a Quantum Neural Network in qiskit, using the VQC class. The problem is that each data consists in 190 features, which just can't be encoded with the default VQC's function (ZZfeatureMap), since this would mean create a…
Fred Derf
  • 45
  • 5
2
votes
1 answer

Qiskit Nature VQE print full quantum circuit

I am doing VQE using Qiskit Nature. I want to see how my final quantum circuit looks like. How to print the whole quantum circuit (like an ansatz)?
Farida
  • 21
  • 2
2
votes
1 answer

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
  • 21
  • 1
2
votes
2 answers

QISKIT error - numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

I ran this from qiskit import QuantumCircuit, execute, Aer from qiskit.visualization import plot_histogram and got the below error --------------------------------------------------------------------------- ValueError …
X10nD
  • 21,638
  • 45
  • 111
  • 152
2
votes
0 answers

The Tutorials in Qiskit: Option Pricing with qGANs

# Set upper and lower data values bounds = np.array([0.,7.]) # Set number of qubits used in the uncertainty model num_qubits = [3] # Set entangler map entangler_map = [] for i in range(sum(num_qubits)): entangler_map.append([i, int(np.mod(i+1,…
LOGA
  • 21
  • 1
2
votes
1 answer

Unexpected keyword argument 'datatime' qiskit provider

I'm trying to set datatime calling backend.properties qiskit. this is my code : from qiskit import * from qiskit.providers.ibmq import * provider = IBMQ.get_provider(hub='ibm-q') provider.backends(simulator=False) backend =…
2
votes
3 answers

Implement quantum teleportation in qiskit

I am trying to implement the quantum teleportation protocol from the qiskit textbook in qiskit: I start with q_0 bit = 1 and I expect that q_3 = 1 at the end but it does not work. from qiskit import * qc = QuantumCircuit(3, 3) qc.x(0) #q ->…
Felix Ha
  • 401
  • 5
  • 11
1
2
3
15 16