Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QI2-1126] Added compiler_configs to static reply #11

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/request/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ This message does not require any additional information in the payload section.
| `name` | `str` | Name of the system |
| `pgs` | `list[str]` | Supported primitive gates set of the system. Gate names as described in cQASM (in uppercase). |
| `starttime` | `float` | Timestamp of start-up of the system (return value of `time.time()`) |
| `default_compiler_config` | `dict[str,list[dict[str, Any]]]` | Compiler configurations for different stages. Keys represent stage names (e.g., "decomposition"), and values are list of passes. Each pass includes settings such as the pass name, corresponding method invoked by opensquirrel and additional keyword arguments. |

##### Get static reply example

Expand All @@ -230,7 +231,18 @@ This message does not require any additional information in the payload section.
"X",
"Y"
],
"starttime": 1690061619.610174
"starttime": 1690061619.610174,
"default_compiler_config": {
"decomposition": [
{
"path": "opensquirrel.decomposer.mckay_decomposer.McKayDecomposer",
"method": "decompose",
"arguments": {
"merge_single_qubit_gates": true
}
}
]
}
},
"version": "0.1.0"
}
Expand Down
54 changes: 54 additions & 0 deletions schemas/get_static/reply_success.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
{
"$defs": {
"CompilerConfig": {
"description": "Specifies a series of compiler passes to be applied to the circuit before execution.",
"properties": {
"decomposition": {
"default": [],
"items": {
"$ref": "#/$defs/CompilerPass"
},
"title": "Decomposition",
"type": "array"
}
},
"title": "CompilerConfig",
"type": "object"
},
"CompilerPass": {
"properties": {
"path": {
"description": "Path to OpenSquirrel object that does the compiler pass",
"examples": [
"opensquirrel.decomposer.mckay_decomposer.McKayDecomposer"
],
"title": "Path",
"type": "string"
},
"method": {
"description": "Method on OpenSquirrel object that does the compiler pass",
"examples": [
"decompose"
],
"title": "Method",
"type": "string"
},
"arguments": {
"default": {},
"description": "Arguments for the compiler pass",
"title": "Arguments",
"type": "object"
}
},
"required": [
"path",
"method"
],
"title": "CompilerPass",
"type": "object"
},
"QuantumHardwareStaticData": {
"properties": {
"nqubits": {
Expand Down Expand Up @@ -38,6 +85,13 @@
"title": "Pgs",
"type": "array"
},
"default_compiler_config": {
"$ref": "#/$defs/CompilerConfig",
"default": {
"decomposition": []
},
"description": "A suitable default compiler configuration for the hardware backend"
},
"starttime": {
"description": "Timestamp of start-up of the system (return value of time.time())",
"title": "Starttime",
Expand Down
Loading