arXiv ScienceSearch

arXiv subjects

Diyi Liu

Publications and source records attributed to Diyi Liu.

At least 19 recordsLinked to original sources

Logical Resource Estimation for Quantum State Preparation with Compilation

Quantum state preparation is a fundamental primitive in quantum algorithms for encoding classical data into quantum amplitudes. We compare the cost of preparing general $n$-qubit states with real amplitudes using two common paradigms: rotation-based methods, based on controlled rotations, and sampling-based methods, based on a structured representation of the target state. Although these approaches are often theoretically compared using CNOT count and $T$-count, their relative performance in total gate count remains less well understood practically. We compare representative rotation-based and sampling-based methods using $T$-count and total gate count, and analyze how compilation overhead affects their relative performance. We also develop a software package for compiling state preparation circuits, designed as a practical subroutine for more general quantum computations. Numerical experiments on resource states and quantum states related to quantum chemistry, condensed matter physics, and simulation via Magnus expansion over a range of target accuracies $\epsilon$ support the analysis. Our results show that sampling-based methods achieve asymptotically lower $T$-count and retain an overall advantage after accounting for total gate count and compilation overhead.

quant-ph

The Enforcement and Feasibility of Hate Speech Moderation

Online hate speech is associated with harms ranging from deteriorating mental health to violence, yet how consistently platforms moderate hate, and whether enforcement is feasible at scale, remain poorly understood. We audit hate speech moderation on Twitter (now X) using 540,000 tweets annotated by trained native speakers, representative of a full day on the platform. Five months after posting, 80% of hateful tweets, including violent ones, remained online. Removal was only marginally more likely than for non-hateful tweets, far below scams or adult content, and insensitive to severity and reach. Automated detection could not reliably classify hate but ranked it highly, enabling human triage. Simulating this workflow, current staffing curbed little exposure, yet substantial reductions proved financially feasible, far below applicable regulatory fines. Persistent hate reflects resource allocation, not technical limits.

cs.CY

RankFormer: A Propose-then-Select Transformer for Multi-Agent Multimodal Trajectory Prediction

Predicting traffic agent trajectories plays an important role in autonomous driving, traffic operations, transportation safety analysis, etc. Although many deep learning algorithms are devised to predict future agent trajectories, the trajectory prediction problem is still challenging due to the complexity of decision-making process, interactions with surrounding vehicles, and the existence of multiple possible intentions for the traveling agents even under similar scenarios. Most existing methods are limited by the requirement of graph structures (e.g., Graph Neural Network) or the requirement of manually labeled intentions. In this study, we propose a pure Transformer-based deep learning model for multi-modal trajectory prediction considering temporal dependencies and agent-agent spatial interactions. After encoding the historical trajectories, two parallel decoders are employed to generate trajectories and probabilities on separate decoder tracks. The model is evaluated on two real-world datasets, one highway dataset and the other pedestrian dataset with solid performance. One important insight is that following a ``propose-then-select'' strategy, the agent-agent spatial interactions are only considered for probability estimation instead of trajectory generation. In summary, the proposed model provides a potential direction to design more robust and effective multi-modal trajectory prediction models.

cs.RO

Magic State Distillation using Asymptotically Good Codes on Qudits

Qudits offer the potential for low-overhead magic state distillation, although previous results for asymptotically good codes have required qudit dimension $q\gg 100$ or code length $\mathcal{N}\gg 100$. These parameters far exceed experimental demonstrations of qudit platforms, and thus motivate the search for better codes. Using a novel lifting procedure, we construct the first family of good triorthogonal codes on the $\mathbb{F}_{2^{2m}}$ alphabet with $m \geq 3$ that lies above the Tsfasman-Vladut-Zink bound. These codes yield a family of asymptotically good quantum codes with transversal CCZ gates, enabling constant space overhead magic state distillation with qudit dimension as small as $q=64$. Further, we identify a promising code with parameters $[[42,14,6]]_{64}$. Finally, we show that a distilled $|{CCZ}\rangle_{2^{2m}}$ can be reduced to a $|{CCZ}\rangle_{2^n}$ state for arbitrary $n$ with a constant-depth Clifford circuit of at most 9 computational basis measurements, 12 single-qudit and 9 two-qudit Clifford gates.

quant-ph

Block encoding with low gate count for second-quantized Hamiltonians

