You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In issue #71 (PR #79) local_variables is changed from a list of strings to a dictionary. Similarly, in QREF (PsiQ/qref#106) local_variables is changed to be a dictionary, as well.
However, the alias_sampling_basic.json has not been updated and trying to call qref_to_bartiq after loading the JSON results in:
pydantic_core._pydantic_core.ValidationError: 3 validation errors for SchemaV1
program.children.0.local_variables
Input should be a valid dictionary [type=dict_type, input_value=['R=ceiling(log_2(L))'], input_type=list]
For further information visit https://errors.pydantic.dev/2.7/v/dict_type
program.children.2.local_variables
Input should be a valid dictionary [type=dict_type, input_value=['R=ceiling(log_2(L))'], input_type=list]
For further information visit https://errors.pydantic.dev/2.7/v/dict_type
program.local_variables
Input should be a valid dictionary [type=dict_type, input_value=['R=ceiling(log_2(L))'], input_type=list]
For further information visit https://errors.pydantic.dev/2.7/v/dict_type
How to Reproduce
This can be duplicated with the following code:
import json
from bartiq import Routine, compile_routine, evaluate
from bartiq.integrations import qref_to_bartiq
with open("docs/data/alias_sampling_basic.json", "r") as f:
routine_dict = json.load(f)
uncompiled_routine = qref_to_bartiq(routine_dict)
Expected behavior
The provided sample json file should be in the appropriate format so that it can be changed into a routine properly.
Actual behavior
Calling qref_to_bartiq throws an error complaining that local_variables is not a dictionary.
Environment:
Bartiq 0.5.0
Python version 3.11.9
The text was updated successfully, but these errors were encountered:
Describe the bug
In issue #71 (PR #79) local_variables is changed from a list of strings to a dictionary. Similarly, in QREF (PsiQ/qref#106) local_variables is changed to be a dictionary, as well.
However, the alias_sampling_basic.json has not been updated and trying to call
qref_to_bartiq
after loading the JSON results in:How to Reproduce
This can be duplicated with the following code:
Expected behavior
The provided sample json file should be in the appropriate format so that it can be changed into a routine properly.
Actual behavior
Calling
qref_to_bartiq
throws an error complaining thatlocal_variables
is not a dictionary.Environment:
The text was updated successfully, but these errors were encountered: