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

Conversation

@cgranade
Copy link
Contributor

This PR begins work towards #211, and its new API surface should be reviewed carefully before merging to master.

NB: This PR is still a draft, and is intended for early feedback only at this time.

@cgranade
Copy link
Contributor Author

This PR is now pretty close to being ready for review. I think the remaining callables that need attention are the StatePreparationPositiveCoefficients and StatePreparationComplexCoefficients functions. The latter is a straightforward partial application, and appears to only be used contexts where that partial application is entirely extraneous (see d959867 for example). My thought would thus be to remove both functions, adding appropriate type suffixes to PrepareArbitraryState, PrepareArbitraryStateD and PrepareArbitraryStateCP.

@cgranade cgranade force-pushed the cgranade/preparation-quality branch from 9d296de to 4f3de29 Compare January 28, 2020 23:08
@cgranade cgranade marked this pull request as ready for review January 30, 2020 23:30
@cgranade
Copy link
Contributor Author

Marking as ready for review, please take a look!

@cgranade cgranade changed the title WIP: Improvements to M.Q.Preparation namespace. Improvements to M.Q.Preparation namespace. Feb 5, 2020
@cgranade cgranade added Status-Blocked This PR or issue is blocked on another work item; see comments for details. Status-NeedsApiReview This PR requires an API review before merging in. labels Feb 5, 2020
@cgranade
Copy link
Contributor Author

cgranade commented Feb 5, 2020

This PR is currently blocked on #223. (edit: resolved)

@cgranade cgranade linked an issue Feb 5, 2020 that may be closed by this pull request
9 tasks
@cgranade cgranade removed the Status-Blocked This PR or issue is blocked on another work item; see comments for details. label Feb 6, 2020
@cgranade
Copy link
Contributor Author

cgranade commented May 6, 2020

Closing, as this is inconsistent with the changes made for QML with #234.

@cgranade cgranade closed this May 6, 2020
@cgranade cgranade deleted the cgranade/preparation-quality branch May 6, 2020 22:07
msoeken added a commit that referenced this pull request Sep 7, 2020
msoeken added a commit that referenced this pull request Sep 7, 2020
cgranade pushed a commit that referenced this pull request Nov 16, 2020
* Squashed commit of the following:

commit 9841567
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 10:41:17 2020 +0200

    Fix bug in QuantumROM.

commit 9726ff2
Merge: 58d428e 0b02a6a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 09:49:43 2020 +0200

    Merge branch 'master' into msoeken/state-preparation-cleanup

commit 58d428e
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:59:12 2020 +0200

    Cleanup remaining files.

commit b35222a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:54:33 2020 +0200

    Clean-up arbitrary state preparation.

commit e8076f7
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:31:17 2020 +0200

    Cleanup quantum ROM.

commit 860c0ab
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:21:21 2020 +0200

    Cleanup uniform superposition.

commit b94ec8c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Tue Aug 25 15:56:26 2020 +0200

    Cleanup QuantumROM.

* Remove duplicate code and reduce T-count.

* Cleanup.

* Squashed commit of the following:

commit cb77faa
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 16:46:12 2020 +0200

    Fix error.

commit 9841567
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 10:41:17 2020 +0200

    Fix bug in QuantumROM.

commit 9726ff2
Merge: 58d428e 0b02a6a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 09:49:43 2020 +0200

    Merge branch 'master' into msoeken/state-preparation-cleanup

commit 58d428e
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:59:12 2020 +0200

    Cleanup remaining files.

commit b35222a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:54:33 2020 +0200

    Clean-up arbitrary state preparation.

commit e8076f7
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:31:17 2020 +0200

    Cleanup quantum ROM.

commit 860c0ab
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:21:21 2020 +0200

    Cleanup uniform superposition.

commit b94ec8c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Tue Aug 25 15:56:26 2020 +0200

    Cleanup QuantumROM.

* Squashed commit of the following:

commit cde7c0c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 16:34:40 2020 +0200

    Unzipped function.

* Preparing function and tests for QuantumROM with signed coefficients.

* Further unification.

* Ineffecient way of creating sign bit.

