Fig. 1: Interferometer and pulse sequence.

a Diagram of the two-way interferometer supplemented by a WPD. A quantum system is evolved to a superposition of taking paths 0 and 1 by the first beam-splitter (BS). Then it is subjected to an adjustable relative phase shift (θ), and coupled to the WPD which undergoes a unitary transformation, U, conditional on the system’s path 1. After recombination of the two paths by the second BS, the system is detected. b Logic diagram of the on-chip Ramsey interferometer. A superconducting Xmon qubit, Q1, acts as the interfering qubit, whose quantum state is split and recombined by two Hadamard transformations (H), in between which the which-path information in the quantum state space is controllably encoded on the photonic field of a resonator, R. A second Xmon qubit Q2 is used for preparing and detecting the state of the resonator. c Pulse sequence. The interference experiment with which-path information acquisition consists of three parts: Preparation of the resonator’s initial state \(\left\vert {W}_{0}\right\rangle\) with Q2; Ramsey interference supplemented with the WPD, realized by sandwiching the Q1-resonator interaction between two π/2 pulses, \({R}_{\pi /2}^{\theta }\) and \({R}_{\pi /2}^{x}\); State readout.