//  [python]
def __init__(self, itcf, qmc, trial, root, h5f, system, dtype, BT2):
        self.stable = itcf.get('stable', True)
        self.restore_weights = itcf.get('restore_weights', True)
        self.tmax = itcf.get('tau_max', 0.0)
        self.teqlb = itcf.get('tau_eqlb', 0.0)
        self.mode = itcf.get('mode', 'full')
        self.stack_size = itcf.get('stack_size', 1)
        self.nmax = int(self.tmax/qmc.dt)
        self.dt = qmc.dt
        self.ntau = int(self.nmax/self.stack_size)
        self.neqlb = int(self.teqlb/qmc.dt)
        self.nprop_tot = self.nmax + self.neqlb
        self.nstblz = qmc.nstblz
        self.denom = 0
        self.BT2 = BT2
        self.kspace = itcf.get('kspace', False)
        # self.spgf(i,j,k,l,m) gives the (l,m)th element of the spin-j(=0 for up
        # and 1 for down) k-ordered(0=greater,1=lesser) imaginary time green's
        # function at time i.
        # +1 in the first dimension is for the green's function at time tau = 0.
        nbasis = system.nbasis
        self.spgf_shape = (self.ntau+1, 2, 2, nbasis, nbasis)
        self.spgf = numpy.zeros(shape=self.spgf_shape, dtype=trial.G.dtype)
        self.global_array = numpy.zeros(shape=(1+numpy.prod(self.spgf_shape),),
                                        dtype=trial.G.dtype)
        # self.global_array = numpy.zeros(shape=(self.nmax+1,2,2,nbasis,nbasis),
                                        # dtype=trial.G.dtype)
        if trial.type == "GHF":
            self.I = numpy.identity(trial.psi.shape[1], dtype=trial.psi.dtype)
            self.initial_greens_function = self.initial_greens_function_ghf
            self.accumulate = self.accumulate_ghf
            self.back_propagate_single = back_propagate_single_ghf
            self.construct_propagator_matrix = construct_propagator_matrix_ghf
            if self.stable:
                self.increment_tau = self.increment_tau_ghf_stable
            else:
                self.increment_tau = self.increment_tau_ghf_unstable
        else:
            self.I = numpy.identity(trial.psi.shape[0], dtype=trial.psi.dtype)
            self.initial_greens_function = self.initial_greens_function_uhf
            self.accumulate = self.accumulate_uhf
            if system.name == "Generic":
                self.back_propagate_single = back_propagate_generic
                self.construct_propagator_matrix = construct_propagator_matrix_generic
            if system.name == "Hubbard":
                self.back_propagate_single = back_propagate_single
                self.construct_propagator_matrix = construct_propagator_matrix
            if self.stable:
                self.increment_tau = self.increment_tau_uhf_stable
            else:
                self.increment_tau = self.increment_tau_uhf_unstable
        if self.stable:
            self.calculate_spgf = self.calculate_spgf_stable
        else:
            self.calculate_spgf = self.calculate_spgf_unstable
        self.keys = [['up', 'down'], ['greater', 'lesser']]
        # I don't like list indexing so stick with numpy.
        if root:
            if self.mode == 'full':
                shape = (qmc.nsteps//(self.nmax),) + self.spgf.shape
            elif self.mode == 'diagonal':
                shape = (qmc.nsteps//(self.nmax), self.nmax+1, 2, 2, nbasis)
            else:
                shape = (qmc.nsteps//(self.nmax), self.nmax+1, 2, 2, len(self.mode))
            spgfs = h5f.create_group('single_particle_greens_function')
            self.rspace_unit = H5EstimatorHelper(spgfs, 'real_space', shape,
                                                 self.spgf.dtype)
            if self.kspace:
                self.kspace_unit = H5EstimatorHelper(spgfs, 'k_space', shape,
                                                     self.spgf.dtype)