An adaptive tuning method and system for coherent measurement and control parameters of diamond NV color centers

By combining Bayesian decaying cosine model and MCMC sampling algorithm with reinforcement learning, the problem of parameter extraction in diamond NV color center coherent measurement that is prone to getting trapped in local optima was solved, realizing intelligent online optimization of hardware parameters and improving the adaptive tuning efficiency and long-term operation capability of quantum precision measurement system.

CN123046759APending Publication Date: 2026-11-06CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611055062.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In existing technologies, coherent measurement of diamond NV color centers is prone to getting trapped in local optima in low signal-to-noise ratio environments. Due to strong nonlinear coupling, the automatic parameter adjustment efficiency of multidimensional hardware control parameters is low, making it difficult to maintain the optimal balance point in real time.

Method used

A Bayesian decaying cosine model combined with the MCMC sampling algorithm is used for posterior parameter inference to construct a proximal policy optimization algorithm model. Reinforcement learning decision-making is used to achieve adaptive tuning of hardware parameters, and control is achieved through a fully automatic closed-loop architecture.

Benefits of technology

High-confidence extraction of quantum physics parameters under extremely low signal-to-noise ratio enables intelligent online optimization of hardware measurement and control parameters, automatically maintaining the system at the optimal balance between signal quality and measurement efficiency, and improving the adaptive tuning efficiency and long-term continuous operation capability of quantum precision measurement systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123046759A_ABST
    Figure CN123046759A_ABST
Patent Text Reader

Abstract

This invention proposes an adaptive tuning method for coherent measurement and control parameters of diamond NV color centers. Based on resonant frequency locking, this method introduces a Bayesian decay model into Rabi oscillations and Ramsey coherent measurements, and employs the MCMC sampling algorithm for posterior parameter inference. It extracts coherence time and frequency offset and calculates the magnetic field, effectively overcoming the drawback of traditional fitting methods that easily get trapped in local optima under low signal-to-noise ratios. Furthermore, using ODMR spectral contrast, Rabi oscillation amplitude, fluorescence signal noise standard deviation, and coherence time as state inputs, a near-end strategy optimization algorithm model is constructed. Using a composite reward function as the objective, it solves online for optimal hardware action parameters such as microwave power, laser power, sampling rate, and average number of scans, and then sends them out for execution. After hardware state reconstruction, the closed-loop return is initiated to relock the frequency, achieving fully automatic closed-loop control of parameter extraction and hardware optimization. This significantly improves the adaptive tuning efficiency and measurement accuracy of quantum precision measurement systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum precision measurement and automated measurement and control technology, and in particular to an adaptive tuning method and system for coherent measurement and control parameters of diamond NV color centers. Background Technology

[0002] Coherent manipulation of the spin states of diamond NV centers (such as Rabi oscillations and Ramsey coherent interferometry) is a core technique for quantum weak magnetic field detection and precision sensing. To achieve high-sensitivity detection, it is essential to extract the fundamental quantum physical parameters of the NV centers with high precision (such as...). Pulse time, Pulse time and decoherence time It can adaptively tune underlying hardware control parameters such as excitation laser power, pulsed microwave radio frequency power, and data sampling rate online.

[0003] However, under actual operating conditions, due to the multi-source and complex noise interference in the diamond environment, the coherent fluorescence response signal detected by the system usually has an extremely low signal-to-noise ratio.

[0004] The main pain points of traditional technologies include: (1) Conventional fitting algorithms are prone to failure: Traditional techniques usually use the least squares method to fit sinusoidal decay data, but in the context of low signal-to-noise ratio and high noise, this method is prone to getting trapped in local optima, resulting in the extracted data failing to meet the required standards. The pulse time and the decoherence time had a huge error, which caused the coherent manipulation experiment to fail directly. (2) Multidimensional nonlinear coupling of hardware measurement and control parameters, resulting in low efficiency of manual parameter tuning: The measurement efficiency of the NV color center sensing system is subject to complex nonlinear constraints on signal contrast, coherence time, system fluorescence noise, and total measurement time. For example, blindly increasing the laser power can improve the fluorescence signal-to-noise ratio, but it will lead to increased temperature drift and local heating, thereby destroying spin coherence. Traditional parameter tuning methods that rely on manual and experience-based adjustments by experimenters cannot cope with multiple objective trade-offs and make it difficult to make the system work at its optimal performance point. Summary of the Invention

[0005] This invention proposes an adaptive tuning method and system for coherent measurement and control parameters of diamond NV color centers, which solves the problems in the prior art such as the easy trapping of parameter extraction into local optima in low signal-to-noise ratio environments, the difficulty of automatic tuning of multi-dimensional hardware control parameters due to strong nonlinear coupling, and the difficulty of maintaining the measurement and control conditions at the optimal balance point in real time.

