PsiQ / qref

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

Clarify language about different types of QREF objects. #118

Open mstechly opened 1 month ago

mstechly commented 1 month ago

Currently QREF objects can come in different forms:

  1. Saved to a file
  2. Represented as a dictionary
  3. Instances of pydantic models (SchemaV1)

This introduces some ambiguity, as when we say "QREF object", we could mean any of these.

It would be good to clarify the language here, below is a proposal for this:

  1. "QREF file" would refer to a JSON or YAML file adhering to QREF schema
  2. "QREF dictionary" would refer to a Python dictionary adhering to QREF schema
  3. "QREF object" would refer to an instance of QREF pydantic model

Keep in mind that in future QREF pydantic models might become generic (i.e. they would support not only strings as expressions, but also other types, e.g.: sympy expressions). In such case we could imagine having dictionaries containing non-native expression types. Such dictionary would be a valid input for creating a QREF object. However, we should not call it "QREF dictionary", as it is not JSON/YAML-serializable.

Once we agree on what the good naming is, we should update documentation (including docstrings!) accordingly.

CC: @dexter2206 @sammorley-short

sammorley-short commented 3 weeks ago

Yep, am happy with that!