## Results

### Measurements of avalanche pulse shape via quenching based on ARS

A schematic of the charging and discharging process of the SPAD in series with a resistor and the experimental system setup used for single-photon avalanche detection are shown in Fig. 1. Details of the experimental measurements are provided in the “Methods” section, along with further information regarding the quenching mechanism. A commercial Si SPAD (Hamamatsu S14643-02) with a sensing diameter of 200 μm was used to detect single photons. The quenching resistors (whether ARS or fixed, passive resistors) were connected in series with the SPAD. A periodic single-photon pulse with a 1 MHz repetition rate incident on the SPAD to trigger an avalanche, and the current flowing through the SPAD derived directly via readout from the oscilloscope. Details of the measurement setup are described in the “Methods” section.

The ARS is a 5 nm Al2O3 dielectric layer sandwiched by a Ti (5 nm)/Pt (50 nm) bottom electrode and an Ag (10 nm)/Au (50 nm) top electrode. The top and bottom electrodes (each 500 nm wide) are orthogonal, leading to a cross-bar device geometry. Fabrication details are provided in the “Methods” section.

When the ARS is used as a quenching resistor, the typical single-photon triggered avalanche pulse shape (current flowing through the SPAD) is shown in Fig. 2a as the blue curve. Four inflection points are marked in Fig. 2a as (A, B, C, D). The driving voltage of the laser is shown as a red curve. As will be compared later, the pulse shape has a significant difference from those observed in our experiments with conventional passive quenching (i.e., with a fixed resistor). For the current trace of Fig. 2a, one possibility is that the current (A → B) rise is attributable to the discharging process of the SPAD, followed by B → C and C → D corresponding to recharging processes. If this were the case, then the quenching resistance during B → C is larger than that during C → D period (since the B → C segment slope is lower than the C → D segment). This would imply that the switch to the low-resistance state of the ARS occurred around point C, and there should then be a significant rise in the SPAD current at C, which we do not observe.

Therefore, discharging is completed before point A and point A is involved in the recharging process. The rise of current at point A is caused by the switching of the resistance for the ARS (as shown in Fig. 2a). This is indeed expected if we consider estimates of the timescales involved: the RC time constant for discharge is ~700 ps for a junction capacitance of 0.7 pF (datasheet) and a diode resistance of 1 kΩ (The estimation of diode resistance is discussed in “Methods” section). It follows that ~90% of the stored energy will be discharged in ~1.6 ns (from Eqs. (1) and (2)). In contrast, resistive switches are known to switch on timescales of ~100 ps to a few ns (c.f. Menzel et al.24 and the multiple references [5–19] listed therein). Based on these estimates’ expectations, we propose that at point A the SPAD has already completed its discharge, and segment A → B is caused by the ARS switching from the off (high-resistance) to the on (low-resistance) state. Segment B → C represents the fast recharging period with the ARS in the on state. When the voltage across the ARS drops below a critical value (the off voltage) at point C, the ARS reverts to the off state, leading to the C → D segment. It should be noted that the SPAD recovery will continue after point D and the increased resistance of the ARS prolongs the process. Thus, in this paper, we refer to the A → D process as the critical recovery process, which is accelerated by the ARS and the duration after D is designated as the recovery tail. In this paper, the crucial point is that the critical recovery process is fast, during which time the voltage restored on the SPAD is sufficient to let the SPAD detect other photons. The critical recovery process dominates the counting speed of the SPAD. Although during the recovery tail process, the SPAD bias is slowly restored, it does not significantly influence the detection efficiency. Since it is hard to sense the exact value of the off-state resistance of the ARS in the serial system during fast quenching and recharging process, it is difficult to precisely determine the recovery and is beyond the scope of this paper.

Further analysis of this behavior via simulations is described later in this paper. A statistical analysis of the critical recovery times taken over 1000 avalanche pulses, and the critical recovery time distribution is shown in the histogram of Fig. 2b. Most pulses have a short critical recovery time (<50 ns), and the averaged critical recovery time is estimated as 30 ns. Since the laser pulse width is 15 ns, and we target single-photon pulses via the use of a 1000× attenuator applied to a ~1000 photon number (average) laser pulse, we cannot rule out the stochastic impingement of multiple (few) photons rather than a single photon only. The detection of one or a few photons is not relevant to the purpose of the current paper, which is to demonstrate the dynamic quenching operation of the ARS. However, this variation may play a role in our observation of the spread in the critical recovery times. In addition, the variation of pulse width in the output of the SPAD quenched by the ARS is also probably caused by the stochastic electro-chemical reaction processes of the ARS filament growth and dissolution.