[0006] The technical solution of this invention is implemented as follows: The first aspect of this invention provides an adaptive tuning method for coherent measurement and control parameters of diamond NV color centers, comprising the following steps: Step S1: Configure the carrier frequency and pulse timing of the arbitrary waveform generator according to the currently locked reference resonance frequency, and control the arbitrary waveform generator to output a pulse sequence to the microwave source; control the microwave source to radiate microwave pulses with continuously increasing width to the diamond NV color center sample, and simultaneously collect fluorescence response signals to generate Rabi oscillation curves. Step S2: Input the Rabi oscillation curve as observed data into the Bayesian decaying cosine model, perform posterior parameter inference using the MCMC sampling algorithm, and output the Rabi oscillation frequency and Rabi oscillation amplitude; extract the Rabi oscillation frequency. Pulse duration; simultaneously, ODMR spectral contrast and fluorescence signal noise standard deviation are extracted from the fluorescence response signal; Step S3: Based on The pulse time is controlled by an arbitrary waveform generator to generate a pulse sequence and scan the free evolution time, while simultaneously acquiring fluorescence signals to generate Ramsey interference fringe data. The Ramsey interference fringe data is used as observation data and input into a Bayesian decaying cosine model. The MCMC sampling algorithm is used to perform posterior parameter inference, outputting the coherence time and frequency offset, and calculating the external magnetic field strength. Step S4: Extract the ODMR spectral contrast, Rabi oscillation amplitude, fluorescence signal noise standard deviation, and coherence time output in Step S2 as the state input for reinforcement learning; construct a near-end policy optimization algorithm model to maximize the composite reward function and solve for the optimal hardware action parameters. Step S5: Send the optimal hardware action parameters to the underlying hardware device for execution to complete the hardware state reconstruction; if the experiment has not ended, return to step S1 to enter the next round of closed-loop control.

[0007] Specifically, step S2 includes the following steps: Define the five-dimensional state vector to be solved. : ; in, This represents the Rabi oscillation amplitude. The Rabi oscillation frequency, For Rabi decay time, For the initial phase, For background signal bias, superscript It is the transpose of the vector; Define the prior probability distribution of each parameter in the five-dimensional state vector, and construct the joint prior distribution. ,in, Represents the fifth dimension in the five-dimensional state vector. Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The probability of occurrence; The total number of discrete microwave pulse widths. The standard deviation of the system's Gaussian white noise; pulse width The actual fluorescence response intensity collected at the location, , ; Indicates the microwave pulse width as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability. Random walk sampling is performed in the five-dimensional parameter space. Through multiple iterations and updates, the Rabi oscillation frequency is finally converged and statistically output. and Rabi oscillation amplitude The maximum posterior estimator and its confidence interval.

[0008] Furthermore, when the confidence interval width converges to within the preset uncertainty threshold, the control data acquisition card immediately stops the accumulation of fluorescence data under the current pulse width and automatically triggers pulse timing switching to enter the next pulse width measurement; when the confidence interval width is greater than the preset uncertainty threshold, the control hardware automatically increases the average number of scans under the current pulse width until the confidence interval width converges to within the preset uncertainty threshold.

[0009] Specifically, step S3 includes the following steps: based on Pulse timing controls the generation of arbitrary waveforms. Pulse sequence, the free evolution time Start scanning from 0 with a set step size up to the preset maximum value; Define the five-dimensional state vector to be solved. : ; in, The amplitude of the oscillation. This is the frequency offset. For the coherence time of the NV color center system, For the initial phase, For background signal bias, superscript It is the transpose of the vector; Define a five-dimensional state vector Construct a joint prior distribution from the prior probability distributions of each parameter. ,in, Represents a five-dimensional state vector The Middle Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The probability of occurrence; The number of sampling points. The standard deviation of the system's Gaussian white noise; In free evolution time The actual fluorescence intensity collected at the location, , ; The free evolution time is represented as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability. Random walk sampling is performed in the five-dimensional parameter space. Through multiple iterations and updates, the process eventually converges and the coherence time is statistically output. and frequency offset The maximum posterior estimator and its confidence interval; Then based on the frequency offset Calculate the external magnetic field strength : ; in, NV color center cyclotron magnetic ratio.

[0010] Specifically, in step S4, the state input vector for reinforcement learning Represented as: ; In the formula, For ODMR spectral contrast, This represents the Rabi oscillation amplitude. The standard deviation of fluorescence signal noise. For coherence time; Composite reward function The expression is: ; In the formula, To enhance the composite reward value of the learning agent, it is used to evaluate the quality of the current hardware action parameters; , , , These are preset positive and negative weighting coefficients, used to balance the contribution of each indicator to the optimization objective.

