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.
Files changed (46) hide show
  1. qisdebug/__init__.py +77 -0
  2. qisdebug/_analysis.py +900 -0
  3. qisdebug/_breakpoints.py +373 -0
  4. qisdebug/_cli/__init__.py +2 -0
  5. qisdebug/_cli/app.py +126 -0
  6. qisdebug/_cli/commands.py +101 -0
  7. qisdebug/_compat.py +62 -0
  8. qisdebug/_config.py +73 -0
  9. qisdebug/_debug.py +325 -0
  10. qisdebug/_dispatcher.py +150 -0
  11. qisdebug/_errors.py +11 -0
  12. qisdebug/_events.py +470 -0
  13. qisdebug/_frontends/__init__.py +14 -0
  14. qisdebug/_frontends/_ascii_charts.py +122 -0
  15. qisdebug/_frontends/_breakpoints.py +844 -0
  16. qisdebug/_frontends/_circuit_diff.py +343 -0
  17. qisdebug/_frontends/_cli_session.py +995 -0
  18. qisdebug/_frontends/_display.py +25 -0
  19. qisdebug/_frontends/_guided.py +253 -0
  20. qisdebug/_frontends/_render.py +956 -0
  21. qisdebug/_frontends/_tui.py +988 -0
  22. qisdebug/_frontends/_web/__init__.py +0 -0
  23. qisdebug/_frontends/_web/app.js +599 -0
  24. qisdebug/_frontends/_web/index.html +144 -0
  25. qisdebug/_frontends/_web/style.css +544 -0
  26. qisdebug/_frontends/base.py +34 -0
  27. qisdebug/_frontends/bridge.py +441 -0
  28. qisdebug/_frontends/cli.py +121 -0
  29. qisdebug/_frontends/detect.py +68 -0
  30. qisdebug/_frontends/gui.py +86 -0
  31. qisdebug/_hooks/__init__.py +1 -0
  32. qisdebug/_hooks/construction.py +226 -0
  33. qisdebug/_hooks/execution.py +698 -0
  34. qisdebug/_hooks/transpile.py +601 -0
  35. qisdebug/_mcp/__init__.py +7 -0
  36. qisdebug/_mcp/server.py +110 -0
  37. qisdebug/_mcp/tools.py +654 -0
  38. qisdebug/_store.py +428 -0
  39. qisdebug/py.typed +0 -0
  40. qisdebug/visualizer.py +13 -0
  41. qisdebug-0.1.0.dist-info/METADATA +436 -0
  42. qisdebug-0.1.0.dist-info/RECORD +46 -0
  43. qisdebug-0.1.0.dist-info/WHEEL +5 -0
  44. qisdebug-0.1.0.dist-info/entry_points.txt +3 -0
  45. qisdebug-0.1.0.dist-info/licenses/LICENSE +21 -0
  46. 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
+ ]