microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
joaoboechat/test-get-azdo-userid

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

source/pip/qsharp/__init__.py

79lines · modecode

1# Copyright (c) Microsoft Corporation.
2# Licensed under the MIT License.
3
4"""Deprecated: The ``qsharp`` package has been replaced by ``qdk``.
5
6All functionality previously available in ``qsharp`` is now provided by the
7``qdk`` package. This package is a thin compatibility shim that re-exports the
8``qdk`` public API so that existing code continues to work.
9
10To migrate, replace ``import qsharp`` with ``from qdk import qsharp`` or
11``import qdk`` and use the ``qdk.*`` namespace directly.
12"""
13
14import warnings as _warnings
15
16_warnings.warn(
17 "The 'qsharp' package is deprecated and will be removed in a future release. "
18 "Please use the 'qdk' package instead. "
19 "See https://github.com/microsoft/qdk/wiki/Migrating-from-qsharp-to-qdk for migration guidance.",
20 DeprecationWarning,
21 stacklevel=2,
22)
23
24# Re-export the public API from qdk.qsharp so that existing code keeps working.
25from qdk.qsharp import ( # noqa: F401
26 StateDump,
27 ShotResult,
28 PauliNoise,
29 DepolarizingNoise,
30 BitFlipNoise,
31 PhaseFlipNoise,
32 init,
33 eval,
34 run,
35 compile,
36 circuit,
37 estimate,
38 logical_counts,
39 set_quantum_seed,
40 set_classical_seed,
41 dump_machine,
42 dump_circuit,
43 Result,
44 Pauli,
45 QSharpError,
46 TargetProfile,
47 estimate_custom,
48 CircuitGenerationMethod,
49)
50
51from qdk import telemetry_events
52
53telemetry_events.on_import()
54
55__all__ = [
56 "init",
57 "eval",
58 "run",
59 "set_quantum_seed",
60 "set_classical_seed",
61 "dump_machine",
62 "dump_circuit",
63 "compile",
64 "circuit",
65 "estimate",
66 "estimate_custom",
67 "logical_counts",
68 "Result",
69 "Pauli",
70 "QSharpError",
71 "TargetProfile",
72 "StateDump",
73 "ShotResult",
74 "PauliNoise",
75 "DepolarizingNoise",
76 "BitFlipNoise",
77 "PhaseFlipNoise",
78 "CircuitGenerationMethod",
79]
80