Entanglement and readout of superconducting circuits with light