In Qiskit I can construct a computational basis statevector in the following fashion
from qiskit.quantum_info import Statevector sv = Statevector.from_label('10') print(sv.data)
[0.+0.j 0.+0.j 1.+0.j 0.+0.j] . If I have the data for a statevector in the computation basis, is there a built-in way to return a corresponding string? For
[0.+0.j 0.+0.j 1.+0.j 0.+0.j] I should get back
'10'. More generally, if the state is not in the computational basis it would be nice to get a linear combination of the basis states.