#  Datasets: A Community Library for Natural Language Processing

Quentin Lhoest , Albert Villanova del Moral∗, Yacine Jernite, Abhishek Thakur,
Patrick von Platen, Suraj Patil, Julien Chaumond, Mariama Drame, Julien Plu,
Lewis Tunstall,
Joe Davison, Mario Šaško↑, Gunjan Chhablani↑, Bhavitvya Malik↑, Simon
Brandeis,
Teven Le Scao, Victor Sanh, Canwen Xu, Nicolas Patry, Angelina McMillan-Major,
Philipp Schmid, Sylvain Gugger, Clément Delangue, Théo Matussière, Lysandre
Debut,
Stas Bekman, Pierric Cistac, Thibault Goehringer, Victor Mustar, François
Lagunas,
Alexander M. Rush, and Thomas Wolf$\ {}^{\Omega}$

Hugging Face /<EMAIL_ADDRESS>Lead Library Maintainers, Ω
Library Creator, ↑ Independent Research Contributor

###### Abstract

The scale, variety, and quantity of publicly-available NLP datasets has grown
rapidly as researchers propose new tasks, larger models, and novel benchmarks.
Datasets is a community library for contemporary NLP designed to support this
ecosystem. Datasets aims to standardize end-user interfaces, versioning, and
documentation, while providing a lightweight front-end that behaves similarly
for small datasets as for internet-scale corpora. The design of the library
incorporates a distributed, community-driven approach to adding datasets and
documenting usage. After a year of development, the library now includes more
than 650 unique datasets, has more than 250 contributors, and has helped
support a variety of novel cross-dataset research projects and shared tasks.
The library is available at https://github.com/huggingface/datasets.

##  1 Introduction

Datasets are central to empirical NLP: curated datasets are used for
evaluation and benchmarks; supervised datasets are used to train and fine-tune
models; and large unsupervised datasets are necessary for pretraining and
language modeling. Each dataset type differs in scale, granularity and
structure, in addition to annotation methodology. Historically, new dataset
paradigms have been crucial for driving the development of NLP, from the
Hansard corpus for statistical machine translation Brown et al. (1988) to the
Penn Treebank for syntactic modeling Marcus et al. (1993) to projects like
OPUS and Universal Dependencies Nivre et al. (2016); Tiedemann and Nygaard
(2004) which bring together cross-lingual data and annotations.

Contemporary NLP systems are now developed with a pipeline that utilizes many
different datasets at significantly varying scale and level of annotation
Peters et al. (2018). Different datasets are used for pretraining, fine-
tuning, and benchmarking. As such, there has been a large increase in the
number of datasets utilized in the NLP community. These include both large
text collections like C4 Raffel et al. (2020), fine-tuning datasets like SQuAD
Rajpurkar et al. (2016), and even complex zero-shot challenge tasks. Benchmark
datasets like GLUE have been central to quantifying the the advances of models
such as BERT Wang et al. (2018); Devlin et al. (2019).

The growth in datasets also brings significant challenges, including interface
standardization, versioning, and documentation. A practitioner should be able
to utilize $N$ different datasets without requiring $N$ different interfaces.
In addition, $N$ practitioners using the same dataset should know they have
exactly the same version. Datasets have also grown larger, and ideally
interfaces should not have to change due to this scale, whether one is using
small-scale datasets like Climate Fever ($\sim$1k data points), medium-scale
Yahoo Answers ($\sim$1M), or even all of PubMed ($\sim$79B). Finally, datasets
are being created with a variety of different procedures, from crowd-sourcing
to scraping to synthetic generation, which need to be taken into account when
evaluating which is most appropriate for a given purpose and ought to be
immediately apparent to prospective users Gebru et al. (2018).

Datasets is a community library designed to address the challenges of dataset
management and access, while supporting community culture and norms. The
library targets the following goals:

  * •

Ease-of-use and Standardization: All datasets can be easily downloaded with
one line of code. Each dataset utilizes a standard tabular format, and is
versioned and cited.

  * •

Efficiency and Scale: Datasets are computation- and memory-efficient by
default and work seamlessly with tokenization and featurization. Massive
datasets can even be streamed through the same interface.

  * •

Community and Documentation: The project is community-built and has hundreds
of contributors across languages. Each dataset is tagged and documented with a
datasheet describing its usage, types, and construction.

Datasets is in continual development by the engineers at Hugging Face and is
released under an Apache 2.0 license.111Datasets themselves may utilize
different licenses which are documented in the library. The library is
available at https://github.com/huggingface/datasets. Full documentation is
available through the project website.222https://huggingface.co/docs/datasets/

##  2 Related Work

There is a long history of projects aiming to group, categorize, version, and
distribute NLP datasets which we briefly survey. Most notably, the Linguistic
Data Consortium (LDC) stores, serves, and manages a variety of datasets for
language and speech. In addition to hosting and distributing corpus resources,
the LDC supports significant annotation efforts. Other projects have aimed to
collect related annotations together. Projects like OntoNotes have collected
annotations across multiple tasks for a single corpus Pradhan and Xue (2009)
whereas the Universal Dependency treebank Nivre et al. (2016) collects similar
annotations across languages. In machine translation, projects like OPUS
catalog the translation resources for many different languages. These differ
from Datasets which collects and provides access to datasets in a content-
agnostic way.

Other projects have aimed to make it easy to access core NLP datasets. The
influential NLTK project Bird (2006) provided a data library that makes it
easy to download and access core datasets. SpaCy also provides a similar
loading interface Honnibal and Montani (2017). In recent years, concurrent
with the move towards deep learning, there has been a growth in large freely
available datasets often with less precise annotation standards. This has
motivated cloud-based repositories of datasets. Initiatives like TensorFlow-
Datasets (2021) and TorchText (2021) have collected various datasets in a
common cloud format. This project began as a fork of TensorFlow-Datasets, but
has diverged significantly.

Datasets differs from these projects along several axes. The project is
decoupled from any modeling framework and provides a general-purpose tabular
API. It focuses on NLP specifically and provides specialized types and
structures for language constructs. Finally, it prioritizes community
management and documentation through the dataset hub and data cards, and aims
to provide access to a long-tail of datasets for many tasks and languages.

##  3 Library Tour and Design

We begin with a brief tour. Accessing a dataset is done simply by referring to
it by a global identity.

⬇

dataset = load_dataset("boolq")

Each dataset has a features schema and metadata.

⬇

print(dataset.features, dataset.info)

Any slice of data points can be accessed directly without loading the full
dataset into memory.

⬇

dataset["train"][start:end]

Processing can be applied to every data point in a batched and parallel
fashion using standard libraries such as NumPy or Torch.

⬇

# Torch function "tokenize"

tokenized = dataset.map(tokenize,

num_proc=32)

Datasets facilitates each of these four Stages with the following technical
steps.

#### S1. Dataset Retrieval and Building

Datasets does not host the underlying raw datasets, but accesses hosted data
from the original authors in a distributed manner.333For datasets with
intensive preprocessing, such as Wikipedia, a preprocessed version is hosted.
Datasets removed by the author are not centrally cached and become
unavailable. Each dataset has a community contributed builder module. The
builder module has the responsibility of processing the raw data, e.g. text or
CSV, into a common dataset interface representation.

#### S2. Data Point Representation

Each built dataset is represented internally as a table with typed columns.
The Dataset type system includes a variety of common and NLP-targeted types.
In addition to atomic values (int’s, float’s, string’s, binary blobs) and
JSON-like dicts and lists, the library also includes named categorical class
labels, sequences, paired translations, and higher-dimension arrays for
images, videos, or waveforms.

#### S3. In-Memory Access

Datasets is built on top of Apache Arrow, a cross-language columnar data
framework Arrow (2020). Arrow provides a local caching system allowing
datasets to be backed by an on-disk cache, which is memory-mapped for fast
lookup. This architecture allows for large datasets to be used on machines
with relatively small device memory. Arrow also allows for copy-free hand-offs
to standard machine learning tools such as NumPy, Pandas, Torch, and
TensorFlow.

#### S4. User Processing

At download, the library provides access to the typed data with minimal
preprocessing. It provides functions for dataset manipulation including
sorting, shuffling, splitting, and filtering. For complex manipulations, it
provides a powerful map function that supports arbitrary Python functions for
creating new in-memory tables. For large datasets, map can be run in batched,
multi-process mode to apply processing in parallel. Furthermore, data
processed by the same function is automatically cached between sessions.

#### Complete Flow

