Skip to content

Add qdk standard QPE circuit builder#511

Draft
RushiGong wants to merge 5 commits into
mainfrom
feature/rsg/qpe_qs
Draft

Add qdk standard QPE circuit builder#511
RushiGong wants to merge 5 commits into
mainfrom
feature/rsg/qpe_qs

Conversation

@RushiGong
Copy link
Copy Markdown
Contributor

This pull request adds support for building and testing standard (QFT-based) Quantum Phase Estimation (QPE) circuits in the QDK Chemistry library. It introduces a new circuit builder for standard QPE, integrates the corresponding Q# operation, registers the builder in the algorithm registry, and provides a comprehensive set of tests. Additionally, it improves test parametrization for iterative QPE to support both QDK and Qiskit backends.

Standard QPE Circuit Builder Integration:

  • Added a new QdkStandardQpeCircuitBuilder and its settings in standard_builder.py, implementing the construction of standard QPE circuits using Q# operations. This includes validation, circuit creation, and configuration options.
  • Registered the new builder in the algorithm registry, making it available for use in the library. [1] [2]

Q# Operation for Standard QPE:

  • Added a new Q# file StandardPhaseEstimation.qs implementing the standard QPE circuit, including Hadamard preparation, controlled-U operations, inverse QFT, and measurement logic.
  • Ensured the new Q# file is included in the Q# operation loading mechanism.

Testing Enhancements:

  • Introduced a new test class for the standard QPE circuit builder, covering circuit creation, qubit count, measurement checks, error handling, and builder name validation. [1] [2]
  • Improved test parametrization in iterative QPE tests to run with both QDK and Qiskit circuit builders, allowing broader backend coverage and skipping Qiskit tests if unavailable. [1] [2] [3] [4]

Other Minor Changes:

  • Cleaned up and slightly refactored some tests for clarity and future extensibility.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

📊 Coverage Summary

Component Coverage
C++ Library 77%
Python Package 89%
Pybind11 Bindings 87%

Detailed Coverage Reports

C++ Coverage Details
------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: cpp
------------------------------------------------------------------------------
File                                       Lines    Exec  Cover   Missing
------------------------------------------------------------------------------
include/qdk/chemistry/algorithms/active_space.hpp
                                               5       5   100%
include/qdk/chemistry/algorithms/algorithm.hpp
                                              70      55    78%   117,119-121,124,126-128,130-131,219,241,243-244,302
include/qdk/chemistry/algorithms/dynamical_correlation_calculator.hpp
                                               7       6    85%   115
include/qdk/chemistry/algorithms/hamiltonian.hpp
                                               5       5   100%
include/qdk/chemistry/algorithms/localization.hpp
                                               5       5   100%
include/qdk/chemistry/algorithms/mc.hpp       22      22   100%
include/qdk/chemistry/algorithms/mcscf.hpp
                                              13      13   100%
include/qdk/chemistry/algorithms/pmc.hpp       8       6    75%   41,186
include/qdk/chemistry/algorithms/scf.hpp      15      14    93%   23
include/qdk/chemistry/algorithms/stability.hpp
                                               5       4    80%   131
include/qdk/chemistry/data/ansatz.hpp          3       3   100%
include/qdk/chemistry/data/basis_set.hpp      35      30    85%   110-111,114,116,347
include/qdk/chemistry/data/configuration.hpp
                                              32      30    93%   71,119
include/qdk/chemistry/data/configuration_set.hpp
                                               3       2    66%   35
include/qdk/chemistry/data/data_class.hpp
                                               4       4   100%
include/qdk/chemistry/data/element_data.hpp
                                              18      18   100%
include/qdk/chemistry/data/hamiltonian.hpp
                                              12      12   100%
include/qdk/chemistry/data/hamiltonian_containers/canonical_four_center.hpp
                                               1       1   100%
include/qdk/chemistry/data/hamiltonian_containers/cholesky.hpp
                                               1       1   100%
include/qdk/chemistry/data/hamiltonian_containers/sparse.hpp
                                               1       1   100%
include/qdk/chemistry/data/lattice_graph.hpp
                                               3       1    33%   413-414
include/qdk/chemistry/data/majorana_mapping.hpp
                                               6       5    83%   117
include/qdk/chemistry/data/orbitals.hpp        6       6   100%
include/qdk/chemistry/data/pauli_operator.hpp
                                              88      83    94%   1224,1248,1283,1295,1309
include/qdk/chemistry/data/settings.hpp       93      69    74%   76,79,82,305-306,441,483,618,987,996,1011-1012,1016-1018,1022-1023,1025-1027,1029-1030,1119,1123
include/qdk/chemistry/data/stability_result.hpp
                                              38      38   100%
include/qdk/chemistry/data/structure.hpp       8       8   100%
include/qdk/chemistry/data/symmetry/symmetry.hpp
                                              24      24   100%
include/qdk/chemistry/data/symmetry/symmetry_blocked.hpp
                                             185     162    87%   56,189,221-222,224-225,228-231,236-237,239,356,378,383,402,444,463,523,595,631,652
include/qdk/chemistry/data/symmetry/symmetry_blocked_index_set.hpp
                                               8       6    75%   124-125
include/qdk/chemistry/data/symmetry/symmetry_blocked_sparse_map.hpp
                                             102      69    67%   121-124,126,153-154,162-168,217-220,222-223,230-231,240-241,254,256-259,262,264,313,349
include/qdk/chemistry/data/symmetry/symmetry_blocked_tensor.hpp
                                             202     156    77%   163-164,172-174,176-179,221-224,226-227,255,257-260,262,265,291,293-295,297-300,335,337-340,342,365,371,381,390,410,416,422,438,541,858
include/qdk/chemistry/data/tapering.hpp        3       0     0%   46,80-81
include/qdk/chemistry/data/wavefunction.hpp
                                              25      19    76%   609,615,623-625,749
