text:
Q: Angular js : TypeError: Cannot read property 'elem' of undefined I drew a polygon on an image and I want to move it with the mouse click, i have this error and i can not do them have you an idea please. for this problem i used the librairie Two.js and i can not do that
 $scope.DrawPolygon = function (id, json)
 {

    var elem = document.getElementById('ImgCamera' + id);
    if (elem != null)
    {
        elem.innerHTML = "";
        var two = new Two({
            type: Two.Types.canvas,
            fullscreen: false,
            width: 640,
            height: 480,
        }).appendTo(elem);

        var canvas = two.renderer.domElement;
        var img = $scope.spotCAMImageLoaded[_GetCameraNumberFromPolygonNumber(id)];

        var texture = new Two.Texture(img, function () { });
        var rect = two.makeRectangle(canvas.width / 2, canvas.height / 2, canvas.width, canvas.height);
        rect.fill = texture;
        rect.noStroke();

        var jsonPoly = null;
        var camera = json.Camera2;
        if (_GetCameraNumberFromPolygonNumber(id) == 0)
            camera = json.Camera1;

        if (camera != null)
        {
            jsonPoly = camera[_GetPolygonNumberFromCameraNumber(id)];
            var polygon = two.makePath([new Two.Anchor(jsonPoly.P1.x, jsonPoly.P1.y)
                                         , new Two.Anchor(jsonPoly.P2.x, jsonPoly.P2.y)
                                         , new Two.Anchor(jsonPoly.P3.x, jsonPoly.P3.y)
                                         , new Two.Anchor(jsonPoly.P4.x, jsonPoly.P4.y)])

            polygon.fill = "#008bbe";
            polygon.opacity = 0.5;
            polygon.stroke = "#00435c";
            polygon.linewidth = 10;

        polygon.renderer.elem.style.cursor = 'pointer';
        two.update();

    }
}

A: Not familiar with Two.js and you didn't post any DOM structure, but there's a lot going on in this function. Consider breaking it down into smaller functions. Also use as much angularjs DSL as possible, eg :

*

*use angular.element(<selector) instead of document.<selectorMethod>

*use a truthy check of elem if(elem), values of 0 null or undefined will be guarded against, same for the camera check

A: Unfortunately undefined and null are different values in JavaScript.
In the first statement, document.getElementById('ImgCamera' + id) is returning undefined.
Try changing the first if statement to this:
if (elem != undefined && != null) {


text:
Senator BUKOLA SARAKI Full Biography
NAME: Bukola Saraki
DATE OF BIRTH: 19 December 1962 OCCUPATION: Politician [ex governor ] [present senate president ] MARITAL STATUS: Married
Bukola Saraki is a Nigerian politician who has been President of the Senate of Nigeria since 2015. Previously he was Governor of Kwara State
from 2003 to 2011. He was first elected to the Senate in April 2011,
representing the Kwara Central senatorial district, and he was
re-elected in the March 2015 elections.
He is currently a member of the All Progressives Congress (APC); previously he was a member of the People's Democratic Party (PDP).
Abubakar Bukola Saraki was born on 19 December 1962 to the family of Olusola Saraki, a one time Senate Leader (1979 – 1983) of the Federal Republic of Nigeria. He attended King's College, Lagos, from 1973 to 1978, and Cheltenham College, Cheltenham, London from 1979 to 1981 for his High School Certificate. He then studied at the London Hospital Medical College of the University of London from 1982 to 1987, when he obtained his M.B.B.S (London). He worked as a Medical Officer at Rush Green Hospital, Essex,
from 1988 to 1989. He was a Director of Societe Generale Bank (Nig) Ltd
from 1990 to 2000. He was appointed special assistant to the President
on Budget in 2000. Ceremonially, he also serves as a tribal nobleman of high rank in his capacity as the Turaki of the Ilorin Emirate.
Dr. Abubakar Bukola Saraki's political career began when he was appointed Special Assistant to President Olusegun Obasanjo on Budget in 2000.
While holding this position, he initiated the Fiscal Responsibility
Bill and served on the Economic Policy Coordination Committee, where he
was responsible for the formulation and implementation of several key
economic policies for Nigeria.In 2003, he ran for the office of the Executive Governor of Kwara State on the platform of the People's Democratic Party (PDP)
and won. He was sworn into office in May 2003. He ran again for
re-election in 2007 and won his second term. As governor of Kwara, he
led reforms in agriculture, health, education, finance and environment
policy. One of his major achievements was inviting displaced white
farmers from Zimbabwe to Kwara State and offering them an opportunity to
farm. This led to the establishment of Shonga Farms
programme, which is now being replicated across Nigeria. His charisma
among his fellow governors got him appointed as Chairman of the Nigeria
Governors Forum.
Under Dr Saraki's Governorship, Kwara became the first state to complete
the Nigeria Independent Power Project. In collaboration with the Power
Holding Company of Nigeria, Dr Saraki re-energised the Ganmo Power
Station at Ilorin, and connected over 375 rural communities to the
National Grid, through the development and installation of 725
transformers and 7 substations.Kwara also completed 4 electrification projects that meant power became
stabilised for 18–22 hours a day. 90% of people living in Kwara have
access to electricity, which compares to a national average in Nigeria
of 30%.
Read ALSO: Checkout The Ten Smartest Animals On Earth.
While in office, Dr Saraki introduced a range of new health
programmes, including a state-wide campaign in 2008 to reduce maternal
and child mortality with regard to Malaria. This included the
distribution of insecticide-treated nets and free malaria drugs to
pregnant mothers and to children under the age of five.
A state-wide programme of hospital development was also implemented,
leading to the redevelopment of hospitals in Afon, Patigi and Lafiagi.
Other measures implemented by Dr Saraki included improved training
and re-training for medical staff; refurbishment of hospitals and staff
living quarters; and employment of qualified medical doctors and other
health workers. Many of the primary care programmes were sponsored by
international agencies such as WHO and UNICEF.Dr Saraki introduced a range of reforms to agricultural policy to
increase the commercial viability of farming, and to increase exports to
international markets. The New Nigerian Farmers Initiative was designed
to improve the technical capability of farmers and to ensure farmers
had a significant financial stake in new investment in agriculture. The
scheme utilised the under-used resource of agricultural expertise in the
Zimbabwean farming industry, and worked with the Zimbabwe Commercial
Farmers' Union to identify high-skilled farmers able to support the
State's farming industry to move to Kwara and develop the industry.
A commercial hub was also developed to build capacity support training of the indigenous farming community.Dr Saraki led a number of significant and state-wide infrastructure
developments, including improvements at the Ilorin International Airport
Cargo Terminal; extensive road construction; and the development of new
sporting facilities such as Kwara Football Academy. The State also has
an on going aim to become a logistics and cargo hub in Nigeria and the
region.Dr Saraki became Chairman of the Nigeria Governors Forum in 2007. Under
Saraki's Chairmanship, a reformed Forum was established, with a fully
resourced secretariat, with a technical and administrative division that
was entirely focused on delivery.
Read ALSO: Senator Dino Melaye Full Biography
One of the most widely recognised achievements of the Nigeria
Governors' Forum was its intervention over the problematic assumption of
power by then Vice-President Goodluck Jonathan, following the illness and subsequent death of President Umaru Musa Yar'Adua.
On 23 November 2009, President Yar'Adua left Nigeria and travelled to
Saudi Arabia, where he was installed in the King Faisal Specialist
Hospital and Research Centre in Jeddah for the treatment of what was
reported to be acute pericarditis. He was not seen in public again and
his absence created a dangerous power vacuum in Nigeria. The problem was
that, for the Vice-President to succeed the President, the constitution
demanded that the latter wrote a letter to the National Assembly making
clear the appointment of the former. But as President Yar'Adua was
constantly in and out of intensive care, this letter was never written
and the succession therefore came into question.
The NGF, led by Dr Saraki, and working with the National Assembly,
devised the Doctrine of Necessity, which was then passed as a resolution
by the National Assembly. The Doctrine of Necessity allowed the Vice
President to take over and become the acting President until such a time
that the President returned.
Under Dr Saraki's chairmanship a number of Memoranda of Understanding
(MOUs) have been signed, including but not limited to the World Bank,
DFID, Bill & Melinda Gates Foundation, GAVI, UNICEF, UNDP.
He was the first Nigerian Governor to be awarded the National Honor of Commander of the Order of the Niger (CON) Ceremonially, he also serves as a tribal nobleman of high rank in his capacity as the Turaki of the Ilorin Emirates.After his two-term tenure as governor of Kwara State,
Bukola Saraki ran for the office of Senator of the Federal Republic of
Nigeria representing the Kwara Central Senatorial District and won,
succeeding his sister, Gbemisola Saraki-Forowa.
He was appointed as the Chairman, Senate Committee on Environment and
Ecology and is also a member of the Senate committee on capital Markets
and Finance. He also pushed a motion in the Senate to end the fuel
subsidy regime in Nigeria which has been an excessive waste of the
country's national resources.
Read ALSO: Rotimi Akeredolu "Aketi" Full Biography
As a member of the Senate, Senator Saraki has campaigned extensively
on health, food security, education and the environment. He was
appointed as the Chairman, Senate Committee on Environment and Ecology
and is also a member of the Senate Committees on Capital Markets and
Finance. He also pushed a motion in the Senate to end the fuel subsidy
regime in Nigeria, which has been an excessive waste of the country's
national resources. His work on the oil industry, has also led him to
focus on arguing to strengthen laws relating to the clean up of oil
spills. His National Oil Spill and Detection and Response Agency
Amendment Bill seeks to ensure oil companies pay appropriate levels of
compensation to communities affected by oil spills.
Dr. Saraki has also intervened in the Lead Poisoning crisis in
Zamfara State in 2010, and has supported to the Global Alliance for
Clean Cookstoves, which ensures safe and healthy methods of cooking for
millions of Nigerians while conserving the environment through reduced
deforestation. He has been a lead campaigner in the areas of desertification and climate change in the Senate and across Nigeria.
Dr Saraki sponsored a motion on the floor of the Senate to end
Nigeria's fuel subsidy regime. Other motions and private member bills he
has sponsored include the National Oil Spill Detection and Response
Agency Amendment Bill 2012, which was aimed at putting a halt to oil
spills in the Niger Delta, the Gas Flaring Prohibition Bill 2012 and the Climate Change Commission Bill 2013.
FEW SPECIAL FACTS ABOUT SARAKI
1. He was born in 19 December, 1962, and is originally a medical doctor.
2. His father is Dr. Abubakar Olusola Saraki, a one time Senate president (1979 – 1983) in Nigeria.
3. He studied medicine at the London Hospital Medical College of the
University of London from 1982 to 1987 and practiced as a medical doctor
at Rush Green Hospital in London.
4. His political career kick started when he was appointed by the
former president Olusegun Obasanjo his special assistant on budget
issues in 2000.
5. He was the one who initiated the Fiscal Responsibility Bill and served on the Economic Policy Coordination Committee.
6. On 2003 under the umbrella of the then ruling party, the Peoples
Democratic Party, he ran for and won the governorship of Kwara state.
7. He was Kwara state governor for two terms, from 2003 till 2011, and had mostly positive reviews of his job.
8. He was the first Nigerian governor to be awarded the national honour, a Commander of the Order of the Niger (CON).
9. Many governors have tried to copy Saraki's community health
insurance scheme, environmental 'Clean and Green' scheme and
agricultural transformation scheme, which have been praised as one of
the reasons Kwara is a profitable and clean state.
10. Before becoming a senator, he was the former chairman of the Nigerian Governor's Forum.
Saraki's fierce opponent,
11]
Saraaki is also a friend the popular american rapper JAY Z as it was said they went to same school together
He has been involved in several fraud scandals during his his 8 year reign as the governor of kwara state. He's been investigated by efcc several times for money laundering and fraud but nothing was found against him.
SARAKI AND FAMILY
SARAKI AND JAY Z IN NIGERIA 2006
SOURCES; www.takemetonaija.com wikipedia, naij.com
Tags: Bukola Saraki, Politicians

redpajama_set_name: RedPajamaCommonCrawl


text:
package cmdutil

// Secrets acquired during process startup
type Secrets struct {
	GitHubWebhookSecret     string
	GitHubToken             string
	GCPCredentials          string
	SendGridAPIKey          string
	GitHubOAuthClientSecret string
	GitHubOAuthClientID     string
}

redpajama_set_name: RedPajamaGithub


Size: 7in x 7in archival pigment print on 8in x 8in Ilford Galerie fiber paper.
MudFest in Punta Gorda, FL, 2017. An annual rural gathering of all things mud trucks. It's the "new" Spring Break in Florida. Daytona Beach and Panama City are in the past. Same people, different place. "Southerners" from all over. This is not caring. Days off after hard work. Ice chests. Bare chests. Kenny Chesney. Dirt. A good time. Americana.


In Rijk Zwaan's high-tech research centre, we test our varieties for resistances and develop new testing methods to identify diseases. The R&D team is made up of people from various academic backgrounds who work intensively in a supportive and encouraging environment. Rijk Zwaan gives you the freedom to use your own initiative.
We work with many different crops, diseases and plagues in a large number of trial greenhouses and laboratories, and our researchers obtain their knowledge from all over the world. Accuracy and a sense of responsibility are essential. As a result, your work with us is varied and you can influence your own career path.
Do you share our ambition to contribute to the world's food supply? If so, apply for one of our vacancies.
Do you want to support our breeding team and work together in the international team ? If so, apply for this full-time vacancy for assistant selector at our research station in Almería and Murcia.
Do you have a passion for genetics and the breeding profession? Would you like to be part of a team that develops succesfull innovative products? Apply for our fulltime vacancy of Breeder Leek in Fijnaart.


text:
Q: Hide Crystal Report Header In my Crystal Report have a Page Header(section Page Header "a" and Page Header "b") and Groupe Header #1 and #2
My problem is, I want to hide Page Header "a" when Group #2 have more records, I want to print records next page without Page Header "a".

A: This could be tricky business depending on which version of Crystal you are using, because you are asking the reporting engine to report on a count of a grouped records that could potentially span across multiple pages.  Without knowing much else about your system, the following might work.
Implement two running total fields that count records returned, one for Group #1 and the other for Group#2.  Each running total should count records returned in each group, resetting on a of group.  Then you would put the following in your suppression formula for Page Header a:
// The following line will suppress the header when
// Group2RecordCount is greater than Group1RecordCount

{#Group2RecordCount} > {#Group1RecordCount};

redpajama_set_name: RedPajamaStackExchange


text:
New to Zacks? Get started here.
Key Factors to Impact CNX Midstream's (CNXM) Q3 Earnings
Zacks Equity Research October 24, 2019
NOV WMB GPOR CNXM
You follow Analyst Blog - edit
Analyst Blog
CNX Midstream Partners LP (CNXM - Free Report) is expected to release third-quarter 2019 results before the opening bell on Tuesday, Oct 29. The current Zacks Consensus Estimate for the to-be reported quarter is a profit of 52 cents on revenues of $74.2 million.
The Zacks Consensus Estimate for third-quarter earnings has been revised downward 1.9% in the past 30 days. Given this backdrop, let's delve into the factors that might have influenced the company's performance in the September quarter.
Factors to Consider This Quarter
Mixed signals from the Anchor Systems segment – representing around 98% of CNX Midstream's revenue – cloud the third-quarter earnings outlook for the partnership.
Our model estimates third-quarter sales for the unit (which handles natural gas midstream facilities in the Marcellus Shale and Utica Shale in Pennsylvania and West Virginia) to be $73 million, down slightly from $76 million in the second quarter but 24.8% higher than the year-ago revenue of $58.5 million.
Meanwhile, Anchor Systems throughput volumes improved 9% sequentially in the second quarter, a trend that most likely continued in the third quarter because of the explosive production growth of natural gas in the Marcellus and Utica shale regions.
What Does Our Model Say?
The proven Zacks model does not conclusively show that CNX Midstream is likely to beat estimates in the third quarter. The combination of a positive Earnings ESP and a Zacks Rank #1 (Strong Buy), 2 (Buy) or 3 (Hold) increases the chances of beating estimates. But that's not the case here.
You can uncover the best stocks to buy or sell before they're reported with our Earnings ESP Filter.
Earnings ESP: CNX Midstream has an Earnings ESP of 0.0%.
Zacks Rank: CNX Midstream sports a Zacks Rank of 2. You can see the complete list of today's Zacks #1 Rank (Strong Buy) stocks here.
Highlights of Q2 Earnings & Surprise History
In the last reported quarter, the natural gas midstream infrastructure operator beat the consensus mark on robust volume activity. CNX Midstream reported earnings of 63 cents per unit that surpassed the Zacks Consensus Estimate by 14 cents. The bottom line also increased 46.5% on a year-over-year basis. Revenues of $78.1 million were 28% higher than the year-ago quarter and beat the Zacks Consensus Estimate of $72 million.
As far as earnings surprises are concerned, the Canonsburg, PA-based partnership has a good record, having gone past the Zacks Consensus Estimate in three of the last four reports. This is depicted in the graph below:
CNX Midstream Partners LP Price and EPS Surprise
CNX Midstream Partners LP price-eps-surprise | CNX Midstream Partners LP Quote
Stocks to Consider
While earnings beat looks uncertain for CNX Midstream, here are some firms from the energy space you may want to consider on the basis of our model, which shows that they have the right combination of elements to post earnings beat this season:
National Oilwell Varco, Inc. (NOV - Free Report) has an Earnings ESP of +16% and is Zacks #3 Ranked. The company is anticipated to release earnings on Oct 29.
Gulfport Energy Corporation (GPOR - Free Report) has an Earnings ESP of +3.57% and a Zacks Rank #3. The company is anticipated to release earnings on Oct 31.
The Williams Companies, Inc. (WMB - Free Report) has an Earnings ESP of +1.63% and is Zacks #3 Ranked. The company is anticipated to release earnings on Oct 30.
Today's Best Stocks from Zacks
Would you like to see the updated picks from our best market-beating strategies? From 2017 through 2018, while the S&P 500 gained +15.8%, five of our screens returned +38.0%, +61.3%, +61.6%, +68.1%, and +98.3%.
This outperformance has not just been a recent phenomenon. From 2000 – 2018, while the S&P averaged +4.8% per year, our top strategies averaged up to +56.2% per year.
See their latest picks free >>
National Oilwell Varco, Inc. (NOV) - free report >>
Williams Companies, Inc. (The) (WMB) - free report >>
Gulfport Energy Corporation (GPOR) - free report >>
CNX Midstream Partners LP (CNXM) - free report >>
Buy These 6 Best Value Stocks to Make the Most of P/B Ratio


text:
package whisk.core.invoker

import akka.actor.Actor
import whisk.http.BasicRasService

/**
 * Implements web server to handle certain REST API calls.
 * Currently provides a health ping route, only.
 */
trait InvokerServer
    extends BasicRasService
    with Actor {

    override def actorRefFactory = context
}


text:
\section{Introduction}

The control of the evolution of molecular systems at the quantum level
has been a long standing goal ever since the beginning of the laser technology.
After an initial slowed down of the investigations in this area due to unsuccessful experiments,
the realization
that the problem can be recast and attacked with the tools of
(optimal) control theory~\cite{hbref110} greatly contributed to the
first positive experimental
results~\cite{hbref1,hbref3,hbref10,hbref9,hbref4}.
Ever since, the desire to understand theoretically how the laser acts to
control the molecule lead the investigators to resort to numerical simulations which
require repeated resolution of the Time Dependent Schr\"odinger Equation of the type~\eqref{schrod_original}; additional
motivation comes from related contexts (online
identification algorithms, learning algorithms, quantum computing~\cite{hbref90}, etc.).

The numerical method used to solve the time dependent Schr\"odinger equation must
provide accurate results without prohibitive computational cost. The conservation of the $L^2$ norm of the wave function $\psi(x,t)$
is also generally required for stability and as a mean of qualitative validation
of the numerical solution.

In this context, the second order Strang operator splitting is often
considered~\cite{descombes,handbook9,strangsplitting}. However, this method suffers from two drawbacks. First, the numerical error is proportional to the norm of the control which
implies poor accuracy when dealing with large laser fields $\varepsilon(t)$ and
make necessary the use of small time steps.
Secondly, it requires at each time step three matrix
products. This difficulty is enhanced in some particular settings e.g., in optimal control,
where the matrices involved in the control term must be assembled online.

Recently introduced, the ``toolkit method''~\cite{yip-mazziotti-rabitz-03,yip-mazziotti-rabitz-03bis} solves this last problem by
precomputing a set of elementary matrices, used in the numerical
resolution. Each matrix is associated to (one or several) field values and enables to solve the evolution over one time
step.
This algorithm has been used in various frameworks and
shows excellent results. It has also been coupled successfully with optimal control and
identification issues~\cite{BST}. The dependence on the $L^\infty$-norm of the control, which is
a restriction of the Strang method, is also improved by the ``toolkit method'' as it will be shown in our analysis.

The goal of the paper is to provide a (first) numerical analysis of the ``toolkit method''.
Our mathematical tools are related to that in~\cite{descombes} (but for a different setting; see also \cite{lubich,sanzserna}
for connected results); the treatment here is different
because of the quantization appearing in the values of the control $\varepsilon(t)$
which impacts both the mathematical analysis and
the numerical efficiency of the method.
The analysis enables us to propose two possible improvements.

The paper is organized as follows:
after having introduced the model and some notations in
Section~\ref{sec:modnot}, the toolkit method is presented and analyzed in
Section~\ref{sec:tk}. An improvement of this method in the limit of small
control fields is introduced in Section~\ref{sec:itk}. A second
improvement, in the limit of large control fields is given in
Section~\ref{sec:itk2}. Finally, Section~\ref{sec:nr} gathers some numerical
results.

\section{Model and notations}\label{sec:modnot}

In this section, we present the Schr\"odinger Equation that will be
considered in the paper and some useful notations.

We consider the time dependent Schr\"odinger equation (TDSE)
\begin{eqnarray}\label{schrod_original}
\left\lbrace
\begin{array}{ll}
i\partial_t \psi(x,t) = (H_0(x) - \mu(x)\varepsilon(t)) \psi(x,t),&\bbR^3\times(0,T)\\
\psi(x,0)=\psi_0(x),&\bbR^3.
\end{array} \right.
\end{eqnarray}
This equation governs the evolution of a quantum system, described by
its wave function $\psi$, that interacts with a laser pulse of amplitude $\varepsilon$, the control variable. The
factor $\mu$ is the dipole moment operator of the system. The Hamiltonian of the system is $H_0=-\Delta_x + V$ where $\Delta_x$ is
the Laplacian operator over the space variables and $V=V(x)$ the electrostatic potential in which
the system evolves. We refer to \cite{rabitz3} for more details about
models involved in quantum control.
Note that to obtain Eq. \eqref{schrod_original}, one has considered
the laser effect as a perturbative term, so that
the control term
$\varepsilon (t)\mu(x)$ is obtained
through a first order approximation with respect to $\varepsilon (t)$. While
often considered, this
approximation fails at describing some models
involving non linear laser-dipole interaction, see
e.g. \cite{claudedionjcp}. Consequently, the norm
of the field cannot be always considered as a small parameter, and
numerical solvers have to tolerate large controls, as the one described here after. \\

\indent Throughout this paper, $T>0$ is  the time of
control of a quantum system. The space $L^{p}(0,T;X)$, with $p\in
[1,+\infty)$ denotes the usual Lebesgue space taking its values in a Banach
space $X$. The notation $W^{1,1}(0,T)$ corresponds to the space of time dependent functions belonging to $L^1(0,T;\bbR)$ such that their first time derivative also belongs to $L^1(0,T)$.
We denote by $L^2$ the space $L^2(\bbR^3,\bbC)$ and by $W^{2,\infty}$
and $H^2$ the Sobolev spaces $W^{2,\infty}(\bbR^3,\bbR)$ and
$H^2(\bbR^3,\bbC)$. The space $\mathcal L(H^2)$ is the space of linear
functionals on $H^2$. One can refer to \cite{Brezis} (or the introduction of \cite{caze}) for more details about the definitions of these functional spaces.\\

Finally, in order to introduce some numerical solver of \eqref{schrod_original}, let us
consider  an integer $N$ and $\Delta t>0$ such that
$N\Delta t=T$. We introduce the time discretization $(t_j)_{0\leq j\leq N}$ of
$[0,T]$ with $t_j=j\Delta t$ and we also denote by $t_{j+\frac 12}$ the intermediate time $\frac{t_j + t_{j+1}}2 = (j+ \frac 12)\Delta t$. \\

Let us first recall some basic results of existence and regularity of the solution of the TDSE.
These are corollaries of a general result on time dependent Hamiltonians (see \cite{R-S}, p.~285,
Theorem~X.70). \\

\begin{lemma}\label{schrod0}
Let $\mu \in \mathcal L(H^2)$, $V\in W^{2,\infty}$, $\varepsilon\in L^{2}(0,T)$ and $\psi_0\in H^2$.
The Schr\"odinger equation
\begin{equation}\label{S}
\left\{
\begin{array}{ll}
i\partial_t \psi (t) =\left(H_0-\mu\varepsilon(t)\right)\psi (t)&\bbR^3\times(0,T)\\
\psi(0)=\psi_0,&\bbR^3,
\end{array}
\right.
\end{equation}
has a unique solution $\psi\in L^\infty(0,T;H^2)\cap W^{1,\infty}(0,T;L^2)$ such that
\begin{equation}\nonumbe
\|\psi (t)\|_{L^\infty(0,T;H^2)} +  \|\partial_t \psi
(t)\|_{L^\infty(0,T;L^2)} \leq C\|\mu\|_\nh\|\varepsilon\|_{W^{1,1}(0,T)}
\|\psi_0\|_{H^2}.\end{equation}
Moreover, for all $t\in [0,T],\quad  \|\psi (t)\|_{L^2}=\|\psi_0\|_{L^2}$.\\
\end{lemma}

It is also well known (see \cite{caze} for instance) that for any
$T>0$ and $\phi_0 \in H^2$, if we have $\varepsilon(t) = \bar\varepsilon \in \bbR $,
independent of time $t$, the Schr\"odinger equation
$$
\left\lbrace
\begin{array}{ll}
i\partial_t \phi (t) =\left(H_0-\mu\bar\varepsilon\right)\phi (t),&\bbR^3\times(0,T)\\
\phi(0)=\phi_0,&\bbR^3
\end{array} \right.
$$
has a unique solution $\phi(t)=S(t)\phi_0$ such that $\phi\in
C([0,T];H^2)\cap C^1([0,T];L^2)$, where $(S(t))_{t\in \mathbb R}$
denotes the one-parameter semi-group generated by the operator
$H_0-\mu\bar\varepsilon$. Moreover, for all $t\in [0,T]$, $S(t) \in \mathcal
L (H^2)$ and  we have
\begin{equation}
\label{SSS}
\begin{array}{ll}
S(t)\phi_0 \in C(0,T;H^2),& \forall \phi_0 \in H^2;\\
\|S(t)\|_{ \mathcal L (H^2)} \leq 1+CT \leq K,& \forall t\in[0,T]; K=K(\|\mu\|_\nh,\varepsilon_{\textnormal{max}});\\
\|S(t)\phi_0\|_{L^2} = \|\phi_0\|_{L^2},& \forall \phi_0 \in L^2, \forall t\in\bbR;\\
S(0) = \textnormal{Id}, \\
S(t+s) = S(t)S(s),& \forall s,t\in \bbR.\\
\end{array}
\end{equation}
Therefore, the solution of Eq.~\eqref{S} is
obtained equivalently as a solution to the integral equation
$$ \psi(t)=S(t) \psi_0 + i \int_0^t S(t-s)(\varepsilon(s)-\bar\varepsilon)\mu \psi(s)\,ds.$$

\section{The toolkit method}\label{sec:tk}

We now present the toolkit method and describe the corresponding error analysis.

\subsection{Algorithm}

In this method, we assume that the control field $\varepsilon$ satisfies the following
hypothesis:

\begin{equation}\tag{$\mathcal H$}
\label{H}
\forall t \in [0,T],\ \varepsilon(t)\in [\varepsilon_{\min},\varepsilon_{\max}].
\end{equation}
The values of the control field are discretized
according to:
\begin{equation}\label{tkdisc}
\bar{\varepsilon}_\ell=\varepsilon_{\min}+\ell\Delta \varepsilon,\ \ell=0...m,
\end{equation}
with $m=\frac{\varepsilon_{\max}-\varepsilon_{\min}}{\Delta \varepsilon}$.
Here, the values $\bar{\varepsilon}_\ell$ have been here uniformly chosen in the
interval $[\varepsilon_{\min},\varepsilon_{\max}]$. If some properties of the field are
known, e.g. its mean value or its variance, some improvement of the
method can be obtained by optimizing the distribution
of the values $\bar{\varepsilon}_\ell$. More generally, this topic enters the
field of scalar quantization, that will not be considered
in this paper. We refer to \cite{sayood} and the references
therein for a review of standard methods in this domain.
In order to solve numerically equation~\eqref{S},
the toolkit method proceeds as follows.\\
\newpage
\begin{algo} (toolkit method)\label{tk}
\begin{enumerate}
\item Preprocessing. Precompute the ``toolkit'', i.e. the set of propagators:
$$S_{\ell}(\Delta t) \textnormal{ for } \ell = 0,\cdots, m,$$
where $(S_{\ell}(t))_{t\in \mathbb R}$ denotes the one-parameter
semi-group generated by the operator $H_0-\mu\bar{\varepsilon}_\ell$, the
sequence $(\varepsilon_\ell)_{\ell=0,\cdots, m,}$ being defined by
\eqref{tkdisc}.
\item Given a control field $\varepsilon\in L^2$ satisfying \ref{H} and
  $\psi^{K}_0=\psi_0$, the sequence $(\psi^{K}_{j})_{j=0,...,N}$ that
  approximates $(\psi(t_j))_{j=0,...,N}$, is obtained recursively by
  iterating the following loop:
\begin{enumerate}
\item \label{step:mp}Find:
$$\ell_j = {\rm
 argmin}_{\ell=1,\cdots,m}\{|\varepsilon(t_{j+\frac 12})-\bar{\varepsilon}_\ell|\},$$
\item Set $\psi^{K}_{j+1}=S_{\ell_j}(\Delta t) \psi^{K}_j$.\\
\end{enumerate}
\end{enumerate}
\end{algo}

In this ``toolkit'' approximation, we consider that the changes in the
Hamiltonian $H(t):=H_0-\mu\varepsilon(t)$ can be neglected over a time step $\Delta
t$. In this way, if $\Delta \varepsilon=0$  (infinite toolkit), and for
a relevant time discretization, the simulation corresponding to
piecewise constant control fields is exact. Such a property does not hold with
methods that approximate the exponential, e.g. the second order Strang
operator splitting. Indeed, these approaches introduce an algebraic error, due to the
non-commutation of the operators $H_0$ and $\mu$ that is consequently
proportional to $\|\varepsilon\|_{L^\infty(0,T)}$.

\begin{rem}
In the original form of the toolkit method \textnormal{\cite{kurti-manby-ren-artamonov-ho-rabitz-05,
 yip-mazziotti-rabitz-03, yip-mazziotti-rabitz-03bis}}, the mid-point
choice proposed in Step~\ref{step:mp} of Algorithm~\ref{tk} is not considered. Yet, the
introduction of this strategy enables us to improve the order of the
method (see the analysis hereafter).
\end{rem}

\subsection{Analysis of the method}

Let us now present an error analysis of the toolkit
method. More precisely, this section aims at proving the following result:\\

\begin{theorem}\label{anatk}
Let $\varepsilon\in W^{2,\infty}(0,T)$ and $\psi$ the corresponding solution of
\eqref{S}. Let $\psi^{K}$ be the approximation of $\psi$ obtained
with Algorithm \ref{tk}. Given $\Delta t>0$ and $\Delta \varepsilon>0$,
there exists $\lambda_1>0$, $\lambda_2>0$, that do not depend on $\|\varepsilon\|_{L^\infty(0,T)}$ such that:
\begin{equation}\label{est1}
\| \psi(T)-\psi^{K}(T)\|_{L^2}\leq \lambda_1 \Delta \varepsilon  + \lambda_2\Delta t^2.
\end{equation}
Moreover, there exists $\nu_1>0$, $\nu_2>0$ depending on $\|\varepsilon\|_{W^{1,1}(0,T)}$ such that:
\begin{equation}\label{est2}
\| \psi(T)-\psi^{K}(T)\|_{H^2}\leq \nu_1 \Delta \varepsilon  + \nu_2\Delta t^2.\\
\end{equation}
\end{theorem}
\begin{rem}
This result shows that the toolkit method enables to work with large control fields,
transferring the computational effort due to such cases to the
preprocessing step: given $\Delta \varepsilon$, the
computational cost of this step only depends
on the norm $\|\varepsilon\|_{L^\infty(0,T)}$, i.e., on Hypothesis \ref{H}.\\
\end{rem}

\proof
To obtain \eqref{est1} and \eqref{est2}, we will focus first on the local error, i.e. the
approximation obtained on one time step $[t_j,t_{j+1}]$.\\
The sequence $(\psi^K_j)_{j=0,...,N}$ is a time
discretization of the solution of
\begin{eqnarray}\label{psiK}
\left\lbrace
\begin{array}{ll}
i\partial_t \psi^{K}(t) = \left(H_0-\mu\bar\varepsilon(t) \right) \psi^{K} (t),&\bbR^3\times(0,T) \\
\psi^{K}(0)=\psi_0,&\bbR^3
\end{array} \right.
\end{eqnarray}
where the space variable has been omitted and $\bar{\varepsilon}(t) = \bar\varepsilon_{\ell_j}$ is constant over each interval
$[t_j,t_{j+1}[ = [j\Delta t,(j+1)\Delta t[$, with $j=0,...,N-1$.
We denote by $\left(S_j(t)\right)_{j=0,...,N-1}$ (instead of
$S_{\ell_j}$) the one-parameter semi-group generated by the operator
$H_0-\mu\bar\varepsilon_{\ell_j}$ and we  introduce $\delta(t)=\varepsilon(t)-\bar{\varepsilon}$ where $\bar{\varepsilon}$ (instead of $\bar\varepsilon_{\ell_j}$) is the constant value of $\bar{\varepsilon}(t) $ over $[t_j,t_{j+1}]$.
Therefore, the solution $\psi$ of \eqref{S} is actually the solution of the integral equation, settled for $t\in [t_j,t_{j+1}[$:
\begin{equation}\label{id1}
\psi(t) = S_{j}(t-t_j) \psi(t_j) + i\int_{t_j}^{t} S_j(t-s)\mu\delta(s)\psi(s)\ ds.
\end{equation}
For the upcoming calculations, one should notice that we have
\begin{equation}
|\delta(t_{j+\frac 12})|\leq\dfrac{\Delta \varepsilon}2\label{estdet}
\end{equation}
and that for all $t\in [t_j,t_{j+1}] $,
\begin{equation}
|\delta(t)| \leq \dfrac{1}2\left( \Delta \varepsilon+
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t\right).
\label{estde}
\end{equation}

We consider the following decomposition:
\begin{eqnarray*}
&&\psi(T)-\psi^{K}(T)=\psi(T)-S_{N-1}(\Delta t)\psi(t_{N-1})\\
&&+~\sum_{j=0}^{N-2}S_{N-1}(\Delta t)\dots S_{j+1}(\Delta t) \big(\psi(t_{j+1})
-S_j(\Delta t)\psi(t_j)\big)\\
&&+~S_{N-1}(\Delta t)\dots S_{0}(\Delta t) \psi_0 - \psi^{K}(T)
\end{eqnarray*}
where the last line is equal to $0$ since $\psi^{K}$ satisfies (\ref{psiK}) on $[0,T]$.\\

From now on and in all the following sections, we will consider either that $\|\psi_0\|_{L^2} = 1$ or that $\|\psi_0\|_{H^2} = 1$. From (\ref{SSS}), we know that the operators $S_j$ are isometries in $L^2$.
Therefore, the use of a triangular inequality brings
\begin{equation}\label{eqpsiT}
\|\psi(T)-\psi^{K}(T)\|_{L^2}  \leq  \sum_{j=0}^{N-1} \left\| \psi(t_{j+1})
-S_j(\Delta t)\psi(t_j)\right\|_{L^2}.
\end{equation}
We will thus calculate and estimate in $L^2$-norm for all $j$ the difference
\begin{eqnarray}\label{decomp}
\psi(t_{j+1})-S_j(\Delta t)\psi(t_j)&=&  i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \psi(s)\,ds \nonumber \\
&=& i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \left(\psi(s)-S_{j}(s-t_j) \psi(t_j)\right)\,ds \nonumber\\
&&+~ i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu S_{j}(s-t_j) \psi(t_j)\,ds. \nonumber\\
&=& i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \left(\psi(s)-S_{j}(s-t_j) \psi(t_j)\right)\,ds \nonumber\\
&&+~  i\int_{t_j}^{t_{j+1}} \delta(s)\varphi_j(s) \psi(t_j)\,ds
\end{eqnarray}
where  $\varphi_j(s):=S_j(t_{j+1}-s)\mu S_j(s-t_j)\in \mathcal L(L^2)$.\\

In what follows, we work in parallel on $L^2$ and $H^2$-estimates of $\psi(t_{j+1})-S_j(\Delta t)\psi(t_j)$. We will need basic $L^2$ and $H^2$-estimates of $\psi(t)-S_{j}(t-t_j) \psi(t_j)$ for the study of the first integral term of (\ref{decomp}), the second one will be dealt with using a Taylor expansion of $\delta(t)$.\\

From Lemma~\ref{schrod0}, (\ref{id1}) and (\ref{estde}), it is easy to obtain coarse estimates of $\psi(t)-S_{j}(t-t_j) \psi(t_j)$. Indeed, for all $t$ in  $[t_j,t_{j+1}] $, one can write

\begin{eqnarray}
 \|\psi(t) - S_{j}(t-t_j) \psi(t_j)\|_{L^2} &=&
 \left\|i\int_{t_j}^{t} S_j(t-s)\mu\delta(s)\psi(s)\ ds\right\|_{L^2}\nonumber\\
 &\leq&  \int_{t_j}^{t_{j+1}} \left\| S_j(t-s)\mu\delta(s)\psi(s)\right\|_{L^2}\ ds \nonumber\\
 &\leq&\Delta t   \|\mu\|_\nl\dfrac{1}2\left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right) \|\psi_0\|_{L^2}  \nonumber\\
 &\leq&\dfrac{1}2 \|\mu\|_\nl\left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right) \Delta t \label{E1}
  \end{eqnarray}
and the $H^2$-estimate gives
\begin{equation}
 \|\psi(t) - S_{j}(t-t_j) \psi(t_j)\|_{H^2}  \leq K \|\varepsilon\|_{W^{1,1}(0,T)} \|\mu\|_\nh \left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right) \Delta t \label{E2}
\end{equation}
where $K= K(\|\mu\|_{\mathcal L(H^2)}, \varepsilon_{\max})$ is a generic constant that estimates every $\|S_j\|_{\mathcal L(H^2)}$.\\
Therefore, we can obtain more accurate estimates of the first integral
term of \eqref{decomp}.
Thanks to \eqref{E1}, we obtain
\begin{eqnarray}
&&\left\|i\displaystyle\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \left(\psi(s)-S_{j}(s-t_j) \psi(t_j)\right)\,ds\right\|_{L^2} \nonumber\\
&&\leq ~\dfrac{1}2\|\mu\|_\nl\left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right) \Delta t \sup_{t\in
  [t_j,t_{j+1}]}\|\psi(s)-S_{j}(s-t_j) \psi(t_j)\|_{L^2}\nonumber \\
&&\leq~\dfrac{1}4 \|\mu\|^2_\nl  \left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right)^2\Delta t^2 \nonumber \\
&&\leq~\dfrac {1}2\|\mu\|^2_\nl \left( \Delta \varepsilon^2
+    \|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^2 \right)\Delta t^2.\label{es2}
\end{eqnarray}
Working now on the $H^2$-estimate, we deduce from \eqref{E2} in the same way that
\begin{multline}
\left\|i\displaystyle\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \left(\psi(s)-S_{j}(s-t_j) \psi(t_j)\right)\,ds\right\|_{L^2} \\
\leq~\dfrac12 K\|\mu\|_\nh \|\varepsilon\|_{W^{1,1}(0,T)}
\left(  \Delta \varepsilon^2 +  \|\dot\varepsilon\|_{L^\infty(0,T)}^2\Delta
  t^2 \right)\Delta t^2.\label{es2b}
\end{multline}
In the two cases ($L^2$ and $H^2$), estimates are stronger than the ones we look
for, and we can focus on the second  integral term of (\ref{decomp}) we want to deal with. \\

We first consider
\begin{equation}\label{phidef}
\begin{array}{llll}
\varphi_j:&[t_j,t_{j+1}]&\to\mathcal L (H^2)\\
&s& \mapsto S_j(t_{j+1}-s)\mu S_j(s-t_j)
\end{array}
\end{equation}
and note that for all $\psi\in H^2$,~
$\|\varphi_j(s) \psi\|_{H^2} = \|S_j(t_{j+1}-s)\mu S_j(s-t_j) \psi\|_{H^2} \leq K\| \psi\|_{H^2}$
so that
\begin{equation}\label{phii}
\forall s\in [t_j,t_{j+1}],\ \|\varphi_j(s)\|_\nh\leq K \|\mu\|_\nh.
\end{equation}
Let us now consider the derivatives of
$\varphi_j(s)$. Since  $(S_j(t))_{t\in \mathbb R}$ denotes the
one-parameter semi-group generated by the operator $H_0-\mu\bar\varepsilon$,
the $\mathcal L(H^2)$ identity $$\partial_t S_j(t)
=-i\left(H_0-\mu\bar\varepsilon\right)S_j(t)$$ holds and minor calculations give, $\forall s\in [t_j,t_{j+1}]$,
\begin{eqnarray*}
\partial_s \varphi_j(s) &=& iS_j(t_{j+1}-s)[H_0,\mu]S_j(s-t_j)\\
\partial^2_{ss} \varphi_j(s) &=& S_j(t_{j+1}-s) \big[[H_0,\mu], H_0 - \mu\bar\varepsilon \big]S_j(s-t_j).
\end{eqnarray*}
Therefore,
\begin{eqnarray}
\|\partial_s \varphi_j(s)\|_\nh &\leq& K  \|[H_0,\mu]\|_\nh\label{phi}\\
\|\partial^2_{ss} \varphi_j(s)\|_\nh & \leq& K \left\|\big[[H_0,\mu], H_0 - \mu\bar\varepsilon\big]\right\|_\nh.\nonumber
\end{eqnarray}
If we consider the $L^2$-analysis of the method, then $\varphi_j(s) \in \mathcal L(L^2)$ and  $\forall s\in [t_j,t_{j+1}]$,
\begin{eqnarray}
\|\varphi_j(s)\|_{\mathcal L(L^2)} &\leq&  \|\mu\|_\nl\nonumber\\
\|\partial_s \varphi_j(s)\|_{\mathcal L(L^2)} &\leq&   \|[H_0,\mu]\|_\nl\label{phib}\\
\|\partial^2_{ss} \varphi_j(s)\|_{\mathcal L(L^2)} & \leq&  \left\|\big[[H_0,\mu], H_0 - \mu\bar\varepsilon\big]\right\|_\nl. \nonumber
\end{eqnarray}

Let us now write the third order Taylor expansion of
$t\mapsto \delta(t)=\varepsilon(t)-\bar{\varepsilon}$ in a neighborhood of $t_{j+\frac12}$:
\begin{eqnarray*}
\delta(s)&=&\delta(t_{j+\frac12})+(s-t_{j+\frac12})\dot{\delta}(t_{j+\frac12})+\frac{1}{2}(s-t_{j+\frac12})^2\ddot{\delta}(\theta(s))\\
&=&\delta(t_{j+\frac12})+(s-t_{j+\frac12})\dot{\varepsilon}(t_{j+\frac12})+\frac{1}{2}(s-t_{j+\frac12})^2\ddot{\varepsilon}\big(\theta(s)\big),
\end{eqnarray*}
with $\theta(s)\in [t_j,t_{j+1}]$. We now focus on estimating the term $ i\displaystyle\int_{t_j}^{t_{j+1}} \delta(s)\varphi_j(s) \psi(t_j)\,ds$.
By means of (\ref{phib}) and
the  $L^2$-norm conservation, we obtain
$$\left\|\int_{t_j}^{t_{j+1}}  \delta( t_{j+\frac12}) \varphi_j(s)\psi(t_j) ds\right\|_{L^2}
\leq \frac{ 1}{2}\|\mu\|_\nl\Delta \varepsilon \Delta t,$$
\begin{eqnarray}
&&\left\|\int_{t_j}^{t_{j+1}}  \left(s- t_{j+\frac12} \right)\dot{\varepsilon}\left( t_{j+\frac12}\right) \varphi_j(s) \psi(t_j) ds\right\|_{L^2} \nonumber\\
&&= ~\left\|\dot{\varepsilon} \left( t_{j+\frac12} \right)\int_{0}^{
    \frac12{\Delta t}} s \
  \big(\varphi(t_{j+\frac12}+s)-\varphi(t_{j+\frac12}-s)\big) \psi(t_j) ds\right\|_{L^2}\nonumber\\
&&=~\left\|\dot{\varepsilon} \left( t_{j+\frac12}
  \right)\int_{0}^{\frac12{\Delta t}}\int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}
  s \partial_u \varphi(u) \psi(t_j)\ du ds\right\|_{L^2}\nonumber\\
&&\leq ~\frac1{12}{\|[H_0,\mu]\|_\nl}  \|\dot{\varepsilon}\|_{L^\infty(t_j,t_{j+1})} \Delta t^3\nonumber
\end{eqnarray}
and
$$\left\|\int_{t_j}^{t_{j+1}}\frac{1}{2}  \left(s- t_{j+\frac12}
  \right)^2 \ddot{\varepsilon}(\theta(s))\varphi_j(s) \psi(t_j)
  ds\right\|_{L^2}
\leq\frac1{24}{\|\mu\|_\nl} \|\ddot{\varepsilon}\|_{L^\infty(t_j,t_{j+1})}\Delta t^3.$$
Combining these results with \eqref{es2}, we estimate \eqref{decomp}
  as follows:
\begin{eqnarray*}
\|\psi(t_{j+1})-S_j(\Delta t)\psi(t_j)\|_{L^2}
&\leq& \frac12 \|\mu\|^2_\nl \left( \Delta \varepsilon^2 \Delta t^2  + \|\dot\varepsilon\|_{\infty}^2 \Delta t^4\right)\\
&& + \frac12\, {\|\mu\|_\nl} \Delta \varepsilon \Delta t\\
&&+~ \frac{1}{24} \left(2\|[H_0,\mu]\|_\nl \|\dot{\varepsilon}\|_{\infty} +\|\mu\|_\nl \|\ddot{\varepsilon}\|_{\infty}\right)\Delta t^3,
\end{eqnarray*}
with $\|\cdot \|_{L^\infty(0,T)} = \| \cdot \|_{\infty}$.
By means of \eqref{eqpsiT}, the global $L^2$-estimate is then:
\begin{eqnarray*}
\|\psi(T)-\psi^{K}(T)\|_{L^2}
&\leq&  \sum_{j=0}^{N-1} \left\| \psi(t_{j+1})-S_j(\Delta t)\psi(t_j)\right\|_{L^2}\\
&\leq& \frac T2 \|\mu\|^2_\nl \left( \Delta \varepsilon^2 \Delta t  + \|\dot\varepsilon\|_{\infty}^2 \Delta t^3\right)
+ \frac T2\, {\|\mu\|_\nl} \Delta \varepsilon \\
&&+~ \frac{T}{24} \left(2\|[H_0,\mu]\|_\nl \|\dot{\varepsilon}\|_{\infty} +\|\mu\|_\nl \|\ddot{\varepsilon}\|_{\infty}\right)\Delta t^2,
\end{eqnarray*}
and \eqref{est1} can be deduced with the following constants
$\lambda_1$ and $\lambda_2$ independent of
$\|\varepsilon\|_{L^\infty(0,T)}$~:
\begin{eqnarray*}
\lambda_1&= &  \frac T2 \|\mu\|_\nl \left( 1+ \Delta \varepsilon \Delta t  \|\mu\|_\nl \right),\\
\lambda_2&=& \dfrac T2\, \|\mu\|_\nl^2 \|\dot \varepsilon\|_{\infty}^2 \Delta t  + \frac T{12}\|[H_0,\mu]\|_\nl
\|\dot{\varepsilon}\|_{\infty} + \frac{T}{24}\|\mu\|_\nl \|\ddot{\varepsilon}\|_{\infty}.
\end{eqnarray*}

Let us now prove the $H^2$ estimate.
By means of  \eqref{es2b}, \eqref{phii} and \eqref{phi} and keeping in mind that $K$ is a generic constant
depending on $\|\mu\|_{\mathcal L(H^2)}$ and  $\varepsilon_{\max}$, we can repeat the previous analysis to find the local estimate:
\begin{eqnarray*}
\|\psi(t_{j+1})-S_j(\Delta t)\psi(t_j)\|_{H^2}
&\leq&K \|\mu\|_\nh \|\varepsilon\|_{W^{1,1}(0,T)}
\left(  \Delta \varepsilon^2 \Delta t^2+  \|\dot\varepsilon\|_{L^\infty(0,T)}^2\Delta t^4 \right)\\
 && +~ K  \Delta \varepsilon \Delta t+ K \Big(\|[H_0,\mu]\|_\nh \|\dot{\varepsilon}\|_{L^\infty} + \|\ddot{\varepsilon}\|_{L^\infty}\Big)\Delta t^3.
\end{eqnarray*}
Since one can prove that we can actually write a more precise
estimate of $S_j(\Delta t)$ and replace $K$ by $1+ C \Delta t$ (see properties (\ref{SSS})), we get:
$$\|S_j(\Delta t)\|_{\mathcal L(H^2)} \leq 1+C \Delta t.$$
and since we have the following intermediate result, where $M>0$
depends on $\|\mu\|_\nh$, $\varepsilon_{\textnormal{max}}$ and $T$ but is independent
of $N$:
$$\sum_{j=0}^{N-1} (1+C\Delta t)^{N-j} \Delta t \leq M.$$
The global estimate is obtained as follows:
\begin{eqnarray*}
\|\psi(T)-\psi^{K}(T)\|_{H^2}
&\leq&  \sum_{j=0}^{N-1} K^{N-j-1}\|\psi(t_{j+1})-S_j(\Delta t)\psi(t_j)\|_{H^2}   \\
&\leq&  \sum_{j=0}^{N-1} (1+C\Delta t)^{N-j} \|\varepsilon\|_{W^{1,1}(0,T)}\left( \Delta \varepsilon^2  \Delta t^2+
  \|\dot\varepsilon\|_{\infty}^2\Delta t^4 \right)\\
&&+~  \sum_{j=0}^{N-1} (1+C\Delta t)^{N-j}\left( \Delta \varepsilon \Delta t   + \left( \|[H_0,\mu]\|_\nh \|\dot{\varepsilon}\|_{\infty} +
    \|\ddot{\varepsilon}\|_{\infty} \right)\Delta t^3 \right)\\
&\leq&  M \|\varepsilon\|_{W^{1,1}(0,T)}\left( \Delta \varepsilon^2\Delta t +  \|\dot\varepsilon\|_{\infty}^2\Delta t^3 \right) + M \Delta \varepsilon \\
&&+~   M\left( \|[H_0,\mu]\|_\nh
    \|\dot{\varepsilon}\|_{\infty} +  \|\ddot{\varepsilon}\|_{\infty}
  \right)\Delta t^2.
\end{eqnarray*}
We finally get $\nu_1$ and $\nu_2$ and conclude the proof of Theorem~\ref{anatk}:
\begin{eqnarray*}
\nu_1&= &   M (1 + \|\varepsilon\|_{W^{1,1}(0,T)}T \Delta \varepsilon\Delta t)\\
\nu_2&=&  M \left(\|\varepsilon\|_{W^{1,1}(0,T)} \|\dot\varepsilon\|_{\infty}^2 \Delta t + \|[H_0,\mu]\|_\nh \|\dot{\varepsilon}\|_{\infty}
+  \|\ddot{\varepsilon}\|_{\infty}\right).
\end{eqnarray*}
\endproof

\begin{rem}
The estimate \eqref{est1} is consistent with the
fact that Algorithm \ref{tk} used with a relevant time discretization is
exact for the piecewise constant control fields.\\
\end{rem}

\section{Improvement in the limit of low intensities}\label{sec:itk}

We now describe a way to improve the time order of the
previous algorithm. Since some constants in the following analysis depend in this
case of the $L^\infty$-norm of the field and the method requires that
the toolkit size scales $\Delta t^3(\varepsilon_{\max}-\varepsilon_{\min})$, it applies in the case of
($L^\infty$-) small control fields.

\subsection{Algorithm}

The algorithm we propose mixes the toolkit and the splitting approaches, in the
sense that it applies sequentially various operators to correct the
third order local error that appears in the proof of Theorem \ref{anatk}. \\

\begin{algo}(Improved toolkit method for low intensities)\label{Itk}
\begin{enumerate}
\item Preprocessing. Precompute the ``toolkit'', i.e. the set of propagators:
$$S_{\ell}(\Delta t) \textnormal{ for } \ell = 0,\cdots, m,$$
where $(S_{\ell}(t))_{t\in \mathbb R}$ denotes the one-parameter group generated
by the operator $H_0-\mu\bar{\varepsilon}_\ell$, the sequence $(\varepsilon_\ell)_{\ell=0,\cdots, m,}$
being defined by \eqref{tkdisc}.
Include in this set the two special elements:
$$ \Omega= e^{\frac{1}{12}[H_0,\mu]\Delta t ^3}, \Theta= e^{\frac{i}{24}\mu\Delta t ^3}$$
and the initial exponents $\alpha_0$ and $\beta_0$ such that ($\varepsilon$ being extended as an even function on [-T,0]):
\begin{eqnarray*}
\alpha_0 &:=& \frac{\varepsilon(\Delta t)-\varepsilon(0)}{\Delta t}
= \dot{\varepsilon}(t_{\frac 12}) + \mathcal{O}(\Delta t^2),\\
\beta_0&:=& \frac{\varepsilon(t_{1})-2 \varepsilon(t_{\frac 12})+ \varepsilon(0)}{\Delta t^2}
= \ddot \varepsilon (t_{\frac 12})+\mathcal{O}(\Delta t^2).
\end{eqnarray*}
\item
Given a control field $\varepsilon\in L^\infty$ satisfying \ref{H} and
  $\psi^{IK}_0=\Omega^{\alpha_0}\Theta^{\beta_0}\psi_0$, the sequence $(\psi^{IK}_{j})_{j=0,...,N}$ that
  approximates $(\psi(t_j))_{j=0,...,N}$, is obtained recursively by
  iterating the following loop:
\begin{enumerate}
\item Find:
$$\ell_j = {\rm argmin}_{\ell=1,\cdots,m}\{| \varepsilon(t_{j+1/2})-\bar{\varepsilon}_\ell|\},$$
\item Compute $\alpha_j$ and $\beta_j$ such that:
\begin{eqnarray}
\alpha_j &:=& \frac{\varepsilon(t_{j+1})-\varepsilon(t_j)}{\Delta t}\label{dmu}
= \dot{\varepsilon}(t_{j+\frac 12}) + \mathcal{O}(\Delta t^2),\\
\beta_j &:=& \frac{\varepsilon(t_{j+1})-2 \varepsilon(t_{j+\frac 12})+ \varepsilon(t_j)}{\Delta t^2}\label{dnu}
= \ddot \varepsilon (t_{j+\frac 12})+\mathcal{O}(\Delta t^2).
\end{eqnarray}
\item\label{coststep} Set $\psi^{IK}_{j+1}=S_{\ell_j}(\Delta t) \Omega^{\alpha_j}\Theta^{\beta_j}\psi^{IK}_j$.\\
\end{enumerate}
\end{enumerate}
\end{algo}
In many cases, e.g. in the experimental frameworks, only the values of
the field can be handled. The use of exact values for the time
derivatives has then to be avoided when possible. This motivates the
introduction of approximations \eqref{dmu} and
\eqref{dnu} of $\dot{\varepsilon}(t_{j})$
and  $\ddot{\varepsilon}(t_{j})$ in the latest
definitions. The analysis presented hereafter shows that this does not
deteriorate the order of the method.\\

In this method, one must perform two online matrices exponentiations. By
working in a basis where one of these two matrices is diagonal, the
cost of Step~{\it\ref{coststep}} can be reduced to one
exponentiation, making the cost of this method equivalent the second order Strang
operator splitting.

\subsection{Analysis of the method}

We can now repeat the analysis that has been done in the proof of
Theorem \ref{anatk} to obtain the following estimate.\\

\begin{theorem}\label{anaItk}
Let $\varepsilon\in W^{2,\infty}(0,T)$, $\psi$ be the corresponding solution of
\eqref{S} and $\psi^{IK}$ the approximation of $\psi$ obtained
with Algorithm \ref{Itk}. Given $\Delta t>0$ and $\Delta \varepsilon>0$,
there exists $\lambda'_1>0$, $\lambda'_2>0$, with $\lambda'_1$
independent of $\|\varepsilon\|_{L^\infty(0,T)}$ such that:
\begin{equation}\nonumbe
\| \psi(T)-\psi^{IK}(T)\|_{L^2}\leq \lambda'_1 \Delta \varepsilon  + \lambda'_2\Delta t^3.
\end{equation}
\end{theorem}

\proof
In the framework of this new algorithm, we note that on every time
interval $]t_j,t_{j+1}[$, the approximation $\psi^{IK}$ is the solution of the evolution equation:
\begin{eqnarray}\label{psiitk}
\left\lbrace
\begin{array}{llll}
i\partial_t \psi^{IK}(t) &= \left(H_0-\mu\bar\varepsilon \right) \psi^{IK} (t),&\bbR^3\times(t_j,t_{j+1}) \\
\psi^{IK}(t_j^+)&=\Omega^{\alpha_j}\Theta^{\beta_j}\psi^{IK}(t_j^-) &\bbR^3
\end{array} \right.
\end{eqnarray}
where we set $\psi(0^-) = \psi_0$. We will keep the notations ($S_j$, $\delta (t)$, $\varphi$,...) of the proof of Theorem \ref{anatk},
and we first focus on the local error analysis. We consider the following decomposition:
\begin{eqnarray*}
&&\psi(T)-\psi^{IK}(T)=\psi(T)-S_{N-1}(\Delta t)\Omega^{\alpha_{N-1}}\Theta^{\beta_{N-1}}\psi(t_{N-1})\\
&&+~\sum_{j=0}^{N-2}S_{N-1}(\Delta t)\Omega^{\alpha_{N-1}}\Theta^{\beta_{N-1}}\dots
S_{j+1}(\Delta t)\Omega^{\alpha_{j+1}}\Theta^{\beta_{j+1}} \\
&&\phantom{+~\sum_{j=0}^{N-2}}\times\big(\psi(t_{j+1})
-S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\big)\\
&&+~S_{N-1}(\Delta t)\Omega^{\alpha_{N-1}}\Theta^{\beta_{N-1}}\dots
S_{0}(\Delta t)\Omega^{\alpha_0}\Theta^{\beta_0} \psi_0 - \psi^{IK}(T)
\end{eqnarray*}
where the last line is equal to $0$ since $\psi^{IK}$ satisfies (\ref{psiitk}) on $[0,T]$.\\
The operators $S_j$ are isometries in $L^2$, we will consider that $\|\psi_0\|_{L^2} = 1$ and we also have, for all $j$
\begin{equation}\label{omegatheta}
\Omega^{\alpha_j}\Theta^{\beta_j}
=  e^{\frac{\alpha_j}{12}[H_0,\mu]\Delta t ^3} e^{\frac{i\beta_j}{24}\mu\Delta t ^3}
= \textnormal{Id} + \left( \frac{\alpha_j}{12}[H_0,\mu] + \frac{i\beta_j}{24}\mu \right) \Delta t ^3   + \textnormal{Id}~\mathcal O(\Delta t^6)
\end{equation}
and thus
\begin{equation}\label{omegatheta1}
\left\|\Omega^{\alpha_j}\Theta^{\beta_j}\right\|_\nl \leq 1+  \mathcal{O}(\Delta t^3).
\end{equation}
Therefore, the use of a triangular inequality brings
\begin{equation}\label{psiT}
\|\psi(T)-\psi^{IK}(T)\|_{L^2}  \leq (1+\mathcal{O}(\Delta t^2))   \sum_{j=0}^{N-1} \left\| \psi(t_{j+1})
-S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\right\|_{L^2}
\end{equation}
and we will calculate and estimate in $L^2$-norm for all $j$ the difference
\begin{eqnarray*}
&&\psi(t_{j+1})-S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\\
&=& S_j(\Delta t)\psi(t_j) + i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \psi(s)\,ds
- S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\\
&=& S_j(\Delta t)\left( \textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j} \right)\psi(t_j)
+ i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu \psi(s)\,ds. \\
\end{eqnarray*}

We define  $Y(s)=\psi(s)-S_j(s-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)$
for all $s\in[t_j,t_{j+1}]$ and obtain
\begin{multline}
Y(t_{j+1}) = S_j(\Delta t)\left( \textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j} \right)\psi(t_j) \\
+ i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu Y(s)\,ds
+ i\int_{t_j}^{t_{j+1}} \delta(s)\varphi_j(s)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\,ds\label{est3}
\end{multline}
where  $\varphi_j(s):=S_j(t_{j+1}-s)\mu S_j(s-t_j)$ and its
derivatives have been estimated in $L^2$ in \eqref{phib}.
As we did in Theorem \ref{anatk}, we start with an estimate of the first integral
term of \eqref{est3}.
For all $t\in]t_j,t_{j+1}]$, we can write:
\begin{eqnarray*}
Y(t)&=&\psi(t)-S_j(t-t_j)\psi(t_j)+S_j(t-t_j)\psi(t_j)-S_j(t-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\\
&=&\int_{t_j}^{t}  S_j(t-s)\delta(s)\mu \psi(s)\ ds +S_j(t-t_j)\left(\textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j}\right)\psi(t_j).
\end{eqnarray*}
Moreover, for all $t\in]t_j,t_{j+1}]$, we have
\begin{eqnarray*}
\|Y(t)\|_{L^2}&\leq& \left\|\int_{t_j}^{t}  S_j(t-s)\delta(s)\mu \psi(s)\ ds\right\|_{L^2} + \left\|S_j(t-t_j)\left(\textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j}\right)\psi(t_j)\right\|_{L^2}
\end{eqnarray*}
The operators $S_j$ are isometries in $L^2$ and $\forall t\in [0,T],
\|\psi (t)\|_{L^2}=\|\psi_0\|_{L^2}$. Therefore, we deduce from \eqref{omegatheta} that
$$\left\|S_j(t-t_j)\left(\textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j}\right)\psi(t_j)\right\|_{L^2} \leq
\left( \frac{\alpha_j}{12}\left\|[H_0,\mu]\right\|_\nl  +\frac{i\beta_j}{24}\left\|\mu\right\|_\nl \right)\Delta t ^3 +  \mathcal{O}(\Delta t^6).$$
Since it is clear that we also have
$$\left\|\int_{t_j}^{t}  S_j(t-s)\delta(s)\mu \psi(s)\ ds\right\|_{L^2}
\leq   \dfrac 12\|\mu\|_\nl \left( \Delta \varepsilon
+    \|\dot\varepsilon\|_{L^\infty(0,T)} \Delta t \right)\Delta t,$$
one can finally deduce that:
\begin{eqnarray}
&&\left\|i\int_{t_j}^{t_{j+1}}  S_j(t_{j+1}-s)\delta(s)\mu Y(s)\ ds\right\|_{L^2}\nonumber\\
&\leq& \dfrac{1}2\|\mu\|_\nl\left( \Delta \varepsilon +
  \|\dot\varepsilon\|_{L^\infty(0,T)}\Delta t \right) \Delta t \sup_{t\in [t_j,t_{j+1}]}\|Y(t)\|_{L^2} \nonumber\\
 &\leq&~\dfrac 14\|\mu\|^2_\nl \left( \Delta \varepsilon
+    \|\dot\varepsilon\|_{L^\infty(0,T)} \Delta t \right)^2\Delta t^2 +  \mathcal{O}(\Delta \varepsilon \Delta t^4)+  \mathcal{O}(\Delta t^5).\label{supY}
\end{eqnarray}
We focus now on the first and third terms of \eqref{est3}.
Using \eqref{omegatheta}, we get
$$S_j(\Delta t)\left( \textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j} \right)\psi(t_j) =
- S_j(\Delta t)\left( \frac{\alpha_j}{12}[H_0,\mu]
+\frac{i\beta_j}{24}\mu \right)\psi(t_j)\Delta t ^3 + \psi(t_j) \mathcal{O}(\Delta t^6).$$
Let us then consider the second integral term of \eqref{est3}.
On the one hand, we consider the fourth order expansion of $ \delta = \varepsilon - \bar\varepsilon$
in a neighborhood of $t_{j+\frac 12}$:
\begin{eqnarray*}
\delta(s)&=&\delta(t_{j+\frac 12})+(s-t_{j+\frac 12})\dot{\delta}(t_{j+\frac 12})+\frac12{(s - t_{j+\frac 12})^2}
\ddot{\delta}(t_{j+\frac 12})+\frac16(s-t_{j+\frac 12})^3\delta^{(3)}(\theta(s))\\
&=&\delta(t_{j+\frac 12})+(s-t_{j+\frac 12})\dot{\varepsilon}(t_{j+\frac 12})+\frac12{(s-t_{j+\frac 12})^2}
\ddot{\varepsilon}(t_{j+\frac 12})+\frac16{(s-t_{j+\frac 12})^3} \varepsilon ^{(3)}\big(\theta(s)\big)
\end{eqnarray*}
where $\theta(s)\in [t_j,t_{j+1}]$.
On the other hand, we calculate and/or estimate the four corresponding terms in
$$ i\int_{t_j}^{t_{j+1}} \delta(s)\varphi_j(s)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\,ds.$$
From \eqref{estdet} and \eqref{phib}, the term of order $0$ gives:
$$\left\|i\int_{t_j}^{t_{j+1}}  \delta(t_{j+\frac 12}) \varphi_j(s) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)ds\right\|_{L^2}
\leq \dfrac 12 \|\mu\|^2_\nl \Delta\varepsilon\Delta t.$$
For the term of order $1$, we can write
\begin{eqnarray*}
&&i\int_{t_j}^{t_{j+1}} (s-t_{j+\frac 12})\dot{\varepsilon}(t_{j+\frac 12}) \varphi_j(s) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j) \ ds\\
&=&i~\dot{\varepsilon} \left( t_{j+\frac12} \right)\int_{0}^{\frac12{\Delta t}} s  \big(\varphi_j(t_{j+\frac12}+s)
-\varphi_j(t_{j+\frac12}-s)\big) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j) \ ds\\
&=&i~\dot{\varepsilon} \left( t_{j+\frac12} \right)\int_{0}^{\frac12{\Delta t}}\int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s} s \partial_u \varphi_j(u) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ du ds\\
&=&i~\dot{\varepsilon}(t_{j+\frac 12})\int_0^{\frac12{\Delta t}} \int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}s\big(\partial_u\varphi_j(t_{j})
+(u-t_{j})\tau(u) \big) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ du ds\\
&=&\frac{\dot{\varepsilon}(t_{j+\frac 12})}{12} S_j\left(\Delta t\right)[H_0,\mu]\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\Delta t^3\\
&& +~i~ \dot{\varepsilon}(t_{j+\frac 12})\int_0^{\frac12{\Delta t}} \int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}s(u-t_{j}) \tau(u-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ du ds\\
&=&\frac{ \alpha_j}{12} S_j\left(\Delta t\right)[H_0,\mu]\psi(t_j)\Delta t^3
+ S_j\left(\Delta t\right)[H_0,\mu]\psi(t_j) \mathcal O(\Delta t^6)\\
&& +~i~\dot{\varepsilon}(t_{j+\frac 12}) \int_0^{\frac12{\Delta t}} \int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}s(u-t_{j}) \tau(u-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ du ds
\end{eqnarray*}
where we used \eqref{dmu}, \eqref{omegatheta} and \eqref{phib} and the function $\tau : s\in[0,\Delta t] \mapsto \tau(s)\in \mathcal
L(L^2)$ is defined as the function that appears in the following
expansion of $\partial_u \varphi_j$ around $t_{j}$, for any $\psi\in
L^2$
\begin{eqnarray*}
\partial_u\varphi_j(u)\psi&=& \partial_u\varphi_j(t_j)\psi+(u-t_j)\tau(u-t_j)\psi\\
&=&iS_j( \Delta t)[H_0,\mu]\psi+(u-t_j) \tau(u-t_j)\psi.
\end{eqnarray*}
Using the estimate (coming from \eqref{phib})
\begin{equation}\label{depc}
\|\tau (s)\|_\nl\leq \left\| \Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl ~~~\forall s\in[0,\Delta t],
\end{equation}
along with $\|\psi(t_j)\|_{L^2} =  \|\psi_0\|_{L^2} = 1$, \eqref{dmu} and \eqref{omegatheta1} we find that for all $j$,
\begin{eqnarray*}
&&\left\|i \dot{\varepsilon}(t_{j+\frac 12})\int_0^{\frac12{\Delta t}} \int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}s(u-t_{j}) \tau(u-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ du ds\right\|_{L^2}\\
&\leq& \left( \alpha_j +\mathcal{O}\left(\Delta t^2\right) \right)
\int_0^{\frac12{\Delta t}} \int_{t_{j+\frac12}-s}^{t_{j+\frac12}+s}s(u-t_{j}) \left\|\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl\left\|\psi(t_j)\right\|_{L^2}\ du ds. \\
&\leq& \dfrac{\alpha_j}{24}\left\|\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl\Delta t^4    + \mathcal{O}\left(\Delta t^5\right).
\end{eqnarray*}
We also prove easily that for all $j$,
$$\left\|S_j\left(\Delta t\right)[H_0,\mu]\psi(t_j) \mathcal O(\Delta t^6)\right\|_{L^2}= \mathcal{O}\left(\Delta t^6\right).$$
For the term of order $2$, using \eqref{dnu}, \eqref{omegatheta} and \eqref{phib} and the first order expansion of $\varphi_j$ around $t_{j}$, $\varphi_j(s)\psi = \varphi_j(t_j)\psi +(s-t_j)\theta(s-t_j)\psi$ for all $\psi\in L^2$, defining $\theta : s\in[0,\Delta t] \mapsto \theta(s)\in \mathcal L(L^2)$, we can write
\begin{eqnarray*}
&&i\int_{t_j}^{t_{j+1}}\frac12{(s-t_{j+\frac 12})^2}\ddot{\varepsilon}(t_{j+\frac 12})\varphi_j(s)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ ds\\
&=&i\ddot{\varepsilon}(t_{j+\frac 12})~\int_{t_j}^{t_{j+1}}\frac12{(s-t_{j+\frac 12})^2}\left( \varphi_j(t_j) +(s-t_j)\theta(s-t_j)  \right) \Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ ds\\
&=&\frac{i\ddot{\varepsilon}(t_{j+\frac 12})}{24} S_j\left(\Delta t\right)\mu\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\Delta t^3\\
&& +~\frac{i \ddot{\varepsilon}(t_{j+\frac 12})}2 \int_{t_j}^{t_{j+1}}(s-t_{j+\frac 12})^2(s-t_j)\theta(s-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ ds\\
&=&\frac{i\beta_j }{24} S_j\left(\Delta t\right)\mu\psi(t_j)\Delta t^3
+ S_j\left(\Delta t\right)\mu \psi(t_j) \mathcal O(\Delta t^6)\\
&& +~\frac{i \ddot{\varepsilon}(t_{j+\frac 12})}2 \int_{t_j}^{t_{j+1}}(s-t_{j+\frac 12})^2(s-t_j)\theta(s-t_j)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ ds.
\end{eqnarray*}
Using \eqref{phib}, we get the estimate $\|\theta (s)\|_\nl\leq \left\| \Big[H_0,\mu]\right\|_\nl $, $\forall s\in[0,\Delta t],$ and using it with \eqref{dnu} and \eqref{omegatheta1}, we obtain that for all $j$,
\begin{eqnarray*}
&&\left\|\frac{i \ddot{\varepsilon}(t_{j+\frac 12})}2 \int_{t_j}^{t_{j+1}}(s-t_{j+\frac 12})^2(s-t_j)\theta(s-t_j)
\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\ ds\right\|_{L^2}\\
&\leq&\frac 12 \left( \beta_j +\mathcal{O}\left(\Delta t^2\right) \right)
\int_{t_j}^{t_{j+1}}(s-t_{j+\frac 12})^2(t_j-s) \left\|[H_0,\mu]\right\|_\nl\left\|\psi(t_j)\right\|_{L^2}\  ds \\
&\leq& \frac 12 \left( \beta_j +\mathcal{O}\left(\Delta t^2\right) \right)\left\|[H_0,\mu]\right\|_\nl
\int_{-\frac{\Delta t}2}^{\frac{\Delta t}2}u^2\left(\frac{\Delta t}2 -u\right) \  du\\
&\leq&\dfrac{\beta_j}{48} \left\|[H_0,\mu]\right\|_\nl \Delta t^4    + \mathcal{O}\left(\Delta t^5\right).
\end{eqnarray*}
and we also prove easily that $\left\|S_j\left(\Delta t\right)\mu\psi(t_j) \mathcal O(\Delta t^6)\right\|_{L^2}= \mathcal{O}\left(\Delta t^6\right).$\\

Combining these results with \eqref{supY} into equation \eqref{est3}, we obtain:
\begin{eqnarray*}
\|Y(t_{j+1}) \|_{L^2} &=&  \left\| \psi(t_{j+1})
-S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\right\|_{L^2}\\
&\leq&
\left\|S_j(\Delta t)\left( \textnormal{Id} - \Omega^{\alpha_j}\Theta^{\beta_j} \right)\psi(t_j)
+ i\int_{t_j}^{t_{j+1}} \delta(s)\varphi_j(s)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\,ds\right\|_{L^2}\\
&&+~ \left\|i\int_{t_j}^{t_{j+1}} S_j(t_{j+1}-s)\delta(s)\mu Y(s)\,ds \right\|_{L^2}\\
&\leq& \dfrac 12 \|\mu\|^2_\nl \Delta\varepsilon\Delta t + \dfrac{\alpha_j}{24}\left\|\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl\Delta t^4   \\
&&+~\dfrac{\beta_j}{48} \left\|[H_0,\mu]\right\|_\nl \Delta t^4  +\dfrac 12\|\mu\|^2_\nl  \left(\Delta \varepsilon^2\Delta t^2+ \|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^4\right)   \\
&&+~ \mathcal{O}(\Delta \varepsilon \Delta t^4)+  \mathcal{O}(\Delta t^5)
\end{eqnarray*}
We have now a local in time estimate that should be traduced in a global one, and from \eqref{psiT}, we get
\begin{eqnarray*}
&&\|\psi(T)-\psi^{IK}(T)\|_{L^2} \\
& \leq &(1+\mathcal O(\Delta t^2)) \sum_{j=0}^{N-1}  \left\| \psi(t_{j+1})
-S_j(\Delta t)\Omega^{\alpha_j}\Theta^{\beta_j}\psi(t_j)\right\|_{L^2}\\
& \leq & \dfrac T2 \|\mu\|^2_\nl \Delta\varepsilon + \dfrac{\alpha_j T}{24}\left\|\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl\Delta t^3   \\
&&+~\dfrac{\beta_j T}{48} \left\|[H_0,\mu]\right\|_\nl \Delta t^3  +\dfrac T2\|\mu\|^2_\nl  \left(\Delta \varepsilon^2\Delta t+ \|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^3\right)   \\
&&+~ \mathcal{O}(\Delta \varepsilon \Delta t^3)+  \mathcal{O}(\Delta t^4).
\end{eqnarray*}
The result follows, with
$$\lambda'_1  = \frac T2  \|\mu\|^2_\nl(1+\Delta \varepsilon \Delta t ) $$ and
$$\lambda'_2 = \dfrac{\alpha_j T}{24}\left\|\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]\right\|_\nl
+\dfrac{\beta_j T}{48} \left\|[H_0,\mu]\right\|_\nl   +\dfrac T2\|\mu\|^2_\nl \|\dot\varepsilon\|^2_{L^\infty(0,T)}$$
\endproof

In this theorem, the constants $\lambda'_2$ depends on $\| \varepsilon\|_{L^\infty(0,T)}$
through the commutator $\Big[[H_0,\mu],H_0-\mu\bar\varepsilon \Big]$ that appears in
\eqref{depc}. This contrasts with the result obtained in Theorem~\ref{anatk}. The
explanation of this situation comes from the fact that the norms of
$\varphi_j(s):=S_j(t_{j+1}-s)\mu S_j(s-t_j)$ (defined in \eqref{phidef})
and its first derivative does not depend on $\| \varepsilon\|_{L^\infty(0,T)}$, whereas its
second derivative does. Thus, errors in Algorithm~\ref{Itk}
depend on $L^\infty$-norm of the control field as in the case of the second order
Strang operator splitting. Although these two methods present the same
computational complexity, the order of Algorithm~\ref{Itk} is
higher when $\Delta \varepsilon$ scales $\Delta t^3$.
~

\section{Improvement in the limit of large intensities}\label{sec:itk2}

We now describe a way to improve the time order of the
Algorithm \ref{tk} in the case of large intensities. The following method
 enables to replace $\Delta \varepsilon$ by $\Delta \varepsilon\Delta
 t $ in the estimates.

\subsection{Algorithm}

The algorithm we propose improve the accuracy in the approximation of
$\varepsilon$. This improvement is obtained by using two toolkit
elements instead of one at each time step. \\

\begin{algo}(Improved toolkit method for large intensities)\label{Itk2}
\begin{enumerate}
\item Preprocessing. Precompute the ``toolkit'', i.e. the set of propagators:
$$S_{\ell}(\Delta t) \textnormal{ for } \ell = 0,\cdots, m,$$
where $(S_{\ell}(t))_{t\in \mathbb R}$ denotes the one-parameter group
generated by the operator $H_0-\mu\bar{\varepsilon}_\ell$, the sequence
$(\varepsilon_\ell)_{\ell=0,\cdots, m,}$ being defined by \eqref{tkdisc}.
\item
Given a control field $\varepsilon\in L^\infty$ satisfying \ref{H} and
  $\psi^{JK}_0=\psi_0$, the sequence $(\psi^{JK}_{j})_{j=0,...,N}$ that
  approximates $(\psi(t_j))_{j=0,...,N}$, is obtained recursively by
  iterating the following loop:
\begin{enumerate}
\item Find $\ell_j$ such that:
$$\varepsilon(t_{j+1/2})\in [\bar{\varepsilon}_{\ell_j},\bar{\varepsilon}_{\ell_j+1}].$$
\item Compute $\alpha_j$ and $\beta_j$ such that:
\begin{eqnarray}
\alpha_j\bar{\varepsilon}_{\ell_j}+\beta_j\bar{\varepsilon}_{\ell_j+1} &=&\varepsilon(t_{j+1/2})\nonumber\\%\label{alphabeta1}\\
\alpha_j+\beta_j &=& 1 \label{alphabeta2}
\end{eqnarray}
\item\label{coststep2} Set $\psi^{JK}_{j+1}=S_{\ell_j+1}(\Delta t )^{\beta_j}S_{\ell_j}(\Delta t)^{\alpha_j}\psi^{JK}_j$.\\
\end{enumerate}
\end{enumerate}
\end{algo}
In this method, one must perform two online matrices
exponentiations. The cost of the corresponding step, namely Step~{\it\ref{coststep2}} can be reduced to three matrix
products when precomputing the mappings between the diagonalization basis of two
consecutive toolkit elements.
\begin{rem}\label{quantif}
Another way to reduce the cost of this step, is to quantify the
values of $\alpha_j$ (and $\beta_j$) and precompute a toolkit
containing elements of the form : $S_{\ell_j+1}(\Delta t
)^{\beta_j}S_{\ell_j}(\Delta t)^{\alpha_j}$. This method is tested
in Sec. \ref{sec:nr}.
\end{rem}
\subsection{Analysis of the method}

We can now repeat the analysis that has been done in the proof of
Theorem \ref{anatk} to obtain the following estimate.\\

\begin{theorem}\label{anaItk2}
Let $\varepsilon\in W^{3,\infty}(0,T)$, $\psi$ be the corresponding solution of
\eqref{S} and $\psi^{JK}$ the approximation of $\psi$ obtained
with Algorithm \ref{Itk}. Given $\Delta t>0$ and $\Delta \varepsilon>0$,
there exists $\lambda''_1>0$, $\lambda''_2>0$, both independent of $\|\varepsilon\|_{L^\infty(0,T)}$ such that:
\begin{equation}\nonumbe
\| \psi(T)-\psi^{JK}(T)\|_{L^2}\leq  \lambda''_1 \Delta \varepsilon\Delta t + \lambda''_2\Delta t^2
\end{equation}
\end{theorem}

\proof
In this algorithm, two control fields are involved successively in the propagation over the
interval $[t_j,t_{j+1}]$. As in the previous proofs, we introduce
$\delta(s)=\varepsilon(s)-\bar{\varepsilon}(s)$, with
 $$\bar{\varepsilon}(s)=\left\{ \begin{array}{cl}\bar{\varepsilon}_{\ell_j}   & s\in [t_j,t_j+\alpha_j\Delta t[,\\
                                                 \bar{\varepsilon}_{\ell_j+1} & s\in [t_j+\alpha_j\Delta t,t_{j+1}[.
                                                  \end{array}\right.$$
Note first that for all $s\in [t_j,t_{j+1}]$
\begin{equation}\label{estimdelta}
|\delta(s)|\leq \Delta \varepsilon + \frac12\|\dot{\varepsilon}\|_{L^\infty(0,T)} \Delta t
\end{equation}
and denote by $\left(S_j(t)\right)_{j=0,...,N-1}$ and $\left(S'_j(t)\right)_{j=0,...,N-1}$
the one-parameter semi-groups generated by the operators $H_0-\mu\bar\varepsilon_{\ell_j}$
and $H_0-\mu\bar\varepsilon_{\ell_j+1}$  respectively.\\
 Following the same analysis as for Algorithm~\ref{tk}, we set
 $(\psi^{JK}_j)_{j=0,...,N}$ as the time discretization of the solution of:
\begin{eqnarray}\label{psiJK}
\left\lbrace
\begin{array}{ll}
i\partial_t \psi^{JK}(t) = \left(H_0-\mu\bar\varepsilon(t) \right) \psi^{JK} (t),&\bbR^3\times(0,T) \\
\psi^{JK}(0)=\psi_0,&\bbR^3
\end{array} \right.
\end{eqnarray}
where $\bar{\varepsilon}(t)$ (defined right above) is constant over each interval
$[t_j,t_j+\alpha_j\Delta t[ $ and $ [t_j+\alpha_j\Delta t,t_{j+1}[$, with $j=0,...,N-1$.
In the same way as we obtained \eqref{id1}, the solution $\psi$ of \eqref{S} satisfies,
$$\psi(t_j+\alpha_j\Delta t) = S_{j}(\alpha_j \Delta t) \psi(t_j)
-i\int_{t_j}^{t_{j}+\alpha_j\Delta t} S_j(t_j+\alpha_j\Delta t - s)\mu\delta(s)\psi(s)\ ds$$
and
$$\psi(t_{j+1}) = S'_{j}(\beta_j \Delta t) \psi(t_j+\alpha_j \Delta t)
-i\int_{t_j+\alpha_j\Delta t}^{t_{j+1}} S'_j(t_{j+1} - s)\mu\delta(s)\psi(s)\ ds.$$
As in (\ref{decomp}), it gives rise to:
\begin{eqnarray}
&&\psi(t_{j+1})- S'_j(\beta_j\Delta t)S_j(\alpha_j\Delta t)\psi(t_j) \nonumber\\
&=&i\int_{t_j+\alpha_j\Delta t}^{t_{j+1}} S'_j(t_{j+1}-s)\mu\delta(s) \psi(s) \ ds \nonumber\\
&&+  i\int_{t_j}^{t_{j}+\alpha_j\Delta t} S'_j(\beta_j\Delta t)S_j(t_{j}+\alpha_j\Delta t-s)\mu\delta(s) \psi(s)\ ds \nonumber\\
&=&i\int_{t_j+\alpha_j\Delta t}^{t_{j+1}} S'_j(t_{j+1}-s)\mu\delta(s) \left(\psi(s) - S'_j(s-t_j-\alpha_j\Delta t) \psi(t_j+\alpha_j\Delta t)\right)    \ ds \nonumber\\
&&+  i\int_{t_j}^{t_{j}+\alpha_j\Delta t} S'_j(\beta_j\Delta t)S_j(t_{j}+\alpha_j\Delta t-s)\mu\delta(s)\left(\psi(s) - S_j(s-t_j) \psi(t_j)\right)\ ds \nonumber\\
&& +i\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}   \delta(s)\widetilde{\varphi}'_j(s)S_j(\alpha_j\Delta t) \psi(t_j) \ ds \nonumber\\
 &&+ i\int_{t_j}^{t_{j}+\alpha_j\Delta t} S'_j(\beta_j \Delta   t)    \delta(s)\widetilde{\varphi}_j(s) \psi(t_j) \ ds .\label{id5}
\end{eqnarray}
where
$\widetilde{\varphi}'_j(s):=S'_j(t_{j+1}-s)\mu S'_j(s-t_j-\alpha_j\Delta t)$ and $\widetilde{\varphi}_j(s):=S_j(t_j+\alpha_j\Delta t-s)\mu S_j(s-t_j)$.
As in the proof of Theorem~\ref{anatk} (see right above \eqref{eqpsiT}) we use the appropriate decomposition
\begin{eqnarray*}
&&\psi(T)-\psi^{JK}(T)=\psi(T)-S'_{N-1}(\beta_{N-1}\Delta t)S_{N-1}(\alpha_{N-1}\Delta t)\psi(t_{N-1})\\
&&+~\sum_{j=0}^{N-2}S'_{N-1}(\beta_{N-1}\Delta t)S_{N-1}(\alpha_{N-1}\Delta t)\dots S'_{j+1}(\beta_{j+1}\Delta t)S_{j+1}(\alpha_{j+1}\Delta t)\\
&&\hspace{7cm} \times \big(\psi(t_{j+1})-S'_{j}(\beta_j\Delta t)S_{j}(\alpha_j\Delta t)\psi(t_j)\big)\\
&&+~S'_{N-1}(\beta_{N-1}\Delta t)S_{N-1}(\alpha_{N-1}\Delta t)\dots S'_0(\beta_0\Delta t)S_0(\alpha_0\Delta t) \psi_0 - \psi^{JK}(T)
\end{eqnarray*}
where the last line is equal to $0$ since $\psi^{JK}$ satisfies (\ref{psiJK}) on $[0,T]$.
We have the corresponding estimate (see \eqref{eqpsiT})
$$\|\psi(T)-\psi^{JK}(T)\|_{L^2}  \leq  \sum_{j=0}^{N-1} \left\| \psi(t_{j+1})- S'_j(\beta_j\Delta t)S_j(\alpha_j\Delta t)\psi(t_j)\right\|_{L^2}$$
and we will thus calculate and estimate in $L^2$-norm for all $j$ the four terms of  \eqref{id5}.
As in \eqref{es2}, but using now the new estimate \eqref{estimdelta} of $\delta$, the two first terms of the right hand side of \eqref{id5} can be respectively estimated by:
\begin{multline}
\left\|i\int_{t_j+\alpha_j\Delta t}^{t_{j+1}} S'_j(t_{j+1}-s)\mu\delta(s) \left(\psi(s)
- S'_j(s-t_j-\alpha_j\Delta t) \psi(t_j+\alpha_j\Delta t)\right)    \ ds\right\|_{L^2}\\
\leq~\beta_j\|\mu\|^2_\nl \left( \Delta \varepsilon^2 \Delta t^2 + \frac12\|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^4 \right)\label{t0}
\end{multline}
and
\begin{multline}
\left\|  i\int_{t_j}^{t_{j}+\alpha_j\Delta t} S'_j(\beta_j\Delta t)S_j(t_{j}+\alpha_j\Delta t-s)\mu\delta(s)\left(\psi(s) - S_j(s-t_j) \psi(t_j)\right) \right\|_{L^2}\\
\leq~\alpha_j\|\mu\|^2_\nl\left( \Delta \varepsilon^2 \Delta t^2 + \frac12\|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^4 \right).\label{t1}
\end{multline}
Let us now focus on the third and fourth terms of \eqref{id5}. We have:
\begin{eqnarray}
\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}
      \delta(s)\widetilde{\varphi}'_j(s)S_j(\alpha_j\Delta t)
      \psi(t_j)     \ ds
=\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}
      \delta(s)\widetilde{\varphi}'_j(t_j+\alpha_j\Delta t)S_j(\alpha_j\Delta t)
      \psi(t_j)     \ ds \nonumber\\
+\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}
      \delta(s)\int_{t_j+\alpha_j\Delta t}^s\partial_u\widetilde{\varphi}'_j(u)
          \ du\ S_j(\alpha_j\Delta t)\psi(t_j) \ ds\nonumber\\
=\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}
      \delta(s)S'_j(\beta_j \Delta t)\mu S_j(\alpha_j\Delta t)
      \psi(t_j)     \ ds \nonumber\\
+\int_{t_j+\alpha_j\Delta t}^{t_{j+1}}
      \delta(s)\int_{t_j+\alpha_j\Delta
        t}^s\partial_u\widetilde{\varphi}'_j(u)\ du  \ S_j(\alpha_j\Delta t)
      \psi(t_j)      \ ds\nonumber
\end{eqnarray}
and
\begin{eqnarray}
\int_{t_j}^{t_{j}+\alpha_j\Delta t} S'_j(\beta_j \Delta
      t)    \delta(s)\widetilde{\varphi}_j(s) \psi(t_j) \ ds=\int_{t_j}^{t_{j}+\alpha_j\Delta t}\delta(s) S'_j(\beta_j \Delta
      t)    \widetilde{\varphi}_j(t_{j}+\alpha_j\Delta t)
      \psi(t_j) \ ds \nonumber\\
-\int_{t_j}^{t_{j}+\alpha_j\Delta t} \delta(s) S'_j(\beta_j \Delta
      t)   \int_{s}^{t_j+\alpha_j\Delta
        t}\partial_u\widetilde{\varphi}_j(u) \ du\ \psi(t_j) \ ds \nonumber\\
=\int_{t_j}^{t_{j}+\alpha_j\Delta t} \delta(s) S'_j(\beta_j \Delta
      t)   \mu S_j(\alpha_j\Delta t)
      \psi(t_j) \ ds \nonumber\\
-\int_{t_j}^{t_{j}+\alpha_j\Delta t}    \delta(s) S'_j(\beta_j \Delta
      t)\int_{s}^{t_j+\alpha_j\Delta
        t} \partial_u\widetilde{\varphi}_j(u) \ du \ \psi(t_j)\ ds \nonumber.
\end{eqnarray}
By means of \eqref{alphabeta2}, we have
\begin{eqnarray}
\int_{t_j}^{t_{j+1}}\delta (s)\ ds& =&\int_{t_j}^{t_{j+1}} \varepsilon(s)-\varepsilon(t_{j+1/2})\ ds
+ \int_{t_j}^{t_{j+1}}\varepsilon(t_{j+1/2})- \bar{\varepsilon}(s)\
ds\nonumber\\
& =&\int_{t_j}^{t_{j+1}} \varepsilon(s)-\varepsilon(t_{j+1/2})\ ds\nonumber\\
&= &\int_{t_j}^{t_{j+1}}\ddot{\varepsilon}(\theta(s))\frac12(s-t_{j+1/2})^2\ ds,\nonumber
\end{eqnarray}
where $\theta(s)\in [t_j,t_{j+1}]$. Consequently,
\begin{equation}
\left\|\int_{t_j}^{t_{j+1}}
      \delta(s)S'_j(\beta_j \Delta t)\mu S_j(\alpha_j\Delta t)
      \psi(t_j)     \ ds \right\|_{L^2}\leq \frac1{24}\|\mu\|_\nl\|\ddot{\varepsilon}\|_{L^\infty(0,T)}\Delta t^3.\label{t2}
\end{equation}
From \eqref{phib} and \eqref{estimdelta}, we obtain
\begin{multline}
\left\| \int_{t_j+\alpha_j\Delta t}^{t_{j+1}} \delta(s)\int_{t_j+\alpha_j\Delta  t}^s\partial_u\widetilde{\varphi}'_j(u)\ du  \ S_j(\alpha_j\Delta t)   \psi(t_j)\ ds\right\|_{L^2}\\
\leq \frac12\beta_j^2\|[H_0,\mu]\|_\nl \left(\Delta
  \varepsilon + \frac12 \|\dot{\varepsilon}\|_{L^\infty(0,T)}\Delta t  \right)\Delta t^2\label{t3}
\end{multline}
and similarly, we find that:
\begin{multline}
\left\| \int^{t_j+\alpha_j\Delta t}_{t_{j}}
      \delta(s)S'_j(\beta_j\Delta t)\int^{t_j+\alpha_j\Delta
        t}_s\partial_u\widetilde{\varphi}_j(u)\ du  \
      \psi(t_j)\ ds   \right\|_{L^2}\\
      \leq \frac12\alpha_j^2\|[H_0,\mu]\|_\nl \left( \Delta
  \varepsilon + \frac12 \|\dot{\varepsilon}\|_{L^\infty(0,T)}\Delta t \right)\Delta t^2.\label{t4}
\end{multline}
Combining \eqref{t0}, \eqref{t1}, \eqref{t2}, \eqref{t3} and \eqref{t4}, we obtain:
\begin{eqnarray*}
\left\|\psi(t_{j+1})- S'_j(\beta_j\Delta t)S_j(\alpha_j\Delta t) \psi(t_j)\right\|_{L^2}
&\leq& \|\mu\|^2_\nl \left( \Delta \varepsilon^2+ \frac12\|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^2\right) \Delta t^2\\
&&+ \frac1{24}\|\mu\|_\nl\|\ddot{\varepsilon}\|_{L^\infty(0,T)}\Delta t^3\\
&&+\frac12\|[H_0,\mu]\|_\nl \left( \Delta \varepsilon + \frac12 \|\dot{\varepsilon}\|_{L^\infty(0,T)}\Delta t \right)\Delta t^2.
\end{eqnarray*}
The global estimate follows
\begin{eqnarray*}
\|\psi(T)-\psi^{JK}(T)\|_{L^2}  &\leq&  \sum_{j=0}^{N-1} \left\| \psi(t_{j+1})- S'_j(\beta_j\Delta t)S_j(\alpha_j\Delta t)\psi(t_j)\right\|_{L^2}\\
&\leq & \|\mu\|^2_\nl \left( \Delta \varepsilon^2+ \frac12\|\dot\varepsilon\|^2_{L^\infty(0,T)} \Delta t^2\right)T \Delta t\\
&&+ \frac1{24}\|\mu\|_\nl\|\ddot{\varepsilon}\|_{L^\infty(0,T)}T\Delta t^2\\
&&+\frac12\|[H_0,\mu]\|_\nl \left( \Delta \varepsilon + \frac12 \|\dot{\varepsilon}\|_{L^\infty(0,T)}\Delta t \right)T\Delta t
\end{eqnarray*}
and the proof of Theorem~\ref{anaItk2} is complete, with
$$\lambda''_1=\frac12\|[H_0,\mu]\|_\nl T + \|\mu\|_\nl^2T\Delta \varepsilon,$$
\begin{eqnarray*}
\lambda''_2&=&\frac14\|[H_0,\mu]\|_\nl\|\dot{\varepsilon}\|_{L^\infty(0,T)}T+\frac1{24}\|\mu\|_\nl\|\ddot{\varepsilon}\|_{L^\infty(0,T)}T
\\&&+\frac12\|\mu\|_\nl^2\|\dot{\varepsilon}\|_{L^\infty(0,T)}T\Delta
t.
\end{eqnarray*}

\endproof
\section{Numerical results}\label{sec:nr}
In this section, we check numerically that the order of the estimates we
have obtained in this paper are optimal, and we compare computational
costs of the methods.

\subsection{Model}

In order to test the performance of the algorithms on
a realistic case, a model already
treated in the literature has been considered. The system is a molecule of HCN
modeled as a rigid rotator. We refer the reader to \cite{claudedionjcp} for numerical details
concerning this system.\\
As a control field, we use an arbitrary field of the form
$\varepsilon(t)=\varepsilon_{\max}\sin(\omega t)$, with
$\varepsilon_{\max}=5.10^{-5}$ and $\omega= 5.10^{-6}$. The
parameters are chosen in accordance with usual scales considered for
this model. The use of an analytic
formula for the field enables us to work with exact values,
i.e. to test the cases $\Delta \varepsilon=0$.

\subsection{Orders of convergence}

To test the time order, we first work with $\Delta \varepsilon=0$,
with various values of $\Delta t$. The numerical orders correspond to
the ones obtained in our analysis. Curves of convergence are depicted
in Fig. \ref{time_error}.

\begin{centering}
\begin{figure}[h!]
\psfrag{dt}[r][c]{ $\Delta t/T$}
\psfrag{error}[c][t]{ $\| \psi(T)-\psi^{num}(T)\|_{L^2}$}
\center
\includegraphics[width=.8\textwidth]{time_error3}
\caption{Error with respect to $\Delta t$, when $\Delta
  \varepsilon=0$ for toolkit method and Improved toolkit I method, and
  when$\Delta
  \varepsilon=c\Delta t$ for Improved toolkit II method. Here, $\psi^{num}$ stands for the approximation
  of $\psi$ when using the toolkit method, the second order Strang
operator splitting, the Improved toolkit I method and the Improved
toolkit II.  The coefficient $a$ is the regression
coefficient.}\label{time_error}
\end{figure}
\end{centering}
The order with respect to $\Delta \varepsilon$ is also obtained
numerically by using a small time step. In this test, the numerical
order is consistent
with the one obtained in Theorem~\ref{anatk}. The convergence with
respect to this parameter is presented in Fig. \ref{toolkit_error}.
\begin{centering}
\begin{figure}[h!]
\psfrag{dc}[c][b]{ $\Delta \varepsilon/\varepsilon_{\max}$}
\psfrag{error}[c][t]{ $\| \psi(T)-\psi^{num}(T)\|_{L^2}$}
\center
\includegraphics[width=.8\textwidth]{toolkit_error}
\caption{Error with respect to $\Delta \varepsilon$, when $\Delta t$  is small. Here, $\psi^{num}$ stands for the approximation  of $\psi$ when using the toolkit method.   }\label{toolkit_error}
\end{figure}
\end{centering}

\subsection{Computational cost}
In a second test, we compare the computational costs of the
methods. To do this, we look for the
values of $N=\frac{T}{\Delta t}$ and $m=\frac{\varepsilon_{\max}}{\Delta \varepsilon}$ that enable to reach a
fixed arbitrary error of $Tol=5.10^{-3}$ (recall that in any case the error
cannot exceed 2). For sake of simplicity, we only test powers of $2$.
In this test, we also include the quantified version of the Improved
toolkit II which is described in Remark \ref{quantif}. In our case,
the parameters $\alpha$ and $\beta$ were quantified among 100 values
uniformly distributed in $[0,1]$.

\begin{table}[htbp]
\begin{center}
\begin{tabular}{|c|c|c|c|}
  \hline
                    & $N=\frac{T}{\Delta t}$&Matrix products  & $m=\frac{\varepsilon_{\max}}{ \Delta \varepsilon}$ \\
  \hline
Strang Op. Splitting&    $16384$            &      32768    &        -                 \\
  \hline
Toolkit             &    $8192$             &      8192     &   $16384$               \\
  \hline
Improved toolkit I  &    $1024$             &      2048     &   $16384$             \\
  \hline
Improved toolkit II &    $4096$             &      12288    &   $16$ \\
  \hline
Quantified Improved toolkit II &    $4096$  &      4096     &   $6400$
\\
  \hline
\end{tabular}
\end{center}
\caption{Values of numerical parameters corresponding to a tolerance
  error of  $Tol=5.10^{-3}$.}\label{tab2}
\end{table}

These tests show that toolkit methods always give better results as the
second order Strang operator splitting. \\
The two improvements we propose in this paper enable to reduce respectively the global number of
matrix products and the size of the toolkit, which is in agreement
with the analysis we have done. Note that the second improvement reduce
significantly preprocessing step. This fact makes feasible the quantified
version of it, which requires intrinsically a larger toolkit.

\section*{Acknowledgments}
This work is partially supported by the ANR project C-QUID, INRIA
project ``MicMac'' and by a PICS CNRS-NFS grant.
\bibliographystyle{siam}

redpajama_set_name: RedPajamaArXiv


⊗ Looking for Office Spaces for rent in Defence Colony, New Delhi? Click here to view more matching properties.
Prime Located Commercial Space available for Lease in Defence Colony, South Delhi .
Defence colony as the name says is one of the safest and posh locality. Full of greenery , parks , jogging track. Very peaceful and beautiful area. One of the most sought after property in Delhi.
Situated in South Delhi, Defence Colony is a premium residential area, known for its upscale lifestyle. Originally established to settle high rank Defence Personnel, the colony now has people residing from all walks of life.
Defence Colony is broadly divided in to 5 Residential blocks - A, B, C, D, and E, and stretches from Lala Lajpat Rai Marg to Bhishm Pitamah Marg in one direction, and from the Ring Road to Jawahar Lal Nehru Stadium, approximately, in the other direction.
The colony is dotted with beautiful parks and gardens, like the Sukun Park, where residents spend leisurely mornings and evenings catching up with friends and their daily walks and jogs.
One of the main attractions of Defence Colony is its main market, famous for numerous Restaurants and Eateries frequented by visitors from all over the city. Some prominent names include Moet's, Colonel's Kebabs, Aka Saka, Moti Mahal etc. The market also has well stocked convenience stores like Malik brothers, where you will find items of daily use, as well as other novelty items imported from all over.


A big match has been announced for Tuesday's SmackDown Live.
WWE has announced that this Tuesday on SmackDown Live which emanates from the 'Huntington Center' in Toledo, Ohio, the six-men who are competing in the WWE Championship Elimination Chamber match at the 'Elimination Chamber pay-per-view -- Samoa Joe, Randy Orton, AJ Styles, Mustafa Ali, Jeff Hardy and the WWE Champion Daniel Bryan will partake in a Gauntlet match and the winner of said match will earn the right to enter the Elimination Chamber match last.
"The New" Daniel Bryan recently unveiled the new-look WWE Championship that is made of hemp and is eco-friendly. Bryan has stated on WWE TV that the reason he is being forced to defend his title inside the Elimination Chamber is because management wants to bring back the belt with the leather strap.
Mustafa Ali is currently working through a tailbone injury and it was rumored that former two-time WWE Champion AJ Styles was dealing with an injury as well but AJ took to social media to refute that report and for more on that story, click here.


text:
Q: Any possible ways to use my iPhone presence in wifi network as a trigger? My goal is to record the time when I am out/arrive home, and certain calendar event. I know how to do everything except finding out the triggers that will indicate that I am at home.
Alternative #1
I think using my iPhone presence in my Wifi network is one of the best alternative that came to my mind. But I don't know any possible ways how I can achieve it through iOS, or osx.
Alternative #2
I also was thinking about using IFTTT on iPhone (Locator + Google Calendar), but it will decrease battery usage.
Do you know how to achieve wifi detection of my phone. Or maybe there are other ideas what could be used as a trigger?

A: Haven't looked into this much yet, but instead of running IFTTT on your phone, you can now have it on your (Google) router:
http://thenextweb.com/gadgets/2016/04/28/googles-onhub-router-ifttt/

A: iOS has built in support for geofence-based regions, which use a mixture of GPS, WiFi, accelerometer, and other sensors. An OS based geofence will even launch your program in order to notify it that you have entered/exited the region. It's also designed to be power-efficient. Take a look at the location manager and CLCircularRegion.


The Delifresh creative zone was in full swing this week as the team from the Gainford Group held their chef's forum within our Cramlington depot at the beginning of the week.
The day consisted of a tour around the engine room which gathered huge excitement followed by a demo by Rational UK in the kitchen and then the team held their own forum as they created new menus and went through business as part of their monthly meeting.
By holding such an event offsite can often bring amazing results especially when you are surrounded by amazing produce and creative people.
If you want to do something similar with your team in either of our facilities just get in touch as we can most definitely host your event.
How creative could that be ???
Newcastle College is into their fourth year of our Veggiecation Scheme and it's great to see every year group that enters into our development project comes out more knowledgeable than ever before around all things fresh produce - Ready for their journey into our magnificent industry.
Newcastle College are doing some outstanding work within the industry to promote and educate the trade to the maximum and its great to work extremely closely with the team.
The trip involved a cheeky breakfast, inspirational creative tour around Delifresh, then up to the sheds of joy to meet the Rhubarb Guru (Robert Tomlinson) whilst witnessing the most magnificent Yorkshire Forced Rhubarb in peak season.
The Delifresh Veggiecation scheme exists to educate all around the importance of eating with the season whilst bringing a sense of realism to all things food to the future of the industry.
How amazing is that going to be???
Thanks to all that attended watch out for a cheeky present coming through on your delivery soon.
Maybe you know someone you know someone who may benefit from our Veggiecation drive???
Ernst Van Zyl who many know is gathering some severe excitement as news spreads like wildfire around his new opening The Glazebury Pub & Restaurant.
Ernst was chef patron at The Lord Clyde in Kerridge just outside Macclesfield where they achieved three AA rosettes and also chef patron at The Hanging Gate Cheshire.
If you are in the area make sure you stop by and show your support for Ernst you will most definitely have a fantastic experience.
If you are planning a trip to Bangkok this year you need to check this out !!!
Raan Jay Fai is a shophouse eatery in Bangkok, which was awarded one Michelin-star in 2017 in the first Michelin Guide to Thailand.
Her real name is Supinya Junsuta, but she's always referred to by her nickname, Jay Fai, which means Sister Mole.
Known for sporting some iconically oversized ski goggles and always wearing ruby red lipstick.


text:
1 Cameroon Country Profile
changes.mady.by.user Henry Ashcroft
Generic Information
Cameroon is a country in Central Africa. It is bordered by Nigeria to the west and north; Chad to the northeast; the Central African Republic to the east; and Equatorial Guinea, Gabon
and the Republic of the Congo to the south.
Cameroon is home to more than 1738 different linguistic groups. French and English are the official languages.
French Cameroon became independent in 1960 as the Republic of Cameroon. The southern portion of neighbouring British Cameroon voted to merge with the new country to form the Federal Republic of Cameroon with Yaoundé as the capital city in October 1961.
In 1972, a new constitution replaced the Federation with a unitary state, the United Republic of Cameroon and later Republic of Cameroon.
Cameroon is divided into five major geographic zones distinguished by dominant physical, climatic, and vegetative features:
The coastal plain at the Gulf of Guinea is exceedingly hot and humid with a short dry season. This belt is densely forested.
The South Cameroon Plateau is an equatorial rainforest; it alternates between wet and dry seasons making it is less humid than the coast.
Countryside near Adamawa Region. An irregular chain of mountains, hills, and plateaus known as the Cameroon range extends from Mount Cameroon to Lake Chad at Cameroon's northern border and it has a mild climate.
Then the Adamawa Plateau stretches from the western mountain area and forms a barrier between the country's north and south. It has high rainfall between April and October.
Finally the northern lowland region extends from the edge of the Adamawa to Lake Chad, the characteristic vegetation is savanna scrub and grass. This is an arid region with sparse rainfall.
Cameroon has four patterns of drainage:
In the south, the principal rivers are the Ntem, Nyong, Sanaga, and Wouri. These flow directly into the Gulf of Guinea.
The Dja and Kadéï drain into the Congo River.
In northern Cameroon, the Bénoué River runs into the Niger.
Finally, the Logone flows into Lake Chad, which Cameroon shares with three neighbouring countries.
Generic country information can be located from sources which are regularly maintained and reflect current facts and figures. For a generic country overview, please consult the following sources:
Cameroon Wikipedia Country Information
Cameroon IMF Country
Cameroon Economist Intelligence Unit Information*
(*note - this is a paid service)
Humanitarian Info
Cameroon still faces serious challenges in achieving Zero Hunger and eradicating malnutrition by 2030 as required by Sustainable Development Goal 2. The country ranks 111 out of 171 in the 2018 Human Development Index and 39 percent of its people live under the poverty line.
Poverty has a strong regional dimension. It is mostly concentrated in rural areas and specifically in the northernmost and eastern regions, where structural underdevelopment and recurring climatic hazards have limited opportunities for communities to thrive and break out of the poverty trap. The Far North, North, Adamaoua and Eastern regions are frequently exposed to food crises and climate shocks, including floods and droughts. These, combined with poor road infrastructure, land degradation, outdated agricultural practices, high post-harvest losses and fragmented markets, severely limit people's access to sufficient nutritious food.
The arrival of refugees driven into Cameroon by conflicts in northeast Nigeria and in the Central African Republic, the internal displacement of people caused by Boko Haram activities in the Far North and the conflict in Nort-West and South-West region, are putting additional strains on already vulnerable communities.
As a result of multiple shocks and stresses, including pressure from insecurity and displacement, the overall food security situation sharply deteriorated since 2015. In March 2019, 3 million person were concern by food insecurity.
Chronic malnutrition remains a public health issue, with 32 percent of children under 5 suffering from stunting. The prevalence of stunting is above the national average in Far North (42%), North (34%), Adamaoua (38%) and East (36%).
For NW and SW 37 percent of the total population is food insecure, of which 8 percent is severely food insecure. The total population in food insecurity represents about 1.5 million people of which 900,000 in the North-West region and 600,000 in the South-West region.
High malnutrition rates are primarily a result of limited consumption of nutritious food, diarrhoeal disease which limits the absorption of nutrients, and limited access to clean water, sanitation and health services.
The 2019 Humanitarian Response Plan for Cameroon was launched on 20 February. The response to the crisis in the North-west and South-West will aim to assist 820,000 people, targeting five times more people than the 2018 Emergency Response Plan.
The situation in February further deteriorated as violence and 'lockdowns' compounded humanitarian challenges.
Schools and Hospitals were particularly affected by incidents of kidnapping and arson.
The humanitarian situation has fastdeteriorated,1.3 million people need of assistance.
Insecurity has forced around 440,000 people to flee their homes. More than 380,000 people need shelter, and some 418,000 people NFI assistance.
An estimated 3,000 children suffering from life-threatening severe acute malnutrition require urgent treatment.
Cameroon World Food Programme Information
Cameroon Wolfram Alpha Information
Cameroon World Bank Information
There is a high risk of a rapid increase in new HIV infections due to ARV supply disruption.
About 3,700 unaccompanied or separated children need urgent psycho-social care and reunification.
Access for humanitarian actors to reach the most vulnerable, and for affected population to needed services, remains difficult.
In February, WFP provided food for 17,000 IDPs in Meme andManyudivisions in South-West region.
Humanitarian partners provided shelters to 23,635 people, and 100,150 received household items.
Sources: Cameroon World Food Programme Information; and Humanitarian Response
French / English - two official languages
+200 ethnic groups: Cameroon Highlanders 31%, Equatorial Bantu 19%, Kirdi 11%, Fulani 10%, North-western Bantu 8%, Eastern Nigritic 7%, other African 13%, non-African less than 1%
Roman Catholic 38.4%, Protestant 26.3%, other Christian 4.5%, Muslim 20.9%, animist 5.6%, other 1%, non-believer 3.2% (2005 est.)
Country size (comparison)
475,440 km2 (472,710 km2 land / 2,730 km2 water)
1,206 km from North to South and 717 km from East to West
Agricultural land: 20.6% (2011 est.)
Forest: 41.7% (2011 est.)
The population is estimated to 25,159,961 in 2019.
53.24 Inhabitants per square meter
population growth 2.6
Urban population 56.4%
Source: http://worldpopulationreview.com/countries/cameroon-population/
Total population: 59.4 years (male: 58 years, female: 60.9 years) 2018 estimate
Country comparison to the world: 210
Total: 18.6 years (male: 18.5 years, female: 18.7 years) 2018 estimate
0-14 years: 42.15% (male 5,445,142 /female 5,362,166)
55-64 years: 3.99% (male 499,101 /female 524,288)
65 years and over: 3.23% (male 384,845 /female 443,099)
Source: https://www.cia.gov/library/publications/the-world-factbook/geos/cm.html
Border countries
In the East: Central African Republic (901 km), Chad (1,116 km), and Republic of the Congo (494 km).
In the South: Equatorial Guinea (183 km) and Gabon ( 349 km)
In the North and West: Nigeria (1,975 km)
Coastline represent 402 km
GNI per capita, Atlas method (current US$)
$ 1,370 (2017 estimate)
Source: https://databank.worldbank.org/data/views/reports/
20191 USD = 583.87 FCFA
Fixed rate EURO - F CFA: 1 Euro = 655,957 F CFA
Source: https://www.oanda.com/currency/converter/
Time Zone (GMT +/-)
GMT + 1
FCFA (XAF)
Telephone dialling code
Driving (left / right)
Cameroon Population Information
{"serverDuration": 182, "requestCorrelationId": "ca5c376d7c52fba3"}