KerrOscillator#

class scqubits.core.oscillator.KerrOscillator(E_osc, K, l_osc=None, truncated_dim=6, id_str=None)[source]#

Class representing a nonlinear Kerr oscillator/resonator governed by a Hamiltonian \(H_\text{Kerr}=E_\text{osc} a^{\dagger} a - K a^{\dagger} a^{\dagger} a a\), with \(a\) being the annihilation operator.

Parameters:
  • E_osc (float) – energy of harmonic term

  • K (float) – energy of the Kerr term

  • l_osc (Optional[float]) – oscillator length (used to define phi_operator and n_operator)

  • truncated_dim (int) – desired dimension of the truncated quantum system; expected: truncated_dim > 1

  • id_str (Optional[str]) – optional string by which this instance can be referred to in HilbertSpace and ParameterSweep. If not provided, an id is auto-generated.

Return type:

QuantumSystemType

Methods

KerrOscillator.__init__(E_osc, K[, l_osc, ...])

KerrOscillator.annihilation_operator()

Returns the annihilation operator

KerrOscillator.broadcast(event, **kwargs)

Request a broadcast from CENTRAL_DISPATCH reporting event.

KerrOscillator.create()

Use ipywidgets to create a new class instance

KerrOscillator.create_from_file(filename)

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

KerrOscillator.creation_operator()

Returns the creation operator

KerrOscillator.default_params()

Return dictionary with default parameter values for initialization of class instance

KerrOscillator.deserialize(io_data)

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

KerrOscillator.eigensys([evals_count])

Returns array of eigenvalues and eigenvectors

KerrOscillator.eigenvals([evals_count])

Returns array of eigenvalues.

KerrOscillator.filewrite(filename)

Convenience method bound to the class.

KerrOscillator.get_initdata()

Returns dict appropriate for creating/initializing a new Serializable object.

KerrOscillator.get_operator_names()

Returns a list of all operator names for the quantum system.

KerrOscillator.hilbertdim()

Returns Hilbert space dimension

KerrOscillator.matrixelement_table(*args, ...)

rtype:

ndarray

KerrOscillator.n_operator()

Returns the charge-number n operator defined as \(i (a^{\dagger} - a)/ ( \sqrt{2} l_\text{osc})\), with \(a\) representing an annihilation operator, and \(l_\text{osc}\) the oscillator length.

KerrOscillator.phi_operator()

Returns the phase operator defined as \(l_\text{osc} (a + a^{\dagger})/\sqrt{2}\), with \(a\) representing an annihilation operator, and \(l_\text{osc}\) the oscillator length.

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

Receive a message from CENTRAL_DISPATCH and initiate action on it.

KerrOscillator.serialize()

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

KerrOscillator.set_params(**kwargs)

Set new parameters through the provided dictionary.

KerrOscillator.set_params_from_gui(change)

Set new parameters through the provided dictionary.

KerrOscillator.supported_noise_channels()

Returns a list of noise channels this QuantumSystem supports.

KerrOscillator.widget([params])

Use ipywidgets to modify parameters of class instance

Attributes

E_osc

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

K

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

id_str

l_osc

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

truncated_dim

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

annihilation_operator()#

Returns the annihilation operator

Return type:

ndarray

broadcast(event, **kwargs)#

Request a broadcast from CENTRAL_DISPATCH reporting event.

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

  • **kwargs

Return type:

None

classmethod create()#

Use ipywidgets to create a new class instance

Return type:

QuantumSystem

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

creation_operator()#

Returns the creation operator

Return type:

ndarray

static default_params()[source]#

Return dictionary with default parameter values for initialization of class instance

Return type:

Dict[str, Any]

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

eigensys(evals_count=6)#

Returns array of eigenvalues and eigenvectors

Parameters:

evals_count (int) – number of desired eigenvalues (default value = 6)

Return type:

Tuple[ndarray, ndarray]

eigenvals(evals_count=6)[source]#

Returns array of eigenvalues.

Parameters:

evals_count (int) – number of desired eigenvalues (default value = 6)

Return type:

ndarray

filewrite(filename)#

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

Return type:

None

Parameters:

filename (str) –

get_initdata()#

Returns dict appropriate for creating/initializing a new Serializable object.

Return type:

Dict[str, Any]

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 “_”.

Parameters:

subsys – Class instance of quantum system

Return type:

List[str]

Returns:

list of operator names

hilbertdim()#

Returns Hilbert space dimension

Return type:

int

n_operator()#

Returns the charge-number n operator defined as \(i (a^{\dagger} - a)/ ( \sqrt{2} l_\text{osc})\), with \(a\) representing an annihilation operator, and \(l_\text{osc}\) the oscillator length.

Return type:

ndarray

phi_operator()#

Returns the phase operator defined as \(l_\text{osc} (a + a^{\dagger})/\sqrt{2}\), with \(a\) representing an annihilation operator, and \(l_\text{osc}\) the oscillator length.

Return type:

ndarray

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

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:

List

widget(params=None)#

Use ipywidgets to modify parameters of class instance

Parameters:

params (Dict[str, Any] | None) –