Photon filters in a microwave cavity