def METHOD_NAME(
    circuit: QPROGRAM,
    executor: Union[Executor, Callable[[QPROGRAM], QuantumResult]],
    check_operators: Sequence[PauliString],
    code_hamiltonian: Observable,
    observable: Observable,
    pauli_string_to_expectation_cache: Dict[PauliString, complex] = {},
) -> float:
    """Function for the calculation of an observable from some circuit of
    interest to be mitigated with quantum subspace expansion (QSE).
    Args:
        circuit: Quantum program to execute with error mitigation.
        executor: Executes a circuit and returns a `QuantumResult`.
        check_operators: List of check operators that define the
            stabilizer code space.
        code_hamiltonian: Hamiltonian of the code space.
        observable: Observable to compute the mitigated expectation value of.
        pauli_string_to_expectation_cache: Cache for expectation values of
            Pauli strings used to compute the projector and the observable.
    Returns:
        The expectation value estimated with QSE.
    """
    projector = get_projector(
        circuit,
        executor,
        check_operators,
        code_hamiltonian,
        pauli_string_to_expectation_cache,
    )
    # Compute the expectation value of the observable: <P O P>
    pop = get_expectation_value_for_observable(
        circuit,
        executor,
        projector * observable * projector,
        pauli_string_to_expectation_cache,
    )
    # Compute the normalization factor: <P P>
    pp = get_expectation_value_for_observable(
        circuit,
        executor,
        projector * projector,
        pauli_string_to_expectation_cache,
    )
    return pop / pp