The jitter performance of the ARS quenched SPAD is calculated from the avalanche output measured by the oscilloscope (Fig. 2c). Details are provided in Supplementary Materials. The threshold for counting is set to be 5 mV, and the sampling time step is set to be 0.5 ns. A sharp and high peak appears at t ≈ 21 ns (full width at half maxima, FWHM ~1.5 ns), while there is a second small peak located at t ≈ 35 ns, which is caused by the ARS degradation and will be discussed later. Degradation measurements indicate that the jitter degrades with repeated operation—these results are discussed later in the paper. In our measurements, the modulation bandwidth of the TO-packaged laser (Thorlabs L520P120) compresses the 15 ns pulse width of the drive waveform (voltage monitored as shown in Fig. 2a red curve). The actual current waveform is narrower than the electric pulse, as a result of which the jitter time is much shorter than the electric input pulse width of the laser (15 ns). The measured jitter indicates that most avalanche responses happen with good timing consistency due to the fast and critical switching of the ARS.

### Hysteresis behavior of ARS

The quasi-static current–voltage (IV) measurement of the ARS following the standard forming treatment at 5 V30 (and before the quenching experiments) is shown in Fig. 2d. A compliance current (1 mA) is used to restrict the conducting filament thickness to keep the device under a volatile mode (i.e., a reversible return to the high resistance state at V = 0)26,31,32. As can be seen, the on voltage is ~0.5 V, the off voltage is ~0.1 V, and the off-state leakage is <1 pA. The off-state leakage current flowing through the ARS is lower than the Keysight B1500a semiconductor analyzer discrimination level and is buried by its noise floor as shown in Fig. 2d. Following repeated operations during our experiments, the on and off switching voltages drift upwards, with an increase in leakage current. This can be seen in the IV characteristics of Fig. 2e (measured with the same time scale as Fig. 2d), taken after ~1010 avalanche triggers at periodical operation single-photon signal. The on and off switching voltages have drifted upwards to 8 and 5 V, respectively, and off-state and on-state resistances at this condition are ~400 and ~40 kΩ, as is fitted by the simulation, which will be discussed later. The consequences of this drift in relation to degradation are discussed later. The degradation will need to be improved through materials development and is not unusual for new device development.

### Comparison with conventional passive quenching

The impact of faster critical recovery times is illustrated in high repetition rate (20 MHz) single-photon measurements (Fig. 4a and b). Details of the measurements are presented in the “Methods” section. Representative avalanche responses (across 1.6 μs time windows) are shown both for the adaptive quenching (ARS) and conventional passive quenching (100 kΩ) cases. The red curve indicates the single-photon drive voltage, and the blue curve is the SPAD signal. Statistical analysis of the data was carried out using single-photon response data over 0.4 ms with a time step resolution of 0.4 ns. There are 8000 single-photon pulses involved in the analysis. Details of the analysis are provided in the Supplementary Materials section. The single-photon counting rate under 20 MHz single-photon repetition rate is 1.8 MHz for conventional passive quenching (100 kΩ) and 8.5 MHz for ARS quenching.

Similarly, the counting rates under different repetition rates ranging from 1 to 50 MHz are calculated and plotted in Fig. 4c for SPADs quenched by ARS and conventional passive quenching. For comparison, 400 kΩ (Roff of ARS), 40 kΩ (Ron of ARS), and 100 kΩ are used to perform the conventional passive quenching. As is shown in Fig. 4c, the counting rate of the ARS quenched SPAD is significantly higher than the passive quenched SPAD, especially when the repetition rate is large. The results are consistent with the faster critical recovery times of the SPAD measurements with ARS quenching.

However, a slow and continuous increase of the voltage across the SPAD after point D (Fig. 2a) would lead to higher dark counts. In the experiment, the dark count rate of the SPAD quenched by a 100 kΩ resistor is 207 kHz, while that for the SPAD quenched by the ARS is 330 kHz. In future work, the stability of the ARS can be improved, so that the off voltage of the ARS is close to 0 V and the recharging process stops right after point D (Fig. 2a).

### Analysis of the ARS quenching of the SPAD

