Add DumpMachine %config option to print ket notation of state
Describe the solution you'd like It would be great to have a %config option to set DumpMachine to print the quantum state of the program as an expression in ket notation. This would allow to replace the following display

with a shorter and often more readable formula

Additional context Tagging @guenp per offline discussion to see whether the quantum calculator or its fragments can be used for this.
Some more details as per @anjbur's request. This is a project I prototyped in Python. The idea is to output the results of a calculation in ket notation, as shown in the screenshot above. To do so, you'll need the following elements:
- [ ] a function that estimates the closest square root of a floating point number. For instance,
estimate_squareroot(0.7071)should returnsqrt(2). - [ ] a data structure that represents a complex number with square root constants.
- [ ] a function that formats the above data structure into LaTeX/MathJax notation to output as HTML.
If it's helpful to anyone working on this, I took a quick stab at writing out the first part (approximating floating point numbers) a little while ago, and it turns out not too hard to do in C#:

To integrate into IQ# would take modifying the StateVectorToHtmlEncoder class. Its constructor takes an object that can be used to look at configuration options:
https://github.com/microsoft/iqsharp/blob/d75f203ef70910b92500b861f34fd3fdad1f0944/src/Jupyter/Visualization/StateDisplayEncoders.cs#L260-L263
From there, would need to then use a new option where the amplitude is formatted as a string: https://github.com/microsoft/iqsharp/blob/d75f203ef70910b92500b861f34fd3fdad1f0944/src/Jupyter/Visualization/StateDisplayEncoders.cs#L374-L374