pasqal-io / qadence

Digital-analog quantum programming interface
https://pasqal-io.github.io/qadence/latest/
Apache License 2.0
72 stars 21 forks source link

[Refac] Move dataclasses to Pydantic #541

Open smitchaudhary opened 3 months ago

mlahariya commented 19 hours ago

@smitchaudhary - Can you please provide which use case this might be needed for?

smitchaudhary commented 18 hours ago

Hey @mlahariya, this is not use case specific. The motivation was that since some of the dataclasses that we use, the likes of, FeatureMapConfig, AnsatzConfig etc need to validate the input in a bunch of different ways in the __post_init__. Pydantic should allow for all this validation with the built in features.