pasqal-io / Pulser

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

Optionally skip validation after `Sequence.to_abstract_repr()` #689

Closed HGSilveri closed 2 weeks ago

HGSilveri commented 1 month ago

After serialization to the abstract repr, we validate the outcomes against the JSON schema to ensure its valid before returning. This is a defensive practice since, in the absence of bugs, the serialized sequence should always be valid. It is also this validation that takes the vast majority of the time.

As such, adding a skip_validation: bool flag to Sequence.to_abstract_repr() is sensible and would allow the serialization to run significantly faster.