include/qdk/chemistry/data/wavefunction_containers/cas.hpp
                                               1       1   100%
include/qdk/chemistry/data/wavefunction_containers/cc.hpp
                                               1       1   100%
include/qdk/chemistry/data/wavefunction_containers/mp2.hpp
                                               1       1   100%
include/qdk/chemistry/data/wavefunction_containers/sci.hpp
                                               1       1   100%
include/qdk/chemistry/data/wavefunction_containers/sd.hpp
                                               1       1   100%
include/qdk/chemistry/utils/hash.hpp           4       4   100%
include/qdk/chemistry/utils/logger.hpp        41      35    85%   223-224,226,233-234,236
include/qdk/chemistry/utils/model_hamiltonians.hpp
                                             128     122    95%   59-60,89-90,137,141
include/qdk/chemistry/utils/string_utils.hpp
                                              11      10    90%   41
src/qdk/chemistry/algorithms/active_space.cpp
                                             227     141    62%   35-36,40-41,45-46,116-118,141-143,145,149-152,154-157,160-161,163-166,171-173,176-178,180-182,184-186,208,210,214,216-219,221-222,226-229,231,233,236-239,241,243,245-246,267-268,297,300,332,337-338,340-343,345-347,349-350,353,357,359-361,403,405,407
src/qdk/chemistry/algorithms/algorithm_defaults.cpp
                                              15       9    60%   41-45,49
src/qdk/chemistry/algorithms/dynamical_correlation_calculator.cpp
                                               8       8   100%
src/qdk/chemistry/algorithms/hamiltonian.cpp
                                              14      14   100%
src/qdk/chemistry/algorithms/localization.cpp
                                              15      15   100%
src/qdk/chemistry/algorithms/mc.cpp           11      11   100%
src/qdk/chemistry/algorithms/microsoft/active_space/autocas_active_space.cpp
                                              80      78    97%   103,133
src/qdk/chemistry/algorithms/microsoft/active_space/autocas_active_space.hpp
                                              16      16   100%
src/qdk/chemistry/algorithms/microsoft/active_space/entropy_active_space.cpp
                                              45      45   100%
src/qdk/chemistry/algorithms/microsoft/active_space/entropy_active_space.hpp
                                              10      10   100%
src/qdk/chemistry/algorithms/microsoft/active_space/occupation_active_space.cpp
                                              60      54    90%   46,48,81,83,101-102
src/qdk/chemistry/algorithms/microsoft/active_space/occupation_active_space.hpp
                                               6       6   100%
src/qdk/chemistry/algorithms/microsoft/active_space/valence_active_space.cpp
                                              75      63    84%   34,36,68-69,76-77,104-105,120-121,124-125
src/qdk/chemistry/algorithms/microsoft/active_space/valence_active_space.hpp
                                               9       9   100%
src/qdk/chemistry/algorithms/microsoft/cholesky_hamiltonian.cpp
                                             455     405    89%   98,102,420,439,442-443,462,473,476-477,507-508,557-558,564-566,573-574,581-582,616,619-620,635,643,645-647,682-686,768,770,782,788,801,807,869-870,872-873,876,981-982,984-985,988
src/qdk/chemistry/algorithms/microsoft/cholesky_hamiltonian.hpp
                                              12      12   100%
src/qdk/chemistry/algorithms/microsoft/hamiltonian.cpp
                                             250     228    91%   46-47,53-55,62-63,70-71,167-168,185-189,294,296,307,319,381,489
src/qdk/chemistry/algorithms/microsoft/hamiltonian.hpp
                                              11      11   100%
src/qdk/chemistry/algorithms/microsoft/localization/iterative_localizer_base.cpp
                                               5       5   100%
src/qdk/chemistry/algorithms/microsoft/localization/iterative_localizer_base.hpp
                                               8       8   100%
src/qdk/chemistry/algorithms/microsoft/localization/mp2_natural_orbitals.cpp
                                              79      74    93%   44,81,83,105,107
src/qdk/chemistry/algorithms/microsoft/localization/mp2_natural_orbitals.hpp
                                               3       3   100%
src/qdk/chemistry/algorithms/microsoft/localization/pipek_mezey.cpp
                                             171     162    94%   26,34,41,43,47,49,249,332,335
src/qdk/chemistry/algorithms/microsoft/localization/pipek_mezey.hpp
                                               6       6   100%
src/qdk/chemistry/algorithms/microsoft/localization/vvhv.cpp
                                             648     577    89%   336,338-339,452-453,476,534,695,739,741,746,762-765,768,778-781,784,819-821,827-831,859-862,865,887,889-891,968-972,1018-1022,1040-1043,1047-1050,1052-1054,1057,1131,1194-1196,1267,1286,1289,1293,1295,1300-1301
src/qdk/chemistry/algorithms/microsoft/localization/vvhv.hpp
                                               8       8   100%
src/qdk/chemistry/algorithms/microsoft/macis_asci.cpp
                                              69      66    95%   51,167,169
src/qdk/chemistry/algorithms/microsoft/macis_asci.hpp
                                              75      75   100%
src/qdk/chemistry/algorithms/microsoft/macis_base.cpp
                                              70      56    80%   29-31,91-92,95,99-100,103-105,112-114
src/qdk/chemistry/algorithms/microsoft/macis_base.hpp
                                              99      77    77%   84,86,88,90,92,94,205-207,209,212,214,217-219,221-223,225-227,229
src/qdk/chemistry/algorithms/microsoft/macis_cas.cpp
                                              59      56    94%   48,132,134
src/qdk/chemistry/algorithms/microsoft/macis_cas.hpp
                                               5       5   100%
src/qdk/chemistry/algorithms/microsoft/macis_pmc.cpp
                                              78      76    97%   110,149
src/qdk/chemistry/algorithms/microsoft/macis_pmc.hpp
                                               5       5   100%
src/qdk/chemistry/algorithms/microsoft/mp2.cpp
                                             204     186    91%   33,78,82-83,93-94,97,101-102,150-151,154-155,165-166,169,173-174
src/qdk/chemistry/algorithms/microsoft/mp2.hpp
                                               2       2   100%
src/qdk/chemistry/algorithms/microsoft/scf.cpp
                                             287     264    92%   62-63,75-76,91-92,118-119,149-150,158,160,214,261,335,367,372,374,400-402,421,492
src/qdk/chemistry/algorithms/microsoft/scf.hpp
                                              19      19   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/basis_set.h
                                               9       8    88%   134
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/enums.h
                                              16       0     0%   38-39,48-49,54-59,70-75
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/eri.h
                                              15      12    80%   46-47,49
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/exc.h
                                               3       3   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/moeri.h
                                               3       3   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/core/molecule.h
                                               1       1   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/eri/eri_multiplexer.h
                                               6       3    50%   126-127,135
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/cache.h
                                              27      26    96%   44
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/class_registry.h
                                              13      13   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/gauxc_registry.h
                                               6       5    83%   39
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/gauxc_util.h
                                              21      21   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/int1e.h
                                               2       2   100%
src/qdk/chemistry/algorithms/microsoft/scf/include/qdk/chemistry/scf/util/singleton.h
                                              13      13   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/core/basis_set.cpp
                                             361     279    77%   33-34,92-93,97-98,146,150-154,157-161,172,183-184,188,190-191,197-198,201-206,210,212-215,217,219,223,225-226,228-229,231,248,257,265-266,313-314,335,337,342-343,345-346,348,401,406-407,415,436,458,460-461,463-465,478,480,482-485,487,490,493-494,542,544,548-549
src/qdk/chemistry/algorithms/microsoft/scf/src/core/scf.cpp
                                               7       7   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/eri.cpp
                                              36      29    80%   58-60,65-66,89-90
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/eri_df_base.cpp
                                              34      32    94%   29-30
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/eri_df_base.h
                                               2       2   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/eri_multiplexer.cpp
                                              61      37    60%   16-17,26-29,40,46-49,52-55,79,81,83-85,87-88,91,93
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/INCORE/incore.cpp
                                              42      29    69%   40,42,44,66,68,70-72,74-75,77-79
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/INCORE/incore_impl.cpp
                                              96      88    91%   44,136,138,235,237,239,287,289
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/INCORE/incore_impl_df.cpp
                                             102      60    58%   86-87,89,203,205,207-214,216-221,224,227-233,236,253,256,263-264,286,291,305-306,309,320-321,323-324,326
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/LIBINT2_DIRECT/libint2_direct.cpp
                                             182     169    92%   268,606,608,610,908,910-913,916,918-920
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/moeri.cpp
                                              36      34    94%   32-33
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/schwarz.cpp
                                              33      13    39%   80-81,83-88,90-93,95-98,101-102,104,106
src/qdk/chemistry/algorithms/microsoft/scf/src/eri/SNK/snk.cpp
                                              66       0     0%   36,58-60,62-65,67,69-70,72,98,100,102-104,107-110,114-116,119-121,124-127,146,148,150,167-168,170,187,191,193-194,200-201,203,205-207,209,212,214,216-218,221,223,225-227,230,232,234-235,239-240,242-243
src/qdk/chemistry/algorithms/microsoft/scf/src/exc/exc.cpp
                                              16      14    87%   42-43
src/qdk/chemistry/algorithms/microsoft/scf/src/exc/GauXC/gauxc.cpp
                                              34      25    73%   42,46-47,50-52,54,56,67
src/qdk/chemistry/algorithms/microsoft/scf/src/exc/GauXC/gauxc_impl.cpp
                                             229     163    71%   79,119,160-161,249-258,260,262-270,352-353,360-364,366,368-377,380-381,383-384,387-389,396,398-399,405-409,411,413-417,419-420,426
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/cpscf.cpp
                                             234     232    99%   232,237
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/guess.cpp
                                              63      63   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/ks_impl.cpp
                                              81      63    77%   73,75-82,140,155-158,160-161,171-172
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/scf_impl.cpp
                                             547     414    75%   73,101,116,122,168-169,185-186,329-330,339-342,467,471,551,588,607-609,676,715-716,720-721,730-735,745,749-752,754-761,774-778,780-783,785-786,793-794,796-801,803-808,810,818-821,831-832,843-845,859-864,867-870,873,876,878,977-979,982,984,988-989,991-995,997-1000,1002-1003,1007,1009,1011-1019,1022-1025,1028-1030,1032,1034,1053,1055
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/scf_impl.h
                                              21      16    76%   98-100,113,161
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/scf_solver.cpp
                                              82      54    65%   35,37,51,55-59,66,68,90,92-93,101-103,111-113,126-128,131-133,141-143
src/qdk/chemistry/algorithms/microsoft/scf/src/scf/soad.cpp
                                              15       0     0%   189,192-204,208
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/asahf.cpp
                                             286     275    96%   49,51,68-69,101,271,464-465,506,530-531
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/diis.cpp
                                             278     259    93%   147,149,158-159,228,234,241,246,268-269,286,486-489,511,520,528,536
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/diis_gdm.cpp
                                              36      36   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/gdm.cpp
                                             401     366    91%   226,249,272,443-446,449-452,478-482,487,518-522,664,667-673,805,809,899,903,905
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/line_search.h
                                              63      62    98%   60
src/qdk/chemistry/algorithms/microsoft/scf/src/scf_algorithm/scf_algorithm.cpp
                                             143     130    90%   63,71-73,75,85-88,175-176,205,264
src/qdk/chemistry/algorithms/microsoft/scf/src/util/gauxc_util.cpp
                                              85      20    23%   26-31,34-43,48-49,52-59,63-66,68,70,72-74,81-88,92-99,106-111,115-118,122-123,134-135
