Skip to content

Commit

Permalink
Improve access to output modulation durations (#663)
Browse files Browse the repository at this point in the history
* Add option to delay after pulse modulation

* Deal with delay of 0

* Add Pulse.get_full_duration()

* Update the Output Modulation tutorial

* Add at_rest option to align()

* Update JSON schema

* Update tutorials/advanced_features/Output Modulation and EOM Mode.ipynb

Co-authored-by: Antoine Cornillot <[email protected]>

---------

Co-authored-by: Antoine Cornillot <[email protected]>
  • Loading branch information
HGSilveri and a-corni authored Apr 4, 2024
1 parent 2ddd789 commit 0f6e3dd
Show file tree
Hide file tree
Showing 11 changed files with 391 additions and 108 deletions.
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

0 comments on commit 0f6e3dd

Please sign in to comment.