How much can I tweak my variational parameters? #512
-
Hey all! First, I want to express my gratitude to all the contributors to this repo. Your work has been incredibly helpful to me. I have a question and thought this would be the best place to ask. If not, I apologize and am happy to move it elsewhere. Here's my question: Is there a way to constrain multiple parameters to be identical in Yao? For instance, if I have a layer where I apply several gates that all depend on a rotation by some angle One way I thought of was defining the effective layer Another application where this behavior could be beneficial is for example in trying to find the maximum Trotter step that minimizes the energy difference. In that case, one could write the time evolution product of the individual Trotter terms and have a unique time step in each exponential. How it's currently set up all time steps would vary independently. If anyone has experience with this or can point me in the right direction, I would greatly appreciate it! Additionally, if this feature isn't currently available but could be implemented, I would be happy to help contribute to its development. Thank you in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Parameters sharing is supposed to be handled by an external automatic differentiation engine, e.g. Zygote. |
Beta Was this translation helpful? Give feedback.
Parameters sharing is supposed to be handled by an external automatic differentiation engine, e.g. Zygote.
If you do not want to port Yao to an AD engine, you can sum up the gradients for the same variable manually.