[0011] Furthermore, through the forward propagation of the neural network of the aforementioned proximal policy optimization algorithm model, the composite reward function is solved online iteratively. Maximizing the optimal hardware action parameters specifically includes the following steps: The state vector of the current iteration step The input is fed into a policy neural network, which is a multi-layer fully connected neural network. After forward propagation, it outputs an action feature vector; this action feature vector is then processed... Activation function mapping to The interval is then linearly scaled and transformed to the physical safety range of each hardware parameter, generating the mean vector of hardware actions. : ; in, The average operating value of microwave power. The average value of the laser power during operation. The action mean of the sampling rate, The superscript represents the average number of scans. It is the transpose of the vector; Simultaneously, the policy neural network outputs a logarithmic vector of the action standard deviation. : ; in, The standard deviation of microwave power is the logarithm. The standard deviation of the laser power is the logarithm. The standard deviation of the sampling rate is the logarithm of the sampling rate. The standard deviation of the scan mean is the logarithm of the number of scans. From the action mean vector and the logarithmic vector of action standard deviation Construct a Gaussian action space probability distribution, wherein each action component in the Gaussian action space probability distribution... Follows a normal distribution: ; in, Action vector The first in Each hardware action component; This is the microwave power operating value. This is the laser power action value. This is the sampling rate action value. This represents the average number of scan actions. Action vector The Middle The mean of each hardware action component, Action vector The Middle The standard deviation of each hardware action component Represents a normal distribution; Adaptive sampling is performed in the Gaussian action space probability distribution to generate the action vector for the current iteration step. And it is sent to the underlying hardware for execution to update the coherent measurement timing; Collect updated fluorescence response data and calculate the corresponding composite reward value. The composite reward value The environmental feedback signal is input into the value neural network to evaluate the state value and calculate the estimated value of the advantage function for the current action. ; The advantage function estimate The ratio of the probabilities of the new and old strategies To drive this process, an objective function with a shearing factor is used. Update the strategy: ; ; in, These are the weight parameters of the policy neural network. To achieve the expected value, the average value of trajectory sample data collected from multiple sets of online experimental interactions is taken as the overall objective guiding the ascent of the neural network weight gradient. To restrict variables to The clipping function within the interval. The hyperparameter is the shear coefficient; The ratio of the probabilities of the new and old strategies is used to measure the current strategy. Compared to the old strategy before the update In the same state Select the same action below The probability ratio; Based on the shearing objective function The gradient ascent algorithm is used to iteratively update the weight parameters of the neural network online. To maximize the objective function, the policy neural network is propagated until it converges; the mean vector output by the converged policy neural network is then forward-propagated. The optimal hardware action parameters are then issued and executed.

[0012] A second aspect of the present invention provides an adaptive tuning system for coherent measurement and control parameters of diamond NV color centers, comprising: The main control platform is used for full-process algorithm logic scheduling, Bayesian parameter extraction, and near-end policy optimization and reinforcement learning policy solving. An arbitrary waveform generator is communicatively connected to the main control platform and is used to output a preset pulse sequence signal according to the timing configuration of the main control platform; A microwave source, connected to the arbitrary waveform generator and the main control platform, is used to receive pulse sequences and modulate and output pulsed microwave radio frequency signals to radiate to the diamond NV color center sample. A laser, connected to the main control platform, is used to radiate laser light onto the diamond NV color center sample. A photodetector is used to collect the fluorescence signal emitted by the diamond NV color center sample and convert it into an analog electrical signal; The data acquisition card is connected to the photodetector and the main control platform respectively, and is used to synchronously acquire the analog fluorescence electrical signal converted by the photodetector and feed the discrete fluorescence data stream back to the main control platform in real time.

[0013] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention effectively solves the comprehensive technical problems of parameter extraction easily getting trapped in local optima under low signal-to-noise ratio environment in traditional NV color center coherent measurement, low efficiency of manual parameter tuning due to strong nonlinear coupling of multidimensional hardware control parameters, and difficulty in maintaining the measurement and control conditions at the best balance point in real time by constructing a fully automatic closed-loop architecture of “frequency locking-Rabi / Ramsey Bayesian parameter extraction-reinforcement learning decision-hardware execution-closed-loop feedback”. It realizes fully automatic closed-loop control from high confidence extraction of quantum physical parameters to intelligent online optimization of hardware measurement and control parameters, which greatly improves the adaptive tuning efficiency and long-term continuous operation capability of quantum precision measurement system. (2) This invention introduces a Bayesian decay model into Rabi oscillations and Ramsey coherent measurements, and uses the MCMC sampling algorithm for posterior parameter inference. It performs random walk sampling in the full probability space, independent of the selection of initial fitting values, and can output the Rabi oscillation frequency and amplitude with high confidence even at extremely low signal-to-noise ratios. The maximum a posteriori estimates and their confidence intervals for pulse time, coherence time, and frequency offset are obtained, and the external magnetic field strength is calculated. This effectively overcomes the shortcomings of traditional least squares fitting, which is prone to divergence and getting trapped in local optima under noisy backgrounds, and ensures the accuracy of quantum state manipulation. (3) This invention constructs a near-end strategy optimization algorithm model with ODMR spectral contrast, Rabi oscillation amplitude, fluorescence signal noise standard deviation and coherence time as state inputs and composite reward function as optimization objective. It uses neural network to solve the optimal hardware action parameters online, realizes intelligent coordinated tuning of multiple hardware parameters that are mutually constrained and nonlinearly coupled, effectively resolves the multidimensional parameter conflict between "optical-microwave-system efficiency", and enables the system to automatically maintain a comprehensive performance state with the optimal balance between signal quality and measurement efficiency. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of an adaptive tuning method for coherent measurement and control parameters of diamond NV color centers according to the present invention.

