Questions tagged [quantum-computing]

Quantum Computation deals with considering computation as fundamentally physical, as well as replacing the classical binary digit (bit) with the quantum binary digit (qubit). While the classical bit is either 0 or 1, the qubit can be in a superposition of these states. Computation systems that use quantum phenomena, such as superposition and entanglement, can solve certain complex problems very quickly.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Can't import QSVM from qiskit machine learning

from qiskit_machine_learning.algorithms import QSVM I have written this code to import QSVM from qiskit machine learning but getting getting error: Traceback (most recent call last): Cell In[7], ...
Shreepad Patil's user avatar
0 votes
0 answers
7 views

Is there any way we can formulate QUBO for finding MST on Dwave Quantum Annealer?

I have an undirected weighted connected graph and I am stuck in formulating QUBO to find MST which span all vertices and provide acyclic subgraph as the output however I cannot seem to find the ...
Usama Bin Tariq's user avatar
0 votes
0 answers
14 views

Problem with Quantum Instance and is_statevector

I am encountering an AttributeError related to the 'QuantumCircuit' object not having the attribute 'is_statevector'. This issue is likely caused by an incorrect usage of the QuantumInstance and the ...
user19211107's user avatar
0 votes
1 answer
17 views

MeasureAllZ result comparison

use (qn, q2) = (Qubit[n], Qubit()); ..... let result = MeasureAllZ(qn); if (result != Zero) { set isConstant = false; } I have this very simple q# snippet. When I try to run it on Azure using ...
Steve's user avatar
  • 11.7k
-1 votes
1 answer
45 views

TypeError: unsupported operand type(s) for +=: 'QuantumCircuit' and 'QuantumCircuit'

I try to train my model using Quantum CNN by qiskit I got error in this code line backend = qiskit.Aer.get_backend('qasm_simulator') filter_size = 2 circ = QuanvCircuit(filter_size, backend, 100, 127) ...
user1967441's user avatar
0 votes
0 answers
11 views

Creating gate for process matrix on a quantum circuit

I am trying to reproduce Figure 2 from the paper https://arxiv.org/pdf/2204.06056.pdf#page=11&zoom=100,421,138. In this, they have the gate root(X) which in appendix B they have the form in ...
Mushahid Nawaz Khan's user avatar
0 votes
0 answers
17 views

Tensorflow Quantum Data Reuploading - Efficient SU2 Encoder circuit

The task is to classify the input vector of dim (12,) into three categories using a quantum neural network. I am following the data Re-uploading scheme to do the task which resembles to with a ...
Anik De's user avatar
  • 73
0 votes
1 answer
34 views

Does IBMQ real devices support reset gate in runtime? Because I'm facing the error :

Failed - TranspilerError: "Unknown operation type for DAGOpNode(op=Instruction(name='reset', num_qubits=1, num_clbits=0, params=[]), qargs=(Qubit(QuantumRegister(7, 'q'), 0),), cargs=()). I need ...
Vishnu Muralidhar's user avatar
0 votes
0 answers
27 views

Quantum Espresso installation in Linuxmint 18.3 (Sylvia)

