Questions tagged [machine-learning]

For questions about how quantum computing could improve or affect machine learning i.e. quantum machine learning. Questions about classical machine learning belong on another site, such as Stack Overflow, Cross Validated or Artificial Intelligence SE.

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

Transform QLSTM model output expectation values back into classical data

What is the typical procedure for transforming a model's expvals back into the classical data format? I'm new to QML and need some insight. I have some expvals that were the output of model i.e. ...
camaya's user avatar
  • 1
0 votes
0 answers
21 views

Qnode model gradient of inputs (not parameters!) question

I am trying to use qml to do physics informed quantum machine learning within Tensorflow. I know with TF, to get derivatives of the network's inputs (df/dx, for example), you can use with tf....
Corey's user avatar
  • 127
1 vote
1 answer
49 views

Quantum neural networks and quantum kernels deal with nonlinearities

I'm trying to understand quantum neural networks from reading Alchieri et al.'s review paper. The following paragraph describes the differences between classical and quantum neural networks: Also, ...
Medulla Oblongata's user avatar
2 votes
1 answer
63 views

Optimizing a parametrized Quantum Circuit in batches does not decrease the cost function while unbatched optimization does

I want to optimize a variational quantum circuit to maximize the Hilbert-Schmidt Distance between the different classes of the UCI breast cancer data set. When I choose to use batched optimization, ...
jo87casi's user avatar
  • 141
3 votes
0 answers
28 views

Why is "reducing Hamiltonian energy" also optimizing a Quantum Machine Learning model?

From what I observed, most hybrid qml architectures surround the ideas of Hamiltonian states, and it seems like our goal to optimize a circuit is to keep energy states as low as possible. But why is ...
Ryan Wang's user avatar
  • 247
0 votes
0 answers
18 views

quantum algorithm for multilevel/hierarchical dataset

The Radon dataset is a well-known hierarchical/multilevel dataset. It contains Radon samples from houses in counties across the United States. The goal of the model is to estimate the (log) Radon ...
inq's user avatar
  • 111
1 vote
0 answers
45 views

Effect of error correction gates in QCNN

In Iris Cong et. al. (2019) they propose a Quantum Convolutional Neural Network that utilizes mid-circuit measurements to control an error-correcting ansatz $V_j$. This is the equivalent of a pooling ...
Federico Tiblias's user avatar
1 vote
1 answer
71 views

How to save a hybrid Tensorflow and Pennylane model?

I implemented a hybrid model with Keras and Pennylane that looks like this: The quantum layer is basically a quantum circuit converted to a keras layer with the ...
Ryan Wang's user avatar
  • 247
1 vote
1 answer
85 views

Error loading saved hybrid quantum (pennylane + tensorflow keras) model: Unknown layer: 'KerasLayer'

I'm creating a hybrid model consisting of classical convolutional layers and a quantum output using Tensorflow. I can save the model in either .h5 or .keras format, but when I load them with the code <...
Ryan Wang's user avatar
  • 247
1 vote
1 answer
62 views

What's the case when parameter-shift rule does not hold?

When the parameterized unitary is of the form $e^{-i\theta V}$, where $V$ is a Hermitian operator of the unitary, we can use parameter shift rule to calculate the gradient. In this paper, it says: &...
peachnuts's user avatar
  • 1,373
1 vote
0 answers
42 views

Could kernels also be used for Reinforcement Learning?

In this paper Kernel-Based Reinforcement Learning (2002), a classical kernel-based method was demonstrated for Reinforcement Learning , which indicates that classical research in this direction is ...
BootBootBoot's user avatar
1 vote
0 answers
48 views

Tensorflow_quantum hybrid models tf-quantum

I am trying to QCNN for MNIST classification equivalent to that built in. I’m having problems trying to pass my quantum circuit built with cirq as a Keras layer. Here’s what I have: ...
Kieran McDowall's user avatar
4 votes
1 answer
115 views

Why is the quantum kernel $\kappa(x,x')=|\langle\phi(x)|\phi(x')\rangle|^2$ defined with a square?

