quantcore_circuits.selftest =========================== .. py:module:: quantcore_circuits.selftest .. autoapi-nested-parse:: ``qcc selftest``: does this install work? pip cannot run tests while it installs, so this is the check to run right after an install (the install scripts in ``scripts/install_sim_pc.*`` call it). One line per check, ``ok`` / ``FAIL`` / ``skip``; the exit code is non-zero when any check failed. It never starts AEDT and runs no solver. Checks: the imports of the core and of every extra (with versions), then a small Q1 + R1 chip shipped as package data (``data/selftest_q1_r1.json``): build, DRC, the layout LOM netlist, a LOM simulation (needs the ``analysis`` extra), one simulation job exported into a temporary folder, and whether ``ansysedt`` is found. Attributes ---------- .. autoapisummary:: quantcore_circuits.selftest.DESIGN_RESOURCE quantcore_circuits.selftest.IMPORTS quantcore_circuits.selftest.OPTIONAL Classes ------- .. autoapisummary:: quantcore_circuits.selftest.Check Functions --------- .. autoapisummary:: quantcore_circuits.selftest.find_ansysedt quantcore_circuits.selftest.main quantcore_circuits.selftest.run_checks Module Contents --------------- .. py:class:: Check .. py:method:: line() -> str .. py:attribute:: detail :type: str :value: '' .. py:attribute:: name :type: str .. py:attribute:: seconds :type: float :value: 0.0 .. py:attribute:: status :type: str .. py:function:: find_ansysedt() -> tuple[str, str] (status, detail): whether ``ansysedt`` is found. Looks for the file only; AEDT is never started. .. py:function:: main(allow_missing: bool = False, as_json: bool = False) -> int .. py:function:: run_checks(allow_missing: bool = False, emit: collections.abc.Callable[[Check], None] | None = None) -> list[Check] Run all checks in order; ``emit`` is called with each as it finishes. .. py:data:: DESIGN_RESOURCE .. py:data:: IMPORTS :type: dict[str, list[tuple[str, str, str]]] .. py:data:: OPTIONAL :value: [('torch', 'torch', 'torch')]