[0017] Figure 2 This is an architecture diagram of an adaptive tuning system for coherent measurement and control parameters of diamond NV color centers according to the present invention. Detailed Implementation

[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] Reference Figure 1 The first aspect of this invention provides an adaptive tuning method for coherent measurement and control parameters of diamond NV color centers, comprising the following steps: Step S1: Configure the carrier frequency and pulse timing of the arbitrary waveform generator according to the currently locked reference resonance frequency, and control the arbitrary waveform generator to output a pulse sequence to the microwave source; control the microwave source to radiate microwave pulses with continuously increasing width to the diamond NV color center sample, and synchronously collect fluorescence response signals to generate Rabi oscillation curves.

[0020] After the diamond NV color center sensor is turned on normally and enters the continuous wave frequency locking circuit, the front-end frequency locking circuit will demodulate the latest resonant center frequency in real time. The data is transmitted to the main control platform. The main control platform, through LabVIEW, calls the underlying interface driver to write the currently locked reference resonant frequency as the center carrier frequency into the frequency register of the arbitrary waveform generator (AWG) in real time without interrupting the system's frequency locking loop. Simultaneously, the main control platform dynamically reconstructs the underlying pulse sequence control file according to the current experimental step size and sends it to the AWG. This frequency writing and timing configuration operation ensures that the carrier frequency of the microwave pulses in subsequent steps is accurately aligned with the resonant frequency of the NV color center, providing an accurate frequency reference for Rabi and Ramsey measurements.

[0021] Step S2: Input the Rabi oscillation curve as observed data into the Bayesian decaying cosine model, perform posterior parameter inference using the MCMC sampling algorithm, and output the Rabi oscillation frequency and Rabi oscillation amplitude; extract the Rabi oscillation frequency. Pulse duration; simultaneously, ODMR spectral contrast and fluorescence signal noise standard deviation are extracted from the fluorescence response signal; specifically, the following steps are included: An arbitrary waveform generator (AWG) outputs a pulse sequence to a microwave source, controlling the microwave source to radiate microwave pulses onto the diamond NV color center sample. The pulse width of the microwave pulses starts from 0 and continuously increases to 200 ns in 4 ns increments. A laser synchronously radiates pump-excitation laser light onto the sample. A photodetector (PD) collects the red fluorescence signal generated by the spin-state transitions and converts it into an analog electrical signal, which is then sent to a data acquisition card (DAQ). After the average number of scans reaches a preset upper limit (preset to 10,000), the data acquisition card uploads the generated discrete Rabi oscillation curve data to the data receiving buffer of the main control platform via a bus.

[0022] Define the five-dimensional state vector to be solved. : ; in, This represents the Rabi oscillation amplitude. The Rabi oscillation frequency, For Rabi decay time, For the initial phase, For background signal bias, superscript It is the transpose of the vector; For this five-dimensional state vector, and considering the specific physical experimental conditions of diamond NV centers, the prior probability distribution of each parameter is defined. Since the Rabi oscillation frequency is determined by the output power of the microwave source, the oscillation frequency... The prior distribution is usually within a known range, so we set it as follows: It follows a uniform distribution, that is... .in and The oscillation amplitude is set within the theoretically estimated range of current microwave power. decay time Initial phase and background signal bias Based on the baseline and noise margin of the fluorescence signal collected by the photodetector, respectively, a uniform distribution within the corresponding physical boundary is set, and a joint prior distribution is constructed. : ; in, Represents the fifth dimension in the five-dimensional state vector. Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The higher the probability of occurrence, the greater the value of the parameter. The higher the degree of matching with the observed data; The total number of discrete microwave pulse widths. The standard deviation of the system's Gaussian white noise; pulse width The actual fluorescence response intensity collected at the location, , ; Indicates the microwave pulse width as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability, and random walk sampling is performed in the five-dimensional parameter space. In this embodiment, the MCMC algorithm performs 20,000 random walks in the five-dimensional parameter space, automatically discarding the first 5,000 aging samples that have not yet converged, and performing probability density statistics on the remaining 15,000 valid samples. In the corresponding marginal posterior probability distribution, the physical quantity that makes its probability density reach its maximum value (i.e., the peak position) is extracted as the maximum posterior estimator, which is the final high-confidence Rabi oscillation frequency. Similarly, in The peak position is extracted from the corresponding marginal posterior probability distribution as the Rabi oscillation amplitude. The maximum a posteriori estimator eventually converges and statistically outputs the Rabi oscillation frequency. and Rabi oscillation amplitude The maximum posterior estimator and its confidence interval.