Upon requesting a dataset, it is downloaded from the original host. This
triggers dataset-specific builder code which converts the text into a typed
tabular format matching the feature schema and caches the table. The user is
given a memory-mapped typed table. To further process the data, e.g. tokenize,
the user can run arbitrary vectorized code and cache the results.

##  4 Dataset Documentation and Search

Figure 1: The data card for ELI5 Fan et al. (2019).

Datasets is backed by the Dataset Hub 444https://hf.co/datasets/ that helps
users navigate the growing number of available resources and draws inspiration
from recent work calling for better documentation of ML datasets in general
Gebru et al. (2018) and NLP datasets in particular Bender and Friedman (2018).

Datasets can be seen as a form of infrastructure Hutchinson et al. (2021). NLP
practitioners typically make use of them with a specific goal in mind, whether
they are looking to answer a specified research question or developing a
system for a particular practical application. To that end, they need to be
able to not only easily identify which dataset is most appropriate for the
task at hand, but also to understand how various properties of that best
candidate might help with, or, conversely, run contrary to their purpose.

The Dataset Hub includes all of the datasets available in the library. It
links each of them together though: a set of structured tags holding
information about their languages, tasks supported, licenses, etc.; a data
card based on a template555https://hf.co/datasets/card-guide designed to
combine relevant technical considerations and broader context information
McMillan-Major et al. (2021); and a list of models trained on the dataset.
Both the tags and data card are filled manually by the contributor who
introduces the dataset to the library. Figure 1 presents an example of the
dataset page on the hub.666https://hf.co/datasets/eli5 Together, these pages
and the search interface help users navigate the available resources.

#### Choosing a Dataset

Given a use case, the structured tags provide a way to surface helpful
datasets. For example, requesting all datasets that have the tags for Spanish
language and the Question Answering task category returns 7 items at the time
of writing. A user can then refine their choice by reading through the data
cards, which contain sections describing the variety of language used, legal
considerations including licensing and incidence of Personal Identifying
Information, and paragraphs about known social biases resulting from the
collection process that might lead a deployed model to cause disparate harms.

#### Using a Dataset

The data card also contains information to help users navigate all the
choices, from hardware to modeling, that go into successfully training a
system. These include the number of examples in each of the dataset splits,
the size on disk of the data, meaningful differences between the training,
validation, and test split, and free text descriptions of the various fields
that make up each example to help decide what information to use as input or
output of a prediction model.

#### The Data Card as a Living Document

A dataset’s life continues beyond its initial release. As NLP practitioners
interact with the dataset in various ways, they may surface annotation
artifacts that affect the behavior of trained models in unexpected ways
Gururangan et al. (2018),777https://hf.co/datasets/snli#other-known-
limitations issues in the way the standard split was initially devised to test
a model’s ability to adapt to new settings Krishna et al. (2021), or new
understanding of the social biases exhibited therein Hutchinson et al. (2020).
The community-driven nature of Datasets and the versioning mechanisms provided
by the GitHub backend provide an opportunity to keep the data cards up to date
as information comes to light and to make gradual progress toward having as
complete documentation as possible.

##  5 Dataset Usage and Use-Cases

Datasets is now being actively used for a variety of tasks. Figure 2 (left)
shows statistics about library usage. We can see that the most commonly
downloaded libraries are popular English benchmarks such as GLUE and SQuAD
which are often used for teaching and examples. However there is a range of
popular models for different tasks and languages.

Figure 2 (right) shows the wide coverage of the library in terms of task
types, sizes, and languages, with currently 681 total datasets. During the
development of the Datasets project, there was a public hackathon to have
community members develop new Dataset builders and add them to the project.
This event led 485 commits and 285 unique contributors to the library. Recent
work has outlined the difficulty of finding data sources for lower-resourced
languages through automatic filtering alone Caswell et al. (2021). The breadth
of languages spoken by participants in this event made it possible to more
reliably bootstrap the library with datasets in a wide range of different
languages. Finally while Datasets is designed for NLP, it is becoming used for
multi-modal datasets. The library now includes types for continuous data,
including multi-dimensional arrays for image and video data and an Audio type.

Figure 2: Summary statistics from the datasets in the library. (Left) The
relative download numbers of the most popular datasets in the library. (Right)
Task properties. Each dataset may have multiple sub-tasks. Task Types are the
types labeled in the library. Task Sizes are the number of data points in the
table. Task Languages are the languages tagged in the library (many datasets
include tasks in different languages).

###  5.1 Case Studies: $N$-Dataset NLP

A standardized library of datasets opens up new use-cases beyond making single
datasets easy to download. We highlight three use-cases in which practitioners
have employed the Datasets library.

#### Case Study 1: $N$-task Pretraining Benchmarks

Benchmarking frameworks such as NLP Decathlon and GLUE have popularized the
comparison of a single NLP model across a variety of tasks McCann et al.
(2018); Wang et al. (2018). Recently benchmarking frameworks like GPT-3’s test
suite framework Brown et al. (2020) have expanded this benchmarking style even
further, taking on dozens of different tasks. This research has increased
interest in comparison of different datasets at scale.

Datasets is designed to facilitate large-scale, $N$-task benchmarking beyond
what might be possible for a single researcher to set up. For example, the
Eleuther AI project aims to produce a massive scale open-source model. As part
of this project they have released an LM Evaluation
Harness888https://github.com/EleutherAI/lm-evaluation-harness which includes
nearly 100 different NLP tasks to test a large scale language model. This
framework is built with the Datasets library as a method for retrieving and
caching datasets.

#### Case Study 2: Reproducible Shared Tasks

NLP has a tradition of shared tasks that become long-lived benchmark datasets.
Tasks like CoNLL 2000 Tjong Kim Sang and Buchholz (2000) continue to be widely
used more than 20 years after their release. Datasets provides a convenient,
reproducible, and standardized method for hosting and maintaining shared
tasks, particularly when they require multiple different datasets.

Datasets was used to support the first GEM (Generation, Evaluation, and
Metrics) workshop Gehrmann et al. (2021). This workshop ran a shared task
comparing natural language generation (NLG) systems on 12 different tasks. The
tasks included examples from twenty different languages and supervised
datasets varying from size of 5k examples to 500k. Critically, the shared task
had a large variety of different input formats including tables, articles, RDF
triples, and meaning graphs. Datasets allows users to access all 12 datasets
with a single line of code in their shared task description.

#### Case Study 3: Robustness Evaluation

While NLP models have improved to the point that on-paper they compete with
human performance, many research projects have demonstrated that these same
models are fooled when given out-of-domain examples Koehn and Knowles (2017),
simple adversarial constructions Belinkov and Bisk (2018), or examples that
spuriously match basic patterns Poliak et al. (2018).

Datasets can be used to support better benchmarking of these issues. The
Robustness Gym999https://robustnessgym.com/ proposes a systematic way to test
an NLP system across many different proposed techniques, specifically
subpopulations, transformations, evaluation sets, and adversarial attacks Goel
et al. (2021). Together, these provide a robustness report that is more
specific than a single evaluation measure. While developed independently, the
Robustness Gym is built on Datasets, and "relies on a common data interface"
provided by the library.

##  6 Additional Functionality and Uses

Streaming Some datasets are extremely large and cannot even fit on disk.
Datasets includes a streaming mode that buffers these datasets on the fly.
This mode supports the core map primitive, which works on each data batch as
it is streamed. Datasets streaming helped enable recent research into
distributed training of a very large open NLP model Diskin et al. (2021).

Indexing Datasets includes tools for easily building and utilizing a search
index over an arbitrary dataset. To construct the index the library can
interface either with FAISS or ElasticSearch Johnson et al. (2017); Elastic
(2021). This interface makes it easy to efficiently find nearest neighbors
either with textual or vector queries. Indexing was used to host the open-
source version of Retrieval-Augmented Generation Lewis et al. (2020), a
generation model backed by the ability to query knowledge from large-scale
knowledge sources.

Metrics Datasets includes an interface for standardizing metrics which can be
documented, versioned and matched with datasets. This functionality is
particularly useful for benchmark datasets such as GLUE that include multiple
tasks each with their own metric. Some metrics like BLEU and SQuAD are
included directly in the library code, whereas others are linked to external
packages. The library also allows for metrics to be applied in a distributed
manner over the dataset.

Figure 3: Datasets viewer is an application that shows all rows for all
datasets in the library. The interface allows users to change datasets,
subsets, and splits, while seeing the dataset schema and metadata.

