myQLM/myqlm-fermion

Error running AdaptVQE

Closed this issue · 1 comments

I'm having an error when running the attached script. It works nicely without AdaptVQE but when I insert it in the stack and launch the job on QLMAAS the result object contains the following error:

qat.comm.exceptions.ttypes.PluginException: PluginException(code=None, modulename='qat.plugins.junction', message='Caught exception from junction: "<class 'super'> returned a result with an error set" [see /tmp/tmpnqozg3oy.junction.log for traceback info]', file=None, line=None)

I'm sending the job to qlm35e and my version of qlmaas is 1.7.2 running on python 3.9.16

adapt_error.txt

Dear @Buffoni,

The x0 argument of ScipyMinimizePlugin is expected to be a list of numbers (not qat-lang variables). Our plugin rely on the minimize function from scipy and this parameter is used to define the initial value for each angle composing your circuit.

This x0 parameter is not mandatory, then, you can simply define your plugin like that:

# Define plugin without x0 parameter
optimizer_plugin = ScipyMinimizePlugin(method="COBYLA", tol=1e-3, options={"maxiter": 200})

Then, your circuit is useable on both myQLM and QLMaaS.