[0023] Maximum a posteriori estimator based on Rabi oscillation frequency The main control platform automatically calculates Pulse time (i.e.) ) and the generation of superposition states Pulse time (i.e.) ).

[0024] Furthermore, when the confidence interval width converges to within the preset uncertainty threshold, the control data acquisition card immediately stops the accumulation of fluorescence data under the current pulse width and automatically triggers pulse timing switching to enter the next pulse width measurement, so as to save the total measurement time; when the confidence interval width is greater than the preset uncertainty threshold, the control hardware automatically increases the average number of scans under the current pulse width until the confidence interval width converges to within the preset uncertainty threshold, so as to ensure the confidence of parameter extraction.

[0025] Step S3: Based on Pulse timing controls the generation of arbitrary waveforms. Pulse sequence and scan free evolution time (free evolution time) Starting from 0, scanning with a set step size to a preset maximum value), simultaneously acquiring fluorescence signals to generate Ramsey interference fringe data; inputting the Ramsey interference fringe data as observation data into a Bayesian decaying cosine model, using the MCMC sampling algorithm for posterior parameter inference, outputting coherence time and frequency offset, and calculating the external magnetic field strength; specifically including the following steps: The main control platform is based on the extraction in step S2 Pulse timing, retuning the arbitrary waveform generator (AWG), controlling its generation Pulse sequence. Two. Free evolution time between pulses The linear scan starts from 0 and continues to 5 μs; the data acquisition card (DAQ) synchronously acquires the fluorescence signal within the corresponding time period and assembles it in the buffer to generate Ramsey interference fringe data.

[0026] Define the five-dimensional state vector to be solved. : ; in, The amplitude of the oscillation. This is the frequency offset. For the coherence time of the NV color center system, For the initial phase, For background signal bias, superscript It is the transpose of the vector; Define a five-dimensional state vector Construct a joint prior distribution from the prior probability distributions of each parameter. ,in, Represents a five-dimensional state vector The Middle Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The probability of occurrence; The number of sampling points. The standard deviation of the system's Gaussian white noise; In free evolution time The actual fluorescence intensity collected at the location, , ; The free evolution time is represented as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability. Random walk sampling is performed in the five-dimensional parameter space. Through multiple iterations and updates, the process eventually converges and the coherence time is statistically output. and frequency offset The maximum posterior estimator and its confidence interval; Then based on the frequency offset Calculate the external magnetic field strength : ; in, For NV color center cyclotron magnetic ratio, γ =2.8MHz / Gauss.

[0027] Step S4: Extract the ODMR spectral contrast, Rabi oscillation amplitude, fluorescence signal noise standard deviation, and coherence time output in Step S2 as the state input for reinforcement learning; construct a near-end policy optimization algorithm model to maximize the composite reward function and solve for the optimal hardware action parameters. The state input vector of reinforcement learning Represented as: ; In the formula, For ODMR spectral contrast, This represents the Rabi oscillation amplitude. The standard deviation of fluorescence signal noise. For coherence time; Composite reward function The expression is: ; In the formula, To enhance the composite reward value of the learning agent, it is used to evaluate the quality of the current hardware action parameters; , , , These are preset positive and negative weighting coefficients, used to balance the contribution of each indicator to the optimization objective. In this embodiment, each weighting coefficient is set to... , , , .