src/qdk/chemistry/algorithms/microsoft/scf/src/util/int1e.cpp
                                             336     226    67%   206-209,211,243,288,290-296,298-303,305-311,314-315,326,328-329,569,592,622,699,702-703,705,713,755,757-758,762-771,780,782-783,787-796,805,807-808,812-824,826-829,838,941-942,946-954,956-962,964-967,976
src/qdk/chemistry/algorithms/microsoft/scf/src/util/libint2_util.cpp
                                             181      91    50%   39,42-45,47,49-51,53-54,58-60,64-66,72,74,76-79,81-82,85-91,94-95,97-102,104-107,109-119,125-126,477,483-490,492-495,497,499,503-504,506,560,562,566-569,571-573,576,580-582,584,627
src/qdk/chemistry/algorithms/microsoft/scf/src/util/matrix_exp.cpp
                                              53      53   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/util/mpi_vars.h
                                               2       2   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/util/opt/gmresxx/arnoldi/arnoldi.h
                                              12      12   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/util/opt/gmresxx/arnoldi/arnoldi_gmres.h
                                             202     168    83%   53-55,176,183,185-188,190-194,196,198,202,205,209,212,217-218,221,223,290,293-294,298,481-482,493,522-523,589
src/qdk/chemistry/algorithms/microsoft/scf/src/util/opt/gmresxx/linalg.h
                                              40      40   100%
src/qdk/chemistry/algorithms/microsoft/scf/src/util/timer.h
                                              29      29   100%
src/qdk/chemistry/algorithms/microsoft/stability.cpp
                                             314     291    92%   192-193,322-324,389,391,413,416-425,429,431,435,437,476
src/qdk/chemistry/algorithms/microsoft/stability.hpp
                                              13      13   100%
src/qdk/chemistry/algorithms/microsoft/utils.cpp
                                             248     171    69%   45-46,52,54,111-112,123-124,126-127,133,135,138-139,141,143-147,150-151,182,184,186,190-191,195,198-205,207-209,211,214-218,220-225,227-229,231,234-235,237,240-245,251,253-255,258-262,387-388,427,429
src/qdk/chemistry/algorithms/pmc.cpp           8       8   100%
src/qdk/chemistry/algorithms/scf.cpp           7       7   100%
src/qdk/chemistry/algorithms/stability.cpp
                                               6       6   100%
src/qdk/chemistry/data/ansatz.cpp            564     391    69%   26,36,39,46-48,50-51,53,55-56,58-60,62,69,84,99,104-105,107-108,115,120,122,148,150,212,214,285,300,302,307-308,341-345,350,352,362,364,367,369,379,381,384,386,403,405,410,412-413,419,421,426,428-429,447,449,454,456-457,462,464,469,471-472,474-475,477,481-482,484-485,487-488,490-491,493-497,499-500,502,505,508-513,515-516,519-521,523,526,528-529,562,572,582,592,614,621,625,639,643-644,654,664-665,672,681,697-700,703-704,707-709,711-712,714-716,732,740,757-760,795-796,805-806,817,825-826,837,848-849,856,865,882-885,888-889,892-894,896-897,899-901,907-908,919-920,944-947
src/qdk/chemistry/data/basis_set.cpp        1500    1304    86%   31,38,70,91-92,221,225,259-260,276-277,327-328,342,351,365,380,411,439,472,488,519-520,526-527,542-543,558-559,578,581-582,628,631-633,661,664-666,734,778,802,831,862,936-938,941-942,958,976,1009,1031,1061,1101,1118,1127,1145,1162,1174,1185,1275-1276,1330,1344,1357,1371,1386,1393,1403,1405,1412,1426-1427,1560,1617-1618,1632-1634,1636-1637,1643-1646,1655-1656,1822,1886-1887,1900-1901,2001,2009,2021,2057-2061,2063-2065,2068-2072,2105,2119-2123,2126-2135,2137-2140,2142-2146,2148-2150,2153-2156,2160-2161,2163,2165-2169,2172-2173,2177-2181,2185-2187,2193-2196,2198-2200,2203,2205,2207,2227-2228,2237-2238,2246-2248,2255-2256,2276-2277,2279,2296-2298,2363-2364,2366-2371,2377,2455,2485
src/qdk/chemistry/data/configuration.cpp     285     177    62%   67,178,181,183-184,187-188,190-191,194-195,197,201,205-206,215,221,247-249,277-279,282-283,285-294,296,298,300-303,305-306,308,310-311,313-315,318-319,321-322,324,326-327,329-336,338,340,342-345,347-348,352-353,355-359,362-363,365-366,369-370,372-379,381-382,384-392,432-433,443,445
src/qdk/chemistry/data/configuration_set.cpp
                                             328     209    63%   33-34,85-87,90-92,234,247,272-277,287-288,331-333,350-354,356,376-377,400-402,421,425,427,429,431-434,436-437,439,441-442,444-447,450-451,453-455,458-463,465-466,468-478,480,482,484-487,489-490,494-495,497-501,503,506-508,510-514,517-524,526-527,529-540
src/qdk/chemistry/data/filename_utils.hpp
                                              44      26    59%   30-33,35-36,51-53,72-75,77-78,93-95
src/qdk/chemistry/data/hamiltonian.cpp       566     374    66%   28,31,33,36-39,41,46,48,52,54-56,71,74-75,80-83,85-88,95,97-99,102-104,107-114,116,124-127,130-132,137,157-159,178-179,187-188,191-192,205-209,225-229,237,239,245,247,269,271-274,286,291,293-294,299-300,305,307-308,321,332,334,338,341,419-432,434,437-438,441-444,446-449,452-455,457-460,464-467,469-472,475-479,481-484,486-489,491-494,497-498,504,518,527-528,546,549-550,582,595,607,620,633,646,653,672,690,697,704,711-713,719,730-731,751-752,768-769,777-778,803-807,838,840-841,906-908
src/qdk/chemistry/data/hamiltonian_containers/canonical_four_center.cpp
                                             283     233    82%   79-80,104,121,141-142,182,188-190,224-225,236,242-245,247,251,254-255,290,298,308,313,319-320,326-327,333-334,336,338-339,341,355-357,421-422,430-431,455,461,468-469,475-476,492-493
