diff --git a/docs/request/index.md b/docs/request/index.md index 877451b..96c3737 100644 --- a/docs/request/index.md +++ b/docs/request/index.md @@ -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 @@ -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" } diff --git a/schemas/get_static/reply_success.schema.json b/schemas/get_static/reply_success.schema.json index bae5b15..c736edc 100644 --- a/schemas/get_static/reply_success.schema.json +++ b/schemas/get_static/reply_success.schema.json @@ -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": { @@ -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",