# Writing an arbitrary operator in bra-ket notation

An annoying fact about my physics textbook (Griffiths' Introduction to Quantum Mechanics) is that it introduces bra-ket notation without telling us how to use it. So I have a two-part question for SE:

1. In general, how do I write an operator written in functional form (say, the Hamiltonian, $-\frac{\hbar^2}{2m}\nabla^2+V$) as something in the form $\sum|a\rangle\langle b|$?
2. In particular, one of the questions my professor gave me told me (without explanation) that the Hamiltonian of the finite double well could be written $|L\rangle \langle R| + |R\rangle \langle L|$ for the purposes of calculating tunneling probabilities. How can I reproduce this result?

Details for #2: The text of the question reads:

A box containing a particle is divided into a left and a right compartment by a thin partition. If the particle is known to be on the right side with certainty its state is represented by the state vector $|R\rangle$. This is basically a particle in a box but where we have chosen to neglect spatial variations in either half of the box. ... The particle can tunnel through the partition; this tunneling effect is characterized by the Hamiltonian $H=\Delta (|R\rangle\langle L| + |L\rangle\langle R|)$ where $\Delta$ is a real number with dimensions of energy.

Essentially, I don't understand where that Hamiltonian comes from. I can see that it is something tunnel-y (in the sense that it's doing something with mappings from one state from the other) but not how to rigorously generate it.

1. If your desired basis is the set ${|n\rangle}$, then the completeness relation tells you: $\hat{O} = \sum_a \sum_b \langle a|\hat{O}|b \rangle |a \rangle \langle b|$. Ideally, we prefer to do this in the orthonormal basis in which the operator $\hat{O}$ is diagonal, in which case this becomes $\hat{O} = \sum_a \langle a|\hat{O}|a \rangle |a \rangle \langle a|$. Then the coefficients of the expansion are just the eigenvalues of the operator and the basis is the set of eigenvectors. This is called the spectral decomposition.
• Wait, I take that back. The set $|n\rangle$ has completely vanished in your second two equations - what happened there? – linkhyrule5 Mar 10 '14 at 11:42
• I'm not sure I follow. $n$ is just a variable, it doesn't matter what letter you use. $a$ and $b$ are just dummy indices for summation. – user27578 Mar 10 '14 at 12:44
• As for the second question: tunneling between the the wells means that $|L\rangle$ becomes $|R\rangle$ and vice versa. Apply that operator to either state and that's exactly what you get. Though I don't know why your professor is calling it the system's Hamiltonian; it's a simplified time evolution operator. – user27578 Mar 10 '14 at 12:55
• shrug It's a thing that we were told to set equal to $E \psi$, so... And I think I see - by "set $|n\rangle$" you mean "the set of vectors $|a\rangle, |b\rangle, |c\rangle\cdots$", correct? – linkhyrule5 Mar 10 '14 at 13:35