[0028] In this embodiment, the agent inputs and outputs a set of hardware action parameters based on the current state and sends them to the hardware for execution. After the hardware is executed, the system enters the next round of measurement and control cycle. The fluorescence signals measured in steps S2 and S3 are extracted using Bayesian parameters to calculate the composite reward value. This reward value is fed back to the agent to evaluate the merits of the current action. The PPO algorithm uses online iterative solution through neural network forward propagation to solve the composite reward function. Maximizing the optimal hardware action parameters specifically includes the following steps: The state vector of the current iteration step The input is fed into a policy neural network, which is a multi-layer fully connected neural network. After forward propagation, it outputs an action feature vector; this action feature vector is then processed... Activation function mapping to The interval is then linearly scaled and transformed to the physical safety range of each hardware parameter, generating the mean vector of hardware actions. : ; in, The average operating value of microwave power. The average value of the laser power during operation. The action mean of the sampling rate, The superscript represents the average number of scans. It is the transpose of the vector; Simultaneously, the policy neural network outputs a logarithmic vector of the action standard deviation. : ; in, The standard deviation of microwave power is the logarithm. The standard deviation of the laser power is the logarithm. The standard deviation of the sampling rate is the logarithm of the sampling rate. The standard deviation of the scan mean is the logarithm of the number of scans. From the action mean vector and the logarithmic vector of action standard deviation Construct a Gaussian action space probability distribution, wherein each action component in the Gaussian action space probability distribution... Follows a normal distribution: ; in, Action vector The first in Each hardware action component; This is the microwave power operating value. This is the laser power action value. This is the sampling rate action value. This represents the average number of scan actions. Action vector The Middle The mean of each hardware action component, Action vector The Middle The standard deviation of each hardware action component Represents a normal distribution; Adaptive sampling is performed in the Gaussian action space probability distribution to generate the action vector for the current iteration step. And it is sent to the underlying hardware for execution to update the coherent measurement timing; Collect updated fluorescence response data and calculate the corresponding composite reward value. The composite reward value The environmental feedback signal is input into the value neural network to evaluate the state value and calculate the estimated value of the advantage function for the current action. ; The advantage function estimate The ratio of the probabilities of the new and old strategies To drive this process, an objective function with a shearing factor is used. Update the strategy: ; ; in, These are the weight parameters of the policy neural network. To achieve the expected value, the average value of trajectory sample data collected from multiple sets of online experimental interactions is taken as the overall objective guiding the ascent of the neural network weight gradient. To restrict variables to The clipping function within the interval. The hyperparameter is the shear coefficient; The ratio of the probabilities of the new and old strategies is used to measure the current strategy. Compared to the old strategy before the update In the same state Select the same action below The probability ratio; Based on the shearing objective function The gradient ascent algorithm is used to iteratively update the weight parameters of the neural network online. To maximize the objective function, the policy neural network is propagated until it converges; the mean vector output by the converged policy neural network is then forward-propagated. The optimal hardware action parameters are then issued and executed.

[0029] This step enables intelligent coordinated tuning of multiple hardware parameters that are mutually constrained and nonlinearly coupled, effectively resolving the multidimensional parameter conflicts between "optical-microwave-system efficiency" and enabling the system to automatically maintain an optimal overall performance state that balances signal quality and measurement efficiency.

[0030] Step S5: Send the optimal hardware action parameters to the underlying hardware device for execution to complete the hardware state reconstruction; if the experiment has not ended, return to step S1 to enter the next round of closed-loop control.

[0031] In this embodiment, the main control platform sends out the optimal action parameter command calculated in step S4 in real time through the communication interface. Specifically, this includes: sending the optimal laser power to the laser's drive current module, sending the optimal microwave power to the microwave source's internal attenuator, writing the reconstructed average number of scans to the data acquisition card's counter register, and writing the optimal sampling rate to the data acquisition card's sampling clock configuration register. The hardware device executes the command immediately upon receiving it, completing the reconstruction of the entire machine's hardware measurement and control status.

[0032] After the underlying hardware state reconstruction is completed, if the experiment is not terminated, the system's control logic will return to step S1 and be re-executed. That is, under the latest laser power and microwave power conditions, the system will reacquire the reference frequency of the front-end frequency-locking loop and rewrite it into the register, refresh the pulse timing file, and then enter the next round of adaptive coherent measurement. By forcibly returning to step S1 after the hardware action parameters are issued in step S5, it is ensured that the latest reference frequency of the front-end frequency-locking loop can be written to the arbitrary waveform generator register in real time, and the underlying timing file can be adaptively and dynamically reconstructed with the hardware action, effectively overcoming the problem of measurement and control parameter mismatch caused by environmental drift in long-period monitoring scenarios.

[0033] like Figure 2 As shown, a second aspect of the present invention provides an adaptive tuning system for coherent measurement and control parameters of diamond NV color centers, comprising: The main control platform is used for full-process algorithm logic scheduling, Bayesian parameter extraction, and near-end policy optimization and reinforcement learning policy solving. An arbitrary waveform generator is communicatively connected to the main control platform and is used to output a preset pulse sequence signal according to the timing configuration of the main control platform; A microwave source, connected to the arbitrary waveform generator and the main control platform, is used to receive pulse sequences and modulate and output pulsed microwave radio frequency signals to radiate to the diamond NV color center sample. A laser, connected to the main control platform, is used to radiate laser light onto the diamond NV color center sample. A photodetector is used to collect the fluorescence signal emitted by the diamond NV color center sample and convert it into an analog electrical signal; The data acquisition card is connected to the photodetector and the main control platform respectively, and is used to synchronously acquire the analog fluorescence electrical signal converted by the photodetector and feed the discrete fluorescence data stream back to the main control platform in real time.

[0034] In this embodiment, the main control platform is a PC based on a virtual instrument architecture, with a built-in LabVIEW runtime environment. It communicates with the arbitrary waveform generator, data acquisition card, laser, and microwave source by calling the underlying interface drivers through LabVIEW. The laser is a 532 nm solid-state laser; the microwave source is a radio frequency signal generator with pulse modulation function; the sampling rate of the arbitrary waveform generator is no less than 1.2 GS / s, its pulse output terminal is connected to the pulse modulation terminal of the microwave source, and the radio frequency output terminal of the microwave source is connected to the microwave antenna; the data acquisition card is a dual-channel synchronous acquisition card, its signal input terminal is connected to the analog signal output terminal of the photodetector, and its counting register receives the scan averaging number configuration command issued by the main control platform; the photodetector is a high-gain APD. Through the coordinated work of these hardware components, complete physical support is provided for the implementation of the above method.

