microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
source/pip/qsharp/__init__.py
61lines · modecode
| 1 | # Copyright (c) Microsoft Corporation. |
| 2 | # Licensed under the MIT License. |
| 3 | |
| 4 | from . import telemetry_events |
| 5 | from ._qsharp import ( |
| 6 | init, |
| 7 | eval, |
| 8 | run, |
| 9 | compile, |
| 10 | circuit, |
| 11 | estimate, |
| 12 | set_quantum_seed, |
| 13 | set_classical_seed, |
| 14 | dump_machine, |
| 15 | dump_circuit, |
| 16 | StateDump, |
| 17 | ShotResult, |
| 18 | PauliNoise, |
| 19 | DepolarizingNoise, |
| 20 | BitFlipNoise, |
| 21 | PhaseFlipNoise, |
| 22 | ) |
| 23 | |
| 24 | telemetry_events.on_import() |
| 25 | |
| 26 | from ._native import Result, Pauli, QSharpError, TargetProfile, estimate_custom |
| 27 | |
| 28 | # IPython notebook specific features |
| 29 | try: |
| 30 | if __IPYTHON__: # type: ignore |
| 31 | from ._ipython import register_magic, enable_classic_notebook_codemirror_mode |
| 32 | |
| 33 | register_magic() |
| 34 | enable_classic_notebook_codemirror_mode() |
| 35 | except NameError: |
| 36 | pass |
| 37 | |
| 38 | |
| 39 | __all__ = [ |
| 40 | "init", |
| 41 | "eval", |
| 42 | "run", |
| 43 | "set_quantum_seed", |
| 44 | "set_classical_seed", |
| 45 | "dump_machine", |
| 46 | "dump_circuit", |
| 47 | "compile", |
| 48 | "circuit", |
| 49 | "estimate", |
| 50 | "estimate_custom", |
| 51 | "Result", |
| 52 | "Pauli", |
| 53 | "QSharpError", |
| 54 | "TargetProfile", |
| 55 | "StateDump", |
| 56 | "ShotResult", |
| 57 | "PauliNoise", |
| 58 | "DepolarizingNoise", |
| 59 | "BitFlipNoise", |
| 60 | "PhaseFlipNoise", |
| 61 | ] |
| 62 | |