Efficient block encoding of many-body Hamiltonians is a central requirement for quantum algorithms in scientific computing, particularly in the early fault-tolerant era. In this work, we introduce new explicit constructions for block encoding second-quantized Hamiltonians that substantially reduce Clifford+T gate complexity and ancilla overhead. By utilizing a data lookup strategy based on the SWAP architecture for the sparsity oracle $O_C$, and a direct sampling method for the amplitude oracle $O_A$ with SELECT-SWAP architecture, we achieve a T count that scales as $\mathcal{\tilde{O}}(\sqrt{L})$ with respect to the number of interaction terms $L$ in general second-quantized Hamiltonians. We also achieve an improved constant factor in the Clifford gate count of our oracle. Furthermore, we design a block encoding that directly targets the $\eta$-particle subspace, thereby reducing the subnormalization factor from $\mathcal{O}(L)$ to $\mathcal{O}(\sqrt{L})$, and improving fault-tolerant efficiency when simulating systems with fixed particle numbers. Building on the block encoding framework developed for general many-body Hamiltonians, we extend our approach to electronic Hamiltonians whose coefficient tensors exhibit translation invariance or possess decaying structures. Our results provide a practical path toward early fault-tolerant quantum simulation of many-body systems, substantially lowering resource overheads compared to previous methods.

quant-ph

High-order Magnus Expansion for Hamiltonian Simulation

Efficient simulation of quantum dynamics with time-dependent Hamiltonians is important not only for time-varying systems but also for time-independent Hamiltonians in the interaction picture. Such simulations are more challenging than their time-independent counterparts due to the complexity introduced by time ordering. Existing algorithms that aim to capture commutator-based scaling either exhibit polynomial cost dependence on the Hamiltonian's time derivatives or are limited to low-order accuracy. In this work, we establish the general commutator-scaling error bounds for the truncated Magnus expansion at arbitrary order, where only Hamiltonian terms appear in the nested commutators, with no time derivatives involved. Building on this analysis, we design a high-order quantum algorithm with explicit circuit constructions. The algorithm achieves cost scaling with the commutator structure in the high-precision regime and depends only logarithmically on the Hamiltonian's time variation, making it efficient for general time-dependent settings, including the interaction picture.

quant-ph

Synthesis of Single Qutrit Circuits from Clifford+R

We present two deterministic algorithms to approximate single-qutrit gates. These algorithms utilize the Clifford + $\mathbf{R}$ group to find the best approximation of diagonal rotations. The first algorithm exhaustively searches over the group; while the second algorithm searches only for Householder reflections. The exhaustive search algorithm yields an average $\mathbf{R}$ count of $2.193(11) + 8.621(7) \log_{10}(1 / \varepsilon)$, albeit with a time complexity of $\mathcal{O}(\varepsilon^{-4.4})$. The Householder search algorithm results in a larger average $\mathbf{R}$ count of $3.20(13) + 10.77(3) \log_{10}(1 / \varepsilon)$ at a reduced time complexity of $\mathcal{O}(\varepsilon^{-0.42})$, greatly extending the reach in $\varepsilon$. These costs correspond asymptotically to 35% and 69% more non-Clifford gates compared to synthesizing the same unitary with two qubits. Such initial results are encouraging for using the $\mathbf{R}$ gate as the non-transversal gate for qutrit-based computation.

quant-ph

HateDay: Insights from a Global Hate Speech Dataset Representative of a Day on Twitter

To address the global challenge of online hate speech, prior research has developed detection models to flag such content on social media. However, due to systematic biases in evaluation datasets, the real-world effectiveness of these models remains unclear, particularly across geographies. We introduce HateDay, the first global hate speech dataset representative of social media settings, constructed from a random sample of all tweets posted on September 21, 2022 and covering eight languages and four English-speaking countries. Using HateDay, we uncover substantial variation in the prevalence and composition of hate speech across languages and regions. We show that evaluations on academic datasets greatly overestimate real-world detection performance, which we find is very low, especially for non-European languages. Our analysis identifies key drivers of this gap, including models' difficulty to distinguish hate from offensive speech and a mismatch between the target groups emphasized in academic datasets and those most frequently targeted in real-world settings. We argue that poor model performance makes public models ill-suited for automatic hate speech moderation and find that high moderation rates are only achievable with substantial human oversight. Our results underscore the need to evaluate detection systems on data that reflects the complexity and diversity of real-world social media.

cs.CL

Estimating journey time for two-point vehicle re-identification survey with limited observable scope using 2-dimensional truncated distributions

