ParameterSweep Class¶
ParameterSweep¶
-
class
scqubits.ParameterSweep(param_name, param_vals, evals_count, hilbertspace, subsys_update_list, update_hilbertspace, num_cpus=1)[source]¶ The ParameterSweep class helps generate spectral and associated data for a composite quantum system, as an externa, parameter, such as flux, is swept over some given interval of values. Upon initialization, these data are calculated and stored internally, so that plots can be generated efficiently. This is of particular use for interactive displays used in the Explorer class.
- Parameters
param_name (str) – name of external parameter to be varied
param_vals (ndarray) – array of parameter values
evals_count (int) – number of eigenvalues and eigenstates to be calculated for the composite Hilbert space
hilbertspace (HilbertSpace) – collects all data specifying the Hilbert space of interest
subsys_update_list (list or iterable) – list of subsys_list in the Hilbert space which get modified when the external parameter changes
update_hilbertspace (function) – update_hilbertspace(param_val) specifies how a change in the external parameter affects the Hilbert space components
num_cpus (int, optional) – number of CPUS requested for computing the sweep (default value settings.NUM_CPUS)
-
broadcast(event, **kwargs)¶ Request a broadcast from CENTRAL_DISPATCH reporting event.
- Parameters
event (str) – event name from EVENTS
**kwargs –
-
classmethod
create_from_file(filename)¶ Read initdata and spectral data from file, and use those to create a new SpectrumData object.
- Parameters
filename (str) –
- Returns
new SpectrumData object, initialized with data read from file
- Return type
-
classmethod
deserialize(iodata)[source]¶ Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
- Parameters
iodata (IOData) –
- Returns
- Return type
StoredSweep
-
filewrite(filename)[source]¶ Convenience method bound to the class. Simply accesses the write function.
- Parameters
filename (str) –
-
get_initdata()¶ Returns dict appropriate for creating/initializing a new Serializable object.
- Returns
- Return type
dict
-
new_datastore(**kwargs)¶ Return DataStore object with system/sweep information obtained from self.
-
receive(event, sender, **kwargs)[source]¶ Hook to CENTRAL_DISPATCH. This method is accessed by the global CentralDispatch instance whenever an event occurs that ParameterSweep is registered for. In reaction to update events, the lookup table is marked as out of sync.
- Parameters
event (str) – type of event being received
sender (object) – identity of sender announcing the event
**kwargs –