You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qiskit Aqua version: 0.7., 0.8. up to latest 0.8.1
What is the current behavior?
Using VQE class with a parametrized quantum circuit (i.e. efficientsu2), the energy evaluation function is called with parameters in alphabetical order, and not in numerical order as it happens with method assign_parameters of parametrized quantum circuit.
This leads, for example, to parameters called in order: theta[0], theta[10], theta[11], theta[1], etc... which can cause unexpected behaviors if a program relies on numerical ordering of parameters.
What is the expected behavior?
That the parameters are called in numerical ordering: theta[0], theta[1], theta[2], etc...
Suggested solutions
For the case of parametrized quantum circuit, the class VQAlgorithm in "qiskit-aqua/qiskit/aqua/algorithms/vq_algorithm.py" sorts the parameters in the following way:
while it could behave like the parametrized circuit method assign_parameters, which calls them according to the order of the property ordered_parameters.
The text was updated successfully, but these errors were encountered:
Information
What is the current behavior?
Using VQE class with a parametrized quantum circuit (i.e. efficientsu2), the energy evaluation function is called with parameters in alphabetical order, and not in numerical order as it happens with method assign_parameters of parametrized quantum circuit.
This leads, for example, to parameters called in order: theta[0], theta[10], theta[11], theta[1], etc... which can cause unexpected behaviors if a program relies on numerical ordering of parameters.
What is the expected behavior?
That the parameters are called in numerical ordering: theta[0], theta[1], theta[2], etc...
Suggested solutions
For the case of parametrized quantum circuit, the class
VQAlgorithm
in "qiskit-aqua/qiskit/aqua/algorithms/vq_algorithm.py" sorts the parameters in the following way:while it could behave like the parametrized circuit method
assign_parameters
, which calls them according to the order of the propertyordered_parameters
.The text was updated successfully, but these errors were encountered: