Constructing Hamiltonian which contains a variable

I want to make a hamiltonian for a lattice and decompose it , then run ssvqe algorithm on it to get the band structure of the lattice. so i need to decompose a a hamiltonian which is containing k as variable. Can you help me how to build the code to define the hamiltonian and run the ssvqe on it so that i get continuous energy for each k value?

Hey @Kaushik! Sounds like you’re just starting on this project, so I can give you some good resources to help you along:

Can’t hurt to sift through all of our demos to see if something better fits your needs: Demos | PennyLane

Interestingly, I also found this repo that has SSVQE with PennyLane, but keep in mind that it’s 3 years old and some features might be deprecated or removed altogether. Might help get some ideas flowing though!

Let me know if this helps :slight_smile: