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

Improve access to output modulation durations #663

Merged
merged 9 commits into from
Apr 4, 2024
Merged
6 changes: 5 additions & 1 deletion pulser-core/pulser/json/abstract_repr/deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,15 @@ def _deserialize_operation(seq: Sequence, op: dict, vars: dict) -> None:
channel=op["channel"],
)
elif op["op"] == "align":
seq.align(*op["channels"])
seq.align(
*op["channels"],
at_rest=op.get("at_rest", True),
)
elif op["op"] == "delay":
seq.delay(
duration=_deserialize_parameter(op["time"], vars),
channel=op["channel"],
at_rest=op.get("at_rest", False),
)
elif op["op"] == "phase_shift":
seq.phase_shift_index(
Expand Down
260 changes: 201 additions & 59 deletions pulser-core/pulser/json/abstract_repr/schemas/device-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"pre_calibrated_layouts": {
"description": "Register layouts already calibrated on the device.",
"items": {
"$ref": "#/definitions/Layout"
"$ref": "layout-schema.json"
},
"type": "array"
},
Expand Down Expand Up @@ -355,7 +355,56 @@
"type": "null"
},
{
"$ref": "#/definitions/RydbergEOM"
"additionalProperties": false,
"properties": {
"controlled_beams": {
"description": "The beams that can be switched on/off with an EOM.",
"items": {
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"type": "array"
},
"custom_buffer_time": {
"description": "A custom wait time to enforce during EOM buffers.",
"type": "number"
},
"intermediate_detuning": {
"description": "The detuning between the two beams, in rad/µs.",
"type": "number"
},
"limiting_beam": {
"description": "The beam with the smallest amplitude range.",
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"max_limiting_amp": {
"description": "The maximum amplitude the limiting beam can reach, in rad/µs.",
"type": "number"
},
"mod_bandwidth": {
"description": "The EOM modulation bandwidth at -3dB (50% reduction), in MHz.",
"type": "number"
},
"multiple_beam_control": {
"description": "Whether both EOMs can be used simultaneously or not.",
"type": "boolean"
}
},
"required": [
"mod_bandwidth",
"limiting_beam",
"max_limiting_amp",
"intermediate_detuning",
"controlled_beams"
],
"type": "object"
}
],
"description": "Configuration of an associated EOM."
Expand Down Expand Up @@ -632,7 +681,56 @@
"type": "null"
},
{
"$ref": "#/definitions/RydbergEOM"
"additionalProperties": false,
"properties": {
"controlled_beams": {
"description": "The beams that can be switched on/off with an EOM.",
"items": {
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"type": "array"
},
"custom_buffer_time": {
"description": "A custom wait time to enforce during EOM buffers.",
"type": "number"
},
"intermediate_detuning": {
"description": "The detuning between the two beams, in rad/µs.",
"type": "number"
},
"limiting_beam": {
"description": "The beam with the smallest amplitude range.",
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"max_limiting_amp": {
"description": "The maximum amplitude the limiting beam can reach, in rad/µs.",
"type": "number"
},
"mod_bandwidth": {
"description": "The EOM modulation bandwidth at -3dB (50% reduction), in MHz.",
"type": "number"
},
"multiple_beam_control": {
"description": "Whether both EOMs can be used simultaneously or not.",
"type": "boolean"
}
},
"required": [
"mod_bandwidth",
"limiting_beam",
"max_limiting_amp",
"intermediate_detuning",
"controlled_beams"
],
"type": "object"
}
],
"description": "Configuration of an associated EOM."
Expand Down Expand Up @@ -899,9 +997,6 @@
],
"description": "A Channel that can be physical or virtual."
},
"Layout": {
"$ref": "layout-schema.json"
},
"PhysicalChannel": {
"anyOf": [
{
Expand All @@ -926,7 +1021,56 @@
"type": "null"
},
{
"$ref": "#/definitions/RydbergEOM"
"additionalProperties": false,
"properties": {
"controlled_beams": {
"description": "The beams that can be switched on/off with an EOM.",
"items": {
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"type": "array"
},
"custom_buffer_time": {
"description": "A custom wait time to enforce during EOM buffers.",
"type": "number"
},
"intermediate_detuning": {
"description": "The detuning between the two beams, in rad/µs.",
"type": "number"
},
"limiting_beam": {
"description": "The beam with the smallest amplitude range.",
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"max_limiting_amp": {
"description": "The maximum amplitude the limiting beam can reach, in rad/µs.",
"type": "number"
},
"mod_bandwidth": {
"description": "The EOM modulation bandwidth at -3dB (50% reduction), in MHz.",
"type": "number"
},
"multiple_beam_control": {
"description": "Whether both EOMs can be used simultaneously or not.",
"type": "boolean"
}
},
"required": [
"mod_bandwidth",
"limiting_beam",
"max_limiting_amp",
"intermediate_detuning",
"controlled_beams"
],
"type": "object"
}
],
"description": "Configuration of an associated EOM."
Expand Down Expand Up @@ -1176,7 +1320,56 @@
"type": "null"
},
{
"$ref": "#/definitions/RydbergEOM"
"additionalProperties": false,
"properties": {
"controlled_beams": {
"description": "The beams that can be switched on/off with an EOM.",
"items": {
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"type": "array"
},
"custom_buffer_time": {
"description": "A custom wait time to enforce during EOM buffers.",
"type": "number"
},
"intermediate_detuning": {
"description": "The detuning between the two beams, in rad/µs.",
"type": "number"
},
"limiting_beam": {
"description": "The beam with the smallest amplitude range.",
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"max_limiting_amp": {
"description": "The maximum amplitude the limiting beam can reach, in rad/µs.",
"type": "number"
},
"mod_bandwidth": {
"description": "The EOM modulation bandwidth at -3dB (50% reduction), in MHz.",
"type": "number"
},
"multiple_beam_control": {
"description": "Whether both EOMs can be used simultaneously or not.",
"type": "boolean"
}
},
"required": [
"mod_bandwidth",
"limiting_beam",
"max_limiting_amp",
"intermediate_detuning",
"controlled_beams"
],
"type": "object"
}
],
"description": "Configuration of an associated EOM."
Expand Down Expand Up @@ -1499,57 +1692,6 @@
"mod_bandwidth"
],
"type": "object"
},
"RydbergBeam": {
"enum": [
"RED",
"BLUE"
],
"type": "string"
},
"RydbergEOM": {
"additionalProperties": false,
"properties": {
"controlled_beams": {
"description": "The beams that can be switched on/off with an EOM.",
"items": {
"$ref": "#/definitions/RydbergBeam"
},
"type": "array"
},
"custom_buffer_time": {
"description": "A custom wait time to enforce during EOM buffers.",
"type": "number"
},
"intermediate_detuning": {
"description": "The detuning between the two beams, in rad/µs.",
"type": "number"
},
"limiting_beam": {
"$ref": "#/definitions/RydbergBeam",
"description": "The beam with the smallest amplitude range."
},
"max_limiting_amp": {
"description": "The maximum amplitude the limiting beam can reach, in rad/µs.",
"type": "number"
},
"mod_bandwidth": {
"description": "The EOM modulation bandwidth at -3dB (50% reduction), in MHz.",
"type": "number"
},
"multiple_beam_control": {
"description": "Whether both EOMs can be used simultaneously or not.",
"type": "boolean"
}
},
"required": [
"mod_bandwidth",
"limiting_beam",
"max_limiting_amp",
"intermediate_detuning",
"controlled_beams"
],
"type": "object"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
],
"type": "object"
},
"Layout": {
"$ref": "layout-schema.json"
},
"QubitId": {
"description": "Name for a qubit.",
"type": "string"
Expand All @@ -37,7 +34,7 @@
"additionalProperties": false,
"properties": {
"layout": {
"$ref": "#/definitions/Layout",
"$ref": "layout-schema.json",
"description": "The trap layout underlying the register."
},
"register": {
Expand Down
Loading