We want to train a parameterised circuit(which is our neural network - from this paper. Now our final circuit looks a little like enter image description here

Let's say there are n training cases. So I have n |gt> vectors along with n (alpha,beta and gamma). Currently I am trying to use minimize function from scipy to find these parameters, the objective function that has been passed makes n circuits(each for one training case) and then uses SWAP test to see how close the final state generated from our circuit is to the |gt> state for particular case, this would be the cost for one case. Now the final cost is the root of sum of all the costs squared. This is mainly motivated from - https://qiskit.org/textbook/ch-demos/variational-quantum-regression.html

Here is the main problem - it is not getting optimised, now I know this is not an efficient approach and might not work but it is not working at all. Does any one know how we can do this more efficiently such that the training actually works. Thanks any help is greatly appreciated



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.