src/qdk/chemistry/data/hamiltonian_containers/cholesky.cpp
                                             387     285    73%   62,88-89,113,167-170,172-173,176,178,180-183,186-188,191,193,195-196,199-201,204-205,208-209,212-221,223-224,254,260-262,282-287,296-297,313,335-336,347-348,351-352,366-367,396,417,425,435,440,446-447,453-454,460-461,463,465-466,468,497-499,552-554,564,568-569,578-579,603,609,616-617,623-624,631-633,638-639,647-648
src/qdk/chemistry/data/hamiltonian_containers/sparse.cpp
                                             415     362    87%   35,182-184,235,255-258,272-275,377-379,411,448-454,456,484-492,494,497,500-501,507-510,519-520,525,623,632,648,651-653,655,657
src/qdk/chemistry/data/hdf5_error_handling.hpp
                                              10       3    30%   20-21,23,25-26,28-29
src/qdk/chemistry/data/hdf5_serialization.cpp
                                             256     142    55%   13,15-22,24,26-32,34,36-44,46,48-56,71,73-74,95,98,106-109,111-113,115-116,119-121,124-127,138,141,143-150,153-160,238-240,249-251,253-255,258-260,277-280,282-286,288-289,322-326,328-329,343,346-352
src/qdk/chemistry/data/json_serialization.cpp
                                             177     106    59%   29,38,45-47,57,64-68,70-71,83,90-92,94-98,100,102-103,105,114,120-121,128-129,131,133-134,136-139,141,143-146,148-149,152-153,155,163-164,173,178-179,188-189,196,201,210,220-222,232-236,260-264
src/qdk/chemistry/data/lattice_graph.cpp     590     320    54%   39-42,53-56,102,104-105,107-110,112,114-115,117-120,169,196,199,202,245,248,251,306,309,312,359,362,365,445,456,524,612,626,639-640,642-649,651,653,655-658,660-661,663,665-666,669-673,677-680,682-685,687-688,690-691,693-694,696-698,700-702,704,706-707,709-710,713-715,718-721,724-726,728-736,740-742,745-755,757-765,767-768,770-777,779,781,783-786,788-789,793-794,796-800,802-805,807-808,810-811,813-814,816-817,820-821,823-832,834,836-839,841-848,850-851,853-854,856-857,859-864,866-867,869-877,879-881,884-886,888-890,892-895,897-898,900,902-913,915,918-921,923-937,939-940,942-943
src/qdk/chemistry/data/majorana_map_engine.cpp
                                             268     254    94%   95,126-131,137,160,231,532-535
src/qdk/chemistry/data/majorana_mapping.cpp
                                             202      62    30%   39,41,48,51,53-54,84-85,90-94,100-103,113-115,117,119-122,124,131-134,137-140,150-152,155-159,161-163,165-166,168-174,178-183,185-188,190,192-195,197,199,201-207,211-223,225,227-228,230-232,234,236-237,239-242,244-245,247-250,252-255,257-261,263-267,269-273,275-279,281,283-284,286-287,289
src/qdk/chemistry/data/majorana_mapping_factories.cpp
                                             220     147    66%   68,117,147,200-203,206-207,209,211-217,219-220,223-224,226-230,233-235,237-242,247-248,250-254,256-257,259-260,262-266,268-269,271-273,275-276,283,314,317-320,322-323,325,327-330,333-334
src/qdk/chemistry/data/orbitals.cpp         1347    1059    78%   109-110,131,147-148,154-155,159-160,184,186,227-228,248-249,328,335,356,359,361-362,365-369,372-373,377-380,382-383,385,387,389-390,393-396,399,403,405-406,409,411,413-414,417-423,426-427,430-431,433-434,436,438,440-441,444-448,451,454,456-457,531-535,538-539,541-542,544-545,548-549,552,554-555,557-558,560-561,563-564,567-569,572,574-575,577-578,580-581,583-584,587-588,591,593-594,666-667,675-676,713,733,735,745,747,750,752,808,814,819,833,846,852,857,884,894,938-942,980,993,1005,1018,1038,1056,1065,1155-1156,1181-1185,1193-1194,1225-1227,1254-1255,1266-1267,1274-1275,1286-1287,1294-1295,1314,1316-1324,1327-1329,1331-1332,1335-1336,1338-1339,1341,1344,1347,1350-1351,1357,1425,1429,1483-1484,1505-1506,1508-1512,1515,1518,1520,1523,1525,1528,1530-1532,1534-1536,1539-1541,1543-1545,1547-1550,1560,1569-1572,1574-1577,1579-1582,1644-1645,1675-1677,1692-1694,1728-1729,1741-1742,1927-1931,1944-1945,1948,1951-1952,1955-1957,1959,1999,2036,2051-2053,2102-2103,2138-2139,2145-2146,2152-2153,2155-2156,2159-2160,2162-2163,2170,2186-2187
src/qdk/chemistry/data/pauli_operator.cpp
                                             792     683    86%   17,19-24,26,28-29,31-52,54,56-58,103,106,130-131,233,245-246,267,440,450,464-466,560,598-600,602-604,620-622,624-626,649,652,764,849,861,863-864,898,903-905,920,925-927,955,981-985,987,989,994,999,1039,1057-1059,1072,1079-1080,1082-1087,1105,1116-1119,1245,1265,1343,1386
src/qdk/chemistry/data/settings.cpp         1236     599    48%   40-43,68-70,81,85,95-101,126-134,136-140,158-163,166-169,171-175,177-181,183,185-188,190-195,197-201,203-213,217-226,239,243,280,292-295,297-299,302-306,308-309,311-313,315-316,318-319,362-363,366,381,412-413,416-418,420-425,427,429-434,437,457-461,464-465,468,470,476,478,480,484,486,488,492,536-537,539,541,543-544,546-549,553-554,556-558,561-562,566-568,571-573,577,579,582-587,592-596,598-608,610-613,615-619,621-625,628,632-635,639-643,647-650,653-657,659-660,662,664-667,669-671,673-674,676-678,680,682-684,686-690,693-697,699,701-703,705-707,709-713,716-720,722,724-726,729-731,733,736-738,741-742,745-752,754-755,757-758,761-762,764-770,773-779,783,786-787,790-791,794-795,798-799,802-806,808,810,812-813,815-818,820-821,823-824,826-829,831-832,834,836-839,842,844-847,851-856,860-861,863,865-868,872,875-876,889,895,898,905,908,916,920,941-942,959-962,971,974,982-983,999-1004,1006,1008-1009,1052-1055,1057-1059,1071-1072,1084,1086,1231,1235-1238,1240-1241,1244,1246-1248,1250-1253,1255-1259,1264,1266-1269,1272,1274-1275,1281-1282,1285-1290,1292,1296,1298,1301,1308,1312-1314,1320,1324,1327-1328,1333,1335-1337,1341,1386,1393,1411,1462-1464,1494,1500-1503,1525-1526,1561-1562,1564,1593-1595,1614-1619,1645-1647,1649,1651-1652,1655-1657,1659-1661,1667,1688-1695,1698-1701,1757,1785,1800-1802,1808-1816,1818,1821-1824,1826-1835,1837-1846,1849-1856,1858-1860,1863-1873,1875-1880,1882-1884,1886-1892,1894-1896,1898,1900,1902-1906,1908-1912,1914-1916,1918-1919,1921-1928,1930-1939,1941-1943,1945-1947,1963
src/qdk/chemistry/data/stability_result.cpp
                                             317     292    92%   25,32,42,176,213,218,271,281,299,315,344,346,350,356,379,419,421,425,451,458,503-507
src/qdk/chemistry/data/structure.cpp         761     703    92%   86,101,115-116,127,140,159,176-177,204,245-246,295,479,492,512,530,649,665,802,816,964-966,974-975,985,995-996,1018-1019,1027,1055-1057,1063,1076,1122-1123,1126,1132-1135,1138-1147,1151-1153,1156
src/qdk/chemistry/data/symmetry/symmetry.cpp
                                             373     316    84%   25,77-78,81-83,118-122,124,153,173-174,207-208,227,249-250,302-303,310-313,315,345,365-366,375,377-381,383-384,386,414,436-437,447,449-451,453-454,456-457,470-471,490-491,508-509,528
src/qdk/chemistry/data/symmetry/symmetry_blocked_index_set.cpp
                                             165     118    71%   85,87-91,115-119,121-122,139-140,149,151-155,157-158,160,167,189-192,196-200,202-205,223-224,234,236-239,241-242
src/qdk/chemistry/data/symmetry/symmetry_blocked_tensor.cpp
                                             112     101    90%   89-90,92,96,123,139,146,165,167-168,184
src/qdk/chemistry/data/tapering.cpp          126       0     0%   20-26,29-32,35-38,41,43,45-46,48-49,51-54,56-59,62-63,65-66,69,71,74-79,81,83-84,87-91,93,95-97,99-101,104-107,109-110,112,114-116,118-121,123-129,131-134,136-139,141-149,151-156,158-160,162-166,168,170-173,175,177-180,182,184,186,188-189,191-192,194
src/qdk/chemistry/data/wavefunction.cpp     1151     987    85%   46,66,175,178,186-188,270,339,467,483,504,509,525,546,563,566,589,592,595-601,631,645,658,660,665,667,689-690,732-736,741-744,753-756,766,780,782-783,797,799,802-803,824-827,829,864,866-867,892,909,1035,1165-1168,1196,1203,1209,1216,1232,1238-1240,1246,1257,1287-1288,1303-1304,1311-1312,1332,1337-1338,1344,1355,1391,1489-1490,1535-1536,1546-1547,1574,1600-1601,1631-1632,1678-1683,1685-1687,1695-1698,1710-1713,1749,1751,1754-1755,1763-1765,1783-1785,1787-1788,1794-1797,1800-1810,1812-1813,1815-1818,1821-1824,1826-1828,1830-1831,1833-1834
src/qdk/chemistry/data/wavefunction_containers/cas.cpp
                                             271     225    83%   93-94,96-99,114,159-160,164,166,170,172,176-177,189-191,197,199-202,205-208,225-226,229-230,335-337,357,373-374,386,397,420-421,491-495
src/qdk/chemistry/data/wavefunction_containers/cc.cpp
                                             878     525    59%   48,52,57,59,62,66,71-72,74-77,79,87-88,122-127,153-160,169-175,203-204,206-220,222-224,226-228,231,233-234,250,258-259,261,267,277,287,299,319,324,326-328,331-334,337,339-340,343,345-349,351-352,354-355,358-359,381-383,385-387,389-391,393-395,397-399,425,432,463-466,528-529,595-596,599,601,603,606-607,609-610,612,615,617-620,622-624,627-628,630,633,637,639-640,643,687,696-697,699,705-706,708-709,716,728,737-738,747-748,754,790,800,810,820,830,841,940-950,952-956,969-979,981,983-985,1058-1069,1071-1083,1085-1091,1093-1100,1115-1126,1128-1140,1142-1148,1150-1156,1171-1181,1183-1195,1197-1200,1202,1204-1207,1223-1232,1234-1246,1248-1251,1253-1257,1322-1324,1326-1327,1330,1332-1333,1335,1337-1338,1342-1344
src/qdk/chemistry/data/wavefunction_containers/mp2.cpp
                                             604     423    70%   32,36,40-41,45-47,60-62,78,85,110,139,150-151,179-180,228-229,245,315,320,322-324,327-329,332-335,338-343,345-351,353-355,376,439-440,470-471,479,492-494,496,500-502,504,537,546-547,549,555-556,558-559,566,578,587-588,608,625-626,629-630,633,635-641,643-646,648,650,652,654-660,662-665,667,669,671,673-679,681-684,686,690-699,705-714,720-729,736-738,740-741,745,747-748,750-752,756-759,761,927,933,935,966-967,970-971,975,977,1048,1064-1065,1069-1070
src/qdk/chemistry/data/wavefunction_containers/sci.cpp
                                             232     197    84%   95-96,98-101,115,149,151,153-154,164-165,168-169,258-260,280,296-297,309,320,343-344,423-427,430-434
src/qdk/chemistry/data/wavefunction_containers/sd.cpp
                                             387     326    84%   17,42-46,54,56-60,111,113,118,120,136-137,140,143-144,154,156,159-160,198,200,203-204,268,270,273,299,301,304,306,359,361,457,487-488,491,501-502,505,552,561,567,581,589-592,636-637,654-655,673-674,684-685
src/qdk/chemistry/utils/logger.cpp           120     115    95%   201-203,237,281
src/qdk/chemistry/utils/orbital_rotation.cpp
                                              97      58    59%   60-62,141-143,146,150-151,153,155-156,177,179,181,183,186-187,189,193-194,197-200,203,205-206,208,211-214,217,221-222,224,226-227
src/qdk/chemistry/utils/valence_space.cpp
                                              57      54    94%   73,102,106
------------------------------------------------------------------------------
TOTAL                                      24843   19298    77%
------------------------------------------------------------------------------
Python Coverage Details
src/qdk_chemistry/data/unitary_representation/containers/__init__.py                                  0      0   100%
src/qdk_chemistry/data/unitary_representation/containers/base.py                                     28      0   100%
src/qdk_chemistry/data/unitary_representation/containers/pauli_product_formula.py                   107      5    95%
src/qdk_chemistry/definitions.py                                                                      8      0   100%
src/qdk_chemistry/plugins/__init__.py                                                                 0      0   100%
src/qdk_chemistry/plugins/networkx/__init__.py                                                       19      0   100%
src/qdk_chemistry/plugins/networkx/term_grouper.py                                                   36      1    97%
src/qdk_chemistry/plugins/openfermion/__init__.py                                                    19      0   100%
src/qdk_chemistry/plugins/openfermion/conversion.py                                                  78      0   100%
src/qdk_chemistry/plugins/openfermion/qubit_mapper.py                                                49      0   100%
src/qdk_chemistry/plugins/pyscf/__init__.py                                                          18      0   100%
src/qdk_chemistry/plugins/pyscf/active_space_avas.py                                                 80      7    91%
src/qdk_chemistry/plugins/pyscf/conversion.py                                                       264     16    94%
src/qdk_chemistry/plugins/pyscf/coupled_cluster.py                                                  101     27    73%
src/qdk_chemistry/plugins/pyscf/localization.py                                                      72      8    89%
src/qdk_chemistry/plugins/pyscf/mcscf.py                                                            125     15    88%
src/qdk_chemistry/plugins/pyscf/scf_solver.py                                                       102      5    95%
src/qdk_chemistry/plugins/pyscf/stability.py                                                        154      2    99%
src/qdk_chemistry/plugins/qiskit/__init__.py                                                         56      0   100%
src/qdk_chemistry/plugins/qiskit/_interop/__init__.py                                                 0      0   100%
src/qdk_chemistry/plugins/qiskit/_interop/circuit.py                                                130      0   100%
src/qdk_chemistry/plugins/qiskit/_interop/noise_model.py                                             26      4    85%
src/qdk_chemistry/plugins/qiskit/_interop/qir.py                                                     87     23    74%
src/qdk_chemistry/plugins/qiskit/_interop/transpiler.py                                             194     11    94%
src/qdk_chemistry/plugins/qiskit/circuit_executor.py                                                 77     10    87%
src/qdk_chemistry/plugins/qiskit/conversion.py                                                       31      0   100%
src/qdk_chemistry/plugins/qiskit/phase_estimation_circuit_builder.py                                117      5    96%
src/qdk_chemistry/plugins/qiskit/qubit_mapper.py                                                     40      0   100%
src/qdk_chemistry/plugins/qiskit/regular_isometry.py                                                 40      0   100%
src/qdk_chemistry/utils/__init__.py                                                                   4      0   100%
src/qdk_chemistry/utils/cubegen.py                                                                   54     54     0%
src/qdk_chemistry/utils/enum.py                                                                      23     10    57%
src/qdk_chemistry/utils/model_hamiltonians.py                                                        95     10    89%
src/qdk_chemistry/utils/pauli_commutation.py                                                        115      3    97%
src/qdk_chemistry/utils/pauli_matrix.py                                                              74      0   100%
src/qdk_chemistry/utils/phase.py                                                                     39      1    97%
src/qdk_chemistry/utils/qsharp/__init__.py                                                           17      0   100%
src/qdk_chemistry/utils/telemetry.py                                                                142     87    39%
src/qdk_chemistry/utils/telemetry_events.py                                                          59     48    19%
src/qdk_chemistry/utils/wavefunction.py                                                              57     57     0%
---------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                              6377    713    89%
Coverage HTML written to dir ../coverage-reports/python_coverage_html
Coverage XML written to file ../coverage-reports/python_coverage.xml
=========================== short test summary info ============================
SKIPPED [2] tests/test_docs_examples.py:195: Skipping slow test. Set QDK_CHEMISTRY_RUN_SLOW_TESTS=1 to enable.
SKIPPED [1] tests/test_docs_examples.py:195: release_notes example requires v1.1.x (installed: 2.0.0+local)
SKIPPED [1] tests/test_sample_workflow.py:240: Skipping slow test. Set QDK_CHEMISTRY_RUN_SLOW_TESTS=1 to enable.
SKIPPED [1] tests/test_sample_workflow.py:268: Skipping slow test. Set QDK_CHEMISTRY_RUN_SLOW_TESTS=1 to enable.
========== 1851 passed, 5 skipped, 31 warnings in 1163.15s (0:19:23) ===========
Pybind11 Coverage Details
------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: .
------------------------------------------------------------------------------
File                                       Lines     Exec  Cover   Missing
------------------------------------------------------------------------------
src/pybind11/algorithms/active_space.cpp      38       38   100%
src/pybind11/algorithms/davidson_solver.cpp
                                              35       34    97%   28
src/pybind11/algorithms/dynamical_correlation_calculator.cpp
                                              31       31   100%
src/pybind11/algorithms/factory_bindings.hpp
                                             288      239    83%   32,32,32,32,32,32,32,32-33,33,33,33,33,33,33,33-34,34,34,34,34,34,34,34-35,35,35,35,35,35,35,35-36,36,36,36,36,36,36,36,249,249,249,249,249,249,249,249,249
src/pybind11/algorithms/hamiltonian.cpp       36       36   100%
src/pybind11/algorithms/localizer.cpp         38       38   100%
src/pybind11/algorithms/mc.cpp                37       37   100%
src/pybind11/algorithms/mcscf.cpp             34       34   100%
src/pybind11/algorithms/pmc.cpp               36       35    97%   178
src/pybind11/algorithms/scf.cpp               35       35   100%
src/pybind11/algorithms/stability.cpp         34       34   100%
src/pybind11/algorithms/syev_solver.cpp       19       18    94%   43
src/pybind11/constants.cpp                    89       89   100%
src/pybind11/data/ansatz.cpp                  69       69   100%
src/pybind11/data/basis_set.cpp              224      212    94%   62-68,70-71,232-233,235
src/pybind11/data/configuration.cpp           30       29    96%   200
src/pybind11/data/configuration_set.cpp       84       84   100%
src/pybind11/data/data_class.cpp             109       27    24%   19-20,23-24,27,29,32,34-37,39-44,46,48-49,52,54,57-59,64,67,71-72,75,78-79,81-82,90,92,94-96,98,101,104-105,107,110,113-115,117-120,124,126,128-129,131,133,135-137,139,141,143-145,150-151,153,156-157,159,162-163,165,168-169,171,174,176,178,249
src/pybind11/data/element_data.cpp           123      123   100%
src/pybind11/data/hamiltonian.cpp            284      275    96%   62,65,67,524,543,746,766,966,987
src/pybind11/data/lattice_graph.cpp          122       96    78%   20,23,25,27,29-30,51,53-54,66-69,71-72,249,476-478,482,501,512,615,617,619,621
src/pybind11/data/majorana_mapping.cpp       217      181    83%   50-53,99-101,106-107,120-121,123,160-166,191-193,195-198,269-271,276-277,283-285,290-291
src/pybind11/data/orbitals.cpp               149      148    99%   978
src/pybind11/data/path_utils.hpp              19       11    57%   37,39,42-47
src/pybind11/data/pauli_operator.cpp         278      233    83%   154,265,330,406,411,417,423,435,475,481,513,519,525,537,577,612,644,649,663,667,675,712-713,716-721,723-726,752-753,755-760,762-765
src/pybind11/data/property_binding_helpers.hpp
                                             240      240   100%
src/pybind11/data/serialization.cpp            5        5   100%
src/pybind11/data/settings.cpp               840      575    68%   40-41,57-58,110-111,117-118,123-124,129,131,136,138,164-168,177-179,182-185,190-194,198-200,210-213,217-221,230-233,237-242,246-249,259-262,266-270,273-277,281-291,293-311,313-327,333,335,337-338,342,345-347,381,383,400,450,452-453,536,544-546,548,552,571-577,633-636,643-649,651,654,656,658-661,668,670,713,784,1444,1452,1458,1461,1580,1614,1692,1755,1780,1805,1831,1895,1983-1984,1986-1990,2024-2028,2030-2035,2086,2140,2166-2167,2169,2172-2175,2201,2243-2244,2246-2247,2278-2279,2281,2284-2287,2314-2316,2337-2339,2341-2342,2361-2367,2387-2389,2391-2392,2414-2418,2420-2425,2456-2457,2475-2481,2503-2504,2522-2528
src/pybind11/data/stability_result.cpp       112      112   100%
src/pybind11/data/structure.cpp              199      184    92%   69,72,75-78,82-84,87,90-91,969,977,999
src/pybind11/data/symmetry/symmetry.cpp      127      107    84%   63,77-78,83-84,89-90,95,101,107,133-134,139-140,145-146,151,157,163,202
src/pybind11/data/symmetry/symmetry_blocked_index_set.cpp
                                              51       42    82%   38,63-64,75-76,81-82,95-96
src/pybind11/data/symmetry/symmetry_blocked_sparse_map.cpp
                                              33       20    60%   30-33,35-36,45-48,50-51,62
src/pybind11/data/symmetry/symmetry_blocked_tensor.cpp
                                             282      282   100%
src/pybind11/data/wavefunction.cpp           386      361    93%   39,51,53-54,107,109,203,214,226,238,321-322,325,329,335,530-534,536,1073,1075,1121,1124
src/pybind11/module.cpp                       53       53   100%
src/pybind11/qdk_scf_config.cpp               12       12   100%
src/pybind11/utils/logger.cpp                191      177    92%   27,54,68-69,92,97-99,105-106,262-263,476,480
src/pybind11/utils/model_hamiltonians.cpp
                                              62       62   100%
src/pybind11/utils/orbital_rotation.cpp        7        7   100%
src/pybind11/utils/valence_space.cpp           6        6   100%
------------------------------------------------------------------------------
TOTAL                                       5064     4431    87%
------------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant