GridSpec#

class scqubits.core.discretization.GridSpec(minmaxpts_array)[source]#

Class for specifying a general discretized coordinate grid (arbitrary dimensions).

Parameters:

minmaxpts_array (ndarray) – array of with entries [minvalue, maxvalue, number of points]

Return type:

SerializableType

Methods

GridSpec.__init__(minmaxpts_array)

GridSpec.broadcast(event, **kwargs)

Request a broadcast from CENTRAL_DISPATCH reporting event.

GridSpec.create_from_file(filename)

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

GridSpec.deserialize(io_data)

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

GridSpec.filewrite(filename)

Convenience method bound to the class.

GridSpec.receive(event, sender, **kwargs)

Receive a message from CENTRAL_DISPATCH and initiate action on it.

GridSpec.serialize()

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

GridSpec.unwrap()

Auxiliary routine that yields a tuple of the parameters specifying the grid.

Attributes

max_vals

Descriptor class for properties that are to be monitored for changes.

min_vals

Descriptor class for properties that are to be monitored for changes.

pt_counts

Descriptor class for properties that are to be monitored for changes.

var_count

Descriptor class for properties that are to be monitored for changes.

broadcast(event, **kwargs)#

Request a broadcast from CENTRAL_DISPATCH reporting event.

Parameters:
  • event (str) – event name from EVENTS

  • **kwargs

Return type:

None

classmethod create_from_file(filename)#

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)#

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)#

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

Return type:

None

Parameters:

filename (str) –

receive(event, sender, **kwargs)#

Receive a message from CENTRAL_DISPATCH and initiate action on it.

Parameters:
  • event (str) – event name from EVENTS

  • sender (DispatchClient) – original sender reporting the event

  • **kwargs

Return type:

None

serialize()#

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

Return type:

IOData

unwrap()[source]#

Auxiliary routine that yields a tuple of the parameters specifying the grid.

Return type:

Tuple[ndarray, ndarray, Union[List[int], ndarray], int]