Innovative quantum technologies in agriculture for assessing land fertility

. Agriculture is a key sector ensuring food security. In the face of modern challenges such as climate change and sustainable use of resources, it becomes necessary to introduce innovative technologies to improve the efficiency of agriculture. Assessing soil fertility plays a critical role in optimizing the use of fertilizers and resources. One innovative approach is the use of quantum technologies to assess soil fertility. Variational quantum chains (VQC) provide a unique opportunity to efficiently solve classification problems in the context of soil characterization data analysis. In this study, we used data on soil chemical and physical properties, including density, moisture, pH, nitrogen, phosphorus, and potassium. To build the VQC model, we converted these data into quantum states using various ansatzes such as ZZFeatureMap and RealAmplitudes. To compare the results, we used traditional classification methods such as support vector machine (SVM) and compared them with the results obtained using VQC. We split the data into training and test sets, trained the models on the training data, and evaluated their performance on the test data. The advantages and limitations of using variational quantum circuits in assessing soil fertility were discussed. The prospects for further development and improvement of the methodology were considered. Variational quantum chains represent a promising direction for the development of innovative methods for assessing soil fertility in agriculture. The results of our study highlight the potential of quantum technologies in agriculture and the need for further research in this direction.


Introduction
Agriculture is a critical sector in ensuring food security and meeting the needs of a growing population.However, efficient agricultural production requires not only the experience of farmers, but also modern technologies for precise management of re-sources and optimization of yields.In this context, accurate assessment of soil fertility plays a key role in making informed decisions regarding fertilization, watering and tillage approaches.Traditional fertility assessment methods, although widely used, have their limitations, such as high costs for equipment and laboratory testing, as well as time delays in obtaining results.With the development of quantum computing and the use of quantum algorithms in the field of machine learning, new prospects are opening up for more efficient and accurate assessment of soil fertility [1].
This paper explores the application of variational quantum algorithm (VQC) to effectively assess soil fertility levels.In modern agriculture, accurate assessment of land fertility plays a key role in optimizing agricultural production.While traditional assessment methods are often limited, new approaches such as quantum computing provide promising opportunities for solving complex data analytics problems in agri-culture.The paper presents the results of using VQC as a tool to create a model capa-ble of predicting the level of soil fertility based on its chemical and physical charac-teristics.To build a quantum model, libraries and tools provided by quantum compu-ting platforms such as Qiskit are used.The developed model is tested on real data from soil samples, providing a perspective on the efficiency and accuracy of quantum methods in agriculture [2].
The purpose of this paper is to present the results of a study conducted using VQC to estimate land fertility based on real data.Sections of the work include a description of the methods and tools used, a presentation of the architecture of the quantum model, an analysis of the results, and a discussion of the prospects for the use of variational quantum algorithms in agriculture [3].
In today's world, faced with the challenges of global climate change and growing demand for food, agriculture is becoming a key area for sustainable development.Effective management of rural resources is becoming more critical and accurate assessment of soil fertility plays an important role in ensuring high yields and optimiz-ing agricultural production.Traditional methods of assessing fertility, such as chemi-cal soil tests, are often associated with high costs, labor intensity and time delays.In this regard, the emergence of innovative methods such as variational quantum algo-rithms (VQC) provides an opportunity to revolutionize the approach to agriculture.Using VQC to assess land fertility promises to speed up the process and improve the accuracy of the results.Quantum computing makes it possible to efficiently process and analyze complex data, making VQC a promising tool for solving the problems of precision agriculture and improving the resilience of agriculture to climate change [4].
Thus, this work is relevant in the context of the search for innovative methods in agriculture that can improve productivity, optimize resource use and contribute to solving global food security problems [5].

Materials and methods
To conduct the study, data on various soil indicators such as density, moisture, pH level, nitrogen, phosphorus, potassium and other parameters collected from various soil samples was used.The raw data went through a preprocessing process that in-cluded removing outliers, normalizing values, and converting the data into a format convenient for analysis.To prepare the data for classification, label encoding methods such as LabelEncoder and OneHotEncoder were used to convert the categorical labels into a numeric format.Features were scaled using the Min-Max Scaling method to ensure data homogeneity and improve model performance.The data was split into training and test sets using train_test_split for subsequent model training and evaluation [6].
The study selected variational quantum algorithm (VQC) to classify soil samples.Quantum feature and ansatz schemes such as ZZFeatureMap and RealAmplitudes were used as input to VQC.The COBYLA optimizer was chosen to configure the VQC parameters.The optimizer was used to minimize the loss function during model training.The variational quantum classifier was trained on the training set, and during the training process a callback mechanism was used to visualize the dynamics of changes in the loss function.This approach to materials and methods allows us to systematize the research process and clearly demonstrate each stage of the work [7].
VQC (Variational Quantum Classifier) is a variational quantum learning algorithm that is used to classify data in quantum computing.This algorithm combines ideas from classical machine learning methods with quantum computing, allowing quantum advantages to be used in the model training process.To represent data in quantum form, a "feature map" is used.A feature map in quantum algorithms is a quantum circuit that transforms input data (classical bits) into a quantum state.In Qiskit, ZZFeatureMap is one of the feature map types that is used to represent input data in quantum form.Let's describe its mathematical form [8].
Let us have a vector of input features X of dimension n : 12 ( , ,..., ) . Feature map ZZFeatureMap creates a quantum state using the following formula: Where Z is a Pauli Z gate, and i  are parameters that can be optimized (Figure 1).Thus, each input feature i x is converted into a rotation around an axis Z with the corresponding parameter i  .These operations interfere with each other, creating a quantum state that represents the input data.Visually, feature_map.decompose().draw(output="mpl",fold=20) indicates that the quantum circuit will be divided into blocks, and each block will be folded in the graphical representation for better readability.The fold=20 parameter determines how many circuit elements will be folded into one line for graphical representation [9].Quantum circuit and ansatz are two terms that are often used in quantum compu-ting, and they refer to different aspects of quantum programming.A quantum circuit is a sequence of quantum gates and operations that model quantum computing.Gates are elements that can perform transformations on qubits.Quantum circuits are used to build algorithms and solve problems in quantum computing.They are the basic elements of quantum programming and represent the quantum analogue of classical digital circuits.
Ansatz is a parameterized quantum circuit used in quantum machine learning and optimization algorithms.It is a form of wave function representation using parameters that can be tuned during training.Ansatz are used in variational quantum learning (VQE) algorithms, where the parameters of the ansatz are tuned to minimize the energy of the system.They are also used in other quantum machine learning tasks.RealAmplitudes and ZZFeatureMap are examples of ansatians [10][11][12][13][14]. RealAmplitudes are a group of single-qubit rotations repeated on each qubit.Here's how to describe this ansatz in more detail (Figure 2): Let ij  denote the parameter angle for the i -th qubit and the j -th rotation block.Then RealAmplitudes with num_qubits qubits and reps rotation blocks looks like this [15][16][17]: RealAmplitudes( )=R ( ) R ( ) ... R ( ) ....

R ( ) R ( ) ... R ( ),
num qubits reps reps num qubits reps  is rotation around an axis Y with angle  .In quantum computing, rotation around an axis is represented by a matrix: The notation   is the tensor product of two rotation operators around an axis Y with angles 0,1  and 1,1  respectively.The tensor product of operators acts on the spaces of two qubits and produces an operator that acts on the tensor product of the states of these two qubits.The matrix representation of this tensor product can be written as a block matrix: Where: y 0,1 R ( )  -rotation operator around an axis Y with angle 0,1 operator around an axis Y with angle 1,1  ; 0 -matrix of zeros. Thus,   represents an operator that acts on the space obtained from the tensor product of the spaces of two qubits, and applies the corresponding rotation operations to each of the qubits.Each rotation block represents a single time step in the optimization algorithm and includes parameter angles for each qubit.The repetition of blocks creates an ansatz structure that can be used in quantum learning algorithms such as the Variational Quantum Classifier (VQC).
Thus, quantum circuit is a more general term representing the sequence of opera-tions in quantum computing, while ansatz is a specific kind of quantum circuit used for specific tasks, especially in the context of quantum machine learning.Our exam-ple uses ZZFeatureMap, which creates a parameterized quantum circuit to represent the input data.During the training process, VQC minimizes a cost function that measures the difference between the predicted and actual data labels.In your exam-ple, COBYLA was used as an optimizer to tune the ansatz parameters.The VQC algorithm uses quantum evolution to transform the input data using an ansatz and feature map.The resulting quantum system is used to predict class labels for new data.