Data Viewer A benefit of the standardized interface of the library is that it
makes it trivial to build a cross-task dataset viewer. As an example, Hugging
Face hosts a generic viewer for the entirety of datasets (Figure 3)
101010https://huggingface.co/datasets/viewer/. In this viewer, anyone on the
web can open all almost 650 different datasets and view any example. Because
the tables are typed, the viewer can easily show all component features,
structured data, and multi-modal features.

##  7 Conclusion

Hugging Face Datasets is an open-source, community-driven library that
standardizes the processing, distribution, and documentation of NLP datasets.
The core library is designed to be easy to use, fast, and to use the same
interface for datasets of varying size. At 650 datasets from over 250
contributors, it makes it easy to use standard datasets, has facilitated new
use cases of cross-dataset NLP, and has advanced features for tasks like
indexing and streaming large datasets.

## Acknowledgements

While organized by Hugging Face, Datasets is an open-source project driven by
contributors. This work was only possible thanks to Charin Polpanumas, Cahya
Wirawan, Jonatas Grosman, Thomas Hudson, Zaid Alyafeai, Rahul Chauhan, Vineeth
S, Sandip, Yvonnegitau, Jared T Nielsen, Michal Jamry, Bharat Raghunathan,
Ceyda Cinarel, David Adelani, Misbah Khan, Steven Liu, Vasudev Gupta, Matthew
Bui, Abdul Rafay Khalid, Beth Tenorio, Eduardo Gonzalez Ponferrada, Harshal
Mittal, Hugo Abonizio, Moussa Kamal Eddine, Stefan Schweter, Sumanth
Doddapaneni, Yavuz Kömeçoğlu, Yusuke Mori, J-chim, Ontocord, Skyprince999,
Vrindaprabhu, Jonathan Bragg, Philip May, Alexander Seifert, Ivanzidov, Jake
Tae, Karim Foda, Mohamed Al Salti, Nick Doiron, Vinay, Czabo, Vblagoje,
Nilansh Rajput, Abdulelah S. Al Mesfer, Akshay Bhardwaj, Amit Moryossef,
Basava Sai Naga Viswa Chaitanya, Darek Kłeczek, Darshan Gandhi, Gustavo
Aguilar, Hassan Ismail Fawaz, Jack Morris, Jamesg, Jonathan Chang, Karthik
Bhaskar, Manan Dey, Maria Grandury, Michael A. Hedderich, Mounica Maddela,
Nathan Cooper, Purvi M, Richard Wang, Song Feng, Sourab Mangrulkar, Tanmoy,
Vijayasaradhi, Zacharysbrown, Chameleontk, Eusip, Jeromeku, Patpizio,
Tuner007, Benjamin Van Der Burgh, Bharati Patidar, George Mihaila, Olivier,
Tim Isbister, Alessandro Suglia, Başak Buluz Kömeçoğlu, Boris Dayma, Dariusz
Kajtoch, Frankie Robertson, Jieyu, Mihaelagaman, Nikhil Bartwal, Param
Bhavsar, Paullerner, Rachelker, Ricardo Rei, Sai, Sasha Rush, Suraj Parmar,
Takuro Niitsuma, Taycir Yahmed, Tuan-phong Nguyen, Vladimir Gurevich, Alex,
Calpt, Idoh, Justin-yan, Katnoria, Sileod, Avinash Swaminathan, Connor
Mccarthy, Jungwhan Kim, Leo Zhao, Sanjay Kamath, (bill) Yuchen Lin,
2dot71mily, 8bitmp3, Abi Komma, Adam, Adeep Hande, Aditya Siddhant, Akash
Kumar Gautam, Alaa Houimel, Alex Dong, Along, Anastasia Shimorina, Andre
Barbosa, Anton Lozhkov, Antonio V Mendoza, Ashmeet Lamba, Ayushi Dalmia,
Batjedi, Behçet Şentürk, Bernardt Duvenhage, Binny Mathew, Birger Moëll, Blanc
Ray, Bram Vanroy, Clément Rebuffel, Daniel Khashabi, David Fidalgo, David
Wadden, Dhruv Kumar, Diwakar Mahajan, Elron Bandel, Emrah Budur, Fatima
Haouari, Fraser Greenlee, Gergely Nemeth, Gowtham.r, Hemil Desai, Hiroki
Nakayama, Ilham F Putra, Jannis Vamvas, Javier De La Rosa, Javier-jimenez99,
Jeff Hale, Jeff Yang, Joel Niklaus, John Miller, John Mollas, Joshua Adelman,
Juan Julián Cea Morán, Kacper Łukawski, Koichi Miyamoto, Kushal Kedia, Laxya
Agarwal, Leandro Von Werra, Loïc Estève, Luca Di Liello, Malik Altakrori,
Manuel, Maramhasanain, Marcin Flis, Matteo Manica, Matthew Peters, Mehrdad
Farahani, Merve Noyan, Mihai Ilie, Mitchell Gordon, Niccolò Campolungo, Nihal
Harish, Noa Onoszko, Nora Belrose, Or Sharir, Oyvind Tafjord, Pewolf, Pariente
Manuel, Pasquale Minervini, Pedro Ortiz Suárez, Pedro Lima, Pengcheng Yin,
Petros Stavropoulos, Phil Wang, Philipp Christmann, Philipp Dufter, Philippe
Laban, Pierre Colombo, Rahul Danu, Rabeeh Karimi Mahabadi, Remi Calizzano,
Reshinth Adithyan, Rodion Martynov, Roman Tezikov, Sam Shleifer, Savaş
Yıldırım, Sergey Mkrtchyan, Shubham Jain, Shubhambindal2017, Subhendu Ranjan
Mishra, Taimur Ibrahim, Tanmay Thakur, Thomas Diggelmann, Théophile Blard,
Tobias Slott, Tsvetomila Mihaylova, Vaibhav Adlakha, Vegar Andreas Bergum,
Victor Velev, Vlad Lialin, Wilson Lee, Yang Wang, Yasir Abdurrohman, Yenting
(Adam) Lin, Yixin Nie, Yoav Artzi, Yoni Gottesman, Yongrae Jo, Yuxiang Wu,
Zhong Peixiang, Zihan Wang, Aditya2211, Alejandrocros, Andy Zou, Brainshawn,
Cemilcengiz, Chutaklee, Gaurav Rai, Dhruvjoshi1998, Duttahritwik, Enod,
Felixgwu, Ggdupont, Jerryishere, Jeswan, Lodgi, Lorinczb, Maxbartolo, Nathan
Dahlberg, Neal, Ngdodd, Kristo, Onur Güngör, Ophelielacroix, Padipadou, and
Phiwi.

## References

  * Arrow (2020) Apache Arrow. 2020.  Apache Arrow, a cross-language development platform for in-memory analytics.  https://arrow.apache.org/.
  * Belinkov and Bisk (2018) Yonatan Belinkov and Yonatan Bisk. 2018.  Synthetic and natural noise both break neural machine translation.  In _International Conference on Learning Representations_.
  * Bender and Friedman (2018) Emily M. Bender and Batya Friedman. 2018.  Data statements for natural language processing: Toward mitigating system bias and enabling better science.  _Transactions of the Association for Computational Linguistics_ , 6:587–604.
  * Bird (2006) Steven Bird. 2006.  NLTK: The Natural Language Toolkit.  In _Proceedings of the COLING/ACL 2006 Interactive Presentation Sessions_ , pages 69–72, Sydney, Australia. Association for Computational Linguistics.
  * Brown et al. (1988) P. Brown, J. Cocke, S. Della Pietra, V. Della Pietra, F. Jelinek, R. Mercer, and P. Roossin. 1988.  A statistical approach to language translation.  In _Coling Budapest 1988 Volume 1: International Conference on Computational Linguistics_.
  * Brown et al. (2020) Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020.  Language models are few-shot learners.  In _Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual_.
  * Caswell et al. (2021) Isaac Caswell, Julia Kreutzer, Lisa Wang, Ahsan Wahab, Daan van Esch, Nasanbayar Ulzii-Orshikh, Allahsera Tapo, Nishant Subramani, Artem Sokolov, Claytone Sikasote, Monang Setyawan, Supheakmungkol Sarin, Sokhar Samb, Benoît Sagot, Clara Rivera, Annette Rios, Isabel Papadimitriou, Salomey Osei, Pedro Javier Ortiz Suárez, Iroro Orife, Kelechi Ogueji, Rubungo Andre Niyongabo, Toan Q. Nguyen, Mathias Müller, André Müller, Shamsuddeen Hassan Muhammad, Nanda Muhammad, Ayanda Mnyakeni, Jamshidbek Mirzakhalov, Tapiwanashe Matangira, Colin Leong, Nze Lawson, Sneha Kudugunta, Yacine Jernite, Mathias Jenny, Orhan Firat, Bonaventure F. P. Dossou, Sakhile Dlamini, Nisansa de Silva, Sakine Çabuk Balli, Stella Biderman, Alessia Battisti, Ahmed Baruwa, Ankur Bapna, Pallavi Baljekar, Israel Abebe Azime, Ayodele Awokoya, Duygu Ataman, Orevaoghene Ahia, Oghenefego Ahia, Sweta Agrawal, and Mofetoluwa Adeyemi. 2021.  Quality at a glance: An audit of web-crawled multilingual datasets.  _CoRR_ , abs/2103.12028.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Diggelmann et al. (2020) Thomas Diggelmann, Jordan Boyd-Graber, Jannis Bulian, Massimiliano Ciaramita, and Markus Leippold. 2020.  Climate-fever: A dataset for verification of real-world climate claims.
  * Diskin et al. (2021) Michael Diskin, Alexey Bukhtiyarov, Max Ryabinin, Lucile Saulnier, Quentin Lhoest, Anton Sinitsin, Dmitry Popov, Dmitry Pyrkin, Maxim Kashirin, Alexander Borzunov, Albert Villanova del Moral, Denis Mazur, Ilia Kobelev, Yacine Jernite, Thomas Wolf, and Gennady Pekhimenko. 2021.  Distributed deep learning in open collaborations.
  * Elastic (2021) Elastic. 2021.  Elastic Search.  https://www.elastic.co/.
  * Fan et al. (2019) Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019.  ELI5: Long form question answering.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 3558–3567, Florence, Italy. Association for Computational Linguistics.
  * Gebru et al. (2018) Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna M. Wallach, Hal Daumé III, and Kate Crawford. 2018.  Datasheets for datasets.  _CoRR_ , abs/1803.09010.
  * Gehrmann et al. (2021) Sebastian Gehrmann, Tosin P. Adewumi, Karmanya Aggarwal, Pawan Sasanka Ammanamanchi, Aremu Anuoluwapo, Antoine Bosselut, Khyathi Raghavi Chandu, Miruna Adriana Clinciu, Dipanjan Das, Kaustubh D. Dhole, Wanyu Du, Esin Durmus, Ondvrej Duvsek, Chris C. Emezue, Varun Gangal, Cristina Garbacea, T. Hashimoto, Yufang Hou, Yacine Jernite, Harsh Jhamtani, Yangfeng Ji, Shailza Jolly, Mihir Kale, Dhruv Kumar, Faisal Ladhak, Aman Madaan, Mounica Maddela, Khyati Mahajan, Saad Mahamood, Bodhisattwa Prasad Majumder, Pedro Henrique Martins, Angelina McMillan-Major, Simon Mille, Emiel van Miltenburg, Moin Nadeem, Shashi Narayan, V. Nikolaev, Rubungo Andre Niyongabo, Salomey Osei, Ankur P. Parikh, Laura Perez-Beltrachini, Niranjan Rao, Vikas Raunak, Juan Diego Rodríguez, Sashank Santhanam, João Sedoc, Thibault Sellam, Samira Shaikh, Anastasia Shimorina, Marco Antonio Sobrevilla Cabezudo, Hendrik Strobelt, Nishant Subramani, W. Xu, Diyi Yang, Akhila Yerukola, and Jiawei Zhou. 2021.  The gem benchmark: Natural language generation, its evaluation and metrics.  _ArXiv_ , abs/2102.01672.
  * Goel et al. (2021) Karan Goel, Nazneen Fatema Rajani, Jesse Vig, Zachary Taschdjian, Mohit Bansal, and Christopher Ré. 2021.  Robustness gym: Unifying the NLP evaluation landscape.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Demonstrations_ , pages 42–55, Online. Association for Computational Linguistics.
  * Gururangan et al. (2018) Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A. Smith. 2018.  Annotation artifacts in natural language inference data.  In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)_ , pages 107–112, New Orleans, Louisiana. Association for Computational Linguistics.
  * Honnibal and Montani (2017) Matthew Honnibal and Ines Montani. 2017.  spacy 2: Natural language understanding with bloom embeddings, convolutional neural networks and incremental parsing.  _To appear_ , 7(1):411–420.
  * Hutchinson et al. (2020) Ben Hutchinson, Vinodkumar Prabhakaran, Emily Denton, Kellie Webster, Yu Zhong, and Stephen Denuyl. 2020.  Social biases in NLP models as barriers for persons with disabilities.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020_ , pages 5491–5501. Association for Computational Linguistics.
  * Hutchinson et al. (2021) Ben Hutchinson, Andrew Smart, Alex Hanna, Emily Denton, Christina Greer, Oddur Kjartansson, Parker Barnes, and Margaret Mitchell. 2021.  Towards accountability for machine learning datasets: Practices from software engineering and infrastructure.  In _Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency_ , FAccT ’21, page 560–575, New York, NY, USA. Association for Computing Machinery.
  * Johnson et al. (2017) Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2017.  Billion-scale similarity search with gpus.  _arXiv preprint arXiv:1702.08734_.
  * Koehn and Knowles (2017) Philipp Koehn and Rebecca Knowles. 2017.  Six challenges for neural machine translation.  _arXiv preprint arXiv:1706.03872_.
  * Krishna et al. (2021) Kalpesh Krishna, Aurko Roy, and Mohit Iyyer. 2021.  Hurdles to progress in long-form question answering.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021_ , pages 4940–4957. Association for Computational Linguistics.
  * Lewis et al. (2020) Patrick S. H. Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020.  Retrieval-augmented generation for knowledge-intensive NLP tasks.  _CoRR_ , abs/2005.11401.
  * Marcus et al. (1993) Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993.  Building a large annotated corpus of English: The Penn Treebank.  _Computational Linguistics_ , 19(2):313–330.
  * McCann et al. (2018) Bryan McCann, N. Keskar, Caiming Xiong, and R. Socher. 2018.  The natural language decathlon: Multitask learning as question answering.  _ArXiv_ , abs/1806.08730.
  * McMillan-Major et al. (2021) Angelina McMillan-Major, Salomey Osey, Juan Diego Rodríguez, Pawan Sasanka Ammanamanchi, Sebastian Gehrmann, and Yacine Jernite. 2021.  Reusable templates and guides for documenting datasets and models for natural language processing and generation - a case study of the huggingface and gem data and model cards.
  * Nivre et al. (2016) Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajič, Christopher D. Manning, Ryan McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, Reut Tsarfaty, and Daniel Zeman. 2016.  Universal Dependencies v1: A multilingual treebank collection.  In _Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC’16)_ , pages 1659–1666, Portorož, Slovenia. European Language Resources Association (ELRA).
  * Peters et al. (2018) Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018.  Deep contextualized word representations.  In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)_ , pages 2227–2237, New Orleans, Louisiana. Association for Computational Linguistics.
  * Poliak et al. (2018) Adam Poliak, Jason Naradowsky, Aparajita Haldar, Rachel Rudinger, and Benjamin Van Durme. 2018.  Hypothesis only baselines in natural language inference.  In _Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics_ , pages 180–191, New Orleans, Louisiana. Association for Computational Linguistics.
  * Pradhan and Xue (2009) Sameer S. Pradhan and Nianwen Xue. 2009.  OntoNotes: The 90% solution.  In _Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, Companion Volume: Tutorial Abstracts_ , pages 11–12, Boulder, Colorado. Association for Computational Linguistics.
  * Raffel et al. (2020) Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020.  Exploring the limits of transfer learning with a unified text-to-text transformer.  _J. Mach. Learn. Res._ , 21:140:1–140:67.
  * Rajpurkar et al. (2016) Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016.  SQuAD: 100,000+ questions for machine comprehension of text.  In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_ , pages 2383–2392, Austin, Texas. Association for Computational Linguistics.
  * TensorFlow-Datasets (2021) TensorFlow-Datasets. 2021.  TensorFlow Datasets, a collection of ready-to-use datasets.  https://www.tensorflow.org/datasets.
  * Tiedemann and Nygaard (2004) Jörg Tiedemann and Lars Nygaard. 2004.  The OPUS corpus - parallel and free: http://logos.uio.no/opus.  In _Proceedings of the Fourth International Conference on Language Resources and Evaluation (LREC’04)_ , Lisbon, Portugal. European Language Resources Association (ELRA).
  * Tjong Kim Sang and Buchholz (2000) Erik F. Tjong Kim Sang and Sabine Buchholz. 2000.  Introduction to the CoNLL-2000 shared task chunking.  In _Fourth Conference on Computational Natural Language Learning and the Second Learning Language in Logic Workshop_.
  * TorchText (2021) TorchText. 2021.  TorchText.  https://pytorch.org/text/stable/index.html.
  * Wang et al. (2018) Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018.  GLUE: A multi-task benchmark and analysis platform for natural language understanding.  In _Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP_ , pages 353–355, Brussels, Belgium. Association for Computational Linguistics.


# Entanglement of a two–qutrit Heisenberg XXZ model with Herring–Flicker
coupling and Dzyaloshinskii-Moriya interaction in homogeneous magnetic field

Brahim Adnane  LPMC. Laboratory, Theoretical Physics Group, Faculty of
Sciences, Chouaïb Doukkali University, PO Box 20, 24000 El Jadida, Morocco
Younes Moqine  Research Laboratory of Physics and Engineers Sciences, Team of
Applied Physics and New Technologies, Polydisciplinary Faculty (FP-BM), Sultan
Moulay Slimane University, Béni Mellal, Morocco  Abdelhadi Belouad  LPTHE.
Laboratory, Theoretical Physics and High Energy, Faculty of Sciences, Ibn Zohr
University, PO Box 8106, Agadir, Morocco  Rachid Houça<EMAIL_ADDRESS>LPMC.
Laboratory, Theoretical Physics Group, Faculty of Sciences, Chouaïb Doukkali
University, PO Box 20, 24000 El Jadida, Morocco  LPTHE. Laboratory,
Theoretical Physics and High Energy, Faculty of Sciences, Ibn Zohr University,
PO Box 8106, Agadir, Morocco

In this study, we use the concept of negativity to characterize the
entanglement of a two–qutrit Heisenberg XXZ model for subject to a uniform
magnetic field and z–axis Dzyaloshinskii–Moriya (DM) interaction with Herring-
Flicker (HF) coupling. By varying the temperature, magnetic field, DM
interaction, and distance of HF coupling. We find that the state system
becomes less entangled at high temperatures or in strong magnetic fields, and
vice versa. Our findings also suggest that entanglement rises when the z–axis
DM interaction increases. Finally, HF coupling affects the degree of
entanglement. For example, when HF coupling and temperature are at small
values, the degree of entanglement is at its highest, but when HF coupling is
at substantial values, the degree of intricacy tends to stabilize.

PACS numbers: 03.65.Ud, 03.67-a, 75.10Jm

Keywords: Two–qutrit, quantum entanglement, negativity, Heisenberg model,
Herring–Flicker coupling, Dzyaloshinskii-Moriya interaction, density matrix.

##  1 Introduction

Entanglement is one of the most intriguing aspects of quantum physics [1]. It
happens when particles interact in a manner that makes it impossible to
characterize each particle’s quantum state separately. With implementations in
quantum communication and teleportation [2, 3, 4], quantum information
processing [5], quantum dense coding, and the application of various quantum
protocols [6, 7, 8], quantum entanglement uses are a precious resource for
research that cannot be done using conventional resources. Different physics
fields have also successfully attained entanglement. For instance, quantum
logic operations involving trapped ions [10], nuclear spins of organic
molecules [11], semiconductor devices [12], and atomic chips [13] have all
been demonstrated to exhibit quantum communication patterns.

Finding a way to tell if a specific quantum system state is entangled or not,
as well as selecting the optimal way to quantify the degree of entanglement,
are significant challenges. In light of this, one of the most critical issues
in the realm of quantum information is the quantization and characterization
of the degree of entanglement. When the quantum system is in a pure state, the
notion of entanglement is simpler and easier to comprehend. In contrast, the
characterization of complete entanglement characteristics of mixed states is a
challenging and unanswered mathematical problem. Several measures, such as
negativity [14, 15, 16, 17], have been suggested to quantify entanglement.

Condensed matter systems’ quantum entanglement is a significant field, as is
well known. Various studies on quantum entanglement have been accomplished on
the thermal equilibrium states of spin chains subjected to an external
magnetic field at a fixed temperature [18, 19, 20, 21, 22]. Moreover, two-
qubit quantum correlations with the DM interaction receive much attention from
researchers [23, 24, 25, 26, 27]. In addition, the Heisenberg model was used
to study entanglement. A number of important works were produced, including
the isotropic Heisenberg XX model [28, 29], the XXX model [30, 31, 32], the
anisotropic Heisenberg XY model [33, 34], the completely anisotropic
Heisenberg XYZ model [35], as well as some new research on the spin–1/2 [36].
Unfortunately, since measurements for higher spin systems are lacking,
entanglement in spin–1 systems has gotten less attention. Vidal and Werner
established a measure of entanglement called negativity, which may apply to
higher spin systems [37, 38]. Using the notion of negative, Wang et al.
arrived at analytical conclusions about entanglement in a spin–1 chain [41,
42].

Now, we describe a few studies by various authors that include the coupling
strength, $J$, as a function of location in various spin chain configurations.
In reality, due to quantum fluctuations and noise, the coupling intensity in
quantum systems may be regarded as a factor in practical scenarios regarding
the distance separating quantum particles. This method could be utilized to
improve quantum implementations. In $1988$ Haldane and Shastry [43, 44]
presented the first effort to explore entanglement in the spin chain with
long-range interactions, where the coupling strength is equal to the inverse
of the distance square and follows the squared law. In a similar manner, B.
Lin et al. [45] investigated the XXZ Heisenberg chain with long-range
interactions, whereas M. XiaoSan et al. [46] investigated the XX Heisenberg
model with Calogero Moser interactions.

Due to the significance of HF coupling in quantum information physics to
determine the degree of intricacy between particles and motivated by previous
works, we will investigate the thermal entanglement of spin–1 in a two-spin
Heisenberg XXZ system with z-axis DM interaction, HF coupling distance, and in
the presence of a uniform magnetic field. To the best of our knowledge, this
study is the first to offer the first finding of thermal quantum correlation
measured by negativity for two-spins-qutrit over the HF coupling distance.

This paper is organized as follows: Section 2 presents in–depth the
theoretical model of our system exposed to DM interaction and a magnetic field
with HF coupling. In addition, we establish the spectrum of the system at a
certain temperature. Section 3 will address thermal quantum entanglement
measured by negativity. Section 4 will include numerical studies to highlight
the behavior of systems. Lastly, the investigation is concluded with a summary
of the results.

##  2 Hamiltonian of the system

In this study, we take into account a Heisenberg XXZ model with two–qutrit
(spin 1), Herring-Flicker (HF) coupling, and z–axis DM interaction exposed to
a uniform magnetic field. The Hamiltonian of the system is expressed by

$\mathcal{H}=\mathcal{H}_{H}+\mathcal{H}_{DM}+\mathcal{H}_{Z}$ (1)

$\mathcal{H}_{H}$ corresponds to the XXZ Heisenberg chain, $\mathcal{H}_{DM}$
indicates the DM interaction, and $\mathcal{H}_{Z}$ refers to the Zeeman
energy. Usually, the DM Hamiltonian $\mathcal{H}_{DM}$ [47, 48] can be
represented as follows

$\displaystyle\mathcal{H}_{DM}$ $\displaystyle=$
$\displaystyle\overrightarrow{D}.\left(\overrightarrow{\sigma}_{1}\times\overrightarrow{\sigma}_{2}\right)$
$\displaystyle=$ $\displaystyle
D_{x}\left(\sigma_{1}^{y}\sigma_{2}^{z}-\sigma_{1}^{z}\sigma_{2}^{y}\right)+D_{y}\left(\sigma_{1}^{x}\sigma_{2}^{z}-\sigma_{1}^{z}\sigma_{2}^{x}\right)+D_{z}\left(\sigma_{1}^{x}\sigma_{2}^{y}-\sigma_{1}^{y}\sigma_{2}^{x}\right)$

Where $\sigma^{x,y,z}$ denotes the Pauli matrices for a spin–1 and $D_{x,y,z}$
reflects the components of DM interaction. In the current studies, we limit
ourselves to the case where the DM interaction occurs along the z–axis. Then,
our Hamiltonian has the form

$\mathcal{H}=J\left(\sigma_{1}^{x}\sigma_{2}^{x}+\sigma_{1}^{y}\sigma_{2}^{y}+\gamma\sigma_{1}^{z}\sigma_{2}^{z}\right)+D_{z}\left(\sigma_{1}^{x}\sigma_{2}^{y}-\sigma_{1}^{y}\sigma_{2}^{x}\right)+B\left(\sigma_{1}^{z}+\sigma_{2}^{z}\right)$
(3)

where $\sigma^{m}(m=x,y,z)$ denotes the spin–1 Pauli matrices given by

$\sigma^{x}={1\over\sqrt{2}}\left(\begin{array}[]{ccc}0&1&0\\\ 1&0&1\\\
0&1&0\\\
\end{array}\right),\quad\sigma^{y}={1\over\sqrt{2}}\left(\begin{array}[]{ccc}0&-i&0\\\
i&0&-i\\\ 0&i&0\\\
\end{array}\right),\quad\sigma^{z}=\left(\begin{array}[]{ccc}1&0&0\\\ 0&0&0\\\
0&0&-1\\\ \end{array}\right)$ (4)

and $D_{z}$ denotes the DM interaction along the z-axis. It should be noted
that $J$ represents the coupling between the spin chains. Whenever the value
of $J>0$, the chain is antiferromagnetic; whenever the value of $J<0$, the
chain is ferromagnetic; $\gamma$ is the anisotropy parameter. Furthermore, we
assume that the coupling $J$ is an HF coupling, i.e., $J(R)$, is defined by

$J(R)=1.642\exp(-2R)R^{5\over 2}+O(R^{2}\exp(-2R))$ (5)

Figure 1: (Color online) The coupling $J$ of Herring-Flicker in terms of the
distance $R$ between two spins.

Where $R$ is HF coupling distance. The graph of the function $J$ in terms of
$R$ is shown in Figure 1. From Fig. 1, it is evident that the coupling of HF
is zero when the spins are far apart ($R>6$) and has a maximum when they are
closer ($R\simeq 1.3$), implying that the spins become free at greater
distances. As a result, in this study, we restrict ourselves to values on the
margin where $J$ is non-zero $(0<R<6)$.

To evaluate the spectrum of the Hamiltonian (3) it is convenient to give the
matrix form of $\mathcal{H}$ in the basis $|-1,-1>$, $|-1,0>$, $|-1,1>$,
$|0,-1>$, $|0,0>$, $|0,1>$, $|1,-1>$, $|1,0>$, $|1,1>$ as

$\mathcal{H}=\left(\begin{array}[]{ccccccccc}\gamma J(R)+2B&0&0&0&0&0&0&0&0\\\
0&B&0&re^{i\theta}&0&0&0&0&0\\\ 0&0&-\gamma J(R)&0&re^{i\theta}&0&0&0&0\\\
0&re^{-i\theta}&0&B&0&0&0&0&0\\\ 0&0&re^{-i\theta}&0&0&0&re^{i\theta}&0&0\\\
0&0&0&0&0&-B&0&re^{i\theta}&0\\\ 0&0&0&0&re^{-i\theta}&0&-\gamma J(R)&0&0\\\
0&0&0&0&0&re^{-i\theta}&0&-B&0\\\ 0&0&0&0&0&0&0&0&\gamma J(R)-2B\\\
\end{array}\right)$ (6)

which the quantities $r$ and $\theta$ are defined by

$\displaystyle r$ $\displaystyle=$ $\displaystyle\sqrt{D_{z}^{2}+J(R)^{2}}$
(7) $\displaystyle\theta$ $\displaystyle=$
$\displaystyle\arctan\left(\frac{D_{z}}{J(R)}\right)$ (8)

the eigenvalues as well as the eigenvectors of the equation (6) are given by

$\displaystyle\epsilon_{1,2}$ $\displaystyle=$ $\displaystyle B\pm r$ (9)
$\displaystyle\epsilon_{3,4}$ $\displaystyle=$ $\displaystyle\gamma J(R)\pm
2B$ (10) $\displaystyle\epsilon_{5}$ $\displaystyle=$ $\displaystyle-\gamma
J(R)$ (11) $\displaystyle\epsilon_{6,7}$ $\displaystyle=$ $\displaystyle-B\pm
r$ (12) $\displaystyle\epsilon_{8,9}$ $\displaystyle=$
$\displaystyle\frac{r}{2}\chi_{2,1}$ (13)

where $\chi_{1,2}=\frac{\sqrt{\gamma^{2}J(R)^{2}+8r^{2}}\pm\gamma J(R)}{r}$,
and the related eigenvectors

$\displaystyle|\varphi_{1,2}\rangle$ $\displaystyle=$
$\displaystyle\pm\frac{e^{i\theta}}{\sqrt{2}}|-1,0\rangle+\frac{1}{\sqrt{2}}|0,-1\rangle$
(14) $\displaystyle|\varphi_{3,4}\rangle$ $\displaystyle=$ $\displaystyle|\mp
1,\mp 1\rangle$ $\displaystyle|\varphi_{5}\rangle$ $\displaystyle=$
$\displaystyle-\frac{e^{2i\theta}}{\sqrt{2}}|-1,1\rangle+\frac{1}{\sqrt{2}}|1,-1\rangle$
$\displaystyle|\varphi_{6,7}\rangle$ $\displaystyle=$
$\displaystyle\pm\frac{e^{i\theta}}{\sqrt{2}}|0,1\rangle+\frac{1}{\sqrt{2}}|1,0\rangle$
$\displaystyle|\varphi_{8,9}\rangle$ $\displaystyle=$
$\displaystyle\frac{2e^{2i\theta}}{\sqrt{\chi_{1,2}^{2}+8}}|-1,1\rangle\pm\frac{e^{i\theta}\chi_{1,2}}{\sqrt{\chi_{1,2}^{2}+8}}|0,0\rangle+\frac{2}{\sqrt{\chi_{1,2}^{2}+8}}|1,-1\rangle$

After obtaining the spectrum of our system, it is easy to calculate the
thermal density, which is essential for performing measurements of the
examined system’s entanglement. To this end, the following section will be
devoted to calculating the density matrix following the system’s parameters.

##  3 Thermal density matrix and negativity

After determining the system’s spectrum, we shall seek the equation of the
density matrix $\varrho(T)$, which will enable us to quantify the negativity
at the thermal thermodynamic equilibrium at a given temperature $T$. According
to the above-described framework, the system’s state of thermal equilibrium
might be expressed as follows

$\varrho(T)={1\over\mathbb{Z}}e^{-\beta\mathcal{H}}$ (15)

such that the canonical partition function $\mathbb{Z}$ is written by

$\mathbb{Z}=\sum_{i=1}^{9}e^{-\beta\epsilon_{i}}$ (16)

such as $k_{B}$ is the constant of the Boltzmann, for convenience, it is
considered as unity in the next. The temperature’s inverse is represented by
the parameter $\beta=1/T$. The spectrum of the Hamiltonian (6) allows
expressing the thermal density $\varrho(T)$ as

$\varrho(T)={1\over\mathbb{Z}}\sum_{k=1}^{4}e^{-\beta\epsilon_{k}}|\phi_{k}\rangle\langle\phi_{k}|$
(17)

Adding equations (9) and (14) to equation (17) yields the density matrix of
the system in thermal equilibrium, which may be written on the previous basis
as

$\varrho(T)={1\over\mathbb{Z}}\left(\begin{array}[]{ccccccccc}\rho_{11}&0&0&0&0&0&0&0&0\\\
0&\rho_{22}&0&e^{i\theta}\rho_{24}&0&0&0&0&0\\\
0&0&\rho_{33}&0&e^{i\theta}\rho_{35}&0&e^{2i\theta}\rho_{37}&0&0\\\
0&e^{-i\theta}\rho_{42}&0&\rho_{44}&0&0&0&0&0\\\
0&0&e^{-i\theta}\rho_{53}&0&\rho_{55}&0&e^{i\theta}\rho_{57}&0&0\\\
0&0&0&0&0&\rho_{66}&0&e^{i\theta}\rho_{68}&0\\\
0&0&e^{-2i\theta}\rho_{73}&0&e^{-i\theta}\rho_{75}&0&\rho_{77}&0&0\\\
0&0&0&0&0&e^{-i\theta}\rho_{86}&0&\rho_{88}&0\\\ 0&0&0&0&0&0&0&0&\rho_{99}\\\
\end{array}\right)$ (18)