In transportation, Weigh-in motion (WIM) stations, Electronic Toll Collection (ETC) systems, Closed-circuit Television (CCTV) are widely deployed to collect data at different locations. Vehicle re-identification, by matching the same vehicle at different locations, is helpful in understanding the long-distance journey patterns. In this paper, the potential hazards of ignoring the survivorship bias effects are firstly identified and analyzed using a truncated distribution over a 2-dimensional time-time domain. Given journey time modeled as Exponential or Weibull distribution, Maximum Likelihood Estimation (MLE), Fisher Information (F.I.) and Bootstrap methods are formulated to estimate the parameter of interest and their confidence intervals. Besides formulating journey time distributions, an automated framework querying the observable time-time scope are proposed. For complex distributions (e.g, three parameter Weibull), distributions are modeled in PyTorch to automatically find first and second derivatives and estimated results. Three experiments are designed to demonstrate the effectiveness of the proposed method. In conclusion, the paper describes a very unique aspects in understanding and analyzing traffic status. Although the survivorship bias effects are not recognized and long-ignored, by accurately describing travel time over time-time domain, the proposed approach have potentials in travel time reliability analysis, understanding logistics systems, modeling/predicting product lifespans, etc.

stat.AP

An Iterative Algorithm to Impute Truck Information over Nationwide Traffic Networks

Understanding the dynamics of truck volumes and activities across the skeleton traffic network is pivotal for effective traffic planning, traffic management, sustainability analysis, and policy making. Yet, relying solely on average annual daily traffic volume for trucks cannot capture the temporal changes over time. Recently, the Traffic Monitoring Analysis System dataset has emerged as a valuable resource to model the system by providing information on an hourly basis for thousands of detectors across the United States. Combining the average annual daily traffic volume from the Highway Performance Monitoring System and the Traffic Monitoring Analysis System dataset, this study proposes an elegant method of imputing information across the traffic network to generate both truck volumes and vehicle class distributions. A series of experiments evaluated the model's performance on various spatial and temporal scales. The method can be helpful as inputs for emission modeling, network resilience analysis, etc.

cs.NI

Time-dependent Hamiltonian Simulation via Magnus Expansion: Algorithm and Superconvergence

Hamiltonian simulation becomes more challenging as the underlying unitary becomes more oscillatory. In such cases, an algorithm with commutator scaling and a weak dependence, such as logarithmic, on the derivatives of the Hamiltonian is desired. We introduce a new time-dependent Hamiltonian simulation algorithm based on the Magnus series expansion that exhibits both features. Importantly, when applied to unbounded Hamiltonian simulation in the interaction picture, we prove that the commutator in the second-order algorithm leads to a surprising fourth-order superconvergence, with an error preconstant independent of the number of spatial grids. This extends the qHOP algorithm [An, Fang, Lin, Quantum 2022] based on first-order Magnus expansion, and the proof of superconvergence is based on semiclassical analysis that is of independent interest.

quant-ph

Learning the local density of states of a bilayer moir\'e material in one dimension

Recent work of three of the authors showed that the operator which maps the local density of states of a one-dimensional untwisted bilayer material to the local density of states of the same bilayer material at non-zero twist, known as the twist operator, can be learned by a neural network. In this work, we first provide a mathematical formulation of that work, making the relevant models and operator learning problem precise. We then prove that the operator learning problem is well-posed for a family of one-dimensional models. To do this, we first prove existence and regularity of the twist operator by solving an inverse problem. We then invoke the universal approximation theorem for operators to prove existence of a neural network capable of approximating the twist operator.

math-ph

GTFS2STN: Analyzing GTFS Transit Data by Generating Spatiotemporal Transit Network

The General Transit Feed Specification (GTFS) is an open standard format for recording transit information, utilized by thousands of transit agencies worldwide. This study introduces GTFS2STN, a novel tool that converts static GTFS transit networks into spatiotemporal networks, connecting bus stops across space and time. This transformation enables comprehensive analysis of transit system accessibility. Additionally, we present a web-based application version of the GTFS2STN tool that allows users to generate spatiotemporal networks online and perform basic analyses, including the creation of isochrone maps from a given origin and the calculation of travel time variability between origin-destination pairs over time. Comparative analysis demonstrates that GTFS2STN produces results similar to those of Mapnificent, an existing open-source tool for generating isochrone maps from GTFS inputs. Compared with Mapnificent, GTFS2STN offers enhanced flexibility for researchers and planners to evaluate transit plans, as it allows users to upload and analyze historical or suggested GTFS feeds from any transit agency. This feature facilitates the assessment of accessibility and travel time variability in transit networks over extended periods, making GTFS2STN a valuable tool for the planning and research for the transit systems.

cs.CE

From Languages to Geographies: Towards Evaluating Cultural Bias in Hate Speech Datasets

