I found one solution using qml.BasisEmbedding(). I am now trying another method by manipulating bits and assign the resulting state vector to the current state so that qml.state() returns my statevector. Suppose I have a statevector [0,0,0,0,0,0,1,0]. How do I assign my statevector to the current state?
I think I mislabeled the codercise number. It should be Codercise 1.11.1 Preparing a basis state.
Hi @mlowe , thank you for your question.
Would you please be able to ask your question on this thread instead? I will answer there. This way others who may have the same question in the future can find it more easily!