forked from PsiQ/bartiq
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Copied from PsiQ/bartiq #163
Describe the bug
When we have a resource called local_highwater, when we export it to latex, for some reason the cal part gets cut.
I've also seen case where it was wrong in some other way, but I couldn't reproduce it. Though it was still related to the fact that there's cal in the name, which probably needs to get escaped/sanitized somehow.
How to reproduce
Run the following in a jupyter notebook:
from qref import SchemaV1
from bartiq import compile_routine
from bartiq.integrations import routine_to_latex
from IPython.display import Math
qref_dict = {
"name": "my_routine",
"type": None,
"resources": [
{"name": "local_highwater", "type": "other", "value": "10"},
],
}
alias_sampling_qref = {"version": "v1", "program": qref_dict}
uncompiled_routine = SchemaV1(**alias_sampling_qref)
compiled_routine = compile_routine(uncompiled_routine)
Math(routine_to_latex(compiled_routine.to_qref()))
The routine_to_latex function is contained here
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers