class qcodes.utils.metadata.Metadatable(metadata: Optional[Mapping[str, Any]] = None)[source]

Bases: object

load_metadata(metadata: Mapping[str, Any]) None[source]

Load metadata into this classes metadata dictionary.


metadata – Metadata to load.

snapshot(update: Optional[bool] = False) Dict[Any, Any][source]

Decorate a snapshot dictionary with metadata. DO NOT override this method if you want metadata in the snapshot instead, override snapshot_base().


update – Passed to snapshot_base.


Base snapshot.

snapshot_base(update: Optional[bool] = False, params_to_skip_update: Optional[Sequence[str]] = None) Dict[str, Any][source]

Override this with the primary information for a subclass.

class qcodes.utils.metadata.ParameterDiff(left_only, right_only, changed)[source]

Bases: NamedTuple

Create new instance of ParameterDiff(left_only, right_only, changed)

left_only: Dict[Union[str, Tuple[str, str]], Any]

Alias for field number 0

right_only: Dict[Union[str, Tuple[str, str]], Any]

Alias for field number 1

changed: Dict[Union[str, Tuple[str, str]], Tuple[Any, Any]]

Alias for field number 2

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

qcodes.utils.metadata.extract_param_values(snapshot: Dict[str, Any]) Dict[Union[str, Tuple[str, str]], Any][source]

Given a snapshot, returns a dictionary from instrument and parameter names onto parameter values.

qcodes.utils.metadata.diff_param_values(left_snapshot: Dict[str, Any], right_snapshot: Dict[str, Any]) ParameterDiff[source]

Given two snapshots, returns the differences between parameter values in each.

qcodes.utils.metadata.diff_param_values_by_id(left_id: RunId, right_id: RunId) ParameterDiff[source]

Given the IDs of two datasets, returns the differences between parameter values in each of their snapshots.