Edge names broken due to autoreplace of - by _ in qcodes==0.34 (InstrumentBase.__init__)
QCoDeS 0.34 has introduced autoreplace of -
by _
in Instrument names.
This breaks our Edge naming
edge_name = f"{parent_element_name}-{child_element_name}"
and thereby a bunch of tests
/usr/local/lib/python3.8/site-packages/qcodes/instrument/base.py:416: UserWarning: Changed q2-q3 to q2_q3 for instrument identifier
warnings.warn(f"Changed {name} to {new_name} for instrument identifier")
Current state of qcodes has advanced a bit further but still doesn't appear to allow for -
name = self._replace_hyphen(name)
self._short_name = name
self._is_valid_identifier(self.full_name)
https://github.com/QCoDeS/Qcodes/pull/4257
Solution
In Developer's meeting it has been decided to:
- Move to underscore in edge names instead of dash
- Disallow dash in qubit name: raise an exception in the init (of DeviceElement?)
As part of this, also please:
- update
def _find_edge(device_cfg, q0, q1, op_name):
def _find_edge(device_cfg, parent_element_name, child_element_name, op_name):
Edited by Edgar Reehuis