The narrow avalanche pulse width and fast quenching performance are consistent with a critical change in the resistance of the ARS when quenching the SPAD. The switching mechanism of resistive switches has been extensively studied, as noted earlier. Switching times have been reported in the range of ~100 ps to a few ns24. There have been limited reports on the switching behavior of similar resistive switches in series with a diode (or capacitor) and the impact of the capacitor’s charging and recharging process. The results reported here are consistent with a switching time on the level of a few ns.

In the following, we discuss the modeling of the ARS quenched SPAD’s response via PSPICE simulations using OrCAD Pspice Designer. Details of the analytical model are presented in the “Methods” section. For this simulation, the switching voltages and resistances of the ARS are extracted from the IV measurement results, as is shown in Fig. 5a. The ARS on and off time constants were empirically set at the level of 1 ns.

The simulation results are shown in Fig. 4d and e. In Fig. 4d, the response current is shown in solid blue curve while the excess bias, which is defined as the voltage across SPAD minus breakdown voltage is shown in dashed red curve. The shape of the blue current curve is similar to that observed in the experiment. The SPAD abrupt voltage drop illustrates how the discharge proceeds (1–4 ns). After the discharge, the ARS starts to switch and generates an avalanche pulse output with A → B → C → D periods similar to the experimental results shown in Fig. 2a. Figure 4e shows the voltage across the ARS (purple curve) and the ARS resistance (dark curve). Using relevant physical parameters (see “Methods” section), the simulations show that with the triggering of an avalanche, the junction capacitor of the SPAD discharges, and the ARS switches from its high (400 kΩ) to low (40 kΩ) resistive states in 4.7 ns (A → B).

It should be noted that point A (t = 2.47 ns @Fig. 2a) occurs during the discharging period (1–4 ns), after the voltage across the ARS exceeds 8 V. As a result of switching-on, the current increases, and the recharging process is then accelerated (B → C in Fig. 4d, e). During the fast recharging, the excess voltage across the SPAD increases to 4 V (red dashed curve in Fig. 4d), and the voltage on the ARS is reduced to below 5 V (purple curve in Fig. 4e). As a result, the ARS switches off (C → D in Fig. 4e). The recharging process then decelerates (C → D in Fig. 4d). The shape of the simulated SPAD response is consistent with experimental observations, which means that the ARS switches resistance from the high to the low state during the SPAD discharge and recharge process of the SPAD, thereby significantly reducing SPAD reset times. However, two issues remain unresolved in the model used. First, the magnitude of the current in the simulation peaks at ~100 μA, which is higher than what is observed (10–40 μA). The reason for this is not clear at this moment. Second, our model does not incorporate statistical fluctuations of the avalanche pulse width (Fig. 2b).

## Discussion

We demonstrate in this paper that the ARS accomplishes resistive switching during the avalanche process with the result that the avalanche reset is greatly accelerated compared to a passive resistor. Although the critical recovery time (30 ns) is much longer than the state of the art VLQC method (2–3 ns @sensing area size of 20 μm11,12), the ARS quenching method holds significant advantages in suppressing the afterpulsing effect with a large initial quenching resistance (400 kΩ in this work, a few tens of kΩ in ref. 11 (VLQC), and 800 Ω in ref. 12) and therefore the sensing area size can be much larger (200 μm in this work) and there is no need to design a hold off time, which can be quite long (>20 ns) in the VLQC method. Moreover, VLQC requires more processing complexity. We are offering a neat and simple way to get 10× improved critical recharging speeds in large SPADs with just a swap of the resistor. Based on the working principles analyzed in this paper, this critical recovery time may be further shortened by reducing the on-state resistance (to accelerate the recharging process) and improving the redox speed of the Ag electrode (increasing the critical switching speed of the ARS).

We note that printed circuit board (PCB) interconnects limit our time resolution for the single-photon counting to a few nanoseconds. Hence our measurements cannot probe the sub-ns dynamics of the filamentary devices that have been reported by other workers in similar materials (see Menzel et al.24 and references [5–19] therein, for instance). However, our approach is adequate for clearly demonstrating the clear benefits of the ARS devices in reducing passive quenching response times to tens of nanoseconds and by a factor of 10× as compared to the passive quenching case.

