Fixed https://github.com/eclipse/xacc/issues/509
- Gradient strategies to filter out non-observing circuits associated with identity term.
- For two-sided gradients (central and parameter shift), the identity term has no effect. For single-sided ones (forward and backward), add the identity coefficient in the shifted enery value.
- Fixed an oversight in setting optional 'step' param. It was only set in the ctor, but not reset during initialization. Hence, it may carry the value set by a previous run.
- Added a set of unit test cases covering 'shots' mode
Signed-off-by:
Thien Nguyen <thien.md.nguyen@gmail.com>
Please register or sign in to comment