We may simulate the three-polarising-filter experiment as a circuit, in the following way, using qutrits.
I will start by describing this as a sequence of transformations (a channel) on qutrits, and then give a circuit which simulates this using qubits.
$\def\ket#1{\left\lvert#1\right\rangle} \def\bra#1{\left\langle#1\right\rvert}$
The three-polarising-filter experiment as a channel on qutrits
We consider the path that the photon could take in the experiment, and describe the state of this path at each point in terms of a qutrit with state-space spanned by $\{ \ket\varnothing, \ket H, \ket V \} $. The state $\ket\varnothing$ is the vacuum state, meaning a state with no photons. The states $\ket H$ and $ \ket V$ correspond to having one photon which is horizontally or vertically polarised.
(A more general treatment would allow any finite number of photons, in which case one should instead consider an analysis in terms of creation and annihilation opeeators; for any finite number of qubits or qudits of fixed dimension, we must restrict ourselves to some limited number of photons — here we consider just one.)
As input, we can consider an arbitrary single-photon state. The state doesn't even have to be a pure state: we may consider any density matrix as input in the space spanned by $\{ \ket H, \ket V \} $.
The first filter does not quite 'measure' the photon, as it — well — filters it out. For a horizontally polarised filter, it strips away the vertical component, transforming it to the zero-photon state, and leaves the other 'basis' states unchanged. This realises the following transformation on density operators:
$$ F_H(\rho) \,=\, \ket\varnothing\!\!\bra\varnothing \,\rho\, \ket\varnothing\!\!\bra\varnothing \,+\, \ket H\!\!\bra H \,\rho\, \ket H \!\!\bra H \,+\, \ket\varnothing\!\!\bra V \,\rho\, \ket V\!\!\bra\varnothing$$
— note the final term above.
- Note that this transformation is irreversible, and in particular, non-unitary. It is sometimes said of such transformations that they involve an 'implicit measurement'. Sure enough, this transformation could be in an abstract sense simulated by a non-demolition polarisation measurement, followed by a unitary on the state-space which depends on the measurement outcome, and finally by forgetting the measurement outcome so that no explicit trace is left of whether the filtering happened. That could be a way of simulating the filtering operation, e.g. with CNOTs and qubits representing operations on qutrits. But the actual physics is a bit closer to the irreversible map $F_H$ itself, that I've described.
The second filter acts much the way the first filter does, but in a different basis. Consider the basis $\{ \ket\varnothing, \ket D, \ket d \} $, where $ \ket\varnothing$ is as before and $\ket D = (\ket H + \ket V) \,/ \sqrt 2$, $\ket d = (\ket H - \ket V) \,/ \sqrt 2$.
Then we may analogously define
$$ F_D(\rho) \,= \,\ket\varnothing\!\!\bra\varnothing \,\rho\, \ket\varnothing\!\!\bra\varnothing + \ket D\!\!\bra D \,\rho\, \ket D \!\!\bra D \,+\, \ket\varnothing\!\!\bra d \,\rho\, \ket d\!\!\bra\varnothing$$
to describe the effect of a polarising filter for $\ket D$.
The final filter is much as you might now expect:
$$ F_V(\rho) \,=\, \ket\varnothing\!\!\bra\varnothing \,\rho\, \ket\varnothing\!\!\bra\varnothing \,+\, \ket \varnothing\!\!\bra H \,\rho\, \ket H \!\!\bra \varnothing \,+\, \ket V\!\!\bra V \,\rho\, \ket V\!\!\bra V$$
— note here the second term.
The observation of the three-polarising-filter experiment is then that
$$
\begin{align}
(F_V \circ F_H) (\rho) = F_V ( F_H(\rho)) &= \ket\varnothing \!\! \bra\varnothing, \quad\text{whereas}
\\
(F_V \circ F_D \circ F_H) (\rho) = F_V \bigl(F_D\bigl( F_H(\rho)\bigr) \bigr) &= \tfrac 14 p\ket V \!\! \bra V + (1-\tfrac 14 p) \ket\varnothing \!\! \bra\varnothing,
\end{align}$$
where $p = \bra H \rho \ket H$ may be non-zero.
Simulation with a circuit using qubits
There are a number of different ways in which we could simulate this using qubits. A good choice of representation of the 'photon qutrit' will give us a simpler circuit. I would suggest the following.
Use a two-qubit representation with qubits labelled $N$ (for
number') and $P$ (for 'polarisation'), where we consider $\ket{0}_P$ to correspond to horizontal polarisation (or the lack of polarisation when there are no photons) and $\ket{1}$ to correspond to vertical polarisation.
Then
$$
\ket{\varnothing} \equiv \ket{0}_N\ket{0}_P\,,
\quad
\ket{H} \equiv \ket{1}_N\ket{0}_P\,,
\quad
\ket{V} \equiv \ket{1}_N\ket{1}_P\,.
$$
The two-qubit state $\ket{01}$ is not in the state-space of the simulation; by asserting that it is not valid as an input, we may use a simpler circuit.
The action of each filter can be described in terms of forcing a particular polarisation at output, for instance by mapping the polarisation to be selected for the $\ket{0}_P$, conditioned on the photon number being $\ket{1}_N$; preparing a fresh qubit in the state $\ket{0}$ and substituting it for the polarisation qubit; forcing the photon number to zero for the part of the state where the photon polarisation is not what we were selecting for; and then by discarding the information about the input polarisation and restoring the frame of reference for the polarisation.
Using this representation, the following circuit then represents the set-up of having all three filters present:
(I've used a 'controlled-X' gate for the $F_V$ filter to emphasise the similarity to the $F_D$ filter: in general one can define a filter using any controlled unitary $U$, where $U$ determines the polarisation to filter.)
The symbols at the end of the 'auxiliary' wires for each filter is just a map of discarding that qubit (i.e. you don't care about anything at all that happens to it from that point on and it isn't accessible for measurement). This is equivalent to using a destructive measurement, summing up the non-normalised density operators for the two measurement outcomes, and then forgetting the measurement outcome, but from a physical perspective, you don't usually have to measure a qubit — or a photon, or your carry-on luggage — in order to forget about it and then lose access to it forever.