page_type | languages | products | description | urlFragment | jupyter | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
|
|
Using facts and assertions to diagnose quantum programs in Q#. |
facts-and-assertions |
|
This sample demonstrates:
In this sample, you can use Q# to check the correctness of quantum programs with both facts (functions that check conditions on the values of their inputs) and assertions (operations that check conditions on the state of their inputs). Both facts and assertions can be used together to help understand bugs in quantum programs, and to write unit tests that help ensure that your Q# programs work correctly.
This sample is designed to be run from Jupyter Notebook. To set up your development environment to run Jupyter Notebooks, follow the steps explained in the Q# Quickstart: Jupyter guide.
Once this is set up, from the terminal, you can run the following command:
jupyter notebook
Alternatively, these notebooks can be started and run in the VSCode editor. To get set up with VSCode, please follow the steps laid out in the Q# Quickstart: VSCode guide.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )