# Expectation values of states in QFT via the path integral

The path integral in QFT is usually computed only for the vacuum state,

$$\langle 0 | T\{ A \} | 0 \rangle = \int \mathcal{D}\phi(x) A e^{iS[\phi]}$$

Doing it for different states is a bit trickier, short of expressing them in terms of the vacuum state, but you do encounter it once in a while, given two states $$\phi_1$$ and $$\phi_2$$ at two different times, the transition amplitude is something of the form

$$$$\langle \varphi_1\vert \hat{A}\vert\varphi_2\rangle = \int_{\varphi_1(x_1)}^{\varphi_2(x_2)} \mathcal{D}\varphi(x)Ae^{\frac{i}{\hbar}S[\varphi(x)]}$$$$

On the other hand, you also encounter once in a while in the wavefunctional formalism for QFT the following : for two wavefunctionals $$\Psi_i[\phi(x)]$$, their expectation value is defined by

$$\langle \Psi_1 | A | \Psi_2 \rangle = \int \mathcal{D}\phi(x) \Psi_2[\phi(x)] \Psi_1^*[\phi(x)]$$

Is there some kind of link between those two facts, given that they both represent roughly the same quantities and both using a path integral?