QuTech-Delft / OpenQL

OpenQL: A Portable Quantum Programming Framework for Quantum Accelerators. https://dl.acm.org/doi/10.1145/3474222
https://openql.readthedocs.io
Other
99 stars 44 forks source link

Command line option 'output_dir' gets reset to default #378

Closed wvlothuizen closed 3 years ago

wvlothuizen commented 3 years ago

While switching from OpenQL 0.8.1 to the current version, it was observed that option 'output_dir' gets reset to default.

What we actually see is that we get '...test_output' (i.e. the default value) at https://github.com/DiCarloLab-Delft/PycQED_py3/blob/feature/DIOCal/pycqed/measurement/openql_experiments/openql_helpers.py#L52

whereas is wat set to '...output' in https://github.com/DiCarloLab-Delft/PycQED_py3/blob/feature/DIOCal/pycqed/measurement/openql_experiments/openql_helpers.py#L20

jvanstraten commented 3 years ago

OpenQL was resetting all options at the end of every call to compile() as a "fix" to test cases affecting each other. #380 modifies the behavior to something slightly more sane, although it doesn't fix the root cause (i.e. the context-sensitivity/global-state reliance of OpenQL's API).

MiguelSMoreira commented 3 years ago

The OpenQL Helpers have been modified to enforce that the 'output_dir' is set correctly across different experiments. This has been successfully tested!