Is there a way to create an arbitrary state in Q# just for debugging purposes in the local computer via the quantum full state simulator?
Asked
Active
Viewed 57 times
1 Answers
1
Modern QDK (version 1.*): You can use the library operations PreparePureStateD (arbitrary real amplitudes) or ApproximatelyPreparePureStateCP (complex amplitudes, with a possibility of approximate state preparation) to prepare an arbitrary state starting from the $|0..0\rangle$ state.
Classic QDK (version 0.*): You can use the library operations PrepareArbitraryStateD (real non-negative amplitudes) or PrepareArbitraryStateCP (complex amplitudes) to prepare an arbitrary state starting from the $|0..0\rangle$ state.
Mariia Mykhailova
- 9,000
- 1
- 12
- 39