Skip to content

Optimising functions with Openfermion  #338

@zohimchandani

Description

@zohimchandani

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

Labels

kind/bug-reportSomething doesn't seem to workstatus/staleHas been inactive for a while and may be closed soon

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions