Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@msoeken
Copy link
Member

@msoeken msoeken commented Sep 8, 2020

This is a proposal to fix #221. It adds an assertion that the input state is in state |0...0>. The assertion will also get triggered when calling the Adjoint variant on a state that is not in a uniform superposition. Ideally, we would check whether the state is eventually in a uniform superposition, but this may add too much overhead.

@msoeken msoeken requested a review from cgranade September 8, 2020 16:09
@cgranade
Copy link
Contributor

cgranade commented Sep 8, 2020

I think this makes a lot of sense, though I'd also suggest adding an explicit note to the API documentation comment, since its not obvious a priori that the operation is adjointable only as a partial isometry and not as a unitary.

Copy link
Contributor

@cgranade cgranade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, modulo comment about documentation. Thanks!

@msoeken msoeken merged commit b802b25 into master Sep 8, 2020
@msoeken msoeken deleted the msoeken/uniform branch September 8, 2020 18:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PrepareUniformSuperposition is not generally adjointable

3 participants