Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Return re-usable values from user facing functions such as bogoliubov_transform #302

@Strilanc

Description

@Strilanc

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions