PsiQ / qref

Quantum Resource Estimate Format
https://psiq.github.io/qref/
Apache License 2.0
34 stars 3 forks source link

feat: Allow more concise definition of connections #113

Closed dexter2206 closed 3 months ago

dexter2206 commented 3 months ago

Description

Closes #12

The concise format is "source -> target" (space-insensitive). It works both for schema validation and for pydantic model validation. However, for pydantic objects, the concise format always translates to original ConnectionV1 object.

Please verify that you have completed the following steps

mstechly commented 3 months ago

I'm also wondering whether it would make sense to rewrite all the examples we have to use this new format? Probably except one, just to show there are two ways to do this. But I don't see any reason for anyone to use the more verbose one if you have this.

dexter2206 commented 3 months ago

I'm also wondering whether it would make sense to rewrite all the examples we have to use this new format? Probably except one, just to show there are two ways to do this. But I don't see any reason for anyone to use the more verbose one if you have this.

I'd actually say that the more verbose one should be the default. Given that QREF is mostly serialization format and is supposed to be machine-processed, it is easier to have objects instead of strings that have to be parsed to objects. It's nice we have simpler format, because one can quickly hand craft short examples, but I think machine-readability and ease of processing should be our default goal. WDYT?

mstechly commented 3 months ago

I'd actually say that the more verbose one should be the default. Given that QREF is mostly serialization format and is supposed to be machine-processed, it is easier to have objects instead of strings that have to be parsed to objects. It's nice we have simpler format, because one can quickly hand craft short examples, but I think machine-readability and ease of processing should be our default goal. WDYT?

Sounds legit – we'll refactor it in bartiq examples though, as they're more "written by hand" case :) LGTM