Describe the bug
Python API dump_machine() represents amplitudes of the state as tuples. This is very inconvenient, since the first thing I need to do with its return is get rid of the global phase, which requires converting the amplitudes to complex type. (The complex global phase shows up even in simple scenarios that use only Ry gates, so I couldn't find a case where having only tuples would suffice.)
To Reproduce
Run dump_machine(), for example, using https://github.com/microsoft/qsharp/blob/36a091c23144014a3f9e64169210a30262f9095f/pip/tests/test_qsharp.py#L63.
Expected behavior
Return a dictionary of complex numbers, similar to Qiskit statevector behavior.
Additional context
I can unpack the tuple representing the amplitude and convert its fields into complex type manually, but I'll need to do it every time I use dump_machine(), so it really makes sense to have the API do it instead.
Describe the bug
Python API
dump_machine()represents amplitudes of the state as tuples. This is very inconvenient, since the first thing I need to do with its return is get rid of the global phase, which requires converting the amplitudes to complex type. (The complex global phase shows up even in simple scenarios that use only Ry gates, so I couldn't find a case where having only tuples would suffice.)To Reproduce
Run
dump_machine(), for example, using https://github.com/microsoft/qsharp/blob/36a091c23144014a3f9e64169210a30262f9095f/pip/tests/test_qsharp.py#L63.Expected behavior
Return a dictionary of complex numbers, similar to Qiskit statevector behavior.
Additional context
I can unpack the tuple representing the amplitude and convert its fields into
complextype manually, but I'll need to do it every time I usedump_machine(), so it really makes sense to have the API do it instead.