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 Dec 11, 2019

Implements #154

@msoeken msoeken added the Kind-Enhancement New feature or request label Dec 11, 2019
@msoeken msoeken requested review from cgranade and vadym-kl December 11, 2019 08:12
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.

This looks like a really good start, thanks for adding this! I think my main area of suggestions would be around the API exposed by this feature. Perhaps it would be worth discussing the API in a little more detail? Thanks!

Copy link
Member Author

@msoeken msoeken left a comment

Choose a reason for hiding this comment

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

Thanks for your comments.

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.

(Sorry, hit the wrong button and didn't mean to submit a review— seems that you can't delete a review, though?)

@cgranade
Copy link
Contributor

Thanks for your comments.

Thanks for adding this feature, that will be really good to have in! 💕

@msoeken msoeken requested a review from cgranade December 18, 2019 11:04
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.

Looks great, thank you so much for the addition! I just had a couple minor suggestions left, but otherwise I think this is ready. Thanks again!

Comment on lines 274 to 275
mutable qs = new Qubit[2^numControls];
set qs w/= 0 <- target;
Copy link
Contributor

Choose a reason for hiding this comment

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

Very minor, but these could be collapsed into a single statement:

Suggested change
mutable qs = new Qubit[2^numControls];
set qs w/= 0 <- target;
mutable qs = new Qubit[2^numControls] w/ 0 <- target;

Mathias Soeken and others added 2 commits December 18, 2019 23:26
Co-Authored-By: Chris Granade <chgranad@microsoft.com>
@msoeken
Copy link
Member Author

msoeken commented Dec 18, 2019

Thanks for the comments. I integrated them and made some more simplifications and added some more references. From my side it's done now.

@cgranade cgranade merged commit 6c9561a into master Dec 19, 2019
@msoeken msoeken deleted the msoeken/and branch December 19, 2019 07:47
cgranade pushed a commit that referenced this pull request Jan 8, 2020
* Clarify the restriction on the number of bits for IntAsBoolArray (#171)

* Clarify the restriction on the number of bits for IntAsBoolArray

This should fix #166 by providing a more specific error message.

* Update Standard/src/Convert/Convert.qs

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Allow to have bits = 0

Looks like our tests assume that number = 0 with bits = 0 is a valid scenario; updating the change to account for that

* Package updates (#188)

* Quantum AND gates (a.k.a. CCNOT with constant target) (#186)

* Two AND gate implementations.

* Added test case.

* Formatting.

* Code formatting.

* Update Standard/src/Canon/And.qs

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Assertion for 0-target.

* Added DOI to references.

* Named application for CCNOTop.

* Rename operations.

* Add Test attribute.

* Add links to arXiv.

* Rename operations.

* Better assertion for 0-target.

* Fix bug in LowDepthAnd.

* Docs.

* Doc string convention.

* Controlled variant for `ApplyAnd`.

* Controlled AndLowDepth.

* Adjoint Controlled LowDepthAnd.

* References.

* Simplify code.

* Apply suggestions from code review

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Integrate comment.

* Removed comment ref to IncrementByIntegerPhaseLE (#189)

There appears to be no function IncrementByIntegerPhaseLE, and I guess it is covered by ApplyLEOperationOnPhaseLE.

Co-authored-by: Chris Granade <cgranade@gmail.com>

* New Hadamard and SWAP test operations. (#196)

* First work on Hadamard and SWAP test operations.

* (c) header and typo fix.

* Fixed typo with placement of phase shift.

* Put public operations above private.

* Added tests for new operations.

* Added API documentation comments.

* Newline at end of file.

* Refactor AA namespace to use Q# style guide (#197)

* Began simplifying AA interface.

* Expose traditional AA as new public operation.

* Removed rest of "AmpAmp" prefix.

* Resolve deprecation warning.

* Switching to using the new Sdk (#194)

* Minor doc fixes (#190)

* Minor doc fixes

* Minor doc cleanup

There are probably still some unstated assumptions on the algorithms.

* Add "# Description" for MultiplyByModularInteger

...because there is inline math.

Co-Authored-By: Chris Granade <cgranade@gmail.com>

* "unitary operation" instead of "unitary operator"

Co-Authored-By: Chris Granade <cgranade@gmail.com>

* Add "# Description", remove refs in "# Summary"

Co-authored-by: Chris Granade <cgranade@gmail.com>

* Fix build by updating QML projects to use SDK.

Co-authored-by: Mariia Mykhailova <michaylova@gmail.com>
Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
Co-authored-by: Mathias Soeken <mathias.soeken@gmail.com>
Co-authored-by: numpde <21158052+numpde@users.noreply.github.com>
cgranade pushed a commit that referenced this pull request Jan 13, 2020
* Clarify the restriction on the number of bits for IntAsBoolArray (#171)

* Clarify the restriction on the number of bits for IntAsBoolArray

This should fix #166 by providing a more specific error message.

* Update Standard/src/Convert/Convert.qs

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Allow to have bits = 0

Looks like our tests assume that number = 0 with bits = 0 is a valid scenario; updating the change to account for that

* Package updates (#188)

* Quantum AND gates (a.k.a. CCNOT with constant target) (#186)

* Two AND gate implementations.

* Added test case.

* Formatting.

* Code formatting.

* Update Standard/src/Canon/And.qs

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Assertion for 0-target.

* Added DOI to references.

* Named application for CCNOTop.

* Rename operations.

* Add Test attribute.

* Add links to arXiv.

* Rename operations.

* Better assertion for 0-target.

* Fix bug in LowDepthAnd.

* Docs.

* Doc string convention.

* Controlled variant for `ApplyAnd`.

* Controlled AndLowDepth.

* Adjoint Controlled LowDepthAnd.

* References.

* Simplify code.

* Apply suggestions from code review

Co-Authored-By: Chris Granade <chgranad@microsoft.com>

* Integrate comment.

* Removed comment ref to IncrementByIntegerPhaseLE (#189)

There appears to be no function IncrementByIntegerPhaseLE, and I guess it is covered by ApplyLEOperationOnPhaseLE.

Co-authored-by: Chris Granade <cgranade@gmail.com>

* New Hadamard and SWAP test operations. (#196)

* First work on Hadamard and SWAP test operations.

* (c) header and typo fix.

* Fixed typo with placement of phase shift.

* Put public operations above private.

* Added tests for new operations.

* Added API documentation comments.

* Newline at end of file.

* Refactor AA namespace to use Q# style guide (#197)

* Began simplifying AA interface.

* Expose traditional AA as new public operation.

* Removed rest of "AmpAmp" prefix.

* Resolve deprecation warning.

* Begin moving classifier structure creation to Q#.

* Moving example datasets into new namespace.

* Fix datasets used in layered structure demo.

* Fixed bug with cyclic entangling layer.

* Use new Hadamard test operation to simplify grad est.

* Simplify input encoder logic.

* Removed layer construction methods moved out to Q#.

* Revised name of approximate input encoder.

* Removed unused interop library.

* Update pack script for new layout.

* Addressing feedback.

Co-authored-by: Mariia Mykhailova <michaylova@gmail.com>
Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
Co-authored-by: Mathias Soeken <mathias.soeken@gmail.com>
Co-authored-by: numpde <21158052+numpde@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Kind-Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants