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

Update tutorial_variational_classifier to torch #971

Open
KetpuntoG opened this issue Nov 1, 2023 · 0 comments
Open

Update tutorial_variational_classifier to torch #971

KetpuntoG opened this issue Nov 1, 2023 · 0 comments

Comments

@KetpuntoG
Copy link
Contributor

One of the tasks I am working on is to move some demos to torch or jax instead of autograd (from pennylane import numpy should not appear in the demo). The demo tutorial_variational_classifier is a demo that I have to change to torch but I have not managed to do it.

The problem I have I think is in the batching.
The demo is divided into two examples, I have managed to make the first one work with a standard torch flow and by changing the statepreparation to

def statepreparation(x):
    qml.AngleEmbedding(np.pi * x, wires = [0,1,2,3], rotation = "X")

The reason for this is that it allows me to do batching and introduce it into the torch workflow.
The second example is a very particular ansatz and I am failing to it the example torch-compatible.

@KetpuntoG KetpuntoG changed the title Change `tutorial_variational_classifier to torch Update tutorial_variational_classifier to torch Nov 1, 2023
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

1 participant