71 research outputs found
mabuchilab/NiceLib: 0.6
Added
<ul>
<li>Better support for libs with absolute paths</li>
<li><code>pycparser</code> extension for parsing C++isms</li>
<li>Warnings against using using <code>NiceObjectDef</code> and tuple-based Sigs</li>
<li>Support for <code>#include_next</code> directive</li>
<li>Lexing support for u/U/L-prefixed char literals</li>
<li>Python source generation of char literals</li>
<li>Include "include-fixed" directory in INCLUDE_DIRS</li>
</ul>
Changed
<ul>
<li>Fixed error on fileless header parsing</li>
<li>Fixed StopIteration issue caused by PEP 479</li>
<li>Improved error message for invalid <code>LibFunction</code> input args</li>
<li>Fixed duplicate struct issue exposed by pycparser 2.19</li>
</ul>
A Parallel Sweeping Preconditioner for Heterogeneous 3D Helmholtz Equations
A parallelization of a sweeping preconditioner for three-dimensional Helmholtz equations without large cavities is introduced and benchmarked for several challenging velocity models. The setup and application costs of the sequential preconditioner are shown to be O(γ2N4/3) and O(γN logN), where γ(ω) denotes the modestly frequency-dependent number of grid points per perfectly matched layer. Several computational and memory improvements are introduced relative to using black-box sparse-direct solvers for the auxiliary problems, and competitive runtimes and iteration counts are reported for high-frequency problems distributed over thousands of cores. Two open-source packages are released along with this paper: Parallel Sweeping Preconditioner (PSP) and the underlying distributed multifrontal solver, Clique. © 2013 Society for Industrial and Applied Mathematics.This work was partially supported by the sponsors of the Texas Consortium for Computational Seismology.The second author was supported by NSF grant DMS-1016577. The fourth author was supported by NSF CAREER grant DMS-0846501, NSF grant DMS-1016577, and funding from KAUST.This author was supported by a CAM fellowship
Introduction to compiler design (1 ed.)
This textbook is intended for an introductory course on Compiler Design, suitable for use in an undergraduate programme in computer science or related fields.Introduction to Compiler Design presents techniques for making realistic, though non-optimizing compilers for simple programming languages using methods that are close to those used in "real" compilers, albeit slightly simplified in places for presentation purposes. All phases required for translating a high-level language to machine language is covered, including lexing, parsing, intermediate-code generation, machine-code generation and register allocation. Interpretation is covered briefly.Aiming to be neutral with respect to implementation languages, algorithms are presented in pseudo-code rather than in any specific programming language, and suggestions for implementation in several different language flavors are in many cases given. The techniques are illustrated with examples and exercises.The author has taught Compiler Design at the University of Copenhagen for over a decade, and the book is based on material used in the undergraduate Compiler Design course there
On low-depth algorithms for quantum phase estimation
Quantum phase estimation is one of the critical building blocks of quantum
computing. For early fault-tolerant quantum devices, it is desirable for a
quantum phase estimation algorithm to (1) use a minimal number of ancilla
qubits, (2) allow for inexact initial states with a significant mismatch, (3)
achieve the Heisenberg limit for the total resource used, and (4) have a
diminishing prefactor for the maximum circuit length when the overlap between
the initial state and the target state approaches one. In this paper, we prove
that an existing algorithm from quantum metrology can achieve the first three
requirements. As a second contribution, we propose a modified version of the
algorithm that also meets the fourth requirement, which makes it particularly
attractive for early fault-tolerant quantum devices.Comment: Accepted at Quantu
Hyper-Chaotic Color Image Encryption Based on Transformed Zigzag Diffusion and RNA Operation
With increasing utilization of digital multimedia and the Internet, protection on this digital information from cracks has become a hot topic in the communication field. As a path for protecting digital visual information, image encryption plays a crucial role in modern society. In this paper, a novel six-dimensional (6D) hyper-chaotic encryption scheme with three-dimensional (3D) transformed Zigzag diffusion and RNA operation (HCZRNA) is proposed for color images. For this HCZRNA scheme, four phases are included. First, three pseudo-random matrices are generated from the 6D hyper-chaotic system. Second, plaintext color image would be permuted by using the first pseudo-random matrix to convert to an initial cipher image. Third, the initial cipher image is placed on cube for 3D transformed Zigzag diffusion using the second pseudo-random matrix. Finally, the diffused image is converted to RNA codons array and updated through RNA codons tables, which are generated by codons and the third pseudo-random matrix. After four phases, a cipher image is obtained, and the experimental results show that HCZRNA has high resistance against well-known attacks and it is superior to other schemes
On adaptive low-depth quantum algorithms for robust multiple-phase estimation
This paper is an algorithmic study of quantum phase estimation with multiple
eigenvalues. We present robust multiple-phase estimation (RMPE) algorithms with
Heisenberg-limited scaling. The proposed algorithms improve significantly from
the idea of single-phase estimation methods by combining carefully designed
signal processing routines and an adaptive determination of runtime amplifying
factors. They address both the {\em integer-power} model, where the unitary
is given as a black box with only integer runtime accessible, and the {\em
real-power} model, where is defined through a Hamiltonian by with any real runtime allowed. These algorithms are
particularly suitable for early fault-tolerant quantum computers in the
following senses: (1) a minimal number of ancilla qubits are used, (2) an
imperfect initial state with a significant residual is allowed, (3) the
prefactor in the maximum runtime can be arbitrarily small given that the
residual is sufficiently small and a gap among the dominant eigenvalues is
known in advance. Even if the eigenvalue gap does not exist, the proposed RMPE
algorithms can achieve the Heisenberg limit while maintaining (1) and (2).Comment: 16 pages, 3 figure
A note on spike localization for line spectrum estimation
This note considers the problem of approximating the locations of dominant
spikes for a probability measure from noisy spectrum measurements under the
condition of residue signal, significant noise level, and no minimum spectrum
separation. We show that the simple procedure of thresholding the smoothed
inverse Fourier transform allows for approximating the spike locations rather
accurately
On efficient quantum block encoding of pseudo-differential operators
Block encoding lies at the core of many existing quantum algorithms. Meanwhile, efficient and explicit block encodings of dense operators are commonly acknowledged as a challenging problem. This paper presents a comprehensive study of the block encoding of a rich family of dense operators: the pseudo-differential operators (PDOs). First, a block encoding scheme for generic PDOs is developed. Then we propose a more efficient scheme for PDOs with a separable structure. Finally, we demonstrate an explicit and efficient block encoding algorithm for PDOs with a dimension-wise fully separable structure. Complexity analysis is provided for all block encoding algorithms presented. The application of theoretical results is illustrated with worked examples, including the representation of variable coefficient elliptic operators and the computation of the inverse of elliptic operators without invoking quantum linear system algorithms (QLSAs)
- …