such that the density matrix elements are given by

$\displaystyle\varrho_{11}$ $\displaystyle=$ $\displaystyle
e^{-\beta(2B+\gamma J(R))}$ (19) $\displaystyle\varrho_{22}$ $\displaystyle=$
$\displaystyle\varrho_{44}=e^{-\beta B}\cosh(\beta r)$
$\displaystyle\varrho_{33}$ $\displaystyle=$
$\displaystyle\varrho_{77}=\frac{1}{2}e^{\beta\gamma
J(R)}+\frac{4e^{-\frac{\beta
r\chi_{2}}{2}}}{\chi_{1}^{2}+8}+\frac{4e^{\frac{\beta
r\chi_{1}}{2}}}{\chi_{2}^{2}+8}$ $\displaystyle\varrho_{55}$ $\displaystyle=$
$\displaystyle\frac{\chi_{1}^{2}e^{-\frac{1}{2}\beta
r\chi_{2}}}{\chi_{1}^{2}+8}+\frac{\chi_{2}^{2}e^{\frac{1}{2}\beta
r\chi_{1}}}{\chi_{2}^{2}+8}$ $\displaystyle\varrho_{37}$ $\displaystyle=$
$\displaystyle\varrho_{73}=\frac{1}{2}\left(-e^{\beta\gamma
J(R)}+\frac{8e^{-\frac{\beta
r\chi_{2}}{2}}}{\chi_{1}^{2}+8}+\frac{8e^{\frac{\beta
r\chi_{1}}{2}}}{\chi_{2}^{2}+8}\right)$ $\displaystyle\varrho_{35}$
$\displaystyle=$
$\displaystyle\varrho_{53}=\varrho_{57}=\varrho_{75}=-\frac{4\left(e^{\frac{\beta\gamma
J(R)}{2}}\sinh\left(\frac{1}{4}\beta
r(\chi_{1}+\chi_{2})\right)\right)}{\chi_{1}+\chi_{2}}$
$\displaystyle\varrho_{66}$ $\displaystyle=$
$\displaystyle\varrho_{88}=e^{\beta B}\cosh(\beta r)$
$\displaystyle\varrho_{24}$ $\displaystyle=$
$\displaystyle\varrho_{42}=-e^{-\beta B}\sinh(\beta r)$
$\displaystyle\varrho_{68}$ $\displaystyle=$
$\displaystyle\varrho_{86}=-e^{\beta B}\sinh(\beta r)$
$\displaystyle\varrho_{99}$ $\displaystyle=$ $\displaystyle e^{\beta(2B-\gamma
J)}$

The negativity, based on the partial transposition approach [14], is shown to
be a beneficial entanglement measurement introduced by Vidal et al. [37], and
that it can be determined effectively for any dimension bipartite system. We
shall use the method [49], as described by

$\mathcal{N}(\varrho)=\sum_{j}|\lambda_{j}|$ (20)

Where the negative eigenvalues of the partial transposition
$\varrho^{T_{1}}(\varrho^{T_{2}})$ of the given state $\varrho$ with
consideration to the first (second) system are denoted by $\lambda_{j}$, in
this case, the expression of $\varrho^{T_{1}}$ is defined by

$\varrho^{T_{1}}={1\over\mathbb{Z}}\left(\begin{array}[]{ccccccccc}\varrho_{11}&0&0&0&e^{i\theta}\varrho_{24}&0&0&0&e^{2i\theta}\varrho_{37}\\\
0&\varrho_{22}&0&0&0&e^{i\theta}\varrho_{35}&0&0&0\\\
0&0&\varrho_{33}&0&0&0&0&0&0\\\
0&0&0&\varrho_{44}&0&0&0&e^{i\theta}\varrho_{57}&0\\\
e^{-i\theta}\varrho_{42}&0&0&0&\varrho_{55}&0&0&0&e^{i\theta}\varrho_{68}\\\
0&e^{-i\theta}\varrho_{53}&0&0&0&\varrho_{66}&0&0&0\\\
0&0&0&0&0&0&\varrho_{77}&0&0\\\
0&0&0&e^{-i\theta}\varrho_{75}&0&0&0&\varrho_{88}&0\\\
e^{-2i\theta}\varrho_{73}&0&0&0&e^{-i\theta}\varrho_{86}&0&0&0&\varrho_{99}\\\
\end{array}\right).$ (21)

We currently have all we need to investigate the behavior of our system. To do
this, we will devote the following part to a numerical analysis of the
negativity $\mathcal{N}$, as detailed below, to demonstrate the full
performance of the proposed system. Then, we presented some graphs depending
on the parameters of the system under consideration, like temperature $T$, HF
coupling distance $R$, DM interaction $D_{z}$ and uniform magnetic field $B$.
In addition, we will continue to examine this in more detail in order to draw
conclusions.

##  4 Numerical results

This section will quantitatively investigate several elements of entanglement
in a two–spin–qutrit Heisenberg XXZ chain with z–axis of DM interaction in
terms of the HF coupling distance $R$ for various temperatures and magnetic
field values. Firstly, we will explore negativity $\mathcal{N}$ as a function
of temperature $T$ for different $R$ and magnetic field values by fixing the
z–axis DM interaction such as $D_{z}=1$. Secondly, for a given temperature
$T$, coupling distance $R$, and magnetic field $B$, we display the negativity
$\mathcal{N}$ as a function of z–axis DM interaction. Finally, we will adjust
the z–axis DM interaction for the value $D_{z}=1$ to plot the negativity
$\mathcal{N}$ as a function of the HF coupling distance $R$, temperature $T$,
and magnetic field $B$.

Figure 2: (Color online) (a) The negativity versus $T$ for different $R$ for
$B=D_{z}=1$. (b) The negativity versus $T$ for different $B$ for the values
$D_{z}=1$ and $R=0.5$.

In figure (2), we plot the negativity $\mathcal{N}$ as a function of
temperature for different HF coupling distances $R$ (Fig. 2(a)) and magnetic
field $B$ (Fig. 2(b)). In Fig. 2(a), the negativity is plotted as a function
of the temperature $T$ for $R=0.3,0.6,0.9$ and the other parameters are set as
$D_{z}=B=1$. At high temperatures, the negativity is cancelled, which means
that the state’s system becomes separable. Moreover, for a fixed value of $T$,
the negativity increases with increasing HF coupling distance $R$. From Fig.
2(b) when $B=0$, the maximally entangled state
$|\varphi_{2}\rangle=|\varphi_{7}\rangle$ is the ground state with eigenvalue
$-r$ with the maximum entanglement, i.e., $N=0.9616$. Furthermore, when $T$
rises, the negativity lowers owing to the mixture of other states with the
maximally entangled state. The state $|11>$ is changing into the ground state
for strong magnetic fields $B$ ($B=1.2)$, meaning that there is no
entanglement at $T=0$. As a result, as $T$ grows, the maximally entangled
states mix with the unentangled state $|11>$, hence increasing entanglement.
Negativity decreases with rising magnetic field $B$ for a given value of $T$
until it reaches zero at higher temperatures.

Figure 3: (Color online) The negativity versus z-axis DM interaction. (a) for
different $T$ ($R=B=1$), (b) for different $R$ ($T=0.08$ and $B=0.5$), (c) for
different $B$ ($T=0.08$ and $R=0.5$).

Figure 3 shows the entanglement change with $D_{z}$ in the two–particle
antiferromagnetic XXZ model $(J>0)$ with different parameters ($T$, $R$ and
$B$). The first remark is that the negativity is symmetrical compared to
$D_{z}=0$. For this, we will interpret only the positive values of $D_{z}$.
The negativity remains null for a certain value of $D_{z}$ lower than the
critical value $D_{z}^{c}$, this last varying according to the parameters $T$,
$R$ or $B$. However, the rise of the quantities $T$ and $R$ decreases the
critical value of $D_{z}^{c}$ (Figs. 3(a) and (b)). On the other hand, when
the magnetic field increases, the $D_{z}^{c}$ critical value increases (Fig.
3(c)). In addition, we observe a peak of negativity which is related to the
temperature $T$, HF coupling distance $R$ and magnetic field $B$. Indeed, for
$D_{z}>D_{z}^{c}$ and in the vicinity of $D_{z}=1$, the negativity presents a
peak that vanishes with the temperature increase. Physically, the disappearing
of the peak can be explained by the temperature dominance in the DM
interaction, which is shown in Fig. 3(a)). In Fig. 3(b) and for the interval
$D_{z}^{c}<D_{z}<1$, we find the same behavior as in Fig. 3(a), except that
the HF coupling is significant in this interval. Moreover, in Fig. 3(c), the
peaks always appear with increasing amplitudes as the magnetic field
increases. Finally, when the DM interaction parameter $D_{z}$ is very high,
the negativity of the entanglement approaches an identical maximum fixed value
in all three figures, which means that the state’s system is maximally
entangled.

