scqubits.utils.spectrum_utils.identity_wrap#
- scqubits.utils.spectrum_utils.identity_wrap(operator, subsystem, subsys_list, op_in_eigenbasis=False, evecs=None)[source]#
Takes the operator belonging to subsystem and “wraps” it in identities. The full Hilbert space is taken to consist of all subsystems given as subsys_list. subsystem must be one element in that list. For each of the other subsystems in the list, an identity operator of the correct dimension is generated and inserted into the appropriate Kronecker product “sandwiching” the operator.
- Parameters:
operator (
Union
[str
,ndarray
,Qobj
,Callable
]) – operator acting in Hilbert space of subsystem; if str, then this should be an operator name in the subsystem, typically not in eigenbasissubsystem (
Union
[QubitBaseClass, Oscillator, KerrOscillator, GenericQubit]) – subsystem where diagonal operator is definedsubsys_list (
List
[Union
[QubitBaseClass, Oscillator, KerrOscillator, GenericQubit]]) – list of all subsystems relevant to the Hilbert space.op_in_eigenbasis (
bool
) – whether operator is given in the subsystem eigenbasis; otherwise, operator is assumed to be in the internal QuantumSystem basis. This argument is ignored if operator is given as a Qobj.evecs (
Optional
[ndarray
]) – internal QuantumSystem eigenstates, used to convert operator into eigenbasis
- Return type:
Qobj
- Returns:
operator in the full Hilbert space (as specified by subsystem_list). This operator is expressed in the bare product basis consisting of the energy eigenstates of each subsystem (unless operator is provided as a Qobj, in which case no conversion takes place).