qisdebug 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qisdebug/__init__.py +77 -0
- qisdebug/_analysis.py +900 -0
- qisdebug/_breakpoints.py +373 -0
- qisdebug/_cli/__init__.py +2 -0
- qisdebug/_cli/app.py +126 -0
- qisdebug/_cli/commands.py +101 -0
- qisdebug/_compat.py +62 -0
- qisdebug/_config.py +73 -0
- qisdebug/_debug.py +325 -0
- qisdebug/_dispatcher.py +150 -0
- qisdebug/_errors.py +11 -0
- qisdebug/_events.py +470 -0
- qisdebug/_frontends/__init__.py +14 -0
- qisdebug/_frontends/_ascii_charts.py +122 -0
- qisdebug/_frontends/_breakpoints.py +844 -0
- qisdebug/_frontends/_circuit_diff.py +343 -0
- qisdebug/_frontends/_cli_session.py +995 -0
- qisdebug/_frontends/_display.py +25 -0
- qisdebug/_frontends/_guided.py +253 -0
- qisdebug/_frontends/_render.py +956 -0
- qisdebug/_frontends/_tui.py +988 -0
- qisdebug/_frontends/_web/__init__.py +0 -0
- qisdebug/_frontends/_web/app.js +599 -0
- qisdebug/_frontends/_web/index.html +144 -0
- qisdebug/_frontends/_web/style.css +544 -0
- qisdebug/_frontends/base.py +34 -0
- qisdebug/_frontends/bridge.py +441 -0
- qisdebug/_frontends/cli.py +121 -0
- qisdebug/_frontends/detect.py +68 -0
- qisdebug/_frontends/gui.py +86 -0
- qisdebug/_hooks/__init__.py +1 -0
- qisdebug/_hooks/construction.py +226 -0
- qisdebug/_hooks/execution.py +698 -0
- qisdebug/_hooks/transpile.py +601 -0
- qisdebug/_mcp/__init__.py +7 -0
- qisdebug/_mcp/server.py +110 -0
- qisdebug/_mcp/tools.py +654 -0
- qisdebug/_store.py +428 -0
- qisdebug/py.typed +0 -0
- qisdebug/visualizer.py +13 -0
- qisdebug-0.1.0.dist-info/METADATA +436 -0
- qisdebug-0.1.0.dist-info/RECORD +46 -0
- qisdebug-0.1.0.dist-info/WHEEL +5 -0
- qisdebug-0.1.0.dist-info/entry_points.txt +3 -0
- qisdebug-0.1.0.dist-info/licenses/LICENSE +21 -0
- qisdebug-0.1.0.dist-info/top_level.txt +1 -0
qisdebug/__init__.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""QisDebug: zero-touch instrumentation and timeline debugging for Qiskit.
|
|
2
|
+
|
|
3
|
+
Attach full circuit and execution visibility to existing Qiskit code without
|
|
4
|
+
changing it::
|
|
5
|
+
|
|
6
|
+
import qisdebug
|
|
7
|
+
|
|
8
|
+
debug = qisdebug.QisDebug()
|
|
9
|
+
debug.start()
|
|
10
|
+
|
|
11
|
+
# ... build, transpile and run circuits exactly as usual ...
|
|
12
|
+
|
|
13
|
+
print(debug.get(circuit).summary())
|
|
14
|
+
|
|
15
|
+
debug.end()
|
|
16
|
+
|
|
17
|
+
Importing this module has no side effects; nothing is patched until
|
|
18
|
+
:meth:`QisDebug.start` is called, and :meth:`QisDebug.end` restores every
|
|
19
|
+
original method this instance was using. Multiple independently scoped
|
|
20
|
+
``QisDebug()`` instances can be started at once.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
from ._breakpoints import (
|
|
26
|
+
AnomalyCondition,
|
|
27
|
+
BreakpointCondition,
|
|
28
|
+
BreakpointHit,
|
|
29
|
+
GateMatchCondition,
|
|
30
|
+
SeqThresholdCondition,
|
|
31
|
+
WatchThresholdCondition,
|
|
32
|
+
)
|
|
33
|
+
from ._config import QisDebugConfig
|
|
34
|
+
from ._debug import ActivationReport, QisDebug
|
|
35
|
+
from ._errors import QisDebugError, TimelineNotFoundError
|
|
36
|
+
from ._events import (
|
|
37
|
+
EventType,
|
|
38
|
+
ExecutionFinishedEvent,
|
|
39
|
+
ExecutionSubmittedEvent,
|
|
40
|
+
GateEvent,
|
|
41
|
+
NoteEvent,
|
|
42
|
+
PropertySetChanges,
|
|
43
|
+
StateSnapshotEvent,
|
|
44
|
+
TelemetryEvent,
|
|
45
|
+
Timeline,
|
|
46
|
+
TranspileFinishedEvent,
|
|
47
|
+
TranspilePassEvent,
|
|
48
|
+
TranspileStartedEvent,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
__version__ = "0.1.0"
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
"ActivationReport",
|
|
55
|
+
"AnomalyCondition",
|
|
56
|
+
"BreakpointCondition",
|
|
57
|
+
"BreakpointHit",
|
|
58
|
+
"EventType",
|
|
59
|
+
"ExecutionFinishedEvent",
|
|
60
|
+
"ExecutionSubmittedEvent",
|
|
61
|
+
"GateEvent",
|
|
62
|
+
"GateMatchCondition",
|
|
63
|
+
"NoteEvent",
|
|
64
|
+
"PropertySetChanges",
|
|
65
|
+
"QisDebug",
|
|
66
|
+
"QisDebugConfig",
|
|
67
|
+
"QisDebugError",
|
|
68
|
+
"SeqThresholdCondition",
|
|
69
|
+
"StateSnapshotEvent",
|
|
70
|
+
"TelemetryEvent",
|
|
71
|
+
"Timeline",
|
|
72
|
+
"TimelineNotFoundError",
|
|
73
|
+
"TranspileFinishedEvent",
|
|
74
|
+
"TranspilePassEvent",
|
|
75
|
+
"TranspileStartedEvent",
|
|
76
|
+
"WatchThresholdCondition",
|
|
77
|
+
]
|