Skip to content

Allow circuit.set_parameters to set even the non-trainable ones #1699

@BrunoLiegiBastonLiegi

Description

@BrunoLiegiBastonLiegi

Currently we allow to retrieve all the parameters, including those that are not trainable, from a circuit. However, the inverse function, circuit.set_parameters, only works with the trainable ones.
It would come in handy (for qiboml) to optionally set the non-trainable parameters as well, thus:

circuit.set_parameters(params, include_not_trainable=True)

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions