# Linear Combination

Similar to Get Eigenvalue, this node extracts eigenstates from a spectrum. Unlike eigenvalues, it can also immediately calculate a linear combination of eigenstates.

## Inputs

• $\{ \psi_n \}$: list of states - the eigenstates of an operator extracted with the Spectrum-node.

## Outputs

• $\psi$: state - the result of the linear combination calculation

## Content

This node has a relatively complicated input. In essence, it calculates $\psi = \sum_{n=0}^N c_n \psi_n$. The input field labelled "$N_{eigenstates}$" gives the N in the equation. Below the "$N_{eigenstates}$"-field, $N$ input fields set the coefficients $c_n$.

The top half contains several buttons for helping a little: the tickbox for numerically normalizing the resulting state, a button for directly normalizing the user-input coefficients, and a button for resetting the coefficients to $c_0 = 1, c_n = 0$.

## Error messages

The node shows a warning if the #excitations exceeds the number of eigenstates calculated by the Spectrum-node.