We now turn to a discussion of the drift in the ARS characteristics, as was noted earlier. A photon counter (HydarHarp 400) was used to obtain a counting histogram of the SPAD quenched by the ARS (details are provided in the “Methods” section). Compared to the measurements of Fig. 2a–c and Fig. 4a–c, we used the same model of SPAD (Hamamatsu S14643-02) but employed a lower overvoltage (2 V) compared to 9 V for the earlier measurements. The light pulse was attenuated to 0.1 photons/pulse. As is shown in Fig. 5, we measured the histogram at three different time points (Checkpoints #1, #2, and #3). Checkpoint #1 is chosen at the beginning of the measurement when t ≈ 0 min and the ARS switching cycle ≈0. There is a significant peak, indicating a good timing response. The dark count rate (DCR) is around 8 kHz, and lower than the value in the measurements for Figs. 2 and 4 (330 kHz) due to the smaller overvoltage. The single-photon detection efficiency (SPDE) is 30%. Unipolar IV hysteresis performance is shown in the inner-plot, representing a stable hysteresis performance. After continuous operation for 30 min, the SPAD performance was measured again (Fig. 5b, Checkpoint #2). Note the appearance of a second peak in the histogram. The DCR decreases to around 6 kHz, and the SPDE decreases to 15%. The IV hysteresis shown in the inner-plot indicates that the ARS has become leakier. We infer that it is becoming harder for the ARS to be switched off, so it is highly probable that the avalanche could not be quenched, and so the counting rate is suppressed. The second peak is probably caused by the longer restoring time of the ARS. After 1 h 30 min (Checkpoint #3), the second peak has increased in magnitude relative to the first. As The DCR and SPDE decrease to around 5 kHz and 11%, respectively. As seen in the IV hysteresis curve, the ARS tends to switch to non-volatile mode, indicating that it is much harder for the ARS to be switched off by the unipolar driving voltage.

The FWHM of jitter distributions (first peak) shown in Fig. 5a–c are quantified as 2, 3.6, and 10.3 ns at the three checkpoints over time. The degradation of single-photon detection performance is mainly caused by the limited device endurance. The fast avalanche pulse response is enabled by the switching of the ARS between on and off states. With accumulated photon counting, the ARS becomes leakier and harder to switch off, causing the SPAD performance to degrade. It is well known that lower quenching resistance degrades after-pulsing and jitter performance1,36. We anticipate, therefore, that the increased leakage in the ARS will also lead to poor jitter and after-pulsing characteristics. These measurements were not carried out.

It should be noted that the data in Figs. 24 for ARS quenched SPAD was collected within a short time (when the IV performance of Fig. 2d was tested), during which the behavior of the ARS did not change appreciably. Such drift can arise from microstructural changes during the conducting filament formation and dissolution, leading to eventual device degradation.

Detailed studies of the degradation process and statistical evaluation of the fatigue characteristics are the future research subjects and are outside this paper’s scope. We note that similar considerations relating to material stability under repeated operation have also been the subject of significant work in developing this class of materials for non-volatile memory applications with high cycling endurance. For instance, studies have shown that endurance can be improved via using alloy electrodes like Ag-Te37, Ag-Cu38, inserting Ag diffusion barrier layer39, area scaling of the device switching region40, using host materials with stronger chemical bonding among its components41, nitridation42. We anticipate that resistance to such microstructural degradation for the case of the ARS may similarly be achieved by designing optimized electrode, switching structures, adjusting resistor area, new host matrix and electrode materials, and the introduction of solute additives that can retard diffusive processes that exacerbate microstructural fatigue.

Silicon SPADs are technologically relevant for use as fluorescence monitors in biomedical applications. The widest range of such applications are at room temperature due to issues of cost, practicality, and application space. Silicon SPADs can fit this bill since, unlike longer wavelength detectors such as InGaAs and HgCdTe-based SPADs, the Si dark current density is three orders of magnitude lower (compare for instance the Hamamatsu S14643-02 Si and G14858-0020AA InGaAs detectors) at room temperature. Furthermore, a major intent for resistively quenched SPADs is reduced cost and complexity. This is mostly also applicable to room temperature measurements. Lower temperature applications have a higher cost ceiling at which point fast active quenching circuitry can be incorporated, and there is no need for resistive quenching. Our studies have therefore focused only on room temperature measurements of ARS-based quenching. At lower temperatures, we would expect the ARS switching speed to drop (ref. 43) and the switching voltage to increase (Huang’s work44). So, a careful calibration is needed when using ARS to quench the SPAD at low temperatures to enhance the SPAD performance45.

The afterpulsing probability was estimated by analyzing the oscilloscope data (for 1 and 3 MHz repetition rates) in the following manner. A mimic dual pulse window varying from 0.1 to 100 ns was used to gather the afterpulsing peaks that occurred following the photon-generated pulse. We used 5 and 35 mV as the counting thresholds for the ARS and the fixed resistor quenched SPAD, respectively. The afterpulsing probabilities for the SPAD quenched by the ARS, and the 400, 100, and 40 kΩ, respectively, are 7.6%, 2.45%, 8.6%, and 18.3%. The better performance of the ARS compared to the 40 kΩ fixed resistor is due to the critical switching of the ARS and an averaged large off-state resistance, which quenches avalanche fast and reduces the number of carriers that flow through the avalanche region, leading to a lower probability of afterpulsing36. The poorer performance of the ARS compared to the 400 kΩ fixed resistor is likely due to an increase in the probability of switching failure caused by degradation.

It should be noted that although the external drive voltage to the circuit is over 100 V, most of it drops across the SPAD, not the ARS. The maximum voltage drop that develops across the ARS occurs when there is a dynamic change of the voltage across the SPAD junction capacitance, and is limited to a few volts. To protect the ARS from burning, two points should be guaranteed: (1) The overvoltage should not be too large and (2) the external voltage should be loaded and unloaded gradually to prevent an un-expected sudden voltage drop on the ARS (the impendence of SAPD is small when the frequency is large).

The linear model (Eqs. 14) used in this work is a simplification for the ARS dynamic behavior. While our simulations fit the avalanche pulse well, we note that there is a discrepancy when fitting the IV curve due to the assumption of linearity. This is described in the Supplementary section and in Fig. s4. According to Russo’s work on the resistance of metallic filamentary switches that are progressively driven by an electric field, the switching speed can be regarded as constant on a short time scale (tens of nanoseconds)46. Since the IV sweep is a long process (>50 ms), we believe the linear model is inadequate for accurately fitting the IV curve.

The current largest application of passive quenching is SiPM (silicon photomultiplier)10,47,48,49. This work is potentially beneficial for improving the performance of the SiPM by accelerating the recovery speed of avalanche quenching. In addition, the ARS is easy to fabricate and compatible with the Si material system. Therefore, the potential for integration with SPAD arrays is high.

In summary, an avalanche photodetector quenched with a self-adaptive resistive switch (ARS) has been proposed and demonstrated experimentally. We find that this approach led to an avalanche pulse width is at least eight times narrower than the conventional passive quenching method while retaining its approach’s simplicity. The experimental data and simulations support our contention that such fast switching is accomplished due to the voltage-dependent resistance of the ARS switch. In response to the bias changes across the ARS during the discharging and charging processes, it presents a high resistance during the SPAD discharge process, drops to a low resistance during the recharge process, and resets to a higher resistance value following the recharge.

## Methods

### Working principles of the SPAD quenching and how the adaptive resistive switch works in the system

$$I=({V}_{a}-{V}_{b})(1-{e}^{-t/{R}_{d}{C}_{d}})/{R}_{L}$$
(1)
$${V}_{{{{{{{\rm{SPAD}}}}}}}}=\left({V}_{a}-{V}_{b}\right){e}^{-t/{R}_{d}{C}_{d}}+{V}_{b}$$
(2)
$$I=({V}_{a}-{V}_{b}){e}^{-t/{R}_{L}{C}_{d}}/{R}_{L}$$
(3)
$${V}_{{{{{{{\rm{SPAD}}}}}}}}=-\left({V}_{a}-{V}_{b}\right){e}^{-t/{R}_{L}{C}_{d}}+{V}_{a}$$
(4)

The diode resistance (Rd) is the serial sum of the resistance in barrier region (the neutral region that current goes through) and space-charge layer. A smaller sensing area and a thicker depletion region would lead to a larger diode resistance. The typical diode resistance is in the range of 100 Ω to a few kΩ1. The diode resistance of the SPAD used in this paper is taken to be 1 kΩ since it has a large sensing area (diameter is 200 μm) with a relatively thick barrier region (the quantum efficiency can reach as high as 85% @ 650 nm wavelength).

In SPADs, a large RL facilitates sufficient quenching and a lowered jitter time in the discharging process1. As a result, RL is typically held at ~100 kΩ1. However, as shown in Eq. (4), this high quenching resistance also increases the recharging time significantly due to a high RLCd value (since Rd is typical ~100 Ω to a few kΩ1, the discharging time—Eqs. (1) and (2)—can be ignored compared to the recharging time). Since the probability of an avalanche triggered by newly absorbed photons is very low while the SPAD is being recharged, this longer recovery time limits the SPAD’s frequency response when passive quenching is used. What is needed to improve the SPAD’s frequency response is a dynamic resistor with a high resistance during the discharge process and a low resistance during recharging.

The ARS device is connected in series with the SPAD (replacing the passive resistor in Fig. 1). For the process to be successful, a dynamic interaction between metallic filament formation kinetics and avalanche quenching needs to occur. When absorbed photons trigger an avalanche in the SPAD, the ARS is in the off-state (high resistance). The SPAD depletion capacitance discharges and the avalanche is quenched when VSPAD < Vbreakdown. Until this point, the ARS resistance should remain in the high resistance state to ensure rapid quenching of the SPAD. Following avalanche termination, the ARS should switch to the low resistance state driven by the voltage built up across it due to the drop in VSPAD. This time scale is dictated by the formation of the conductive filament across the oxide due to metal drift under the electric field. The transition to the low resistance state in the ARS, in turn, enables rapid recharging of the SPAD. As the recharging progresses, the voltage across the ARS now decreases, and when it attains a value smaller than the off voltage of the ARS, the conductive filament dissolves. The ARS returns to its high resistance off-state, and the SPAD circuit is reset. The dynamic lowering of the ARS resistance enables rapid resetting of the SPAD circuit.

### ARS fabrication and measurement

The ARS devices were fabricated on Si wafers covered with 300 nm thermal SiO2 (see Fig. s1 in the Supplementary section for the experimentally fabricated devices). In this paper, a typical cross-bar architecture50 is used to form the device geometry. The 500-nm-wide bottom electrode strips were fabricated by electron-beam lithography followed by electron-beam evaporation of a Ti (5 nm)/Pt (50 nm) bilayer thin film and lift-off. Next, an AlOx layer was deposited by atomic layer deposition (Veeco/CNT Fiji) at a substrate temperature of 250 °C, using trimethylaluminium (TMA) and H2O as precursors. The AlOx layer was then patterned via photolithography and reactive ion etching (CHF3: 15 sccm, Ar: 5 sccm, RF: 50 W, ICP: 300 W, Press: 7 mTorr). Next, the top electrodes, 500 nm wide and orthogonal to the bottom electrodes, were deposited using electron-beam lithography, followed by electron-beam evaporation of Ag (10 nm)/Au (50 nm) and lift off. The Ag (10 nm)/Au (50 nm) top electrode was created with a Lesker PVD-250 e-beam evaporator at a base pressure in the low 10−8 Torr range. The substrates were rotated at 20 rpm while kept at room temperature utilizing a chilled-water cooling stage. The system was equipped with a QCM feedback control to maintain the desired deposition rates within 3% tolerance. The device’s active area (500 nm × 500 nm) corresponds to the area of cross-sectional overlap between the top and bottom electrodes. Finally, Ti (20 nm)/Au (200 nm) probe-contacts (100 μm × 100 μm) were deposited via photolithography and electron-beam evaporation.

The ARS was packaged in a commercial TO-5 can, and the electrodes were wire bonded to the package pins. Since the distance between package pins is several millimeters, the stray capacitance of the ARS package can be ignored.

The current–voltage characteristics of the ARS were measured by a Keysight B1500A semiconductor parameter analyzer.

### Avalanche pulse shape and quenching measurements

The over-voltages for ARS quenching and conventional quenching are carefully adjusted so that the single-photon detection rates for the SPAD quenched by the ARS and fixed quenching resistor (60 and 100 kΩ) are the same under a repetition rate of 1 MHz. The interval between two photons is long enough for the SPAD quenched by fixed resistance to have a full recovery. For the ARS-based dynamic quenching, since the ARS has a turn-on voltage of 8 V, the counting becomes significant only when the overvoltage is larger than 8 V. In this work, the overvoltage is taken to be 9 V. For conventional passive quenching, an overvoltage of 4 V is adequate to provide the same detection rate. The counting rate is estimated by reading the oscilloscope response curve and confirmed by connecting the AC output signal into a pulse counter (PicoHarp 300).

### Quenching measurement—SPAD response to high repetition rate photons

Counting rates for the 20 MHz single-photon pulse repetition rate were measured over 8000 single-photon pulses. The data accumulated over 0.4 ms length, in time, with a scanning time step of 0.4 ns. Counting is achieved by setting a trigger threshold for the SPAD response trace51. The counting principle is shown in Fig. s2, which is similar to that used as a commercial counter (Picoharp 300). The thresholds for counting are chosen to be above the noise floor (see literature for instance51). For the 100 kΩ quenched SPAD, the threshold is chosen to be 40 mV, and the light counting rate is 1.8 MHz. For ARS quenching, the threshold is chosen to be 5 mV, and the light counting rate is 9.3 MHz.

### Counting histogram measurement and single-photon detection performance calculation

A counter (HydarHarp 400) is used to replace the oscilloscope in Fig. 1d. The signal threshold and acquisition resolution are set to be 10 mV and 32 ps, respectively. The photon number in each pulse is attenuated to 0.1.

The photon detection efficiency is calculated from the total count probability (Pt) and dark count probability (Pd). Pt and Pd are defined as the avalanche pulse numbers per second divided by repetition rate, with and without light, respectively. The number of photo-generated e–h pairs (n) during each pulse obeys Poisson distribution (f(n)) and can be represented by52

$$f\left(n\right)=\frac{{\lambda }^{n}{e}^{-\lambda }}{n!}$$
(5)

Where λ is the average number of photon-generated e–h pairs per pulse and is equal to η·$$\bar{n}$$. η is the quantum efficiency of the SPAD, and $$\bar{n}$$ is the average number of photons per pulse (0.1). Assuming the avalanche probability (Pa) is the same between the avalanche events triggered by each laser pulse. And52

$${P}_{a}=1-\left(1-{P}_{d}\right){\left(1-{P}_{b}\right)}^{n}$$
(6)

Where Pb is the breakdown probability. Then the average avalanche probability per pulse, Pt, can be written as52

$${P}_{t}=\mathop{\sum }\limits_{n=0}^{{{\infty }}}{P}_{a}f\left(n\right)=1-{\left(1-{p}_{d}\right)}^{-\bar{n}{{{{{\rm{\eta }}}}}}{p}_{b}}$$
(7)

Therefore, the SPDE of the SPAD, which is equal with η·$${p}_{b}$$, can be expressed as52

$${{{{{{\rm{SPDE}}}}}}}=\frac{1}{n}{ln}\left(\frac{1-{P}_{d}}{1-{P}_{t}}\right)$$
(8)

### PSPICE simulation

The software OrCAD Pspice Designer was used to simulate the quenching process. The circuit schematic is shown in Fig. s3. The photon signal port, resistances R1, R2, and the switches STrig, SSelf represent the switch in Fig. 1ac. V1 and R3 represent the equivalent internal voltage source (breakdown voltage) and the SPAD internal resistance, respectively. C1 represents the SPAD junction capacitance. The optical switch sub-circuit, V1, R3, and C1 form the equivalent circuit of the SPAD. The quenching resistance is represented by R4 (ARS with PSPICE model embedded in). V2 is the external voltage source. R5 is the 50 Ω matching resistor. Components C4, R6, and L1 form a bias tee, which separates the AC and the DC signal. The values of R6 are given by the datasheet of the bias tee ZFBT-4R2GW+, where the values of capacitance and inductance are missing. Thus, C6 and L1 are selected from the datasheet of another bias tee product BT1-0026 from Marki Microwave, which has a similar transmission band to what we used in the experiment. The AC signal is introduced from C4 into an oscilloscope, whose input impedance is 50 Ω (R7). In the simulation, we track the current flow through R7, the voltage across SPAD, and the voltage and current on the ARS during quenching. The photon signal port generates a voltage pulse53 with a pulse width of 1 ps whose rising edge triggers the switching (closure) of a voltage-controlled switch STrig. When STrig switches on (i.e., closes), C1 discharges through an internal loop (labeled blue in the figure: C1 → R3 → V1 → STrig → SSelf → C1). The discharge current exceeds the threshold of the current-controlled switch SSelf, leading to its closure when discharging begins. The falling edge of the electric pulse leads to the reopening of the voltage-controlled switch STrig. The current-controlled switch threshold is set to be 100 μA (latching current of self-sustainable avalanche1) in this work. When discharging ends, the current flow through SSelf equals the excess bias (the difference between external voltage and breakdown voltage) divided by the total resistance (the sum of the quenching resistance and diode resistance). If the current is below 100 μA, SSelf opens, and the avalanche is quenched. Else, the avalanche continues unquenched.

The SPAD breakdown voltage V1 is 100 V, and junction capacitance C1 is 0.7 pF (Hamamatsu S14643 datasheet). A typical value of 1 kΩ54 is taken for the internal resistance, and with V2 = 109 V, the excess bias is 9 V. The recharging path is labeled in Fig. s3 as a red loop through V1 → R5 → C1 → ARS → V1.

A Pspice model of the ARS was built using an approach based on Biolek’s work (Model R.2: Bipolar memristive system with threshold)55, using the following equations to describe the behavior of the ARS:

$$I={x}^{-1}{V}_{M}$$
(9)
$$\frac{{dx}}{{dt}}=f\left({V}_{M}\right)W\left(x,{V}_{M}\right)$$
(10)
$$f\left({V}_{M}\right)=\beta \times \left[{V}_{M}-\frac{1}{2}\left({V}_{{{{{{{\rm{on}}}}}}}}+{V}_{{{{{{{\rm{off}}}}}}}}\right)-\frac{1}{2}\left(\left|{V}_{M}-{V}_{{{{{{{\rm{off}}}}}}}}\right|-\left|{V}_{M}-{V}_{{{{{{{\rm{on}}}}}}}}\right|\right)\right]$$
(11)
$$W\left(x,{V}_{M}\right)=\theta \left({V}_{{{{{{{\rm{on}}}}}}}}-{V}_{M}\right)\theta \left(1-\frac{x}{{R}_{{{{{{{\rm{off}}}}}}}}}\right)+\theta \left({V}_{M}-{V}_{{{{{{{\rm{off}}}}}}}}\right)\theta \left(\frac{x}{{R}_{{{{{{{\rm{on}}}}}}}}}-1\right)$$
(12)

Here I and VM are the current and voltage on the ARS, x is the resistance of the ARS, $$\beta$$ denotes a resistance transition speed (the unit is Ω/(s·V)). $${V}_{{{{{{{\rm{on}}}}}}}}$$, $${R}_{{{{{{{\rm{on}}}}}}}}$$, $${V}_{{{{{{{\rm{off}}}}}}}}$$, and $${R}_{{{{{{{\rm{off}}}}}}}}$$ are switch on voltage, on-state resistance, switch off voltage, and off-state resistance. Extracting the key parameters of the ARS from Fig. 4b, the $${V}_{{{{{{{\rm{on}}}}}}}}$$ = 8 V, $${V}_{{{{{{{\rm{off}}}}}}}}$$ = 5 V, $${R}_{{{{{{{\rm{on}}}}}}}}=$$ 40 kΩ, and $${R}_{{{{{{{\rm{off}}}}}}}}$$ = 400 kΩ. The response varies as a function of $$\beta ,$$ and it is found that the switching speed is greatly influenced by the factor $$\beta$$. $$\beta$$ looks to be in the $$1\times {10}^{14}\Omega /({{{{{\rm{s}}}}}}{{{{{\rm{\cdot }}}}}}{{{{{\rm{V}}}}}})$$ ballpark to be able to show a similar response to our experimental results. In the paper, $$\beta$$ is assumed to be $$1\times {10}^{14}\Omega /({{{{{\rm{s}}}}}}{{{{{\rm{\cdot }}}}}}{{{{{\rm{V}}}}}})$$ to accommodate the ~ns level rising and falling speed of the response curve. As described in Biolek’s work55, $$\,\theta$$ is the smoothed step function as shown in Eq. (13), which is set to avoid convergence problems55

$$\theta \left(x\right)=\frac{1}{1+{e}^{-x/b}}$$
(13)
$$\left|x\right|=x\left[\theta \left(x\right)-\theta \left(-x\right)\right].$$
(14)

Here, b is a smoothing parameter ($$b=1\times {10}^{-5}$$ according to Biolek’s work55). Equation (14) defines the absolute value function by using the step function55.