You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
Please describe what you would like the feature to accomplish. DumpMachine is one of the key features for a person who starts learning quantum computing using Q#. Unfortunately, the little-endian labels and ordering of the basis states gets new learners confused in most of cases. IQ# tries to solve this by introducing different formats of labeling (little endian vs big endian vs bit string), but I'd really like to see a similar feature in regular Q# projects, since I do most Q# coding and debugging in VS.
Describe the solution you'd like
Add a parameter to DumpMachine that would allow user to switch between little endian, big endian and bit string formats and orderings of the basis vectors in the output.
Describe alternatives you've considered
So far I have to stick to explaining the output of DumpMachine in great detail, but it still doesn't help the learners.
Side note
Adding an extra parameter to DumpMachine is going to be a fairly painful breaking change, but it would simplify microsoft/iqsharp#126 - it would allow the user to configure the output of DumpMachine directly rather than by configurations, so that running the same code in Notebooks and in VS Code produces the same results.
The text was updated successfully, but these errors were encountered:
As a matter of Q# APIs, I think we shouldn't add an extra parameter to DumpMachine. After all, only the quantum simulator even dumps a state in particular, such that a new parameter for formatted output would expose simulator internals at the level of Q#, when it's really a host program configuration option. That's a large part of why the current design in IQ# allows the use of the %config magic for configuring output, for example.
I've been just reminded of how valuable this capability would be: I had an 8-qubit quantum state that had only 2 non-zero basis states in a Q# unit test project, and the ability to use dump.truncateSmallAmplitudes there would've been priceless (it could've been a 16-qubit state!)
@cgranade, @bettinaheim, any thoughts on how to enable configuring DumpMachine output outside of IQ#, in Q# standalone mode?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please describe what you would like the feature to accomplish.
DumpMachine
is one of the key features for a person who starts learning quantum computing using Q#. Unfortunately, the little-endian labels and ordering of the basis states gets new learners confused in most of cases. IQ# tries to solve this by introducing different formats of labeling (little endian vs big endian vs bit string), but I'd really like to see a similar feature in regular Q# projects, since I do most Q# coding and debugging in VS.Describe the solution you'd like
Add a parameter to
DumpMachine
that would allow user to switch between little endian, big endian and bit string formats and orderings of the basis vectors in the output.Describe alternatives you've considered
So far I have to stick to explaining the output of
DumpMachine
in great detail, but it still doesn't help the learners.Side note
Adding an extra parameter to DumpMachine is going to be a fairly painful breaking change, but it would simplify microsoft/iqsharp#126 - it would allow the user to configure the output of DumpMachine directly rather than by configurations, so that running the same code in Notebooks and in VS Code produces the same results.
The text was updated successfully, but these errors were encountered: