-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Labels
kind/bug-reportSomething doesn't seem to workSomething doesn't seem to workstatus/staleHas been inactive for a while and may be closed soonHas been inactive for a while and may be closed soon
Description
I am working on some quantum generative adversarial networks code and have a discriminator which is a function of some parameters multiplied by some expectation value measurements. For example (see below the code) the variable parameters which I would like to optimise given a loss function are the disc_weights which are multiplied by openfermion commands which measure the X and Y expectation values on qubit 0 and 1 respectively.
psi = (disc_weights[0] * QubitOperator('X0') + disc_weights[1] * QubitOperator('Y0') )
When I use a keras optimiser, it recognises disc_weights as a tf.variable but clearly has trouble with the QubitOperator commands. How do I exclude these from the optimisation routine?
Metadata
Metadata
Assignees
Labels
kind/bug-reportSomething doesn't seem to workSomething doesn't seem to workstatus/staleHas been inactive for a while and may be closed soonHas been inactive for a while and may be closed soon