Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x Doesn't Seem to Change in MNIST Example #284

Open
egoetz opened this issue Aug 8, 2024 · 1 comment
Open

x Doesn't Seem to Change in MNIST Example #284

egoetz opened this issue Aug 8, 2024 · 1 comment

Comments

@egoetz
Copy link

egoetz commented Aug 8, 2024

I was surprised to find out that the mnist example took in images (referred to as x in the QFCModel code) with a [256, 16] format, where 256 is the batch size and 16 is the shrunken then flattened MNIST image. Why does the quantum circuit take in its examples in [1, 16] format? And how can the gates process this format if they are limited to four wires? Is every element in a given image vector fed in on the same wire or is the image truncated to the first row of its pixels?

I tried to figure out exactly how the gates were processing these images. But when I went to try and print out any changes to the input x as it progressed through encoding and the quantum layer, torch.all(torch.eq(x, old_x)) always returned true. Is x not processed until we call the measure method? If not, how do I correctly evaluate change in-between simulation steps?

@01110011011101010110010001101111
Copy link
Collaborator

To start answering some of your questions, I would recommend checking out the linked paper: https://arxiv.org/abs/1904.04767

From my understanding, the algorithm works by using a randomly generated trainable quantum circuit as a convolution through which groups of pixels can be slightly perturbed. Effectively, the only quantum part is the convolution (thus quanvolution). There are certainly a handful of more quantum algorithms you could explore (ex: QCNN, etc.)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants