
As widefield surveys yield ever more precise measurements, cosmology has
entered a phase of high precision requiring highly accurate and fast
theoretical predictions. At the heart of most cosmological model predictions is
a numerical solution of the EinsteinBoltzmann equations governing the
evolution of linear perturbations in the Universe. We present PyCosmo, a new
Pythonbased framework to solve this set of equations using a special pur pose
solver based on symbolic manipulations, automatic generation of C++ code and
sparsity optimisation. The code uses a consistency relation of the field
equations to adapt the time step and does not rely on physical approximations
for speedup. After reviewing the system of firstorder linear homogeneous
differential equations to be solved, we describe the numerical scheme
implemented in PyCosmo. We then compare the predictions and performance of the
code for the computation of the transfer functions of cosmological
perturbations and compare it to existing cosmological Boltzmann codes. We find
that we achieve comparable execution times for comparable accuracies. While
PyCosmo does not yet have all the features of other codes, our approach is
complementary to existing cosmological Boltzmann solvers and can be used as an
independent test of their numerical solutions. The symbolic representation of
the EinsteinBoltzmann equation system in PyCosmo provides a convenient
interface for implementing extended cosmological models. We also discuss how
the PyCosmo framework can also be used as a general framework to compute
cosmological quantities as well as observables for both interactive and
highperformance batch jobs applications. Information about the PyCosmo package
and future code releases are available at
http://www.cosmology.ethz.ch/research/softwarelab.html.

The Python programming language is becoming increasingly popular for
scientific applications due to its simplicity, versatility, and the broad range
of its libraries. A drawback of this dynamic language, however, is its low
runtime performance which limits its applicability for large simulations and
for the analysis of large data sets, as is common in astrophysics and
cosmology. While various frameworks have been developed to address this
limitation, most focus on covering the complete language set, and either force
the user to alter the code or are not able to reach the full speed of an
optimised native compiled language. In order to combine the ease of Python and
the speed of C++, we developed HOPE, a specialised Python justintime (JIT)
compiler designed for numerical astrophysical applications. HOPE focuses on a
subset of the language and is able to translate Python code into C++ while
performing numerical optimisation on mathematical expressions at runtime. To
enable the JIT compilation, the user only needs to add a decorator to the
function definition. We assess the performance of HOPE by performing a series
of benchmarks and compare its execution speed with that of plain Python, C++
and the other existing frameworks. We find that HOPE improves the performance
compared to plain Python by a factor of 2 to 120, achieves speeds comparable to
that of C++, and often exceeds the speed of the existing solutions. We discuss
the differences between HOPE and the other frameworks, as well as future
extensions of its capabilities. The fully documented HOPE package is available
at http://hope.phys.ethz.ch and is published under the GPLv3 license on PyPI
and GitHub.

Simulated widefield images are becoming an important part of observational
astronomy, either to prepare for new surveys or to test measurement methods. In
order to efficiently explore vast parameter spaces, the computational speed of
simulation codes is a central requirement to their implementation. We introduce
the Ultra Fast Image Generator (UFig) which aims to bring widefield imaging
simulations to the current limits of computational capabilities. We achieve
this goal through: (1) models of galaxies, stars and observational conditions,
which, while simple, capture the key features necessary for realistic
simulations, and (2) stateoftheart computational and implementation
optimizations. We present the performances of UFig and show that it is faster
than existing public simulation codes by several orders of magnitude. It allows
us to produce images more quickly than SExtractor needs to analyze them. For
instance, it can simulate a typical 0.25 deg^2 Subaru SuprimeCam image (10k x
8k pixels) with a 5sigma limiting magnitude of R=26 in 30 seconds on a laptop,
yielding an average simulation time for a galaxy of 30 microseconds. This code
is complementary to endtoend simulation codes and can be used as a fast,
central component of observational methods relying on simulations.

Motivated by the goal to give the simplest possible microscopic foundation
for a broad class of topological phases, we study quantum mechanical lattice
models where the topology of the lattice is one of the dynamical variables.
However, a fluctuating geometry can remove the separation between the system
size and the range of local interactions, which is important for topological
protection and ultimately the stability of a topological phase. In particular,
it can open the door to a pathology, which has been studied in the context of
quantum gravity and goes by the name of `baby universe', Here we discuss three
distinct approaches to suppressing these pathological fluctuations. We
complement this discussion by applying Cheeger's theory relating the geometry
of manifolds to their vibrational modes to study the spectra of Hamiltonians.
In particular, we present a detailed study of the statistical properties of
loop gas and string net models on fluctuating lattices, both analytically and
numerically.