Perceptions of hate can vary greatly across cultural contexts. Hate speech (HS) datasets, however, have traditionally been developed by language. This hides potential cultural biases, as one language may be spoken in different countries home to different cultures. In this work, we evaluate cultural bias in HS datasets by leveraging two interrelated cultural proxies: language and geography. We conduct a systematic survey of HS datasets in eight languages and confirm past findings on their English-language bias, but also show that this bias has been steadily decreasing in the past few years. For three geographically-widespread languages -- English, Arabic and Spanish -- we then leverage geographical metadata from tweets to approximate geo-cultural contexts by pairing language and country information. We find that HS datasets for these languages exhibit a strong geo-cultural bias, largely overrepresenting a handful of countries (e.g., US and UK for English) relative to their prominence in both the broader social media population and the general population speaking these languages. Based on these findings, we formulate recommendations for the creation of future HS datasets.

cs.CL

An Efficient Quantum Circuit for Block Encoding a Pairing Hamiltonian

We present an efficient quantum circuit for block encoding pairing Hamiltonian often studied in nuclear physics. Our block encoding scheme does not require mapping the creation and annihilation operators to the Pauli operators and representing the Hamiltonian as a linear combination of unitaries. Instead, we show how to encode the Hamiltonian directly using controlled swap operations. We analyze the gate complexity of the block encoding circuit and show that it scales polynomially with respect to the number of qubits required to represent a quantum state associated with the pairing Hamiltonian. We also show how the block encoding circuit can be combined with the quantum singular value transformation to construct an efficient quantum circuit for approximating the density of states of a pairing Hamiltonian. The techniques presented can be extended to encode more general second-quantized Hamiltonians.

nucl-th

Improving the accuracy of freight mode choice models: A case study using the 2017 CFS PUF data set and ensemble learning techniques

The US Census Bureau has collected two rounds of experimental data from the Commodity Flow Survey, providing shipment-level characteristics of nationwide commodity movements, published in 2012 (i.e., Public Use Microdata) and in 2017 (i.e., Public Use File). With this information, data-driven methods have become increasingly valuable for understanding detailed patterns in freight logistics. In this study, we used the 2017 Commodity Flow Survey Public Use File data set to explore building a high-performance freight mode choice model, considering three main improvements: (1) constructing local models for each separate commodity/industry category; (2) extracting useful geographical features, particularly the derived distance of each freight mode between origin/destination zones; and (3) applying additional ensemble learning methods such as stacking or voting to combine results from local and unified models for improved performance. The proposed method achieved over 92% accuracy without incorporating external information, an over 19% increase compared to directly fitting Random Forests models over 10,000 samples. Furthermore, SHAP (Shapely Additive Explanations) values were computed to explain the outputs and major patterns obtained from the proposed model. The model framework could enhance the performance and interpretability of existing freight mode choice models.

cs.LG

Modeling of electronic dynamics in twisted bilayer graphene

We consider the problem of numerically computing the quantum dynamics of an electron in twisted bilayer graphene. The challenge is that atomic-scale models of the dynamics are aperiodic for generic twist angles because of the incommensurability of the layers. The Bistritzer-MacDonald PDE model, which is periodic with respect to the bilayer's moir\'e pattern, has recently been shown to rigorously describe these dynamics in a parameter regime. In this work, we first prove that the dynamics of the tight-binding model of incommensurate twisted bilayer graphene can be approximated by computations on finite domains. The main ingredient of this proof is a speed of propagation estimate proved using Combes-Thomas estimates. We then provide extensive numerical computations which clarify the range of validity of the Bistritzer-MacDonald model.

math-ph

Analyzing Robustness of the Deep Reinforcement Learning Algorithm in Ramp Metering Applications Considering False Data Injection Attack and Defense

Ramp metering is the act of controlling on-going vehicles to the highway mainlines. Decades of practices of ramp metering have proved that ramp metering can decrease total travel time, mitigate shockwaves, decrease rear-end collisions by smoothing the traffic interweaving process, etc. Besides traditional control algorithm like ALINEA, Deep Reinforcement Learning (DRL) algorithms have been introduced to build a finer control. However, two remaining challenges still hinder DRL from being implemented in the real world: (1) some assumptions of algorithms are hard to be matched in the real world; (2) the rich input states may make the model vulnerable to attacks and data noises. To investigate these issues, we propose a Deep Q-Learning algorithm using only loop detectors information as inputs in this study. Then, a set of False Data Injection attacks and random noise attack are designed to investigate the robustness of the model. The major benefit of the model is that it can be applied to almost any ramp metering sites regardless of the road geometries and layouts. Besides outcompeting the ALINEA method, the Deep Q-Learning method also shows a good robustness through training among very different demands and geometries. For example, during the testing case in I-24 near Murfreesboro, TN, the model shows its robustness as it still outperforms ALINEA algorithm under Fast Gradient Sign Method attacks. Unlike many previous studies, the model is trained and tested in completely different environments to show the capabilities of the model.

cs.LG