This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 180
Extend PurifiedMixedState for additional data preparation #322
Merged
cgranade
merged 23 commits into
feature/state-preparation
from
msoeken/state-preparation-sign
Nov 16, 2020
Merged
Extend PurifiedMixedState for additional data preparation #322
cgranade
merged 23 commits into
feature/state-preparation
from
msoeken/state-preparation-sign
Nov 16, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
commit cde7c0c Author: Mathias Soeken <masoeken@microsoft.com> Date: Mon Aug 31 16:34:40 2020 +0200 Unzipped function.
guenp
suggested changes
Sep 23, 2020
| // Uncompute flag qubit. | ||
| (ControlledOnBitString(bits, X))(qubits!, flag); | ||
| Reset(flag); | ||
| operation AssertSignedProbInt(stateIndex : Int, expected : Double, sign : Qubit, qubits : LittleEndian, tolerance : Double) : Unit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to add a docstring here?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, there should be a doctoring here. I'll add it with the next commit.
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferring to the next PR as part of completing work on #344.
guenp
approved these changes
Nov 16, 2020
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I refactored
QuantumROMto (i) incorporate the changes planned in #212 and (ii) to allow the preparation of additional data with the concrete example of preparing the sign of the passed coefficients.I also updated Chemistry and MachineLearning projects to adjust to the new changes.