quantcore_circuits.kqc_files¶
KQCircuits files that the kqcircuits wheel on PyPI does not ship, taken from KQCircuits itself.
The simulation scripts: KQC’s
export_ansys/export_elmercopy the scripts inkqcircuits.defaults.ANSYS_SCRIPT_PATHS/ELMER_SCRIPT_PATHS(andSIM_SCRIPT_PATH / "elmer_modules") into each job folder. They live in the KQCircuits repository (klayout_package/python/scripts), outside the package.kqcircuits/util/font_polygons.oas: the font of KQC’s polygon labels (ChipFrameand the chips built on it).
A KQCircuits git checkout (editable install) or KQC’s KLayout Salt package has them. quantcore-circuits copies none of KQCircuits’ code: it uses KQCircuits’ own files, found in this order:
KQC’s own location (a checkout, an editable install,
KQC_ROOT_PATH);QCC_KQC_SCRIPTS: theklayout_package/python/scriptsfolder of a KQCircuits checkout (the font is read from the checkout’sklayout_package/python/kqcircuitsbeside it);the user cache that
qcc kqc-filesfills from the KQCircuits release of the installed version on GitHub (QCC_CACHE_DIRmoves the cache).
ensure_kqc_scripts() (before an export) and ensure_kqc_data() (when the KQC libraries load) point KQC at
the first one found, and change nothing when KQC has its own.
Attributes¶
Functions¶
|
The quantcore-circuits user cache ( |
|
The cache folder of one kqcircuits version: |
|
Point KQC's polygon-label font at KQCircuits' own file from |
|
Return the KQCircuits |
|
Fill the cache with KQCircuits' |
|
|
|
The installed kqcircuits version ( |
|
Module Contents¶
- quantcore_circuits.kqc_files.cache_root() pathlib.Path¶
The quantcore-circuits user cache (
QCC_CACHE_DIR, else the platform’s user cache folder).
- quantcore_circuits.kqc_files.cached_root(version: str | None = None) pathlib.Path¶
The cache folder of one kqcircuits version:
scripts/andkqcircuits/util/font_polygons.oas, laid out likeklayout_package/pythonof a checkout.
- quantcore_circuits.kqc_files.ensure_kqc_data() pathlib.Path | None¶
Point KQC’s polygon-label font at KQCircuits’ own file from
QCC_KQC_SCRIPTSor the cache when the installed kqcircuits lacks it. Returns the font file in use (None when there is none; KQC then fails on a label).
- quantcore_circuits.kqc_files.ensure_kqc_scripts() pathlib.Path¶
Return the KQCircuits
scriptsfolder the export uses; point KQC at it when it is not KQC’s own.The lists in
kqcircuits.defaultsare changed in place, so the names KQC’s export modules imported from it see the change;SIM_SCRIPT_PATH(a path imported by name) is also set inelmer_export.
- quantcore_circuits.kqc_files.fetch_kqc_files(version: str | None = None, source: str | pathlib.Path | None = None, force: bool = False) pathlib.Path¶
Fill the cache with KQCircuits’
scriptsfolder and label font forversion(default: the installed one).source: a KQCircuits checkout (or itsklayout_package/pythonfolder), or a source zip, instead of the download of<REPO>/archive/refs/tags/v<version>.zip. Returns the cache folder of that version.
- quantcore_circuits.kqc_files.find_kqc_scripts() tuple[pathlib.Path | None, str]¶
(scripts folder, where): the first complete KQCircuitsscriptsfolder, or(None, "").
- quantcore_circuits.kqc_files.kqc_version() str¶
The installed kqcircuits version (
0.0.1for a checkout without git tags).
- quantcore_circuits.kqc_files.missing_message() str¶
- quantcore_circuits.kqc_files.ENV_CACHE = 'QCC_CACHE_DIR'¶
- quantcore_circuits.kqc_files.ENV_SCRIPTS = 'QCC_KQC_SCRIPTS'¶
- quantcore_circuits.kqc_files.FONT = 'kqcircuits/util/font_polygons.oas'¶
- quantcore_circuits.kqc_files.NEEDED = ('simulations/ansys', 'simulations/post_process')¶
- quantcore_circuits.kqc_files.PY_IN_REPO = 'klayout_package/python'¶
- quantcore_circuits.kqc_files.REPO = 'https://github.com/iqm-finland/KQCircuits'¶