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
{{ message }}
This repository was archived by the owner on Mar 15, 2022. It is now read-only.
In quantumlib/Cirq#1087@Wuggins was surprised by the fact that they couldn't use the result of bogoliubov_transform transform twice (i.e. iterate it twice). I think it is a reasonable expectation that many users will have for the result to be reusable. We should be careful to always return values that can be re-used, though internally we will always be careful to allow users to give us values that can only be used once and work correctly despite that limitation.
To resolve this issue, we need to audit every method returning OP_TREE and check if it is exposed to users (for example, it is fine for _decompose_ methods to return OP_TREE because cirq.decompose takes care of it for you).
In quantumlib/Cirq#1087 @Wuggins was surprised by the fact that they couldn't use the result of
bogoliubov_transformtransform twice (i.e. iterate it twice). I think it is a reasonable expectation that many users will have for the result to be reusable. We should be careful to always return values that can be re-used, though internally we will always be careful to allow users to give us values that can only be used once and work correctly despite that limitation.To resolve this issue, we need to audit every method returning
OP_TREEand check if it is exposed to users (for example, it is fine for_decompose_methods to returnOP_TREEbecausecirq.decomposetakes care of it for you).