[0035] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method.

[0036] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for adaptive tuning of NV color center coherent control parameters of diamond, characterized in that, Includes the following steps: Step S1: Configure the carrier frequency and pulse timing of the arbitrary waveform generator according to the currently locked reference resonance frequency, and control the arbitrary waveform generator to output a pulse sequence to the microwave source; control the microwave source to radiate microwave pulses with continuously increasing width to the diamond NV color center sample, and simultaneously collect fluorescence response signals to generate Rabi oscillation curves. Step S2: Input the Rabi oscillation curve as observed data into the Bayesian decaying cosine model, perform posterior parameter inference using the MCMC sampling algorithm, and output the Rabi oscillation frequency and Rabi oscillation amplitude; extract the Rabi oscillation frequency. Pulse duration; simultaneously, ODMR spectral contrast and fluorescence signal noise standard deviation are extracted from the fluorescence response signal; Step S3: Based on The pulse time is controlled by an arbitrary waveform generator to generate a pulse sequence and scan the free evolution time, while simultaneously acquiring fluorescence signals to generate Ramsey interference fringe data. The Ramsey interference fringe data is used as observation data and input into a Bayesian decaying cosine model. The MCMC sampling algorithm is used to perform posterior parameter inference, outputting the coherence time and frequency offset, and calculating the external magnetic field strength. Step S4: Extract the ODMR spectral contrast, Rabi oscillation amplitude, fluorescence signal noise standard deviation, and coherence time output in Step S2 as the state input for reinforcement learning; construct a near-end policy optimization algorithm model to maximize the composite reward function and solve for the optimal hardware action parameters. Step S5: Send the optimal hardware action parameters to the underlying hardware device for execution to complete the hardware state reconstruction; if the experiment has not ended, return to step S1 to enter the next round of closed-loop control.

2. The adaptive tuning method for coherent measurement and control parameters of diamond NV color centers as described in claim 1, characterized in that, Step S2 includes the following steps: Define the five-dimensional state vector to be solved. : ; in, This represents the Rabi oscillation amplitude. The Rabi oscillation frequency, For Rabi decay time, For the initial phase, For background signal bias, superscript It is the transpose of the vector; Define the prior probability distribution of each parameter in the five-dimensional state vector, and construct the joint prior distribution. ,in, Represents the fifth dimension in the five-dimensional state vector. Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The probability of occurrence; This represents the total number of discrete microwave pulse widths. The standard deviation of the system's Gaussian white noise; pulse width The actual fluorescence response intensity collected at the location, , ; Indicates the microwave pulse width as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability. Random walk sampling is performed in the five-dimensional parameter space. Through multiple iterations and updates, the Rabi oscillation frequency is finally converged and statistically output. and Rabi oscillation amplitude The maximum posterior estimator and its confidence interval.

3. The adaptive tuning method for coherent measurement and control parameters of diamond NV color centers as described in claim 2, characterized in that, When the confidence interval width converges to within the preset uncertainty threshold, the control data acquisition card immediately stops the accumulation of fluorescence data under the current pulse width and automatically triggers pulse timing switching to enter the next pulse width measurement; when the confidence interval width is greater than the preset uncertainty threshold, the control hardware automatically increases the average number of scans under the current pulse width until the confidence interval width converges to within the preset uncertainty threshold.

4. The adaptive tuning method for coherent measurement and control parameters of diamond NV color centers as described in claim 1, characterized in that, Step S3 includes the following steps: based on Pulse timing controls the generation of arbitrary waveforms. Pulse sequence, the free evolution time Start scanning from 0 with a set step size up to the preset maximum value; Define the five-dimensional state vector to be solved. : ; in, The amplitude of the oscillation. This is the frequency offset. For the coherence time of the NV color center system, For the initial phase, For background signal bias, superscript It is the transpose of the vector; Define a five-dimensional state vector Construct a joint prior distribution from the prior probability distributions of each parameter. ,in, Represents a five-dimensional state vector The Middle Parameters The prior probability distribution; Constructing a log-likelihood function based on a Bayesian decaying cosine model: ; ; in, This is the logarithmic form of the likelihood function, used to quantify the likelihood given parameters. Observational data under conditions The probability of occurrence; The number of sampling points. The standard deviation of the system's Gaussian white noise; In free evolution time The actual fluorescence intensity collected at the location, , ; The free evolution time is represented as Fluorescence response intensity predicted by the time-Bayesian decaying cosine model; Employing the MCMC sampling algorithm with joint prior distribution Using the random walk benchmark, with the log-likelihood function The calculated value is used as the basis for determining the acceptance probability. Random walk sampling is performed in the five-dimensional parameter space. Through multiple iterations and updates, the process eventually converges and the coherence time is statistically output. and frequency offset The maximum posterior estimator and its confidence interval; Then based on the frequency offset Calculate the external magnetic field strength : ; in, NV color center cyclotron magnetic ratio.