I've always wondered why the quantum kernel method \begin{equation}\label{QKM1} \kappa (x,x')=|\langle \phi(x) |\phi(x') \rangle {{|}^{2}} \end{equation} must be a square. After reading “Supervised ...
Ren-Xin Zhao's user avatar
0 votes
2 answers
388 views

Cannot import tensorflow_quantum module in Colab

I was trying to install the tensor flow quantum module using the one given in their official website but it is showing these errors while installing. ...
Siddharth Sethi's user avatar
1 vote
1 answer
59 views

Pennylane variational classifier demo - need for padding

In the variational classifier demo from Pennylane, the data loading is performed with ...
Sarvapriya Tripathi's user avatar
1 vote
1 answer
104 views

How to determine which embedding method to use for QML?

So there are a lot of feature mapping techniques out there for Quantum Machine Learning, but I'm not sure which one to use for my next VQC. Can anyone explain when and why to use each of the following?...
Ryan Wang's user avatar
  • 247
1 vote
0 answers
53 views

The possibility of an image classifier using quantum computer architecture?

Consider an exhaustive database of all contour images that can ever be created on a 16x16 grid. Out of the $2^{256}$ unique possibilities, could a quantum computer classify all the resulting images ...
LithiumPoisoning's user avatar
3 votes
0 answers
23 views

Question when deriving quantum differential privacy?

I met some problems when trying to derive proposition 4 in the paper Gentle measurement of quantum states and differential privacy. I know that intuitively, if we act on a single register of ρ, and ...
Zehong Fan's user avatar
1 vote
0 answers
34 views

Quanvolutional NN vs Quantum Convolution NN

There are 2 primary approaches for Image recognition using Quantum Neural Networks: 1. Quanvolutional one and 2. Quantum Convolutional Neural Networks. The primary difference is that in 1 we don't ...
Chan's user avatar
  • 131
1 vote
0 answers
54 views

Compatibility of TensorFlow Quantum on Windows

I created a Jupyter file around two years ago that relies on the following packages: However, it seems that Google has discontinued support for TensorFlow Quantum on Windows. This poses a problem as ...
ricklondon's user avatar
2 votes
0 answers
129 views

Comparative analysis of TensorFlow-Quantum, Pennylane, and Qiskit, to implement quantum CNNs

I am currently working on a project wherein I have to implement a Quantum Convolutional Neural Network. The best options for NISQ devices are hybrid algorithms, so I will try integrating quantum ...
Chan's user avatar
  • 131
1 vote
1 answer
69 views

Image classification using quantum variational circuit?

Image classification using variational quantum circuit is described in here. 3 image clusters having clearly separable 3 feature coordinates have been chosen to be: There are classical clustering ...
James's user avatar
  • 475
2 votes
1 answer
87 views

How the circuit covers the Hilbert Space

I am refreshing my functional analysis knowledge to learn quantum machine learning and I am getting confused on Hilbert spaces. What does it mean for a "circuit to cover the Hilbert Space" I ...
epsilonolispe's user avatar
0 votes
1 answer
266 views

How to assign and manipulate Qiskit's TwoLocal ParameterVector?

Below is my code in python where i just show Qiskit's TwoLocal variational circuit model. ...
Luccas Marim's user avatar
2 votes
0 answers
70 views

RealAmplitudes ansatz

Does someone know why RealAmplitudes ansatz is made like this ? I can't find any research paper on it. Why does it use 4 Ry Gate for one qubit ?
Duen's user avatar
  • 326
1 vote
1 answer
312 views

What are the advantages of angle embedding over amplitude embedding?

With $n$ qubits, $2^n$ features can be encoded with amplitude embedding, while only $n$ with angle embedding. So, is there any reason to use angle embedding?
salcc's user avatar
  • 111
1 vote
1 answer
108 views

Are there some cases where Grover's algorithm was used to improve machine learning performance?

Grover algorithm showing quantum advantage, are there some cases where it was used to improve Machine Learing performance ?
Duen's user avatar
  • 326
5 votes
2 answers
198 views

Simultaneous measurements and Bell basis measurements to estimate $\lvert\text{Tr}(\sigma \rho)\rvert^2$ in Huang et al. paper

Theorem 2 of this paper says if one is able to prepare $\rho^{\otimes k}$ then it is possible to predict expectation values of all $n$-qubit Pauli observables using $O(n)$ number of copies of $\rho$. ...
user8183310's user avatar
1 vote
0 answers
40 views

Quantum Generative Adversarial Network does not converge

I have built a quantum generative adversarial network model, in which the generator and the discriminator, both are quantum based model. The parametrized quantum circuit/ansatz of these two models are ...
Shuhul Handoo's user avatar
1 vote
0 answers
78 views

I am optimising a variational quantum circuit to learn a distribution $p(x)$, but it doesn't converge over a training set $\mathcal{X}$?

I am training a variational quantum circuit to learn distributions: given data $s(\vec{\lambda})$, what is the probability distribution for the parameterisation $\vec{\lambda}$, i.e. the posterior ...
JoJo's user avatar
  • 99
2 votes
1 answer
205 views

What are QML algorithms using less than 8 qubits and provide a quantum advantage?

So this is more of a soft question. I've been trying to find some quantum machine learning algorithms can both be run with less than 8 qubits and provide a quantum advantage to classical machine ...
MeltedStatementRecognizing's user avatar
1 vote
0 answers
152 views

Error in Implementing Quantum SVM

I am getting Type error of invalid parameter in base sampler module. From what I know sampler is constructor and doesn't take any parameter values, on the qisit.org tutorial of svm they have even said ...
Piyushgalav's user avatar
3 votes
1 answer
78 views

Data input limitations (size) for QML

I have done quite a few Google/paper searches but did not found an answer. I would like to test the possibility of speeding up/ improving the accuracy of an existing unsupervised machine learning (...
Bill's user avatar
  • 31
2 votes
1 answer
236 views

Which backend does the QSVM run on?

I'm trying to create a QSVM classifier model. I wanted to know which backend the fit() method uses to train the model. I checked on the IBM portal to see if there were any jobs being created, but ...
Amey Meher's user avatar
4 votes
1 answer
106 views

Graph Limits in Quantum Computing

Lovasz's book Large networks and Graph Limits mentions that their study of graph limits is motivatived applications to quantum computers, statistical physics, and models for the internet. They don't ...
user22511's user avatar
1 vote
2 answers
422 views

How to convert classical machine learning dataset to quantum dataset?

I'm looking for a way to convert images dataset to quantum dataset format to apply some quantum machine learning algorithms. Is it possible? I have read about that and I found it is possible by using ...
ahmad alomari's user avatar
2 votes
0 answers
88 views

How can we compute the gradient in a Quantum RNN?

I was looking into implementing a quantum recurrent neural network (QRNN) for a project, but I have some doubts about the computation of the gradient. There are a few papers that have implemented a ...
Alex Li's user avatar
  • 121
3 votes
1 answer
128 views

Advantage of density matrix over vector to form quantum kernel

In Maria Schuld, Supervised quantum machine learning models are kernel methods, Section III.A, on page 6, the third paragraph from the bottom states While from a quantum physics perspective it seems ...
Hans's user avatar
  • 217
2 votes
1 answer
198 views

Hilbert space vs RKHS

I believe in quantum machine learning, it is interesting to talk about RKHS(reproducing kernel Hilbert space) and Hilbert space where a quantum state lives in. How do we think of these two spaces? Are ...
Sam's user avatar
  • 427
2 votes
4 answers
137 views

Inference on real hardware using a pre-trained quantum model on a simulator

Being Quantum Computers with more than 5-7 qubits quite expensive (especially IBM's) I was wondering if it makes sense to pre-train a quantum machine learning model on a noisy simulator, store the ...
mpro's user avatar
  • 507
0 votes
0 answers
115 views

is there any difference bwtween PCA in qiskit.aqua and PCA in sklearn?

Is there any difference bwtween PCA in qiskit.aqua and PCA in sklearn? I am working on a data set and did some dimensional reduction on it (using sklearn) to be able to use it in qiskit (near term ...
Moustafa's user avatar
1 vote
1 answer
168 views

Using machine learning to determine a good initial mapping for a quantum circuit

I am trying to use a machine learning model to find a good initial mapping for a quantum circuit. I am trying to minimise the number of swap operations i.e. the number of CNOT gates. This is my ...
Anonymous's user avatar
6 votes
1 answer
253 views

What's new in Quantum Natural Language Processing (QNLP) w.r.t classical NLP?

I recently discovered Cambridge Quantum people have developed lambeq, a quantum natural language processing high-level library. Before diving into it, I'd like to understand more in detail what ...
mpro's user avatar
  • 507
1 vote
1 answer
136 views

Is this Quantum Neural Network overfitting?

In the accuracy graphs (attached the graph images below) shown in this code (Binary Classification for Fraud Detection): validation loss is greater than training loss training accuracy is greater ...
kanha's user avatar
  • 11
2 votes
1 answer
276 views

Tuning hyperparameters of QSVM

While implementing QSVM algorithm and I am facing some problems. I followed this tutorial: https://qiskit.org/documentation/stable/0.24/tutorials/machine_learning/01_qsvm_classification.html While ...
user14924's user avatar
  • 317
6 votes
1 answer
449 views

How linear combination of unitaries gradient work (Qiskit, PennyLane)?

I'm trying to implement linear combination of unitaries(LCU) gradient from Qiskit Gradient Framework but on PennyLane. First, i looked through the source code in Qiskit. In Qiskit LCU gradient if we ...
Natchapol Patamawisut's user avatar
2 votes
0 answers
159 views

How can I change the default mapping function in ZZ feature map?

I am working with QSVM and have been reading a few things about this. I tried QSVM from the qiskit documentation as well. I also went through the link Quantum circuit for the ZZ feature map which ...
quantipai's user avatar
1 vote
0 answers
139 views

Implementing Logistic Regression on IBMQ Hardware

I'm trying to implement a logistic regression inference circuit on NISQ hardware by following some of the proposed approaches below, [1] Hai-Ling Liu et al.Quantum algorithm for logistic regression. ...
user19571's user avatar
1 vote
2 answers
432 views

Quantum GAN implementation

Can anyone provide a good link to understand how to implement qgan using pytorch in qiskit. Trying to understand this ( https://qiskit.org/documentation/machine-learning/tutorials/...
user14924's user avatar
  • 317
1 vote
1 answer
229 views

Kernel ridge regression with qiskit's FeatureMap shows nonlinear patterns outside [0,1] range

I'm implementing a kernel ridge regressor using qiskit's FeatureMap and QuantumKernel to compute the alpha parameters of the solution. If I try to fit my model with non-normalized features I obtain ...
akatief's user avatar
  • 11