pasqal-io / Pulser

Library for pulse-level/analog control of neutral atom devices. Emulator with QuTiP.
Apache License 2.0
181 stars 65 forks source link

Have a method `from_abstract_repr` in Device to deserialize an abstract Device #725

Closed a-corni closed 2 months ago

a-corni commented 3 months ago

At the moment, users wanting to deserialize the abstract representation of a Device have to do from pulser.json.abstract_repr.deserializer import deserialize_device followed by deserialize_device(abstract_device). It would be simpler to have Device.from_abstract_repr(abstract_device).

Initially suggested by @nataliejpg, useful for users of pulser_myqlm to build the device associated with the current state of the QPU (provided as a String, in the abstract format).