Results and Discussion
In the source data, the 'fertility' column contains text values such as 0 and 1.However, seaborn pairplot expects numeric values for color labels.To convert text labels into numbers, use LabelEncoder from the sklearn library.This code converts the text values 'fertility' into numbers (eg 0 and 1).After converting 'fertility' to a number format, we use seaborn to create a pairplot.Now that 'fertility' is represented by numerical values, you can better explore the relationships between different traits and how they relate to fertility levels (Figure 3).The results of using the SVM (support vector machine) algorithm to estimate soil fertility will depend on the specific data, model parameters and task.However, in general, SVM can provide the following results: Precision reflects how many of the classified fertile or infertile soils actually belong to those classes, while recall measures the model's ability to correctly classify all input samples.
Model accuracy: 0.87 Classification report: precision recall f1-score support 7 1.00 1.00 1.00 3 9 0.50 1.00 0.67 1 10 0.00 0.00 0.00 1 11 0.00 0.00 0.00  The results can be further improved by optimizing VQC parameters and data preprocessing.It is also important to validate the model on independent data sets to confirm its generalizability.
Model accuracy: 1.00 Classification report: precision recall support 0 1.00 1.00 1.00 3 1 1.00 1.00 1.00 3 accuracy 1.00 6 macro avg 1.00 1.00 1.00 6 weighted avg 1.00 1.00 1.00 6  In this work, a study was conducted on the application of variational quantum algorithm (VQC) for the problem of assessing soil fertility.The results of the study provide interesting conclusions and open prospects for the further development and use of quantum methods in agriculture and ecology.The results show that VQC demonstrated high performance in the task of classifying soil samples based on their fertility.Accuracy and other quality metrics validate the quantum algorithm's ability to effectively separate samples based on their characteristics.The comparison with the classic Support Vector Classifier (SVC) method suggests that VQC can provide comparable or even higher classification accuracy.This opens up the possibility of using quantum methods in agriculture as a more accurate and efficient tool.One of the key aspects of successful VQC application is careful data preprocessing.Normalization, outlier removal, and handling of missing values have significant impacts on algorithm performance, highlighting the importance of the preliminary data analysis step.
The results of this study challenge traditional methods for assessing soil fertility and point to the potential of quantum methods in this area.Future research could include expanding the data set, optimizing VQC parameters, and adapting the method to other aspects of agricultural science.However, it is worth noting that the use of quantum methods requires high computing power and special hardware.This creates challenges in practical implementation, but with the development of quantum technologies, these obstacles can be overcome.The adoption of technologies, such as soil fertility assessment using quantum methods, can have a significant impact on agriculture, optimizing resource use and increasing ecosystem resilience.Overall, the results of this study show the promise and applicability of the variational quantum algorithm in agricultural and environmental problems, and also indicate the need for further research and development in this area.

Conclusion
The results obtained confirm the effectiveness of VQC in the task of classifying soil samples and open up prospects for the use of quantum methods in agriculture and ecology.One of the key findings is the high classification accuracy of soil samples using VQC, making this method competitive with classical methods such as Support Vector Classifier (SVC).It is important to note that successful application of VQC requires careful data preprocessing, highlighting the importance of the data analysis step before using quantum methods.
Despite the results achieved, it is worth noting the challenges associated with the computing power and availability of quantum devices.However, with growing inter-est in quantum technologies and the development of hardware, these obstacles can be overcome.Further research in this area may include expanding the data volume, optimizing the algorithm parameters, and adapting the method for other problems in agriculture and ecology.Continued work on the integration of quantum methods into agricultural science may lead to new methods for assessing soil fertility and optimiz-ing agricultural processes taking into account environmental and social aspects.In conclusion, the results of this study highlight the importance of the development and application of quantum methods in agriculture, providing new tools for improving the efficiency of natural resource use and achieving sustainable rural development.

,Fig. 1 .
Fig. 1.Visualization of a quantum circuit used to convert classical features into quantum form.

Fig. 5 .
Fig. 5. Confusion Matrix.The classification report and confusion matrix indicate the high performance of the model in the classification task.