# Rewriting a state as a field in CFT

I've been working through a textbook and course on conformal field theory recently.

However in a section illustrating how to calculate correlators for secondary fields (using the free boson as an example CFT), there is one line of working I don't understand.

Given a secondary field $$\vert \varphi \rangle$$, and a not necessarily primary field $$\vert \phi \rangle$$ related by:

$$\vert \varphi \rangle = a_{-r} \vert \phi \rangle : r > 0$$

apparently we can reverse the state-field correspondence to write:

$$\varphi \left( w \right) = \frac{1}{2 \pi i} \oint_{w} \frac{ \partial \Psi \left( z \right) \phi \left( w \right) } { \left( z - w \right)^r } \mathrm{d}z$$

I have no idea how they managed to get this from the above field. Note that here $$a_{-r}$$ is a creation operator, and $$\Psi$$ is some arbitrary field (I assume? it wasn't actually specified where $$\Psi$$ came from).

This step seemed like bit of a jump, and had no other explanation. However my attempt at a solution was:

Given that, for the free boson: $$\partial \Psi \left( z \right) = \sum_{r \in \mathbb{Z}} a_{r} z^{-r-1}$$

We can invert this to get:

$$a_{-r} = \frac{1}{2 \pi i} \oint_0 \frac{\partial \Psi \left(z \right)} {z^{-r+1} } \mathrm{d} z$$

So:

$$\varphi \left( w \right) = \left( \frac{1}{2 \pi i} \oint_0 \frac{\partial \Psi \left(z \right)} {z^{-r+1} } \mathrm{d} z \right) \ \ \phi \left( w \right)$$

$$= \frac{1}{2 \pi i} \oint_0 \frac{\partial \Psi \left(z \right) \phi \left( w \right)} {z^{-r+1} } \mathrm{d} z$$

Now clearly this isn't quite the same as what I need to get, as I showed above. The integral is contoured around $$0$$ not $$w$$, and has the wrong denominator.

It seems like this could be fixed by using a Laurent series for $$\partial \Psi \left( z \right)$$ centred around w. However surely this would mean the coefficients would no longer be $$a_{-r}$$. Further, this would fix the contour so it's now around $$w$$, and turn the $$z$$ into a $$\left( z-w \right)$$ in the denominator, but wouldn't fix the incorrect power. This makes me think that perhaps this isn't the correct approach then.