0

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?

glS
  • 24,660
  • 5
  • 34
  • 108
Fabio Dias
  • 21
  • 1

1 Answers1

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