* Embed sign computation in multiplex.

* Picking changes from #212.

* Changes from #212.

* Generalize.

* Generalize data register.

* Unifying signatures.

* Use UDT for PurifiedState.

* Docs and cleanup.

* Incoprate API changes.

* Fix bug on Mac.

* Make public because of #239.

* Add deprecated functions.

Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
Co-authored-by: Chris Granade <chgranad@microsoft.com>
cgranade pushed a commit that referenced this pull request Nov 18, 2020
* Cleanup in M.Q.Preparation (#315)

* Cleanup QuantumROM.

* Cleanup uniform superposition.

* Cleanup quantum ROM.

* Clean-up arbitrary state preparation.

* Cleanup remaining files.

* Fix bug in QuantumROM.

* Fix error.

* Revert name due to #239.

* Apply suggestions from code review

Co-authored-by: Chris Granade <chgranad@microsoft.com>

* Addressing reviewer comments.

* Docs.

Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
Co-authored-by: Chris Granade <chgranad@microsoft.com>

* Fix namespace.

* Extend PurifiedMixedState for additional data preparation (#322)

* Squashed commit of the following:

commit 9841567
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 10:41:17 2020 +0200

    Fix bug in QuantumROM.

commit 9726ff2
Merge: 58d428e 0b02a6a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 09:49:43 2020 +0200

    Merge branch 'master' into msoeken/state-preparation-cleanup

commit 58d428e
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:59:12 2020 +0200

    Cleanup remaining files.

commit b35222a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:54:33 2020 +0200

    Clean-up arbitrary state preparation.

commit e8076f7
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:31:17 2020 +0200

    Cleanup quantum ROM.

commit 860c0ab
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:21:21 2020 +0200

    Cleanup uniform superposition.

commit b94ec8c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Tue Aug 25 15:56:26 2020 +0200

    Cleanup QuantumROM.

* Remove duplicate code and reduce T-count.

* Cleanup.

* Squashed commit of the following:

commit cb77faa
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 16:46:12 2020 +0200

    Fix error.

commit 9841567
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 10:41:17 2020 +0200

    Fix bug in QuantumROM.

commit 9726ff2
Merge: 58d428e 0b02a6a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 09:49:43 2020 +0200

    Merge branch 'master' into msoeken/state-preparation-cleanup

commit 58d428e
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:59:12 2020 +0200

    Cleanup remaining files.

commit b35222a
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Thu Aug 27 11:54:33 2020 +0200

    Clean-up arbitrary state preparation.

commit e8076f7
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:31:17 2020 +0200

    Cleanup quantum ROM.

commit 860c0ab
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Wed Aug 26 09:21:21 2020 +0200

    Cleanup uniform superposition.

commit b94ec8c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Tue Aug 25 15:56:26 2020 +0200

    Cleanup QuantumROM.

* Squashed commit of the following:

commit cde7c0c
Author: Mathias Soeken <masoeken@microsoft.com>
Date:   Mon Aug 31 16:34:40 2020 +0200

    Unzipped function.

* Preparing function and tests for QuantumROM with signed coefficients.

* Further unification.

* Ineffecient way of creating sign bit.

* Embed sign computation in multiplex.

* Picking changes from #212.

* Changes from #212.

* Generalize.

* Generalize data register.

* Unifying signatures.

* Use UDT for PurifiedState.

* Docs and cleanup.

* Incoprate API changes.

* Fix bug on Mac.

* Make public because of #239.

* Add deprecated functions.

Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
Co-authored-by: Chris Granade <chgranad@microsoft.com>

* Implement last changes from #344 (#375)

* Implemented changes from #344 review.

* Ported signed quantum ROM test to use WithData.

* Made AssertSignedProbInt internal until #337.

* Apply suggestions from code review

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>

* Apply suggestions from code review

Co-authored-by: Guen P <guenp@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>
Co-authored-by: Mathias Soeken <masoeken@microsoft.com>
Co-authored-by: Guen P <guenp@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Status-NeedsApiReview This PR requires an API review before merging in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Microsoft.Quantum.Preparation for consistency and to use style guide.

3 participants