def METHOD_NAME(filename):
    """Extract QMC estimator metadata from h5 file.
    Parameters
    ----------
    filename : string
        QMCPACK output containing density matrix (*.h5 file).
    Returns
    -------
    md : dict
        Estimator metadata.
    """
    md = {}
    with h5py.File(filename, 'r') as fh5:
        md['nmo'] = fh5['Metadata/NMO'][:][0]
        md['free_proj'] = bool(fh5['Metadata/FreeProjection'][:][0])
        md['walker_type'] = fh5['Metadata/WalkerType'][:][0]
        md['nalpha'] = fh5['Metadata/NAEA'][:][0]
        md['nbeta'] = fh5['Metadata/NAEB'][:][0]
        try:
            md['num_bp']= fh5['Metadata/NumBackProp'][:][0]
            md['num_av'] = fh5['Metadata/NumAverages'][:][0]
            md['num_ref'] = fh5['Metadata/NumReferences'][:][0]
        except KeyError:
            md['num_bp'] = None
        md['dt'] = fh5['Metadata/Timestep'][:][0]
    return md