Skip to content

Fix inconsistency for disabling frequency matching for generator channel - #436

Merged
meeg merged 4 commits into
openquantumhardware:mainfrom
paniash:gen_ch-inconsistency
Oct 9, 2026
Merged

meeg merged 4 commits into
openquantumhardware:mainfrom
paniash:gen_ch-inconsistency

Conversation

@paniash

@paniash paniash commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

In the docstrings for the add_readoutconfig() function in asm_v2.py, it is mentioned that in order to disable frequency matching, one must set gen_ch=None. However in practice, passing gen_ch=None explicitly raises a KeyError.

With the current implementation, this is checked by passing the parameter onto a dictionary par which then is used to check the existence of the key gen_ch instead of its value None.

With this fix, the docstring and code agree with each other i.e. setting gen_ch as None now disables frequency matching.

It also replaces the KeyError with a RuntimeError that names the readout and generator channels.

@meeg

meeg commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Good catch. I think the original intent was that if you didn't want matching you would omit gen_ch, but the docstring was telling you to do gen_ch=None which would not work. Now either works. And the helpful error message is a nice addition.

Thanks, and good to see you again since #293.

@meeg
meeg merged commit bea61c1 into openquantumhardware:main Oct 9, 2026
3 checks passed
@paniash
paniash deleted the gen_ch-inconsistency branch October 10, 2026 09:14
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

Successfully merging this pull request may close these issues.

3 participants