PytketQubitRegisterNames

class tket.metadata.PytketQubitRegisterNames(*args, **kwargs)[source]

Bases: Metadata[list[tuple[str, list[int]]]]

Metadata key for explicit names of input qubit registers.

ALIASES: ClassVar[list[str]] = []

Other aliases of the metadata key.

Typed metadata reads use these, in order, as fallbacks when KEY is not present. This is used for backward compatibility when renaming metadata keys.

Writes ignore this field and only write to KEY.

KEY: ClassVar[str] = 'TKET1.qubit_registers'

The unique key associated with the metadata entry.

__init__(*args, **kwargs)
classmethod from_json(value)[source]

Deserialize the metadata value from the stored json value.

Return type:

list[tuple[str, list[int]]]

classmethod to_json(value)[source]

Serialize the metadata value to a json value.

Return type:

str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]