I have installed quantum espresso in my computer. It is raising following error on test run with "make all" command. I am not being able to figure out the solution. IF(use_gpu) ALLOCATE (...
Kiran Nyaupane's user avatar
0 votes
1 answer
136 views

Keep receiving Error - AttributeError: 'QuantumCircuit' object has no attribute 'u3'

I am attempting to code a NOT gate on Qiskit and I keep receiving the error. I am not sure what to fix as I also want to run Quantum Battleships with partial NOT gates and it involves the same code. q ...
Noodle Master's user avatar
1 vote
1 answer
30 views

How to Calculate the Quantum Cost of Qiskit Circuit

I want to calculate the Quantum cost of this qiskit circuit, e.g as i know x-gate has the cost 1 and there are 4 x-gate so quantum cost for x-gate will be 4. What about ccx gate? How can i calculate ...
Engr. Khuram  Shahzad's user avatar
0 votes
0 answers
11 views

Phase Error with Barrier at Quantum Composer

I have created a simple circuit at IBM Quantum Composer. Diagramm of the circuit: Id C Id H X H (barrier) X quantum-computing.ibm.com/composer/files/new?initial=...
Christian Fleck's user avatar
1 vote
0 answers
71 views

Wrong function picked during compilation

I think this is a duplicated question as it is plenty of examples where users experience the picking of wrong function with the same name and different arguments by the compiler, but I am using an ...
francler's user avatar
0 votes
1 answer
83 views

issue encountered using Backend Estimator using providers from qiskit_braket_providers

I am carrying out a ground state estimation of a molecule via qiskit-nature workflows. As explained in qiskit documentation I define a VQE solver by means of a backend estimator that runs on a ...
Giuliana Siddi Moreau's user avatar
0 votes
0 answers
20 views

Probability m randomly selected Boolean n-vectors is likely to span the whole space

What probability of a set of m randomly selected Boolean n-vectors is likely to span the whole space, provided m = Ω(nlog 2n)? I know probability at least 1/2 then m randomly selected Boolean n-...
Bazo's user avatar
  • 1
0 votes
0 answers
19 views

Converting Classical Images to Quantum Images using INEQR Technique: Feasibility and Python Implementation?

How to convert a classical image into a quantum image using the INEQR technique? and is it possible using Python? I'm facing difficulties to convert a classical image into a quantum image.so, I'm ...
MD FAHIM HOSSAIN SAIKAT 180407's user avatar
0 votes
1 answer
29 views

Grovers algorithm for specific qubits

Is it possible to use Grover's algorithm on a particular register instead of all qubits? For example, if I have the superposition of 2 qubits and I'm looking to see if qubit 1 is present on the second ...
Mushahid Khan's user avatar
0 votes
0 answers
22 views

Quantum CNN Error "InvalidArgumentError: Exception encountered when calling layer 'Quantum_Conv_Layer_1' (type KerasLayer)."

I use quantum CNN code in order to classify X-Ray image dataset, however I have several errors First when use import pennylane as qml qml.enable_tape() I got following error AttributeError: module '...
user1967441's user avatar
0 votes
0 answers
17 views

Computing gradients and hessian matrix of a VQC model in qiskit

I have been following the tutorial in the following url to set up a VQC: https://qiskit.org/ecosystem/machine-learning/tutorials/02_neural_network_classifier_and_regressor.html However, it is not ...
Zhelun Li's user avatar
0 votes
0 answers
12 views

Super Operator Representation of Operators

Can someone guide me as to how to convert operators into super operators? If i have a bitflip noise channel, how can i convert it into a super operator? Thank you
Mushahid Khan's user avatar
0 votes
0 answers
43 views

Period finding in Shor's Algorithm

I'm currently working through the book "Quantum Machine Learning with Python Using Cirq from Google Research and IBM Qiskit" and im at shor's algorithm, more precise at the period finding. ...
Felix's user avatar
  • 19
0 votes
0 answers
18 views

Circuit with Hadamard on ancilla to calculate a specific function

I am viewing this video : https://www.youtube.com/watch?v=YHkfAC5Iu9I&list=PLmRxgFnCIhaMgvot-Xuym_hn69lmzIokg&index=29 My question is on the right side of the presentation, "Kernel as ...
Matodo's user avatar
  • 11
0 votes
0 answers
25 views

Contextual Version Conflict

I'm trying to develop a qiskit noise model using pennylane-qiskit, but there seems to be some issue betwee the packages. Here is the code I'm running in my juptyer notebook. import qiskit import ...
Andrew Kim's user avatar
2 votes
1 answer
24 views

How to define the number of times to run a circuit in Qristal SDK?

I've been starting to create a quantum application using the Qristal SDK. I've gotten it running in a Docker image and successfully printed results from using a qpp back end with a kind of hello world ...
Nina Computer's user avatar
0 votes
1 answer
29 views

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 ...
GloTura's user avatar
0 votes
0 answers
25 views

how to improve QSVC accuracy and decrease computation time?

I developed SVM and QSVM on iris_data to see the potential advantage of QML over classical ML but I got QSVC with less accuracy and more computation time compare to SVC , can some please help how can ...
iron_man's user avatar
1 vote
1 answer
25 views

Is there a way to force Qristal SDK to use available NVIDIA GPUs by default?

I've been using the 1.0 release of the Qristal SDK via the Docker image, and have successfully run some circuits. I'm not sure if it is using the available GPUs however, and I'm not sure how to check ...
Tim Meta's user avatar
-5 votes
1 answer
55 views

Why am I getting this Qiskit Error code: 'qr' not defined?

Qiskit error code 'qr' not defined It should be defined I expect. It may be the difference in the version of software on the video I watched vs my software. I tried 'import qiskit' and it still gave ...
Sasha Chugunov's user avatar
1 vote
1 answer
32 views

Calculating CHSH inequality violation in a two-qubit system with projective measurements

Suppose a two-qubit system is in the state |Φ⟩ = (|00⟩ + |11⟩ )/ √2. Consider projective measurements with outcome ±1. Calculate the maximal violation of the CHSH inequality and find the measurement ...
ustcfy's user avatar
  • 23
1 vote
1 answer
139 views

Resolving deprecation warnings of Qiskit's `QuantumInstance`

This code finds the solution to the Max-Cut problem for a given graph using both classical and quantum algorithms. The Max-Cut problem is a well-known problem in computer science and combinatorial ...
PapaGhost's user avatar
0 votes
0 answers
13 views

How can I optimize a 4D integral computation in quantum computing using TensorFlow Quantum and Numpy?

Hello I am new to programming I want to solve this 4 dimensional integral import numpy as np import matplotlib.pyplot as plt from scipy.fftpack import fftn, fftshift, ifftn, ifftshift from numpy ...
harsh jain's user avatar
0 votes
0 answers
18 views

Which quantum gate/gates can be used to load classical data into a quantum register controlled by other qubit values?

I have two quantum registers, both consisting of one qubit (aiming to extend it to more once I understand it better) A Hadamard gate is applied to the first register resulting in an equal ...
R98's user avatar
  • 1
1 vote
0 answers
160 views

Quantum Fourier Transformation Qiskit implementation

I tried to work the Qiskit implementation using python3 AttributeError: 'QuantumCircuit' object has no attribute 'cu1' is the error message import matplotlib.pyplot as plt %matplotlib inline import ...
Nujud Alyami's user avatar
0 votes
0 answers
41 views

Fibre based QKD Simulator

I'm trying to simulate a quantum fibre channel, but I keep getting an error message saying the model qutip has no attribute depolarize. The library I imported are qutip as qt, lumpy as np and random. ...
Ozi_sly's user avatar
0 votes
1 answer
66 views

CUDA Quantum code built with multiGPU support flag works as single with multiple GPU assigned

I am evaluating CUDA Quantum; the goal is to build and run code with multi-GPU support on an HPC system. I use CUDA Quantum via the official container image and using Nvidia enroot as container engine....
mdepa's user avatar
  • 3
0 votes
0 answers
13 views

Quantum computer, Grovers algorithm

How do I complete this code for adding two ancillas qubits to a circuit ancillas = [AncillaQubit(), ....] I tried ancillas = [AncillaQubit(), 2]
Sikiru Ogunranti's user avatar
0 votes
0 answers
20 views

How do I fix the name 'portfolio' is not defined" error?

I am trying to follow along this tutorial: https://qiskit.org/documentation/stable/0.24/tutorials/finance/01_portfolio_optimization.html But I keep getting the error " Cell In[35], line 37 ...
Christina Samuel's user avatar
1 vote
3 answers
441 views

ModuleNotFoundError: No module named 'qiskit.chemistry'

Ive been trying to solve this issue but this line is causing me trouble from qiskit.chemistry.core import Hamiltonian, TransformationType I know that i have to use qiskit nature instead of qiskit ...
Kenson Wesley's user avatar
0 votes
0 answers
30 views

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 ...
kivk02's user avatar
  • 601
0 votes
0 answers
25 views

Python Numpy implementing PIMC QAVRP

I`m having some trouble implementing PIMC QAVRP, an Quantum Annealing algorithm that uses Path-Integral Monte Carlo. Actully, my problem is with numpy. Here is my code: import numpy as np #Calculo da ...
Vitor Bernstorff Clemes's user avatar
2 votes
0 answers
154 views

'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 ...
Rober's user avatar
  • 21
0 votes
0 answers
32 views

Using Wazuh EDR to monitoring QKD devices

I’m trying to do my thesis project about the possibility to prevent attacks against QKD devices, using an EDR like Wazuh. The problem is that most attacks are prevented through physical methods ...
user13105993's user avatar
0 votes
0 answers
51 views

Implementing Quantum Addition in C# for Solving Complex Problems

var simulator = new QuantumSimulator(); int[] numbers = new int[] { 1, 2, 3, 4, 5 }; QArray<int> qNumbers = new QArray<int>(numbers); int sum = 0; for (int i = 0; i < qNumbers.Length; ...
Adnane Arharbi's user avatar
0 votes
0 answers
89 views

Why cobyla is using more iterations when objective function is less randomized?

I am exploring QAOA. To sum up, I mesure a parameterized quantum circuit, compute a function of the parameters based on the result and then optimize that function using cobyla. The optimization is ...
Himera Ephemera's user avatar
1 vote
1 answer
98 views

Commutator algebra in SymPy

I am solving a commutator algebra in SymPy with the Hamiltonian from sympy import* a=Operator("a") ad=Dagger(a) b=Operator("b") bd=Dagger(b) H= ad*a + bd*...
harsh vardhan upadhyay's user avatar
0 votes
0 answers
25 views

sympy big matrix need help in realising some forgotten operation

Given a big sympy matrix how can I access the off diagonal blocks of the big matrix? I cant post images by the looks of it, so do run the code and try to see what I mean. So If the code is run, the ...
Chewie Wookie's user avatar
0 votes
0 answers
49 views

tensorflow quantum to amplitude encoding

I have been using tensorflow quantum(TFQ) for quantum machine learning rencently but there still some problems. I wanna use amplitude encoding to encode classical data like MNIST images into quantum ...
Humbert Humbert's user avatar
0 votes
0 answers
22 views

Why does removing the uncomputation step at the last iteration of Grover's algorithm worsen results?

When messing around with qiskit.org's article on Sudoku solving with Grover's algorithm, I noticed that removing the uncomputation step in the last iteration of the algorithm worsened the likelihood ...
Lucas's user avatar
  • 106
0 votes
1 answer
155 views

How can I visualize image using qiskit in vscode?

I'm now trying to run qiskit visualization functions(e.g. .draw() methods) in vscode. I use latest version of Python, 3.11.1, and followed Getting Started Qiskit in here. Also I installed qiskit ...
Yong Ryeol Choi's user avatar
0 votes
1 answer
447 views

KeyError: 0 problem. Is there a way to fix?

I'm quite new to quantum coding and i keep on getting this error in my code. ***hamiltonian = second_q_ops[0]*** converter = QubitConverter(mapper,two_qubit_reduction=True) reducer = ...
Person_1749's user avatar

1
2 3 4 5
8