{
    "type": "object",
    "description": "JSON schema for a quantify sequencer operation.",
    "additionalProperties": false,
    "required": [
        "name",
        "gate_info",
        "pulse_info",
        "logic_info",
        "acquisition_info"
    ],
    "properties": {
        "name": {
            "type": "string"
        },
        "gate_info": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "unitary": {
                    "description": "A unitary matrix describing the operation."
                },
                "operation_type": {
                    "description": "Defines what class of operations this gate refers to (e.g. Rxy, CZ etc.).",
                    "type": "string"
                },
                "qubits": {
                    "description": "Deprecated. A list of strings indicating the qubits the gate acts on. Valid qubits are strings that appear in the device_config.json file.",
                    "type": "array"
                },
                "device_elements": {
                    "description": "A list of strings indicating the device_elements the gate acts on. Valid device_elements are strings that appear in the device_config.json file.",
                    "type": "array"
                },
                "symmetric": {
                    "description": "A boolean to indicate whether a two device elements is symmetric. This is used in the device config compilation stage. By default, it is set as False",
                    "type": "boolean"
                },
                "tex": {
                    "type": "string",
                    "description": "latex snippet for plotting"
                },
                "plot_func": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "reference to a function for plotting this operation. If not specified, defaults to using :func:`~quantify_scheduler.schedules._visualization.circuit_diagram.gate_box`."
                }
            }
        },
        "pulse_info": {
            "description": "A list containing the pulses that are part of the operation",
            "type": "array",
            "items": {
                "type": "object",
                "description": "Info to generate an individual pulse.",
                "required": [
                    "port",
                    "clock",
                    "wf_func",
                    "t0",
                    "duration"
                ],
                "properties": {
                    "port": {
                        "description": "A string specifying the port used by the pulse.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "clock": {
                        "description": "A string specifying the clock used to modulate the pulse.",
                        "type": [
                            "string"
                        ]
                    },
                    "wf_func": {
                        "description": "reference to a function to generate the pulse of this operation. ",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "t0": {
                        "description": "Starting time of the pulse with respect to the start of the operation in seconds.",
                        "type": "number"
                    },
                    "duration": {
                        "type": "number",
                        "description": "The duration of the pulse in seconds."
                    }
                }
            }
        },
        "acquisition_info": {
            "description": "A list containing the acquisitions that are part of the operation",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": true,
                "description": "Info to generate an individual acquisition.",
                "required": [
                    "port",
                    "t0",
                    "acq_channel",
                    "acq_index",
                    "acq_return_type"
                ],
                "properties": {
                    "port": {
                        "description": "A string specifying the port used by the acquisition.",
                        "type": [
                            "string"
                        ]
                    },
                    "clock": {
                        "description": "A string specifying the clock used to demodulate the acquisition.",
                        "type": [
                            "string"
                        ]
                    },
                    "t0": {
                        "description": "Starting time of the pulse with respect to the start of the operation in seconds.",
                        "type": [
                            "number"
                        ]
                    },
                    "duration": {
                        "description": "The duration of the acquisition in seconds.",
                        "type": [
                            "number"
                        ]
                    },
                    "acq_channel": {
                        "description": "The acquisition channel to use.",
                        "type": [
                            "number"
                        ]
                    },
                    "acq_index": {
                        "description": "The acquisition index where to store the result of the acquisition protocol.",
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "acq_return_type": {
                        "description": "Describes the return type of an acquisition performed using this protocol."
                    }
                }
            }
        },
        "logic_info": {
            "description": "Not Implemented."
        }
    }
}
