Apply Operator To State

For multiplying an operator onto a state.

Input

• O: Operator - The operator that will be applied
• $\psi$: State - The state that the operator will be applied to.

Output

• $\psi$: State - The state after the operator has been applied.

Example

Here it is shown how the Position Operator applied to a state, and then overlapped with the initial state: $\lt \psi | x \psi \gt$

... corresponds to finding the expectation value:$\lt \psi | x | \psi \gt$