Qubits are physical, a quantum gate thus not only acts on the information carried by the qubit but also on its energy. What is then the corresponding flow of energy between the qubitand the controller that implements the gate? Here we exploit a superconducting platform to answer this question in the case of a quantum gate realized by a resonant drive field. During the gate, the superconducting qubit becomes entangled with the microwave drive pulse so that there is a quantum superposition between energy flows. We measure the energy change in the drive field conditioned on the outcome of a projective qubit measurement. We demonstrate that the drive’s energy change associated with the measurement backaction can exceed by far the energy that can be extracted by the qubit. This can be understood by considering the qubit as a weak measurement apparatus of the driving field.
Detectors of propagating microwave photons have recently been realized using superconducting circuits. However a number-resolved photocounter is still missing. In this letter, we demonstratea single-shot counter for propagating microwave photons that can resolve up to 3 photons. It is based on a pumped Josephson Ring Modulator that can catch an arbitrary propagating mode by frequency conversion and store its quantum state in a stationary memory mode. A transmon qubit then counts the number of photons in the memory mode using a series of binary questions. Using measurement based feedback, the number of questions is minimal and scales logarithmically with the maximal number of photons. The detector features a detection efficiency of 0.96±0.04, and a dark count probability of 0.030±0.002 for an average dead time of 4.5 μs. To maximize its performance, the device is first used as an \emph{in situ} waveform detector from which an optimal pump is computed and applied. Depending on the number of incoming photons, the detector succeeds with a probability that ranges from 56% to 99%.