GenericQubit¶
- class scqubits.core.generic_qubit.GenericQubit(E, id_str=None)[source]¶
Class for a generic qubit (genuine two-level system). Create a class instance via:
GenericQubit(E=4.3)
- Parameters:
Methods
GenericQubit.__init__(E[, id_str])GenericQubit.broadcast(event, **kwargs)Request a broadcast from CENTRAL_DISPATCH reporting event.
Use ipywidgets to create a new class instance.
GenericQubit.create_from_file(filename)Read initdata and spectral data from file, and use those to create a new SpectrumData object.
Return dictionary with default parameter values for initialization of class instance.
GenericQubit.deserialize(io_data)Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
GenericQubit.eigensys([evals_count])GenericQubit.eigenvals([evals_count])GenericQubit.filewrite(filename)Convenience method bound to the class.
Returns dict appropriate for creating/initializing a new Serializable object.
Returns a list of all operator names for the quantum system.
GenericQubit.hamiltonian()Returns Hilbert space dimension.
GenericQubit.matrixelement_table(operator)Returns table of matrix elements for operator with respect to the eigenstates of the qubit.
GenericQubit.receive(event, sender, **kwargs)Receive a message from CENTRAL_DISPATCH and initiate action on it.
Convert the content of the current class instance into IOData format.
GenericQubit.set_params(**kwargs)Set new parameters through the provided dictionary.
GenericQubit.set_params_from_gui(change)Set new parameters through the provided dictionary.
GenericQubit.sm_operator()GenericQubit.sp_operator()Returns a list of noise channels this QuantumSystem supports.
GenericQubit.sx_operator()GenericQubit.sy_operator()GenericQubit.sz_operator()GenericQubit.widget([params])Use ipywidgets to modify parameters of class instance.
Attributes
EDescriptor class for properties that are to be monitored for changes.
id_strtruncated_dim- broadcast(event, **kwargs)¶
Request a broadcast from CENTRAL_DISPATCH reporting event.
- 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:
- Parameters:
filename (str)
- static default_params()[source]¶
Return dictionary with default parameter values for initialization of class instance.
- classmethod deserialize(io_data)¶
Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
- filewrite(filename)¶
Convenience method bound to the class.
Simply accesses the write function.
- get_initdata()¶
Returns dict appropriate for creating/initializing a new Serializable object.
- classmethod get_operator_names()¶
Returns a list of all operator names for the quantum system. Note that this list omits any operators that start with “_”.
- matrixelement_table(operator)[source]¶
Returns table of matrix elements for operator with respect to the eigenstates of the qubit. The operator is given as a string matching a class method returning an operator matrix.
- receive(event, sender, **kwargs)¶
Receive a message from CENTRAL_DISPATCH and initiate action on it.
- Parameters:
event (
str) – event name from EVENTSsender (
DispatchClient) – original sender reporting the event**kwargs
- Return type:
- serialize()¶
Convert the content of the current class instance into IOData format.
- Return type:
- set_params(**kwargs)¶
Set new parameters through the provided dictionary.
- set_params_from_gui(change)¶
Set new parameters through the provided dictionary.
- supported_noise_channels()¶
Returns a list of noise channels this QuantumSystem supports.
If none, return an empty list.
- Return type: