quantumlib / OpenFermion

The electronic structure package for quantum computers.
Apache License 2.0
1.51k stars 372 forks source link

Inconsistencies in the double factorized chemistry resource estimate costing function #839

Open fdmalone opened 11 months ago

fdmalone commented 11 months ago

the costing function computes br for outer prepare and inner prepare differently:

https://github.com/quantumlib/OpenFermion/blob/a034397a13b1ea224e11746d4ee368cccf2bc962/src/openfermion/resource_estimates/df/compute_cost_df.py#L53

Which would be fine but the br fed into cost two should be using the second (hardcoded value) of 7 to output into qrom for state preparation on the second register.