Quantum Computing - A Gentle Introduction by Eleanor Rieffell and Wolfgang Polak states on p57 :

Any Hermitian operator $O$ with eigenvalues $\lambda_j$ can be written as $O = \sum_j \lambda_j P_j$ where $P_j$ are the projectors for the $\lambda_j$-eigenspaces of $O$

An example operator is:

$\begin{pmatrix}0 & 0 & 0 & 0\\0 & 1 & 0 & 0 \\0 & 0 & 2 & 0\\0 & 0 & 0 & 3\end{pmatrix}$

which can be considered as split into eigenvalues and projectors:

  • 0 $|00\rangle\langle00|$
  • 1 $|01\rangle\langle01|$
  • 2 $|10\rangle\langle10|$
  • 3 $|11\rangle\langle11|$

Is there a mathematical procedure (and a corresponding Mathematica function) which can be used to transform the Operator into the set of Projectors? The Eigensystem function will provide the eigenvalues and eigenvectors, but it's not clear to me how that result is related to the required Projectors (which in the example I've given are 4-by-4 matrices). My overall objective is that, given an Operator, I can determine which states a system may end up in after a measurement and what the classical probability of each result is.

  • $\begingroup$ I think you just need to diagonalise the operator. $\endgroup$
    – mavzolej
    Apr 10, 2016 at 16:38

1 Answer 1


This is a great deal simpler than you think. I think you're probably just having one of those bad days where you forget a very basic fact.

Let $X$ be any vector written as a column, here one of the eigenvectors. Then the projector onto its direction is $\hat{X} \otimes \hat{X}^* = \hat{X}\,\hat{X}^\dagger$, where $\dagger$ is the complex conjugate transpose and $\hat{X} = X / \|X\|$ is the unit vector. This operator acts from the left on a state $Y$, so that the whole operation is

$$Y\mapsto (\hat{X}\,\hat{X}^\dagger)\,Y = \hat{X}\,(\hat{X}^\dagger\,Y)$$

So $\hat{X}^\dagger\,Y$ is a scalar: the projection of $Y$ onto the unit eigenvector. This multiplies $ \hat{X}$ to give an eigenvector with the length of the projection.

Mathematica is a bit quirky here: If you write the vector $X$ as an array $X = \{x1,x2,x3\};$ then you'll either need to call


(which makes perfect sense) or (the weird one) to use the conjugate transpose, you need to write $X$ as $X = \{\{x1\},\{x2\},\{x3\}\}$ and then the function $\mathrm{ConjugateTranspose}$ will work and your projector is $$X.\mathrm{ConjugateTranspose}[X]/(X.\mathrm{Conjugate}[X])$$

(you need to write $X$ as an array of one-element rows so that $\mathrm{ConjugateTranspose}$ can work)

  • $\begingroup$ There is also Norm for them 'nominators. $\endgroup$ Oct 5, 2015 at 12:30
  • $\begingroup$ I'm still a long way from fluent so I still need a push with the simple stuff :) In terms that are more familiar to me, you're saying: $|X\rangle\langle X|$ , which makes sense. $\endgroup$
    – David B
    Oct 5, 2015 at 13:29
  • $\begingroup$ I now see what the "Measurement in Quantum Mechanics" Wikipedia page is saying too. I don't need to bother constructing the Projectors to calculate the probabilities. For the state $|\psi\rangle$ I need the quantity: $|P_j|\psi\rangle|^2$ or $\langle\psi|P_j|\psi\rangle$ but since that's $\langle\psi|X\rangle \langle X|\psi\rangle$ I suppose I can just use the eigenvector and the state vector and calculate |$\langle X|\psi\rangle|^2$ (assuming normalised vectors). $\endgroup$
    – David B
    Oct 5, 2015 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.