Skip to content

Adding support for mixed basis during measurement#44

Open
akshaydaf wants to merge 4 commits into
gt-tinker:mainfrom
akshaydaf:mixedbasis
Open

Adding support for mixed basis during measurement#44
akshaydaf wants to merge 4 commits into
gt-tinker:mainfrom
akshaydaf:mixedbasis

Conversation

@akshaydaf
Copy link
Copy Markdown
Contributor

Previously mixed bases such as:

@qpu
def with_phase_60() -> bit[2]:
    return '00' | {'0p', '0m', '1p', '1m'@60}.measure

and

@qpu
def no_phase() -> bit[2]:
    return '00' | {'0p', '0m', '1p', '1m'}.measure

were not working. This change introduces a factor_separable function, which takes in a BasisLiteral and returns a BasisTensor, that the existing lowering code already handles. Additionally, an update was made to the measure path to ignore phases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant