microsoft / microsoft/Qcodes

Inconsistent naming of parameters and instruments

Open
#1,140 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
459
Forks
359
Avg merge
3d 6h
Merged PRs (30d)
73

Description

This is not so much a bug as an annoying inconsistency. I am not sure if there is a good way to fix this whire retaining back wards compatibility but none the less the naming is inconsistent consider the following:

| type | name | full_name | short_name | `__str__` |
|------------|--------------------------------------------|--------------------------|-------------------|-------|
| Instrument | "`{name`}" e.g. "`myinst`" | N/A | N/A | "`<{inst_class}: {name}>`" e.g "``" |
| Channel | "`...{parent_name}_{name}`" e.g. "`myinst_ch1`" | N/A | "`{name}`" e.g. "`ch1`" | "`<{channel_class}: ..._{parent_name}_{name} of {inst_class}: {inst_name}>`" e.g. <`MyChannel: myinst_ch1 of DummyInstrument: myinst`> |
| Parameter | "{name}" e.g. "frequency" | "{instrument_name}_{name}" e.g. "myinst_ch1_frequency" | N/A | "`{instrument_name}_{name}`" e.g. "`myinst_ch1_frequency`"

It's inconsistent if name includes the full name or only the top most part. Depending on which class you are looking at you may have to use either full_name or shore_name instead to get what you are after.

Contributor guide

Open the contributing guide

Research direction

Start with the naming comparison in the issue body and review the existing comment thread for any agreed direction. Establish a consistent naming policy for instruments, channels, and parameters while preserving backward compatibility. Done means the naming behavior and compatibility expectations are clearly defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.