5. The adaptive tuning method for coherent measurement and control parameters of diamond NV color centers as described in claim 1, characterized in that, In step S4, the state input vector for reinforcement learning Represented as: ; In the formula, For ODMR spectral contrast, The Rabi oscillation amplitude is extracted in step S2 by the Markov Chain Monte Carlo (MCMC) sampling algorithm based on the Rabi decay model. The standard deviation of fluorescence signal noise. This refers to the ensemble decoherence time extracted in step S3 by the MCMC sampling algorithm based on the Ramsey decay model; Composite reward function The expression is: ; In the formula, To enhance the composite reward value of the learning agent, it is used to evaluate the quality of the current hardware action parameters; , , , These are preset positive weight allocation coefficients, used to balance the contribution ratio of each indicator in the optimization objective.

6. The adaptive tuning method for coherent measurement and control parameters of diamond NV color centers as described in claim 5, characterized in that, The composite reward function is solved online iteratively through the neural network forward propagation of the aforementioned proximal policy optimization algorithm model. Maximizing the optimal hardware action parameters specifically includes the following steps: The state vector of the current iteration step The input is fed into a policy neural network, which is a multi-layer fully connected neural network. After forward propagation, it outputs an action feature vector; this action feature vector is then processed... Activation function mapping to The interval is then linearly scaled and transformed to the physical safety range of each hardware parameter, generating the mean vector of hardware actions. : ; in, The average operating value of microwave power. The average value of the laser power during operation. The action mean of the sampling rate, The superscript represents the average number of scans. It is the transpose of the vector; Simultaneously, the policy neural network outputs a logarithmic vector of the action standard deviation. : ; in, The standard deviation of microwave power is the logarithm. The standard deviation of the laser power is the logarithm. The standard deviation of the sampling rate is the logarithm of the sampling rate. The standard deviation of the scan mean is the logarithm of the number of scans. From the action mean vector and the logarithmic vector of action standard deviation Construct a Gaussian action space probability distribution, wherein each action component in the Gaussian action space probability distribution... Follows a normal distribution: ; in, Action vector The first in Each hardware action component; This is the microwave power operating value. This is the laser power action value. This is the sampling rate action value. This represents the average number of scan actions. Action vector The Middle The mean of each hardware action component, Action vector The Middle Standard deviation of each hardware action component Represents a normal distribution; Adaptive sampling is performed in the Gaussian action space probability distribution to generate the action vector for the current iteration step. And it is sent to the underlying hardware for execution to update the coherent measurement timing; Collect updated fluorescence response data and calculate the corresponding composite reward value. The composite reward value The environmental feedback signal is input into the value neural network to evaluate the state value and calculate the estimated value of the advantage function for the current action. ; The estimated value of the advantage function The ratio of the probabilities of the new and old strategies To drive this process, an objective function with a shearing factor is used. Update the strategy: ; ; in, These are the weight parameters of the policy neural network. To achieve the expected value, the average value of trajectory sample data collected from multiple sets of online experimental interactions is taken as the overall target to guide the ascent of the neural network weight gradient. To restrict variables to The clipping function within the interval. The hyperparameter is the shear coefficient; The ratio of the probabilities of the new and old strategies is used to measure the current strategy. Compared to the old strategy before the update In the same state Select the same action below The probability ratio; Based on the shearing objective function The gradient ascent algorithm is used to iteratively update the weight parameters of the neural network online. To maximize the objective function, the policy neural network is propagated until it converges; the mean vector output by the converged policy neural network is then forward-propagated. The optimal hardware action parameters are then issued and executed.

7. An adaptive tuning system for coherent measurement and control parameters of diamond NV color centers, used to implement the adaptive tuning method as described in any one of claims 1 to 6, characterized in that, include: The main control platform is used for full-process algorithm logic scheduling, Bayesian parameter extraction, and near-end policy optimization and reinforcement learning policy solving. An arbitrary waveform generator is communicatively connected to the main control platform and is used to output a preset pulse sequence signal according to the timing configuration of the main control platform; A microwave source, connected to the arbitrary waveform generator and the main control platform, is used to receive pulse sequences and modulate and output pulsed microwave radio frequency signals to radiate to the diamond NV color center sample. A laser, connected to the main control platform, is used to radiate laser light onto the diamond NV color center sample. A photodetector is used to collect the fluorescence signal emitted by the diamond NV color center sample and convert it into an analog electrical signal; The data acquisition card is connected to the photodetector and the main control platform respectively, and is used to synchronously acquire the analog fluorescence electrical signal converted by the photodetector and feed the discrete fluorescence data stream back to the main control platform in real time.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.