Skip to content

Commit

Permalink
Add TocGrouping
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Nov 15, 2024
1 parent 35b69c3 commit ecd173d
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 84 deletions.
171 changes: 88 additions & 83 deletions docs/api/qiskit-addon-mpf/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,109 +6,114 @@
"url": "/api/qiskit-addon-mpf"
},
{
"title": "qiskit_addon_mpf.backends",
"url": "/api/qiskit-addon-mpf/backends"
},
{
"title": "qiskit_addon_mpf.backends.quimb_circuit",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit"
},
{
"title": "CircuitEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit-circuit-evolver"
},
{
"title": "CircuitState",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit-circuit-state"
}
]
"title": "qiskit_addon_mpf.static",
"url": "/api/qiskit-addon-mpf/static"
},
{
"title": "qiskit_addon_mpf.backends.quimb_layers",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers"
},
{
"title": "LayerModel",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers-layer-model"
},
{
"title": "LayerwiseEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers-layerwise-evolver"
}
]
"title": "qiskit_addon_mpf.dynamic",
"url": "/api/qiskit-addon-mpf/dynamic"
},
{
"title": "qiskit_addon_mpf.backends.quimb_tebd",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd"
},
{
"title": "MPOState",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd-mpo-state"
},
{
"title": "TEBDEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd-tebd-evolver"
}
]
"title": "qiskit_addon_mpf.costs",
"url": "/api/qiskit-addon-mpf/costs"
},
{
"title": "qiskit_addon_mpf.backends.tenpy_layers",
"title": "qiskit_addon_mpf.backends",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers"
"title": "qiskit_addon_mpf.backends",
"url": "/api/qiskit-addon-mpf/backends"
},
{
"title": "LayerModel",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers-layer-model"
"title": "qiskit_addon_mpf.backends.quimb_circuit",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit"
},
{
"title": "CircuitEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit-circuit-evolver"
},
{
"title": "CircuitState",
"url": "/api/qiskit-addon-mpf/backends-quimb-circuit-circuit-state"
}
]
},
{
"title": "LayerwiseEvolver",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers-layerwise-evolver"
}
]
},
{
"title": "qiskit_addon_mpf.backends.tenpy_tebd",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd"
"title": "qiskit_addon_mpf.backends.quimb_layers",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers"
},
{
"title": "LayerModel",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers-layer-model"
},
{
"title": "LayerwiseEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-layers-layerwise-evolver"
}
]
},
{
"title": "MPOState",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-mpo-state"
"title": "qiskit_addon_mpf.backends.quimb_tebd",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd"
},
{
"title": "MPOState",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd-mpo-state"
},
{
"title": "TEBDEvolver",
"url": "/api/qiskit-addon-mpf/backends-quimb-tebd-tebd-evolver"
}
]
},
{
"title": "MPS_neel_state",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-mps-neel-state"
"title": "qiskit_addon_mpf.backends.tenpy_layers",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers"
},
{
"title": "LayerModel",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers-layer-model"
},
{
"title": "LayerwiseEvolver",
"url": "/api/qiskit-addon-mpf/backends-tenpy-layers-layerwise-evolver"
}
]
},
{
"title": "TEBDEvolver",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-tebd-evolver"
"title": "qiskit_addon_mpf.backends.tenpy_tebd",
"children": [
{
"title": "Module overview",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd"
},
{
"title": "MPOState",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-mpo-state"
},
{
"title": "MPS_neel_state",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-mps-neel-state"
},
{
"title": "TEBDEvolver",
"url": "/api/qiskit-addon-mpf/backends-tenpy-tebd-tebd-evolver"
}
]
}
]
},
{
"title": "qiskit_addon_mpf.costs",
"url": "/api/qiskit-addon-mpf/costs"
},
{
"title": "qiskit_addon_mpf.dynamic",
"url": "/api/qiskit-addon-mpf/dynamic"
},
{
"title": "qiskit_addon_mpf.static",
"url": "/api/qiskit-addon-mpf/static"
}
],
"collapsed": true
Expand Down
7 changes: 6 additions & 1 deletion scripts/js/lib/api/Pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import { join } from "path/posix";

import { findSeparateReleaseNotesVersions } from "./releaseNotes.js";
import { determineHistoricalQiskitGithubUrl } from "../qiskitMetapackage.js";
import { TocGrouping, QISKIT_TOC_GROUPING } from "./TocGrouping.js";
import {
TocGrouping,
QISKIT_TOC_GROUPING,
QISKIT_ADDON_MPF_GROUPING,
} from "./TocGrouping.js";

export class ReleaseNotesConfig {
readonly enabled: boolean;
Expand Down Expand Up @@ -146,6 +150,7 @@ export class Pkg {
githubSlug: "Qiskit/qiskit-addon-mpf",
kebabCaseAndShortenUrls: true,
releaseNotesConfig: new ReleaseNotesConfig({ enabled: false }),
tocGrouping: QISKIT_ADDON_MPF_GROUPING,
});
}
if (name === "qiskit-addon-sqd") {
Expand Down
36 changes: 36 additions & 0 deletions scripts/js/lib/api/TocGrouping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export type TocGrouping = {
moduleToSection: (module: string) => string | undefined;
};

// --------------------------------------------------------------------------------------------------
// Qiskit SDK
// --------------------------------------------------------------------------------------------------

// Qiskit section names
const _CIRCUITS = "Circuit construction";
const _TRANSPILATION = "Transpilation";
Expand Down Expand Up @@ -175,3 +179,35 @@ export const QISKIT_TOC_GROUPING: TocGrouping = {
entries: QISKIT_ENTRIES,
moduleToSection: qiskitModuleToSection,
};

// --------------------------------------------------------------------------------------------------
// qiskit-addon-mpf
// --------------------------------------------------------------------------------------------------

export const QISKIT_ADDON_MPF_GROUPING: TocGrouping = {
entries: [
{
moduleId: "qiskit_addon_mpf.static",
title: "qiskit_addon_mpf.static",
kind: "module",
},
{
moduleId: "qiskit_addon_mpf.dynamic",
title: "qiskit_addon_mpf.dynamic",
kind: "module",
},
{
moduleId: "qiskit_addon_mpf.costs",
title: "qiskit_addon_mpf.costs",
kind: "module",
},
{
name: "qiskit_addon_mpf.backends",
kind: "section",
},
],
moduleToSection: (module) =>
hasPrefix(module, ["qiskit_addon_mpf.backends"])
? "qiskit_addon_mpf.backends"
: undefined,
};

0 comments on commit ecd173d

Please sign in to comment.