Dump the Bloch sphere coordinates of a Qubit (from the simulator)
Please describe what you would like the feature to accomplish.
I'd like to dump a QuBit from the simulator in the form of Bloch sphere coordinates
Describe the solution you'd like
use qb1 = Qubit();
DumpRegisterAsBlochSphereCoordinates((),[qb1])
Describe alternatives you've considered
I was thinking about dumping the state from the simulator into a text file, parse the text file and calculate the Bloch sphere coordinates.
Additional context
You could use https://docs.microsoft.com/en-us/qsharp/api/qsharp/microsoft.quantum.preparation.blochspherecoordinates
If you're using Q# from Python, the qsharp.capture_diagnostics context manager can be used to extract simulator dumps into QuTiP objects, where you can perform this kind of analysis.
For example:
with qsharp.capture_diagnostics(as_qobj=True) as diag:
RunMain.simulate()
# diag should now contain QuTiP objects for each DumpMachine call in
# RunMain
If you're using Q# from Python,
I'm intending to using q# directly. If this is not working, I'd prefer to use c# over Python. Would you have an example in c#?