EigenvectorPhonon¶
-
class
sisl.physics.
EigenvectorPhonon
(state, parent=None, **info)[source]¶ Eigenvectors of phonon modes, no eigenvalues retained
Attributes
dkind
The data-type of the state (in str) dtype
Data-type for the state info
mode
parent
shape
Returns the shape of the state state
Methods
__init__
(state[, parent])Define a state container with a given set of states change_gauge
(gauge)In-place change of the gauge of the mode coefficients copy
()Return a copy (only the state is copied). iter
([asarray])An iterator looping over the states in this system norm
()Return a vector with the norm of each state \(\sqrt{\langle\psi|\psi\rangle}\) norm2
([sum])Return a vector with the norm of each state \(\langle\psi|\psi\rangle\) normalize
()Return a normalized state where each state has \(|\psi|^2=1\) outer
([idx])Return the outer product for the indices idx (or all if None
) by \(\sum_i|\psi_i\rangle\langle\psi_i|\)sub
(idx)Return a new state with only the specified states -
change_gauge
(gauge)¶ In-place change of the gauge of the mode coefficients
The two gauges are related through:
\[\tilde C_j = e^{i\mathbf k\mathbf r_j} C_j\]where \(C_j\) belongs to the gauge
R
and \(\tilde C_j\) is in the gauger
.Parameters: - gauge : {‘R’, ‘r’}
specify the new gauge for the mode coefficients
-
copy
()¶ Return a copy (only the state is copied).
parent
andinfo
are passed by reference
-
dkind
¶ The data-type of the state (in str)
-
dtype
¶ Data-type for the state
-
info
¶
-
iter
(asarray=False)¶ An iterator looping over the states in this system
Parameters: - asarray: bool, optional
if true the yielded values are the state vectors, i.e. a numpy array. Otherwise an equivalent object is yielded.
Yields: - state : State
a state only containing individual elements, if asarray is false
- state : numpy.ndarray
a state only containing individual elements, if asarray is true
-
mode
¶
-
norm
()¶ Return a vector with the norm of each state \(\sqrt{\langle\psi|\psi\rangle}\)
Returns: - numpy.ndarray
the normalization for each state
-
norm2
(sum=True)¶ Return a vector with the norm of each state \(\langle\psi|\psi\rangle\)
Parameters: - sum : bool, optional
if true the summed site square is returned (a vector). For false a matrix with normalization squared per site is returned.
Returns: - numpy.ndarray
the normalization for each state
-
normalize
()¶ Return a normalized state where each state has \(|\psi|^2=1\)
This is roughly equivalent to:
>>> state = State(np.arange(10)) >>> n = state.norm() >>> norm_state = State(state.state / n.reshape(-1, 1))
Returns: - State
a new state with all states normalized, otherwise equal to this
-
outer
(idx=None)¶ Return the outer product for the indices idx (or all if
None
) by \(\sum_i|\psi_i\rangle\langle\psi_i|\)Parameters: - idx : int or array_like, optional
only perform an outer product of the specified indices, otherwise all states are used
Returns: - numpy.ndarray
a matrix with the sum of outer state products
-
parent
¶
-
shape
¶ Returns the shape of the state
-
state
¶
-
sub
(idx)¶ Return a new state with only the specified states
Parameters: - idx : int or array_like
indices that are retained in the returned object
Returns: - State
a new state only containing the requested elements
-