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
We visualize quantum state in a few places (DumpMachine, playground, debugger...) It is a list of amplitudes for all basis vectors (maybe including additional information such as phase, probability, etc). Such visualization isn't always intuitive and is getting very large fast with larger number of qubits.
We should consider providing alternative ways of this visualization.
We are omitting basis vectors with 0 (or near-0) amplitudes. If the space to display the state is limited, the output may be sorted by the magnitude of the amplitude and only top of the list shown with an option to expand.
When we show basis state it is not clear which qubit corresponds to which variable. For example, we may have |010> basis state. An explanation may be added that the order is q0, q1, target. I.e., the first 0 is the value of q0, the second 1 is the value of q1, and the last 0 is the value of target.
User may only be interested in a part of the quantum state - say, only state for qubits a and b. We could use something similar to the QDK's DumpRegister function to display only the relevant information. An open question is what to do if register qubits are entangled with the rest of the system. (DoneAdd DumpRegister #1173)
For some interesting values of amplitudes, we may have representation in radicals. For example, instead of displaying 0.70710678118654, we may show √2 / 2. (DoneAlternative State Visualization #1162)
We can recognize certain states, For example, instead of displaying
|0⟩ √2 / 2
|1⟩ √2 / 2
we can display a LaTeX formula with nice coefficients: √2/2 · ( |0⟩+|1⟩ ). (Partially done#1162)
Potential future items to recognize:
* Recognize trigonometric form, such as sin(𝝅/8) or cos(1).
* Recognize common normalization coefficient, such as 1/2 ( |00⟩ + |01⟩ + |10⟩ + |11⟩ )
* Recognize well-known states such as: |0> |1> |+> |-> |Bell> |CATn>
If the state is separable, it would be nice to show it as a tensor product.
We visualize quantum state in a few places (DumpMachine, playground, debugger...) It is a list of amplitudes for all basis vectors (maybe including additional information such as phase, probability, etc). Such visualization isn't always intuitive and is getting very large fast with larger number of qubits.
We should consider providing alternative ways of this visualization.
We are omitting basis vectors with 0 (or near-0) amplitudes. If the space to display the state is limited, the output may be sorted by the magnitude of the amplitude and only top of the list shown with an option to expand.
When we show basis state it is not clear which qubit corresponds to which variable. For example, we may have |010> basis state. An explanation may be added that the order is
q0, q1, target. I.e., the first 0 is the value ofq0, the second 1 is the value ofq1, and the last 0 is the value oftarget.User may only be interested in a part of the quantum state - say, only state for qubits
aandb. We could use something similar to the QDK's DumpRegister function to display only the relevant information. An open question is what to do if register qubits are entangled with the rest of the system. (Done Add DumpRegister #1173)For some interesting values of amplitudes, we may have representation in radicals. For example, instead of displaying 0.70710678118654, we may show √2 / 2. (Done Alternative State Visualization #1162)
We can recognize certain states, For example, instead of displaying
we can display a LaTeX formula with nice coefficients: √2/2 · ( |0⟩+|1⟩ ). (Partially done #1162)
Potential future items to recognize:
For example, instead of displaying
We can display |+⟩⊗|+⟩. But we also should combine states for a more concise display, such as |10⟩ is preferable to |1⟩⊗|0⟩.
(From discussion) Bring back DumpOperation. Potentially display matrix on hover for simple operations.
(From discussion) What-if scenarios. Take current state in the debugger and show what would happen if some operation is applied.