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
1
vote
1 answer

TensorCirucit c.draw() NameError

I want to plot a circuit build with TensorCircuit using the draw method. I am working on Google Colab and have pip installed qiskit. Yet i get NameError: name 'QuantumCircuit' is not defined. I have also tried from qiskit import QuantumCircuit but…
1
vote
1 answer

In Grover's Algorithm, is there a way to find 2-3 solutions with only 2 qubits?

I am currently learning grover's algorithm on qiskit(https://qiskit.org/textbook/ch-algorithms/grover.html). I notice that in the example of 2 qubits, we are looking for only one solution(|11>). Is there a way to modify the circuit so that we can…
Jokermania
  • 47
  • 1
  • 6
1
vote
1 answer

Reducing circuit initialization complexity

I'm encoding data into a QuantumCircuit via the Initialize method for QFTs. In doing this and transpiling for IonQ backends, I'm getting rather complex circuits. Is there a way to encode this data more efficiently for IonQ backends or a method to…
1
vote
1 answer

I am getting 'No memory for the experiment' error although i dont see any mistake

I am trying to execute this code but I am getting this error as 'No memory for the experiment' . Can anyone help me out is there anything else I need to import to get the memory of circuit? from qiskit.providers.aer import QasmSimulator # Create a…
Vish
  • 35
  • 4
1
vote
1 answer

What IBM_Q backend supports Qiskit Pulse?

I was doing an experiment with open pulse on caliberation of a qubit and I stumbled upon this error: Traceback (most recent call last): Input In [73] in frequency_sweep_results = job.result(timeout=120) # timeout parameter set to 120…
Riya
  • 53
  • 4
1
vote
0 answers

ValueError: setting an array element with a sequence for scikit learn

I am trying to implement Quantum Kernel Ridge Regression (replacing the classical kernel with quantum kernel) in qiskit. The shape of my input x is (7165 x 529) and due to reshaping errors, I added an extra column with zeroes to make it (7165 x 530)…
Aara
  • 11
  • 2
1
vote
1 answer

Accessing Qubit With DAGCircuit

I'm currently trying to make my own TransformationPass to use when compiling a QuantumCircuit for specific hardware, but I'm struggling to get things to work with the DAGCircuit that gets passed to the run(self, dag) method that gets overridden. My…
1
vote
2 answers

Plotting Bloch Vectors in Qiskit: " 'Arrow3D' object has no attribute '_path2d' "

I am working through the Qiskit tutorial textbook, and in Section 1.4 ('Single Qubit Gates'), I can't seem to plot vectors on the Bloch Sphere. I am using Google Colab and am importing as: !pip install qiskit !pip install qiskit[visualization] from…
Sam Frank
  • 31
  • 3
1
vote
1 answer

I'm trying to use the new Qiskit Dynamics module. Do I have to do anything special to import it?

I'm running in the IBM Quantum Lab environment, so I should have access to all the latest code. But I get the following error: ModuleNotFoundError: No module named 'qiskit_dynamics'
1
vote
1 answer

Atribute error when running the Qiskit VQE Alogrithum

I'm trying to run the VQE algorithm using an Aer backend simulator. However, whenever I run the algorithm I Receive this error: "AttributeError: 'TwoLocal' object has no attribute 'set_max_evals_grouped'" Could anyone explain what this error means…
1
vote
1 answer

Qiskit's draw only shows the circuit's name and not the architecture

Upon trying to draw a ZZFeatureMap instance, I only see the name "ZZFeatureMap" and not its architecture. Please find the code snippet and output attached: from qiskit.circuit.library import ZZFeatureMap zz = ZZFeatureMap(2, entanglement="full",…
1
vote
1 answer

Custom feature map with complex features in the Qiskit VQC

I am trying to use the VQC in Qiskit and create a custom feature map. To build the feature map I am using from qiskit.circuit the class ParameterVector, but this class does not let me use complex features. Do you know any way I can still use the VQC…
1
vote
1 answer

How can I obtain the numerical values of the density matrix elements in a state_city plot in qiskit

I have run code following the documentation in the qiskit section on Entanglement Verification, up through the steps: [Earlier material from Entanglement Verification, followed by] meas_calibs, state_labels = complete_meas_cal(qubit_list=qubit_list,…
Katharine Hunt
1
vote
2 answers

Qiskit: mpl drawer module

I started using Qiskit with their official tutorial (Sezon 1) and I got a few bugs with the same code, at the beginning I just had to install pylatexenc but then I had "module 'qiskit.circuit' has no attribute 'draw'" error, this is not true as I…
user15609798
1
vote
0 answers

ImportError - from qiskit import BasicAer

I used conda create --name qc-26 --clone base; conda activate qc-26; jupyter notebook Whenever I ran, from qiskit import BasicAer I received the following error messages ImportError:…
Ka-Lok Ng
  • 11
  • 1