Web Portal for Photonic Technologies Using Grid Infrastructures

The modeling of physical processes is an integral part of scientific and technical research. In this area, the Extendible C++ Application in Quantum Technologies (ECAQT) package provides the numerical simulations and modeling of complex quantum systems in the presence of decoherence with wide applications in photonics. It allows creating models of interacting complex systems and simulates their time evolution with a number of available time-evolution drivers. Physical simulations involving massive amounts of calculations are often executed on distributed computing infrastructures. It is often difficult for non expert users to use such computational infrastructures or even to use advanced libraries over the infrastructures, because they often require being familiar with middleware and tools, parallel programming techniques and packages. The P-RADE Grid Portal is a Grid portal solution that allows users to manage the whole life-cycle for executing a parallel application on the computing Grid infrastructures. The article describes the functionality and the structure of the web portal based on ECAQT package.


Introduction
Recent years the greatly evolved area of physics is modeling of physical processes, which is a result of progress in computer science and its effectiveness in the means of technologies.Theoretical results obtained within framework of computer modeling allow to have full view of systems and processes as more complicated systems do not have analytical solutions and require approximations.
In this paper, a Web portal for photonic and quantum technologies, using computational Grid infrastructures, is introduced that makes possible to solve various problems for quantum open systems.Such systems are mainly constructed from photons, including laser fields, atomphoton interactions and nonlinear optical interactions in crystals and describe photonic devices in the presence of imperfection effects: quantum noise, decoherence and etc.Up to now, the modeling of photonic devices on the level of their practical applications is not yet well standardized.On the other hand, progress in this area open up exciting possibilities for exploring fundamental physics as well as applications in telecommunications, signal processing and quantum information technology.The work is the logical continuation of previous works [1,2], with a target to provide a research platform, which will use transparency large amount of computational resources of Grid infrastructure without being aware of where input, output data and computational resources are located.This is very important, because distributed computing infrastructures, particularly Grids are complicated and therefore these are difficult for scientists and researchers to use without advanced knowledge and experience.
The application handles systems, which satisfy bosonic quantum statistics.In the current implementation the bosonic operators cover only part of the possible materlight interactions and elaboration of the package involving fermion operators is now in the progress.It should be mentioned the other papers in the field of numerical simulation of open quantum systems based on the library of QSD approach [24][25][26].
Behavior of physical objects can be explained and predicted with system of differential equations.In recent years quantum physics has taken on special significance and wide applications in which it is no longer possible to neglect the environment interaction: dissipation and decoherence.In this way, the corresponding quantum systems are usually treated as open systems and their time-evolution is described by a density matrix in the framework of the master equation but not on the base of a Hilbert-space vector  and the Schrodinger equation.
In general, for the most physical systems the master equation cannot be solved analytically for arbitrary evaluation times and need to use numerical methods.But even a numerical solution of the master equation can be very hard.If a state vector  requires D basis vectors in Hilbert space to represent it, the corresponding density operator will require 1 2  D real numbers.This basis can often be too large even for the most powerful machines to handle, particularly, in the case if the system involves more than one degree of freedom.This problem can be overcome by unraveling the density operator evolution into quantum trajectories [3].Since quantum trajectories represent the system as a state vector rather than a density operator, they often have a numerical advantage over solving the master equation directly, even though one has to average over many quantum trajectories to recover the solution of the master equation.
One of widely used approximations for open quantum systems is the Markovian dynamics described in terms of the Lindblad master equation for the reduced density matrix  .The time-evolution in this approach is governed by the Hamiltonian operator H and the Lindblad operators of the system.Thus, in the current implementation QSD method is used based on the stochastic equation that involves both Hamiltonian and the Lindblad operators for the state ) (t  .The density operator using an expansion of the state vector  in a truncated basis of Fock's number states of a harmonic oscillator (photonic states) is calculated.In this way, the ECAQT library corresponding to QSD method has been applied for various physical problems [4][5][6][7][8][9][10][11][12][13][14][15][16][17][18].
In this paper, our previous results by developing a user-friendly gridified platform based on Grid portals are expanded that are very popular for designing user interfaces to Grids.The Grid portal build upon the familiar Web portal model offer to virtual communities of users a single point of access to computational or data resources.The P-GRADE [27] Grid Portal is a Grid portal solution that allows users to manage the whole life-cycle for executing a parallel application on the Grid, enabling the creation, execution and monitoring of work flows through high-level Web interfaces.Being built onto the GridSphere portal framework, the P-GRADE Portal hides the low level details of Grid systems with high-level, user-friendly interface that can be easily integrated with various middleware.The single sign-on feature of the portlet allows users to access Grid resources by automatically retrieving proxy credentials for users.The experiments have been carried out using computational resources of the Armenian National Grid infrastructure [28] that consists of seven Grid sites located in the leading research and educational organizations of Armenia.The infrastructure is a part of the pan-European Grid infrastructure within the European Grid Initiative.Mainly the "ARMGRID.GRID.AM" multidisciplinary virtual organization (VO) [29] is used, because the applications do not require any special software components to run over the infrastructure.This paper is organized as follows.Section 2 describes the structure of the suggested Web Portal.Section 3 introduces the parallelization algorithm and benchmarking results.Finally, Section 4 presents our conclusions.

Web Portal Structure
This Grid aware portal (see Fig. 1) is the logical continuation of our previous work for developing a Gridaware Web interface for quantum optics technologies.(see Fig. 2).Mainly the authorization, authentication, job management and information services of the PGrade Portal have been used by the portlet.The single sign-on feature of the portlet allows users to access Grid resources by automatically retrieves proxy credentials for users.The Web Portal consists of a few layers (see Fig. 3).In the first step user chooses the requested process or the combination of processes, that needs to prepare and to submit the algorithms for calculations of based quantities for Quantum Optics (the density matrix, the quasi-distributions in that number the Wigner function in phase-space, and the fidelity for identification of quantum states); the Poincar´e section describing dissipative chaos in semi-classical, and the entropy as a measure in information theory.Each simulation algorithm independent from the others and also runs separately.Thus, it makes possible to sign all these four algorithms as well as one of them.The mean problem for open quantum system is the calculation of the density matrix which leads to calculations of the other quantities describing the system.For choosing the Density Matrix algorithm, on the next step user needs to concretely denote the system by giving the input parameters: the system's Hamiltonian (creation and annihilation operators, environment operators, values of the external laser field, nonlinearity of media and etc.), system's freedom numbers, system's time evolution range, output time intervals, number of trajectories, number of nodes for parallel calculation and etc.Note that in this case the other remained algorithms are getting automatically.In the case of choosing the other remained algorithms without choosing Density Matrix algorithm, on the next step, user needs additionally to introduce the input filesdensity matrices.In the last step (job submission space) user should choose the output files formats, location of these files and the time interval for getting output runtime if a run time is available for this calculation.On the last step all this parameters are given with default values.The job submission module is the main module interacts between user and infrastructure.The module consists of the following services:  Myproxy, which allows a grid user to delegate her/his proxy certificate;  Job matchmaker, that finds a suitable resource within the VO that matches the job requirements;  Converter that converts all given information into the language for submission, (job description language service (JDL));  Job management service that stores all information into the mysql database, submit the job and check the status.Balancing the calculations over a heterogeneous computing infrastructure such as the ArmGrid is quite challenging.The job matchmaker service makes a decision based experimental results [30] using all platforms available in the ArmGrid infrastructure.The converter service makes the JDL file by indicating quantity of CPUs and size of RAMs as requirements.
After submitting the job with the help of the specific mediator object which is written in Java, job submitted requested Grid site indicated previously.This mediator object is used to establish the connection between Web Portal and calculation algorithms.
The calculation algorithms are based on ECAQT library [1][2], which is given in the first step on Web Portal.The ECAQT library software package is relied on generic programming and template metaprogramming.In particular, the principal concept of the design of library is that all information which gets from Web Portal available at compile time should be processed as such, with the help of Mediator layer.Its design keeps abstraction and multiple code usage.ECAQT consists of three layers, GUI written in Qt, Mediator layer, Engines.The Mediator layer is created to make engines indepenendent from GUI.This allows switching GUI implantations without changing Engines.Mediator is the interface between GUI and Engines.The Engines layer consists of four cores: QSD, Poincare section calculation, quasidistributions, fidelity calculations.The details can be found in [1,2].The ECAQT is called extendible as it allows changing and adding the application behavior for C++ programmers from GUI.The user can specify own format to read the input file for some engines.Particularly Fidelity engine is fully open for extensions.It has a library for pure states that can be extended by user.To extend the pure states library user should inherit from states::state class and overload generate norm() and generate state in fock basis() virtual functions.The only restriction in the current implementation is that the state should be represented in Fock basis.
After job submission the input parameters are parsed and source code is compiled on the specified Grid site.After parsing and compilation process the existing errors are available in an error file.If there are no error messages in submission page in the Web Portal appears a message: "job is submitted".All output information is stored in a database.Information about current job status (running, aborted or finished) and also user ID, dates of submitting, input parameters value, output files are available on the monitoring page of Web Portal.This monitoring page is grouped all information history about user's jobs and makes it visible graphically.

Parallelization Algorithm
As a rule, numerical simulations for the systems which contain more than one dimensions, or the numbers of freedom, take long time.For example, in area of photonics state vectors of such systems contain about 50000 complex numbers corresponding of each QSD trajectory that takes minutes.Since at least 1000-5000 trajectories are required to get smooth results a full simulation takes days depending on the system freedom degree.The suggested QSD parallel algorithm simulates the same equation many times with the same initial state and exactly with the same parameters in order to reduce execution time.The algorithm has been realized using Massage Passing Interface (MPI) and has no limitation on specified processors number.We used Boost library MPI interface.This allows to use complex types in MPI.In order to use the complex types in Boost MPI interface, these types should be serialized according to Boost serialization library.
The algorithm is scalable and efficient by avoiding some problems like synchronization and time delay in massage passing processes in inter-processors communication.
In the first stage the main.cppmodule calling the run() function in order to takes the input parameters including the number of trajectories (n = 5000) and the number of computational nodes (N).The MPI Comm_rank() function returns the number of rank, which get run() function as a parameter.While working in parallel mode the equal number of trajectories is being simulated on different nodes (1-N) of the Grid site.After simulation the results from different processes are merged.In this way a runtime of the simulation can be reduced on many times, that explicitly depends on number of available nodes in the indicated Grid site.It is more significant that parallelization in this approach provides linear effectiveness to solve the master equation.
The procedure of parallelization has been performed as for the density matrix as well as for the arbitrary quantities of interest including the Wigner function that is a complex two-dimensional function visualizing quantum states in a phase-space.As we are interested in time-evolution of the system our aim is to calculate the Wigner functions for different time points during a given time interval.Thus, the corresponding calculation layer in our package is also parallelized in the same way.We run the program with input files for different times using different nodes.

Conclusions
The full implementation of the suggested environment for numerical simulation of photonic technologies over the Grid will allow users, who are not familiar with the parallel programming technologies and software tools (Grid and Cluster middlewares, MPI, JAVA, Unix OS, Open PBS, Condor, etc.), to create and submit their requests over the portal that hides all details of the underlying distributed computing infrastructure.The portal uses open source technologies and software tools and can be easily integrated with any Grid infrastructure and a VO that supports corresponding libraries.

Fig. 1 Fig. 2
Fig. 1 Screenshot of the P-GRADE Web Portal Interface.

Fig. 3
Fig. 3 Web Portal layers interconnections within the environment.