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

Cannot understand control_fixed_ansatz in Qiskit VQLS implementation

I've been studying the VQLS algorithm and came across this Qiskit implementation: https://learn.qiskit.org/course/ch-applications/the-variational-quantum-linear-solver I'm having trouble understanding the circuit in the “control_fixed_ansatz”…
GloTura
  • 1
  • 1
0
votes
1 answer

Multiple parameter hybrid classical-quantum neural network using pytorch and qiskit

I am working with a code for hybrid classical-quantum neural network which can be run on qiskit simulator. I am following the link…
0
votes
1 answer

Quantum: Define superposition as linear combination of orthonormal basis

I'm testing a code for define a superposition state using a percentage of both basis. All seems to run well, when the linear percentage is real. But it fails when the percentage is complex parameter. from cmath import sqrt from typing import List,…
Sourcerer
  • 1,891
  • 1
  • 19
  • 32
0
votes
1 answer

Import error when running Shor's algorithm on Qiskit

from qiskit import Aer from qiskit.utils import QuantumInstance from qiskit.algorithms import Shor N = 15 backend = Aer.get_backend('aer_simulator') quantum_instance = QuantumInstance(backend, shots=1024) shor =…
0
votes
3 answers

Where has the "units" sub-module in qiskit_nature gone?

I am trying to follow this qiskit "Electronic Structure" tutorial, but at the very first step, setting up the PySCF driver with the following from qiskit_nature.units import DistanceUnit from qiskit_nature.second_q.drivers import PySCFDriver driver…
Tico
  • 11
  • 3
0
votes
0 answers

How do I rough merge the surface code of distance 2?

from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, Aer, execute, IBMQ from qiskit.visualization import * n_data = 4 n_ancilla = 3 n_measure = 7 qc = QuantumCircuit(n_data+n_ancilla,n_measure) list_n = list(range(n_data)) list_a…
0
votes
0 answers

Python qiskit metal window is not responding

I am just a beginner today installed qiskit metal and tried to run the very first code. But when the window with qiskit metal opened up, I wasn't able to click anything. Every time I tried to click something, it displayed to me, that the window is…
0
votes
1 answer

issues encountered in using scikit-quant optimizers in Qiskit VQE workflows (Aer backend)

as I am testing all optimizers advised in qiskit.algorithms.optimizers reference page to evaluate their performance in a VQE qiskit nature workflow on the Aer backend with and without noise model, I decided to call scikit-quant optimizers BOBYQA,…
0
votes
1 answer

Qiskit 'No counts for experiment "0"'

Error 'No counts for experiment "0"' in line answer = job_result.get_counts() here's my code shots = 1000 backend_type = 'qasm_simulator' backend = Aer.get_backend(backend_type) provider = IBMQ.load_account() #backend =…
0
votes
0 answers

Is it easier to rewrite a pyomo model into a Docplex or a Gurobi model?

I've got an optimization problem written in pyomo that I want to translate to Qiskit. The only issue is that Qiskit has the ability to take in Docplex or Gurobi models. My question is this: Is it easier to rewrite a pyomo model into a Docplex or a…
0
votes
1 answer

Combining quantum circuits in Qiskit

In Qiskit the instruction to add two quantum circuits qc1 + qc2 produces the following error "unsupported operand type(s) for +: 'QuantumCircuit' and 'QuantumCircuit'" I'm guessing my library must be missing something but as I'm new to Qiskit and…
0
votes
1 answer

qiskit-aer-gpu: cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device

My GPU is: description: VGA compatible controller product: GK107 [GeForce GT 740] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:02:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm…
aneela
  • 1,457
  • 3
  • 24
  • 45
0
votes
0 answers

Intuition behind probability amplitudes, probabilities and Bloch sphere

In mathematics, let’s assume the original basis is [1 0] and [0 1]. We can write [1 1] as a linear combination of the original basis. Where: We can write [1 -1] as a linear combination of the original basis. Where: Further let’s assume [1 1]…
kivk02
  • 599
  • 1
  • 4
  • 16
0
votes
1 answer

Issue in Qiskit VQC with Amplitude Encoding for state preparation

I have a problem in my code for quantum neural network. I tried to encoding 16 classical vectors to 4 qubits. The function for amplitude encoding in my code as below: def amplitude_encoding(num_qubits,x): qc = QuantumCircuit(num_qubits,name…
0
votes
0 answers

Qiskit Getting Started - No repsonse to job = backend.run(transpile(qc, backend=backend), shots=1024) and then error on retrieve_job

Stepping through the Qiskit Getting Started steps, I run the step: run job on real hardware job = backend.run(transpile(qc, backend=backend), shots=1024) and get nothing back. So, I then run the next step or retrieve previously-run job job =…