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
0
votes
1 answer

How to create Entanglement, Superposition and interference?

I am looking the way How to create Entanglement, Superposition and interference? Can someone help to show how to code in qiskit? and the docs related to these mentioned above? Thanks
0
votes
1 answer

'qiskit' has no attribute '__qiskit_version__'

as title says, I type qiskit.__qiskit_version__ and get the error AttributeError: module 'qiskit' has no attribute 'qiskit_version'. I have Anaconda installed as well as pip installed qiskit and qiskit[visualization]. The jupyter notebook only…
Long De
  • 13
  • 5
0
votes
1 answer

How to solve TSP problem with more than 3 nodes in the tutorial of Max-Cut and Traveling Salesman Problem Qiskit 0.24.0?

I had to try the example of qiskit’s Traveling Salesman Problem with 3 nodes and executing it at IBM backend called simulator_statevector.Can execute and get the result normally. But when trying to solve the TSP problem with more than 3 nodes,I…
Snogry
  • 1
  • 3
0
votes
2 answers

Quantum Computing Basics

I am studying quantum computing and created the circuit below: Qiskit Quantum Circuit In such a circuit, should q2 be at the probability of 25%? Because the Toffoli gate has 2 control inputs that haven't been collapsed yet. So the inputs could be…
0
votes
1 answer

How to get a default EquivalenceLibrary?

I want to use the BasisTranslator in Qiskit to process my circuit to base gates. One of the constructor parameters for BasisTranslator is EquivalenceLibrary. I attempted creating a parameter-less EquivalenceLibrary() and pass it to a…
3yakuya
  • 2,622
  • 4
  • 25
  • 40
0
votes
1 answer

compare between the factorization time get prime

i try to compare between the factorization time between : 1) classical algorithm function: def is_prime1(n): if n<2: return False for i in range(2,n): if n % i ==0: return False return True def…
0
votes
0 answers

python IBM quantum lab error with qiskit enable account

I am logged in IBM Quantum lab (https://quantum-computing.ibm.com/lab). I tried to use Shor's alghoritm with number 21. Here is Python source code: (It is also here: https://quantumcomputinguk.org/tutorials/shors-algorithm-with-code) But the output…
Klovik
  • 73
  • 5
0
votes
0 answers

Qiskit: how can you use a different state for each shot in a quantum circuit?

I am trying to run a quantum circuit many times, each time using a different random state - a single qubit i.e. |\psi>= a|0> + b|1> with different a and b. Once each qubit has gone through the circuit, I am saving the state vector of the final…
e.deacon
  • 1
  • 1
0
votes
1 answer

Can I have two iterables in the reduce function? (Python)

Suppose I have the following command (using Python and Qiskit): a = reduce(lambda x,y: x.compose(y,c),circli, qcla) (qcla is an initializer) Here, compose is an internal qiskit function, x and y are elements of the list circli (iterable). I'm…
ZR-
  • 809
  • 1
  • 4
  • 12
0
votes
1 answer

QisKit: Difference on Statevector / No Difference on Vizualization

Why is there a difference in the state vectors, but there is no difference in the visualizations? Is there any other visualization to show the differences? qiskit: 0.23.3 python: 3.8 circuit-1 + statevector: q_0: [1.+0.j 0.+0.j] ==> +1 circuit-2…
Dida
  • 23
  • 3
0
votes
1 answer

qbit collapse before Quantum Teleportation

I have been tweaking with quantum teleportation in python qiskit. One extra thing that I have done in the following diagram is the measurement of q330 at the very beggining. I am doing this because I wanted to see if the measurement is always same…
Sayan Dey
  • 771
  • 6
  • 13
0
votes
1 answer

Jupyter Notebook failed command in Anaconda Prompt for Qiskit

I have Qiskit installed via Anaconda and a virtual environment set up in Python 3.8. when I run (.venv) C:\Users\brenm>jupyter notebook (in Anaconda prompt) it fails and throws 'jupyter' is not recognized as an internal or external command, operable…
0
votes
1 answer

Jupyter Notebook command failing in Qiskit

I have Qiskit installed via Anaconda and a virtual environment set up in Python 3.8. When I run the command jupyter notebook in the Anaconda prompt I get an error. I'm not sure what the problem is. How do I fix it? (.venv) C:\Users\brenm>pip install…
0
votes
1 answer

Is CSP Layout always the first algorithm used by qiskit transpiler to map quantum circuit?

I'm using Qiskit transpile with optimization_level=3. I was wondering if CSP layout selector is always the first algorithm tried by Qiskit, also if I set as layout_method='noise_adaptive' or other methods. If not, how to force the transpiler to use…
0
votes
0 answers

IBM Quantum computer code keeps running job after job

I'm using qiskit for my University research project but whenever I send a job to run on IBM's Quantum experience, it'll wait in the queue, run, obtain results (in the form of a histogram) but instead of moving to the next part of the code (analyzing…