Figure 4: (Color online) (a): The negativity in terms of $R$ ($B=D_{z}=1$),
and (b,c): versus $B$ ($R=D_{z}=1$) for different value of $T$.

In Fig. 4, we display the negativity $\mathcal{N}$ as a function of the HF
coupling distance parameter $R$ (Fig. 4(a)), the uniform magnetic field $B$
(Fig. 4(b)) at different temperature values $(0.04,0.08,0.12$ and $0.5)$ and
the uniform magnetic field $B$ at $T=0$ (Fig. 4(c)). In Fig. 4(a), we see that
the negativity $\mathcal{N}$ increases when the parameter $R$ increases in the
XXZ system with DM interaction ($D_{z}=1$) and in the presence of a magnetic
field ($B=1$). When the HF coupling distance parameter $R$ is large, the
negativity tends to be constant even as the temperature rises. Furthermore, it
is clear that as the temperature rises, the entanglement vanishes even if $R$
varied, which is explained by the dominance of the temperature (black dashed
curve). From Figures 4(b) and 4(c), we see that there is evidence of phase
transition at low temperature by increasing the magnetic field $B$. When $B$
is small, the entanglement is initially at its maximum. When the uniform
magnetic field $B$ is greater, the entanglement decreases until it takes on a
null value. At $T=0$, we can also see that the entanglement vanishes when $B$
crosses a critical point $B_{c}$. However, the role of magnetic fields is
mainly to reduce entanglement.

##  5 summary

In this paper, we have explored thermal quantum entanglements by using the
negativity concept to discuss the entanglement of a two–qutrit Heisenberg XXZ
chain subjected to the uniform magnetic field and z–axis DM interaction with
the distance of the HF coupling. The Hamiltonian model is described, the
spectrum entanglement has been determined through mathematical calculations,
and the thermal state at a finite temperature is mentioned explicitly. The
numerical behavior of the negativity-measured entanglements in our study has
been examined in terms of temperature, z–axis DM interaction, HF distance
coupling and uniform magnetic field. The ground state entanglement at zero
temperature has been analyzed. We discovered that negativity declines
monotonically with increasing temperature, and it is also clear that the
magnetic field eliminates entanglement. Furthermore, We have also looked into
the z-axis DM interaction parameter $D_{z}$, which can be raised to enhance
entanglement. Finally, the affect of the HF coupling distance $R$ on quantum
entanglement in spin systems is explored, i.e., decreasing the temperature can
improve the entanglement of the system states.

## References

  * [1] A. Einstein, B. Podolsky, and N. Rosen, Phys. Rev. 47 (1935) 777
  * [2] R. Houça, A. Belouad, E. B. Choubabi, A. Kamal, and M. El Bouziani, J. Magn. Magn. Mater. 563 (2022) 169816
  * [3] C. H. Bennett, F. Brassard, C. Crepear, and al, Phys. Rev. Lett. 70 (1993) 1895
  * [4] A. K. Ekert, Phys. Rev. Lett. 67 (1991) 661
  * [5] D. P. Divincenzo, D. Eacon, J. Kempe, and al, Nat. 408 (2000) 339
  * [6] L. K. Grover, Phys. Rev. Lett. 79 (1997) 4709
  * [7] P. W. Shor, I. Found. o. Comp. Sci. 35 (1994) 124
  * [8] S. Khan, M. Ramzan, and M. K. Khan, Chin. Phys. Lett. 27 (2010 ) 080302
  * [9] J. Brendel, N. Gisin, W. Tittel, and H. Zbinden, Phys. Rev. Lett. 82 (1999) 2594
  * [10] D. Kielpinski, C. Monroe, and D. J. Wineland, Nat. 417 (2002) 709
  * [11] L. Bogani, and W. Wernsdorfer, A Collec. of Rev. from Nat. Jour. (2010) 194
  * [12] N. M. Chtchelkatchev, G. Blatter, G. B. Lesovik, and T. Martin, Phys. Rev. B. 66 (2002) 161320
  * [13] R. Folman, P. Krüger, D. Cassettari, B. Hessmo, T. Maier, and J. Schmied-mayer, Phys. Rev. Lett. 84 (2000) 4749
  * [14] A. Peres, Phys. Lett. 77 (1996) 1413
  * [15] M. Horodecki, P. Horodecki, and R. Horodecki, Phys. Lett. A. 1 (1996) 223
  * [16] K. Zyczkowski, P. Horodecki, A. Sanpera, and M. Lewenstein, Phys. Rev. A. 58 (1998) 883
  * [17] G. Vidal, and R. F. Werner, Phys. Rev. A. 65 (2002) 032314
  * [18] M. C. Amesen, S. Bose, and V. Vedral, Phys. Rev. Lett. 87 (2001) 017901
  * [19] X. G. Wang, Phys. Rev. A 64 (2001) 012313
  * [20] L. Zhou, H. S. Song, Y. Q. Guo, and C. Li, Phys. Rev. A. 68 (2003) 024301
  * [21] G. F. Zhang, and S. S. Li, Phys. Rev. A. 72 (2005) 034302
  * [22] J. L. Guo, and H. S. Song, Eur. Phys. J. D. 56 (2010) 265
  * [23] T. Tufarelli, D. Girolami, R. Vasile, S. Bose, and G. Adesso, Phys. Rev. A. S86 (2012) 052326
  * [24] Y. Yao, and al, Phys. Rev. A. 86 (2012) 062310
  * [25] S. Xu, X. K. Song, and L. Ye, Int. J. Mod. Phys. B. 27 (2013) 1350074
  * [26] Y. Yao, and al. Phys. Rev. A. 86 (2012) 042102
  * [27] F. W. Ma, S. X. Liu, and X. M. Kong, Phys. Rev. A. 84 (2011) 042302
  * [28] X. G. Wang, Phys. Rev. A. 64 (2001) 012313
  * [29] X. G. Wang, Phys. Rev. A. 66 (2002) 034302
  * [30] R. Houça, A. Belouad, E. B. Choubabi, A. Kamal, and M. El Bouziani, Quant. Infor. Proc. 21 (2022) 1
  * [31] M. A. Nielsen,”Quantum information theory” PhD thesis, University of New Mexico (1998). arXiv:quant-ph/0011036
  * [32] M. C. Arnesen, S.Bose, and V. Vedral, Phys. Rev. Lett. 87 (2001) 017901
  * [33] G. L. Kamta, and A F. Starace, Phys. Rev. Lett. 88 (2002) 107901
  * [34] X. G. Wang, Phys. Lett. A. 281 (2001) 101
  * [35] L. Zhou, H. S. Song, Y. Q. Guo, et al. Phys. Rev. A. 68 (2003) 024301
  * [36] K. W. William, Phys. Rev. Lett. 80 (1998) 2245
  * [37] G. Vidal, R. F. Phys. Rev. A. 65 (2002) 032314
  * [38] J. Schliemann, Phys. Rev. A. 68 (2003) 012309
  * [39] G. F. Zhang, and S S. Li, S. S. Comm. 138 (2006) 17
  * [40] G. F. Zhang, Eur. Phys. J. D. 37 (2006) 123
  * [41] Z. Sun, X. Wang , and Y. Q. Li, N. J. Phys. 7 (2005) 83
  * [42] X. Wang, H. B. Li,Z. Sun, et al, J. Phys. A. 38 (2005) 870
  * [43] F. D. M. Haldane, Phys. Rev. Lett., 60, (1988) 635.
  * [44] B. S. Shastry, Phys. Rev. Lett., 60, (1988) 639.
  * [45] B. Lin, Y. S. Wang , Physica B. 407, (2012) 77
  * [46] M. XiaoSan, Q. Ying, Z. GuangXing and W. AnMin, Science China, 56, (2013) 600
  * [47] T. Moriya, Phys. Rev. 120 (1960) 91
  * [48] T. Moriya, Phys. Rev. Lett. 4 (1960) 228
  * [49] A. Miranowicz, and A. Grudka, J. Opt. B. Quant. Semiclass. Opt. 6 (2004) 542