Serializable#

class scqubits.io_utils.fileio_serializers.Serializable(*args, **kwargs)[source]#

Mix-in class that makes descendant classes serializable.

Methods

Serializable.__init__(*args, **kwargs)

Serializable.create_from_file(filename)

Read initdata and spectral data from file, and use those to create a new SpectrumData object.

Serializable.deserialize(io_data)

Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.

Serializable.filewrite(filename)

Convenience method bound to the class.

Serializable.serialize()

Convert the content of the current class instance into IOData format.

Return type:

SerializableType

classmethod create_from_file(filename)[source]#

Read initdata and spectral data from file, and use those to create a new SpectrumData object.

Returns:

new SpectrumData object, initialized with data read from file

Return type:

SpectrumData

Parameters:

filename (str) –

classmethod deserialize(io_data)[source]#

Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.

Return type:

TypeVar(SerializableType, bound= Serializable)

Parameters:

io_data (IOData) –

filewrite(filename)[source]#

Convenience method bound to the class. Simply accesses the write function.

Return type:

None

Parameters:

filename (str) –

serialize()[source]#

Convert the content of the current class instance into IOData format.

Return type:

IOData