Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python read of boolean variables in rasqberry_environment.env corrupt #136

Open
JanLahmann opened this issue Oct 3, 2022 · 1 comment
Open

Comments

@JanLahmann
Copy link
Owner

There is an issue with reading Boolean variable in rasqberry_environment.env from python.

For example, in demos/bin/RasQ-LED-display.py, the variable "LED_INVERT" is not read correctly.
The following log output:

LED_INVERT = bool(config["LED_INVERT"])
print("LED_INVERT ", LED_INVERT)
LED_INVERT = config["LED_INVERT"]
print("LED_INVERT ", LED_INVERT)
LED_INVERT = False
print("LED_INVERT ", LED_INVERT)

results in

build circuit without entanglement
measurement:  0110001001101001010011001101001110001100100110001101000010100110101110001101000000100000110001100111101110010011110011000001100
LED_INVERT  True
LED_INVERT  false
LED_INVERT  False

Only the last setting leads to the desired result.

@JanLahmann
Copy link
Owner Author

JanLahmann commented Oct 3, 2022

workaround implemented in #137
using
LED_INVERT = bool(config["LED_INVERT"]=="true" or config["LED_INVERT"]=="True")
instead of
LED_INVERT = bool(config["LED_INVERT"])
in file demos/bin/RasQ-LED-display.py (and other files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant