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

Move metadata in FresnelQPU's description to the meta_data attribute #2

Open
iamashwin99 opened this issue Dec 3, 2024 · 1 comment

Comments

@iamashwin99
Copy link

Currently, the device description or specifications for FresnelQPU contain a comprehensive JSON like string with device metadata.
However, the meta_data attribute is currently None. This issue proposes moving the metadata from the description to the appropriate meta_data attribute.

qpu = FresnelQPU(None)
S = qpu.get_specs()
S.description

'{"name": "Fresnel", "dimensions": 2, "rydberg_level": 60, "min_atom_distance": 5, "max_atom_num": 25, "max_radial_distance": 35, "interaction_coeff_xy": null, "supports_slm_mask": false, "max_layout_filling": 0.5, "max_sequence_duration": 10000, "max_runs": 2000, "reusable_channels": false, "pre_calibrated_layouts": [{"coordinates": [[-20.0, 0.0], [-17.5, -4.330127], [-17.5, 4.330127], [-15.0, -8.660254], [-15.0, 0.0], [-15.0, 8.660254], [-12.5, -12.990381], [-12.5, -4.330127], [-12.5, 4.330127], [-12.5, 12.990381], [-10.0, -17.320508], [-10.0, -8.660254], [-10.0, 0.0], [-10.0, 8.660254], [-10.0, 17.320508], [-7.5, -12.990381], [-7.5, -4.330127], [-7.5, 4.330127], [-7.5, 12.990381], [-5.0, -17.320508], [-5.0, -8.660254], [-5.0, 0.0], [-5.0, 8.660254], [-5.0, 17.320508], [-2.5, -12.990381], [-2.5, -4.330127], [-2.5, 4.330127], [-2.5, 12.990381], [0.0, -17.320508], [0.0, -8.660254], [0.0, 0.0], [0.0, 8.660254], [0.0, 17.320508], [2.5, -12.990381], [2.5, -4.330127], [2.5, 4.330127], [2.5, 12.990381], [5.0, -17.320508], [5.0, -8.660254], [5.0, 0.0], [5.0, 8.660254], [5.0, 17.320508], [7.5, -12.990381], [7.5, -4.330127], [7.5, 4.330127], [7.5, 12.990381], [10.0, -17.320508], [10.0, -8.660254], [10.0, 0.0], [10.0, 8.660254], [10.0, 17.320508], [12.5, -12.990381], [12.5, -4.330127], [12.5, 4.330127], [12.5, 12.990381], [15.0, -8.660254], [15.0, 0.0], [15.0, 8.660254], [17.5, -4.330127], [17.5, 4.330127], [20.0, 0.0]], "slug": "TriangularLatticeLayout(61, 5.0\\u00b5m)"}], "version": "1", "channels": [{"id": "rydberg_global", "basis": "ground-rydberg", "addressing": "Global", "max_abs_detuning": 54.97787143782138, "max_amp": 12.56637061435917, "min_retarget_interval": null, "fixed_retarget_t": null, "max_targets": null, "clock_period": 4, "min_duration": 16, "max_duration": 100000000, "mod_bandwidth": 8, "eom_config": {"limiting_beam": "RED", "max_limiting_amp": 188.49555921538757, "intermediate_detuning": 2827.4333882308138, "controlled_beams": ["BLUE"], "mod_bandwidth": 40, "custom_buffer_time": 240}}], "is_virtual": false}'


S.meta_data
None
@a-corni
Copy link
Collaborator

a-corni commented Jan 9, 2025

Hi @iamashwin99,
Thanks for opening this issue !
Indeed, the information regarding the pulser Device implemented by the QPU are stored in the description as a JSON-like string. The pulser Device associated to this QPU can be built by doing device = Device.from_abstract_repr(S.description) (it is the first brick of your quantum program, you will then have to initialize the Sequence with seq = Sequence(register, device))

My issue with the meta_data attribute of the HardwareSpecs is that it only stores a dict(str, str). Therefore, it can store the data (I would have to JSON.load the content in the description, and convert into a str all the values that are not a str) but it cannot be used to build the pulser Device object that represents the QPU straight (users would have to convert all the values that were previously not str into their initial value (which is highly not user-friendly) and have to make a json.dumps(the dictionnary just built)). Of course, for the latter, we could provide a method in IsingAQPU to do that but I think it would add more burden for the user.

Do you agree with me on this ? Do you need these information in the meta_data of the HardwareSpecs anyway ? Is it a problem to have the serialized representation of the Device in the description of the HardwareSpecs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants