nwqlib 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nwqlib-1.0.0/.python-version +1 -0
- nwqlib-1.0.0/CONTRIBUTING.md +13 -0
- nwqlib-1.0.0/LICENSE +24 -0
- nwqlib-1.0.0/MANIFEST.in +5 -0
- nwqlib-1.0.0/PKG-INFO +169 -0
- nwqlib-1.0.0/README.md +104 -0
- nwqlib-1.0.0/docs/CODE_TOUR.md +256 -0
- nwqlib-1.0.0/docs/ENGINEERING_CONSTANTS.md +671 -0
- nwqlib-1.0.0/docs/ENVIRONMENT_LOCK.txt +181 -0
- nwqlib-1.0.0/docs/FRAMEWORK.md +346 -0
- nwqlib-1.0.0/docs/MAINTENANCE.md +207 -0
- nwqlib-1.0.0/docs/ROADMAP.md +246 -0
- nwqlib-1.0.0/docs/aer.md +85 -0
- nwqlib-1.0.0/docs/algorithm_protocol.md +115 -0
- nwqlib-1.0.0/docs/algorithms/expectation.md +176 -0
- nwqlib-1.0.0/docs/algorithms/gcim.md +134 -0
- nwqlib-1.0.0/docs/algorithms/lanczos.md +107 -0
- nwqlib-1.0.0/docs/algorithms/lchs.md +212 -0
- nwqlib-1.0.0/docs/algorithms/qhd.md +878 -0
- nwqlib-1.0.0/docs/algorithms/qls.md +209 -0
- nwqlib-1.0.0/docs/algorithms/qpe.md +163 -0
- nwqlib-1.0.0/docs/api/algorithms/expectation.md +17 -0
- nwqlib-1.0.0/docs/api/algorithms/gcim.md +19 -0
- nwqlib-1.0.0/docs/api/algorithms/lanczos.md +15 -0
- nwqlib-1.0.0/docs/api/algorithms/lchs.md +13 -0
- nwqlib-1.0.0/docs/api/algorithms/qhd.md +119 -0
- nwqlib-1.0.0/docs/api/algorithms/qls.md +13 -0
- nwqlib-1.0.0/docs/api/algorithms/qpe.md +25 -0
- nwqlib-1.0.0/docs/api/evidence.md +29 -0
- nwqlib-1.0.0/docs/api/index.md +13 -0
- nwqlib-1.0.0/docs/api/subroutines/block_encoding.md +47 -0
- nwqlib-1.0.0/docs/api/subroutines/fermionic_pool.md +39 -0
- nwqlib-1.0.0/docs/api/subroutines/hamiltonian_evolution.md +21 -0
- nwqlib-1.0.0/docs/api/subroutines/lcu.md +31 -0
- nwqlib-1.0.0/docs/api/subroutines/pauli_decomposition.md +14 -0
- nwqlib-1.0.0/docs/api/subroutines/qpe.md +18 -0
- nwqlib-1.0.0/docs/api/subroutines/qsp.md +44 -0
- nwqlib-1.0.0/docs/api/subroutines/state_preparation.md +36 -0
- nwqlib-1.0.0/docs/api/subroutines/trotterization.md +5 -0
- nwqlib-1.0.0/docs/api/workflow.md +124 -0
- nwqlib-1.0.0/docs/backends.md +66 -0
- nwqlib-1.0.0/docs/blocks.md +172 -0
- nwqlib-1.0.0/docs/cli.md +56 -0
- nwqlib-1.0.0/docs/contract-specimen/README.md +78 -0
- nwqlib-1.0.0/docs/contract-specimen/claims.json +75 -0
- nwqlib-1.0.0/docs/contract-specimen/records.schema.json +119 -0
- nwqlib-1.0.0/docs/contract-specimen/specimen.json +1232 -0
- nwqlib-1.0.0/docs/dependency_issues.md +118 -0
- nwqlib-1.0.0/docs/development/design_rationale.md +101 -0
- nwqlib-1.0.0/docs/development/execution.md +71 -0
- nwqlib-1.0.0/docs/development/input_contracts.md +55 -0
- nwqlib-1.0.0/docs/development/reports.md +19 -0
- nwqlib-1.0.0/docs/error_evidence.md +85 -0
- nwqlib-1.0.0/docs/examples.md +75 -0
- nwqlib-1.0.0/docs/fault-tolerant-resources.md +127 -0
- nwqlib-1.0.0/docs/ibm.md +30 -0
- nwqlib-1.0.0/docs/index.md +52 -0
- nwqlib-1.0.0/docs/inputs.md +95 -0
- nwqlib-1.0.0/docs/ionq.md +37 -0
- nwqlib-1.0.0/docs/ir.md +153 -0
- nwqlib-1.0.0/docs/mathematics.md +2174 -0
- nwqlib-1.0.0/docs/nexus.md +88 -0
- nwqlib-1.0.0/docs/nwqsim.md +82 -0
- nwqlib-1.0.0/docs/own_circuit.md +228 -0
- nwqlib-1.0.0/docs/prepared_execution.md +76 -0
- nwqlib-1.0.0/docs/profiles.md +95 -0
- nwqlib-1.0.0/docs/qasm-streaming.md +76 -0
- nwqlib-1.0.0/docs/quickstart.md +81 -0
- nwqlib-1.0.0/docs/records/README.md +57 -0
- nwqlib-1.0.0/docs/references.md +369 -0
- nwqlib-1.0.0/docs/release_notes.md +27 -0
- nwqlib-1.0.0/docs/resources.md +138 -0
- nwqlib-1.0.0/docs/run_archives.md +130 -0
- nwqlib-1.0.0/docs/saved_evidence.md +39 -0
- nwqlib-1.0.0/docs/scientist.md +75 -0
- nwqlib-1.0.0/docs/scripts/check_adapt_records.py +118 -0
- nwqlib-1.0.0/docs/scripts/check_algorithm_protocol.py +164 -0
- nwqlib-1.0.0/docs/scripts/check_core_records.py +376 -0
- nwqlib-1.0.0/docs/scripts/check_df_records.py +144 -0
- nwqlib-1.0.0/docs/scripts/check_lchs_records.py +76 -0
- nwqlib-1.0.0/docs/scripts/check_ordered_operator_records.py +84 -0
- nwqlib-1.0.0/docs/scripts/check_prepared_records.py +161 -0
- nwqlib-1.0.0/docs/scripts/check_profile_records.py +210 -0
- nwqlib-1.0.0/docs/scripts/check_qasm_records.py +99 -0
- nwqlib-1.0.0/docs/scripts/check_qhd_records.py +254 -0
- nwqlib-1.0.0/docs/scripts/check_qls_records.py +105 -0
- nwqlib-1.0.0/docs/scripts/check_qpe_records.py +126 -0
- nwqlib-1.0.0/docs/scripts/check_scientist_records.py +227 -0
- nwqlib-1.0.0/docs/scripts/contract_specimen.py +386 -0
- nwqlib-1.0.0/docs/scripts/golden_snapshot.py +299 -0
- nwqlib-1.0.0/docs/scripts/mutation_probes.py +3430 -0
- nwqlib-1.0.0/docs/scripts/policy_lint.py +505 -0
- nwqlib-1.0.0/docs/scripts/qsp_phase_solver_sweep.py +141 -0
- nwqlib-1.0.0/docs/search.md +49 -0
- nwqlib-1.0.0/docs/slurm.md +100 -0
- nwqlib-1.0.0/docs/verification.md +127 -0
- nwqlib-1.0.0/docs/why_nwqlib.md +76 -0
- nwqlib-1.0.0/examples/README.md +28 -0
- nwqlib-1.0.0/examples/gcim_lanczos_qpe_eigenvalue_intro.ipynb +1181 -0
- nwqlib-1.0.0/examples/generators/build_notebooks.py +165 -0
- nwqlib-1.0.0/examples/generators/gcim_lanczos_qpe_eigenvalue_intro.py +682 -0
- nwqlib-1.0.0/examples/generators/lchs_linear_dynamics_intro.py +649 -0
- nwqlib-1.0.0/examples/generators/lchs_scientific.py +700 -0
- nwqlib-1.0.0/examples/generators/qhd_optimization_intro.py +848 -0
- nwqlib-1.0.0/examples/generators/qhd_scientific.py +1122 -0
- nwqlib-1.0.0/examples/generators/qls_linear_system_intro.py +585 -0
- nwqlib-1.0.0/examples/generators/qls_scientific.py +628 -0
- nwqlib-1.0.0/examples/generators/resource_estimation_at_scale.py +1620 -0
- nwqlib-1.0.0/examples/lchs_linear_dynamics_intro.ipynb +1204 -0
- nwqlib-1.0.0/examples/lchs_scientific.ipynb +1197 -0
- nwqlib-1.0.0/examples/qhd_optimization_intro.ipynb +1476 -0
- nwqlib-1.0.0/examples/qhd_scientific.ipynb +1825 -0
- nwqlib-1.0.0/examples/qls_linear_system_intro.ipynb +1139 -0
- nwqlib-1.0.0/examples/qls_scientific.ipynb +1035 -0
- nwqlib-1.0.0/examples/resource_estimation_at_scale.ipynb +2505 -0
- nwqlib-1.0.0/mkdocs.yml +155 -0
- nwqlib-1.0.0/pyproject.toml +133 -0
- nwqlib-1.0.0/setup.cfg +4 -0
- nwqlib-1.0.0/src/nwqlib/__init__.py +63 -0
- nwqlib-1.0.0/src/nwqlib/__main__.py +5 -0
- nwqlib-1.0.0/src/nwqlib/_choice_archive.py +768 -0
- nwqlib-1.0.0/src/nwqlib/_counts.py +168 -0
- nwqlib-1.0.0/src/nwqlib/_limits.py +11 -0
- nwqlib-1.0.0/src/nwqlib/_linalg_laws.py +243 -0
- nwqlib-1.0.0/src/nwqlib/_numerics.py +288 -0
- nwqlib-1.0.0/src/nwqlib/_optional.py +13 -0
- nwqlib-1.0.0/src/nwqlib/_phase_product.py +119 -0
- nwqlib-1.0.0/src/nwqlib/_preparation_laws.py +93 -0
- nwqlib-1.0.0/src/nwqlib/_prepared_execution.py +5346 -0
- nwqlib-1.0.0/src/nwqlib/_projected_eigensolver.py +442 -0
- nwqlib-1.0.0/src/nwqlib/_qpy_archive.py +270 -0
- nwqlib-1.0.0/src/nwqlib/_quantum_readout.py +1071 -0
- nwqlib-1.0.0/src/nwqlib/_remote_preparation.py +200 -0
- nwqlib-1.0.0/src/nwqlib/_run_archive.py +1035 -0
- nwqlib-1.0.0/src/nwqlib/_run_journal.py +575 -0
- nwqlib-1.0.0/src/nwqlib/_sqlite_bytes.py +8 -0
- nwqlib-1.0.0/src/nwqlib/_validation.py +477 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/__init__.py +68 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/_eigen_inputs.py +494 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/_eigen_support.py +178 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/authoring.py +175 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/expectation.py +2938 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/expectation_metadata.py +37 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/__init__.py +39 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt.py +1315 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_acquisition.py +2547 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_actions.py +264 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_archive.py +349 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_inputs.py +1049 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_records.py +643 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/adapt_verification.py +749 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/chemistry.py +793 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/fixed_basis.py +2447 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/optimization.py +452 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/pair_reducer.py +336 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/pencil.py +229 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/gcim/sector.py +132 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/__init__.py +12 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/archive.py +78 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/method.py +1217 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/numerical.py +908 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/readout.py +490 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/records.py +339 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lanczos/workflow.py +285 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/__init__.py +27 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/analysis.py +330 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/archive.py +274 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/compiled_selection.py +766 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/host.py +689 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/host_pf.py +424 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/inhomogeneous_theory.py +240 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/method.py +318 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/native.py +715 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/parameters.py +552 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/periodic.py +476 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/primary_records.py +415 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/provider_config.py +80 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/providers.py +1649 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/quantum.py +403 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/quantum_resources.py +516 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/references.py +188 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/refinement.py +344 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/select_synthesis.py +531 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/selected_grid.py +586 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/selection.py +182 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/solution_error_budget.py +583 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/source_selection.py +135 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/time_independent_common.py +39 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/time_independent_terms.py +2694 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/lchs/verification.py +396 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/protocol.py +152 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/__init__.py +44 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/_durable.py +535 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/_outer.py +453 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/archive.py +255 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/binary.py +1729 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/circuit_errors.py +677 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/compiler.py +699 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/constrained.py +3654 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/constrained_records.py +1483 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/decoding.py +262 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/evolution_bounds.py +696 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/grid.py +286 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/initial_state.py +914 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/kinetic.py +170 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/method.py +4577 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/native.py +285 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/objective.py +184 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/potential.py +281 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/records.py +1318 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/refinement.py +2908 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/refinement_records.py +1238 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/resources.py +1627 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/schedules.py +792 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/split_step.py +807 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/theory.py +733 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/validation.py +209 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qhd/verification.py +553 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/__init__.py +18 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/archive.py +303 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/constants.py +49 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/host_planning.py +986 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/method.py +862 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/norm_search.py +443 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/numerical.py +264 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/periodic.py +123 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/primary_records.py +763 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/quantum.py +2019 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qls/verification.py +628 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/__init__.py +13 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/archive.py +174 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/controller.py +334 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/method.py +2165 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/numerical.py +919 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/powers.py +1449 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/records.py +1623 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/qpe/verification.py +346 -0
- nwqlib-1.0.0/src/nwqlib/algorithms/registry.py +187 -0
- nwqlib-1.0.0/src/nwqlib/amplitudes.py +257 -0
- nwqlib-1.0.0/src/nwqlib/artifacts.py +680 -0
- nwqlib-1.0.0/src/nwqlib/backends/__init__.py +59 -0
- nwqlib-1.0.0/src/nwqlib/backends/_auxiliary_process.py +167 -0
- nwqlib-1.0.0/src/nwqlib/backends/_native/nwqsim_runner.cpp +828 -0
- nwqlib-1.0.0/src/nwqlib/backends/_qpy_buffer.py +17 -0
- nwqlib-1.0.0/src/nwqlib/backends/assessment.py +2057 -0
- nwqlib-1.0.0/src/nwqlib/backends/capabilities.py +203 -0
- nwqlib-1.0.0/src/nwqlib/backends/connection.py +506 -0
- nwqlib-1.0.0/src/nwqlib/backends/host.py +11 -0
- nwqlib-1.0.0/src/nwqlib/backends/ibm_runtime.py +743 -0
- nwqlib-1.0.0/src/nwqlib/backends/inspection.py +235 -0
- nwqlib-1.0.0/src/nwqlib/backends/ionq.py +578 -0
- nwqlib-1.0.0/src/nwqlib/backends/nexus.py +635 -0
- nwqlib-1.0.0/src/nwqlib/backends/nwqec.py +469 -0
- nwqlib-1.0.0/src/nwqlib/backends/nwqsim.py +1166 -0
- nwqlib-1.0.0/src/nwqlib/backends/profiles.py +300 -0
- nwqlib-1.0.0/src/nwqlib/backends/qiskit_aer.py +1074 -0
- nwqlib-1.0.0/src/nwqlib/backends/qre.py +354 -0
- nwqlib-1.0.0/src/nwqlib/backends/resources.py +119 -0
- nwqlib-1.0.0/src/nwqlib/backends/results.py +90 -0
- nwqlib-1.0.0/src/nwqlib/backends/slurm.py +660 -0
- nwqlib-1.0.0/src/nwqlib/backends/targets.py +26 -0
- nwqlib-1.0.0/src/nwqlib/backends/telemetry.py +407 -0
- nwqlib-1.0.0/src/nwqlib/blocks/__init__.py +18 -0
- nwqlib-1.0.0/src/nwqlib/blocks/_archive.py +156 -0
- nwqlib-1.0.0/src/nwqlib/blocks/_qiskit_intake.py +321 -0
- nwqlib-1.0.0/src/nwqlib/blocks/encoding.py +215 -0
- nwqlib-1.0.0/src/nwqlib/blocks/kernels.py +131 -0
- nwqlib-1.0.0/src/nwqlib/blocks/lowering.py +407 -0
- nwqlib-1.0.0/src/nwqlib/blocks/records.py +354 -0
- nwqlib-1.0.0/src/nwqlib/blocks/selection.py +759 -0
- nwqlib-1.0.0/src/nwqlib/cli.py +142 -0
- nwqlib-1.0.0/src/nwqlib/core/__init__.py +11 -0
- nwqlib-1.0.0/src/nwqlib/core/analysis.py +356 -0
- nwqlib-1.0.0/src/nwqlib/core/planning.py +1588 -0
- nwqlib-1.0.0/src/nwqlib/core/records.py +553 -0
- nwqlib-1.0.0/src/nwqlib/evidence/__init__.py +54 -0
- nwqlib-1.0.0/src/nwqlib/evidence/_work.py +145 -0
- nwqlib-1.0.0/src/nwqlib/evidence/binary.py +563 -0
- nwqlib-1.0.0/src/nwqlib/evidence/energy_shift.py +601 -0
- nwqlib-1.0.0/src/nwqlib/evidence/error_model.py +886 -0
- nwqlib-1.0.0/src/nwqlib/evidence/records.py +125 -0
- nwqlib-1.0.0/src/nwqlib/evidence/scalar_bound.py +198 -0
- nwqlib-1.0.0/src/nwqlib/evidence/sector.py +118 -0
- nwqlib-1.0.0/src/nwqlib/evidence/statistics.py +226 -0
- nwqlib-1.0.0/src/nwqlib/evidence/verification.py +226 -0
- nwqlib-1.0.0/src/nwqlib/execution.py +1921 -0
- nwqlib-1.0.0/src/nwqlib/io/__init__.py +10 -0
- nwqlib-1.0.0/src/nwqlib/io/materialization.py +103 -0
- nwqlib-1.0.0/src/nwqlib/io/qasm.py +88 -0
- nwqlib-1.0.0/src/nwqlib/io/streaming.py +504 -0
- nwqlib-1.0.0/src/nwqlib/ir/__init__.py +19 -0
- nwqlib-1.0.0/src/nwqlib/ir/expressions.py +182 -0
- nwqlib-1.0.0/src/nwqlib/ir/records.py +434 -0
- nwqlib-1.0.0/src/nwqlib/ir/selection.py +111 -0
- nwqlib-1.0.0/src/nwqlib/ir/validation.py +972 -0
- nwqlib-1.0.0/src/nwqlib/operators/__init__.py +32 -0
- nwqlib-1.0.0/src/nwqlib/operators/_factorized.py +219 -0
- nwqlib-1.0.0/src/nwqlib/operators/_fermion.py +305 -0
- nwqlib-1.0.0/src/nwqlib/operators/_pauli.py +697 -0
- nwqlib-1.0.0/src/nwqlib/operators/access.py +114 -0
- nwqlib-1.0.0/src/nwqlib/operators/df.py +412 -0
- nwqlib-1.0.0/src/nwqlib/operators/inputs.py +698 -0
- nwqlib-1.0.0/src/nwqlib/operators/refinement.py +375 -0
- nwqlib-1.0.0/src/nwqlib/problems/__init__.py +29 -0
- nwqlib-1.0.0/src/nwqlib/problems/inputs.py +524 -0
- nwqlib-1.0.0/src/nwqlib/problems/records.py +780 -0
- nwqlib-1.0.0/src/nwqlib/problems/scalars.py +127 -0
- nwqlib-1.0.0/src/nwqlib/py.typed +1 -0
- nwqlib-1.0.0/src/nwqlib/reporting/__init__.py +5 -0
- nwqlib-1.0.0/src/nwqlib/reporting/records.py +21 -0
- nwqlib-1.0.0/src/nwqlib/resources/__init__.py +17 -0
- nwqlib-1.0.0/src/nwqlib/resources/fold.py +1065 -0
- nwqlib-1.0.0/src/nwqlib/resources/records.py +416 -0
- nwqlib-1.0.0/src/nwqlib/saved_evidence.py +418 -0
- nwqlib-1.0.0/src/nwqlib/scientist.py +637 -0
- nwqlib-1.0.0/src/nwqlib/search.py +705 -0
- nwqlib-1.0.0/src/nwqlib/serialization.py +54 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/__init__.py +1 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_dense_synthesis.py +1422 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_matrix_checks.py +30 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_mcx_counts.py +36 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_multiplexors.py +827 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_power_of_two.py +25 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_registry_utils.py +70 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_semantic.py +124 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/_serialization.py +37 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/block_encoding/__init__.py +34 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/block_encoding/banded.py +313 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/block_encoding/core.py +1682 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/block_encoding/registry.py +65 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/dense_matrices.py +52 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/fermionic_circuits.py +869 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/fermionic_pool.py +1232 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/hamiltonian_evolution/__init__.py +29 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/hamiltonian_evolution/pauli_evolution.py +442 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/hamiltonian_evolution/pauli_ir.py +89 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/hamiltonian_evolution/pauli_labels.py +112 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/hamiltonian_evolution/sparse_pauli_product.py +81 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/lcu/__init__.py +26 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/lcu/core.py +687 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/lcu/data.py +106 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/lcu/registry.py +41 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/pauli_decomposition.py +241 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qiskit_compat.py +630 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qpe/__init__.py +15 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qpe/coherent.py +189 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qsp/__init__.py +42 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qsp/evolution.py +1566 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qsp/inverse.py +354 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qsp/phases.py +743 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/qsp/shortcut.py +220 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/state_preparation/__init__.py +41 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/state_preparation/direct.py +163 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/state_preparation/mps.py +451 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/state_preparation/mps_circuit.py +450 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/trotterization/__init__.py +32 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/trotterization/error_budget.py +1967 -0
- nwqlib-1.0.0/src/nwqlib/subroutines/xacc.py +118 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/PKG-INFO +169 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/SOURCES.txt +508 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/dependency_links.txt +1 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/entry_points.txt +2 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/requires.txt +64 -0
- nwqlib-1.0.0/src/nwqlib.egg-info/top_level.txt +1 -0
- nwqlib-1.0.0/tests/_fermionic_references.py +190 -0
- nwqlib-1.0.0/tests/_h2_sto3g_reference.py +60 -0
- nwqlib-1.0.0/tests/_hadamard_method.py +433 -0
- nwqlib-1.0.0/tests/_hadamard_method_metadata.py +32 -0
- nwqlib-1.0.0/tests/_lchs_suzuki_reference.py +151 -0
- nwqlib-1.0.0/tests/_pf_branch_comparison.py +182 -0
- nwqlib-1.0.0/tests/_profile_fixtures.py +269 -0
- nwqlib-1.0.0/tests/_qsp_references.py +141 -0
- nwqlib-1.0.0/tests/author_method_fixture.py +25 -0
- nwqlib-1.0.0/tests/conftest.py +154 -0
- nwqlib-1.0.0/tests/data/qls_native_selected.json +113 -0
- nwqlib-1.0.0/tests/test_absolute_structure_predicates.py +51 -0
- nwqlib-1.0.0/tests/test_adapt_admission.py +323 -0
- nwqlib-1.0.0/tests/test_adapt_gcim.py +178 -0
- nwqlib-1.0.0/tests/test_adapt_gcim_efficiency_contract.py +353 -0
- nwqlib-1.0.0/tests/test_adapt_h2_anchors.py +55 -0
- nwqlib-1.0.0/tests/test_adapt_native_cache.py +234 -0
- nwqlib-1.0.0/tests/test_adapt_preserved_science.py +121 -0
- nwqlib-1.0.0/tests/test_adapt_primary.py +553 -0
- nwqlib-1.0.0/tests/test_adapt_shift_science.py +219 -0
- nwqlib-1.0.0/tests/test_adapt_verification.py +273 -0
- nwqlib-1.0.0/tests/test_algorithm_protocol.py +180 -0
- nwqlib-1.0.0/tests/test_amplitude_masses.py +235 -0
- nwqlib-1.0.0/tests/test_archive_boundaries.py +128 -0
- nwqlib-1.0.0/tests/test_backend_baseline.py +705 -0
- nwqlib-1.0.0/tests/test_block_encoding.py +1217 -0
- nwqlib-1.0.0/tests/test_code_review_fixes.py +602 -0
- nwqlib-1.0.0/tests/test_contract_specimen.py +221 -0
- nwqlib-1.0.0/tests/test_controller_frontiers.py +404 -0
- nwqlib-1.0.0/tests/test_core_records.py +624 -0
- nwqlib-1.0.0/tests/test_dense_control_route.py +297 -0
- nwqlib-1.0.0/tests/test_dense_synthesis.py +542 -0
- nwqlib-1.0.0/tests/test_df.py +50 -0
- nwqlib-1.0.0/tests/test_encoding_selection.py +308 -0
- nwqlib-1.0.0/tests/test_error_model.py +453 -0
- nwqlib-1.0.0/tests/test_examples.py +424 -0
- nwqlib-1.0.0/tests/test_expectation_current.py +633 -0
- nwqlib-1.0.0/tests/test_expectation_inference.py +811 -0
- nwqlib-1.0.0/tests/test_factorized_operators.py +129 -0
- nwqlib-1.0.0/tests/test_fermionic_pool.py +952 -0
- nwqlib-1.0.0/tests/test_foundation_imports.py +116 -0
- nwqlib-1.0.0/tests/test_gcim_adapt_inputs.py +145 -0
- nwqlib-1.0.0/tests/test_gcim_chemistry.py +658 -0
- nwqlib-1.0.0/tests/test_gcim_native_chain.py +150 -0
- nwqlib-1.0.0/tests/test_gcim_native_preparations.py +111 -0
- nwqlib-1.0.0/tests/test_gcim_pencil.py +241 -0
- nwqlib-1.0.0/tests/test_gcim_production.py +1115 -0
- nwqlib-1.0.0/tests/test_hamiltonian_evolution.py +159 -0
- nwqlib-1.0.0/tests/test_ibm_backend.py +906 -0
- nwqlib-1.0.0/tests/test_input_access.py +385 -0
- nwqlib-1.0.0/tests/test_ionq_backend.py +785 -0
- nwqlib-1.0.0/tests/test_ir.py +652 -0
- nwqlib-1.0.0/tests/test_lanczos.py +500 -0
- nwqlib-1.0.0/tests/test_lanczos_circuits.py +218 -0
- nwqlib-1.0.0/tests/test_lchs_compiled_select.py +734 -0
- nwqlib-1.0.0/tests/test_lchs_default.py +72 -0
- nwqlib-1.0.0/tests/test_lchs_initial.py +199 -0
- nwqlib-1.0.0/tests/test_lchs_low_somma.py +159 -0
- nwqlib-1.0.0/tests/test_lchs_numerics.py +710 -0
- nwqlib-1.0.0/tests/test_lchs_periodic.py +322 -0
- nwqlib-1.0.0/tests/test_lchs_primary.py +1012 -0
- nwqlib-1.0.0/tests/test_lchs_providers.py +891 -0
- nwqlib-1.0.0/tests/test_lchs_qsp_source.py +67 -0
- nwqlib-1.0.0/tests/test_lchs_resource_structural_law.py +913 -0
- nwqlib-1.0.0/tests/test_lchs_select_synthesis.py +639 -0
- nwqlib-1.0.0/tests/test_lchs_solution_error_budget.py +276 -0
- nwqlib-1.0.0/tests/test_lchs_structured_select.py +404 -0
- nwqlib-1.0.0/tests/test_lchs_verification.py +731 -0
- nwqlib-1.0.0/tests/test_lcu_subroutines.py +391 -0
- nwqlib-1.0.0/tests/test_mcx_counts.py +19 -0
- nwqlib-1.0.0/tests/test_metadata_identity.py +460 -0
- nwqlib-1.0.0/tests/test_mps_state_preparation.py +586 -0
- nwqlib-1.0.0/tests/test_multiplexors.py +481 -0
- nwqlib-1.0.0/tests/test_nexus_backend.py +541 -0
- nwqlib-1.0.0/tests/test_nexus_sdk.py +201 -0
- nwqlib-1.0.0/tests/test_nexus_workflow.py +305 -0
- nwqlib-1.0.0/tests/test_nwqec_compilation.py +392 -0
- nwqlib-1.0.0/tests/test_nwqsim_backend.py +539 -0
- nwqlib-1.0.0/tests/test_nwqsim_targets.py +954 -0
- nwqlib-1.0.0/tests/test_observation_schedule.py +2003 -0
- nwqlib-1.0.0/tests/test_operator_refinement.py +96 -0
- nwqlib-1.0.0/tests/test_plan_estimate.py +206 -0
- nwqlib-1.0.0/tests/test_prepared_contracts.py +613 -0
- nwqlib-1.0.0/tests/test_prepared_execution.py +842 -0
- nwqlib-1.0.0/tests/test_prepared_resources.py +266 -0
- nwqlib-1.0.0/tests/test_profile_assessment.py +766 -0
- nwqlib-1.0.0/tests/test_profile_telemetry.py +235 -0
- nwqlib-1.0.0/tests/test_projected_eigensolver.py +138 -0
- nwqlib-1.0.0/tests/test_provider_optional_errors.py +49 -0
- nwqlib-1.0.0/tests/test_public_cli.py +169 -0
- nwqlib-1.0.0/tests/test_qasm_streaming.py +547 -0
- nwqlib-1.0.0/tests/test_qhd_augmented_lagrangian.py +2040 -0
- nwqlib-1.0.0/tests/test_qhd_binary.py +833 -0
- nwqlib-1.0.0/tests/test_qhd_campaigns.py +54 -0
- nwqlib-1.0.0/tests/test_qhd_corrections.py +322 -0
- nwqlib-1.0.0/tests/test_qhd_efficiency_contract.py +120 -0
- nwqlib-1.0.0/tests/test_qhd_periodic.py +320 -0
- nwqlib-1.0.0/tests/test_qhd_readout.py +762 -0
- nwqlib-1.0.0/tests/test_qhd_refinement.py +1340 -0
- nwqlib-1.0.0/tests/test_qhd_resources.py +1586 -0
- nwqlib-1.0.0/tests/test_qhd_resume.py +903 -0
- nwqlib-1.0.0/tests/test_qhd_schedules.py +346 -0
- nwqlib-1.0.0/tests/test_qhd_split_step.py +807 -0
- nwqlib-1.0.0/tests/test_qhd_workflow.py +2444 -0
- nwqlib-1.0.0/tests/test_qls_native.py +231 -0
- nwqlib-1.0.0/tests/test_qls_periodic.py +249 -0
- nwqlib-1.0.0/tests/test_qls_primary.py +836 -0
- nwqlib-1.0.0/tests/test_qls_quantum.py +1505 -0
- nwqlib-1.0.0/tests/test_qls_workflow.py +435 -0
- nwqlib-1.0.0/tests/test_qpe_campaigns.py +87 -0
- nwqlib-1.0.0/tests/test_qpe_correction.py +846 -0
- nwqlib-1.0.0/tests/test_qpe_domain_evidence.py +193 -0
- nwqlib-1.0.0/tests/test_qpe_efficiency_contract.py +926 -0
- nwqlib-1.0.0/tests/test_qpe_selected.py +767 -0
- nwqlib-1.0.0/tests/test_qpe_subroutines.py +97 -0
- nwqlib-1.0.0/tests/test_qpe_workflow.py +395 -0
- nwqlib-1.0.0/tests/test_qpy_archive.py +202 -0
- nwqlib-1.0.0/tests/test_qre_projection.py +183 -0
- nwqlib-1.0.0/tests/test_qsp_evolution.py +1324 -0
- nwqlib-1.0.0/tests/test_quantum_readout.py +343 -0
- nwqlib-1.0.0/tests/test_remote_preparation.py +128 -0
- nwqlib-1.0.0/tests/test_report_domains.py +291 -0
- nwqlib-1.0.0/tests/test_report_extension.py +474 -0
- nwqlib-1.0.0/tests/test_resource_estimation_tiers.py +165 -0
- nwqlib-1.0.0/tests/test_resource_fold.py +844 -0
- nwqlib-1.0.0/tests/test_run_archive.py +527 -0
- nwqlib-1.0.0/tests/test_run_journal.py +717 -0
- nwqlib-1.0.0/tests/test_run_lifecycle.py +1163 -0
- nwqlib-1.0.0/tests/test_run_provenance.py +199 -0
- nwqlib-1.0.0/tests/test_saved_cli.py +125 -0
- nwqlib-1.0.0/tests/test_saved_evidence.py +395 -0
- nwqlib-1.0.0/tests/test_scientist.py +319 -0
- nwqlib-1.0.0/tests/test_scientist_eigen.py +819 -0
- nwqlib-1.0.0/tests/test_scientist_lchs.py +486 -0
- nwqlib-1.0.0/tests/test_search.py +370 -0
- nwqlib-1.0.0/tests/test_selected_runtime.py +207 -0
- nwqlib-1.0.0/tests/test_semantic_blocks.py +759 -0
- nwqlib-1.0.0/tests/test_shared_contracts.py +141 -0
- nwqlib-1.0.0/tests/test_slurm.py +265 -0
- nwqlib-1.0.0/tests/test_slurm_integration.py +527 -0
- nwqlib-1.0.0/tests/test_static_runtime.py +268 -0
- nwqlib-1.0.0/tests/test_synthesis_admission.py +560 -0
- nwqlib-1.0.0/tests/test_trotter_efficiency_contract.py +156 -0
- nwqlib-1.0.0/tests/test_trotterization.py +942 -0
- nwqlib-1.0.0/tests/test_verification_catalogue.py +406 -0
- nwqlib-1.0.0/tests/test_xacc.py +163 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12.14
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
NWQLib provides quantum algorithm workflows with explicitly selected native SDK extras. Before changing algorithm behavior, read [docs/FRAMEWORK.md](docs/FRAMEWORK.md) for the package contract, execution modes, backend capability policy, reporting standards, and testing expectations. The package root lazily exposes scientist and finite-search operations; import additional public classes and functions from their owning subpackage. Keep changes scoped to one focused capability or fix. Avoid new dependencies unless the framework requires them, and record user-facing behavior through typed records, validation results, reports, and focused tests. Before submitting changes, run the checks in [docs/MAINTENANCE.md](docs/MAINTENANCE.md). A Method that submits your own circuit and returns its counts needs a `descriptor` and two hooks, `plan` and `analyze`, shown in [docs/own_circuit.md](docs/own_circuit.md).
|
|
4
|
+
|
|
5
|
+
## Environment Lock
|
|
6
|
+
|
|
7
|
+
`docs/ENVIRONMENT_LOCK.txt` records the interpreter version and exact package versions used for validation. When resuming work, verify the selected interpreter, imported source location and dependency versions before using their results as evidence. Resumption does not automatically recreate or change an environment. Follow [docs/MAINTENANCE.md](docs/MAINTENANCE.md) for the selected environment and checks appropriate to an authorized dependency change.
|
|
8
|
+
|
|
9
|
+
Public dataclass docstrings use an `Args:` or `Attributes:` section that names every field exactly once. Literal-valued fields list their accepted spellings. Scientific quantities state non-obvious units, normalization, and shape.
|
|
10
|
+
|
|
11
|
+
Example notebooks are generated from their percent-format sources in `examples/generators/`. Edit the source, regenerate the notebook, and run the freshness check rather than maintaining two independent copies of example logic.
|
|
12
|
+
|
|
13
|
+
Generated figures identify their reproducible input or are marked as illustrative. Captions state whether plotted resources describe a full algorithm circuit, an oracle, or a subroutine, and synthesis comparisons name the method, state family, seed, and approximation parameters. Mathematical quantities must satisfy their actual domains before evidence is assessed. A justified roundoff adjustment requires an explicit scale-aware policy, retention of the raw value and disclosure of the adjustment. Signed statistical estimators retain their distinct meaning; formatting must not silently turn them into bounded physical quantities. See [Mathematical Definitions Before Evidence](docs/FRAMEWORK.md#mathematical-definitions-before-evidence).
|
nwqlib-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Battelle Memorial Institute
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
nwqlib-1.0.0/MANIFEST.in
ADDED
nwqlib-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nwqlib
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Evidence-aware quantum algorithms and scientific workflows.
|
|
5
|
+
Author: NWQLib developers
|
|
6
|
+
License-Expression: BSD-2-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/pnnl/NWQLib
|
|
8
|
+
Project-URL: Documentation, https://pnnl.github.io/NWQLib/
|
|
9
|
+
Project-URL: Repository, https://github.com/pnnl/NWQLib
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: numpy>=2.5.2
|
|
14
|
+
Requires-Dist: scipy>=1.18.1
|
|
15
|
+
Requires-Dist: sympy>=1.14.0
|
|
16
|
+
Requires-Dist: pydantic<3,>=2.13.5
|
|
17
|
+
Provides-Extra: qiskit
|
|
18
|
+
Requires-Dist: qiskit>=2.5.2; extra == "qiskit"
|
|
19
|
+
Provides-Extra: aer
|
|
20
|
+
Requires-Dist: qiskit>=2.5.2; extra == "aer"
|
|
21
|
+
Requires-Dist: qiskit-aer>=0.17.2; extra == "aer"
|
|
22
|
+
Provides-Extra: nwqec
|
|
23
|
+
Requires-Dist: qiskit>=2.5.2; extra == "nwqec"
|
|
24
|
+
Requires-Dist: nwqec==0.1.2; extra == "nwqec"
|
|
25
|
+
Provides-Extra: qre
|
|
26
|
+
Requires-Dist: qdk[qre]==1.32.3; extra == "qre"
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: jsonschema>=4.26.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
|
|
31
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
32
|
+
Provides-Extra: qasm
|
|
33
|
+
Requires-Dist: qiskit>=2.5.2; extra == "qasm"
|
|
34
|
+
Requires-Dist: openqasm3[parser]>=1.0.1; extra == "qasm"
|
|
35
|
+
Requires-Dist: qiskit-qasm3-import>=0.6.0; extra == "qasm"
|
|
36
|
+
Provides-Extra: notebook
|
|
37
|
+
Requires-Dist: jupyter>=1.0; extra == "notebook"
|
|
38
|
+
Requires-Dist: ipykernel>=6.0; extra == "notebook"
|
|
39
|
+
Requires-Dist: nbclient>=0.10; extra == "notebook"
|
|
40
|
+
Requires-Dist: matplotlib>=3.7; extra == "notebook"
|
|
41
|
+
Provides-Extra: docs
|
|
42
|
+
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
|
|
43
|
+
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
|
|
44
|
+
Provides-Extra: tensor
|
|
45
|
+
Requires-Dist: qiskit>=2.5.2; extra == "tensor"
|
|
46
|
+
Provides-Extra: chemistry
|
|
47
|
+
Requires-Dist: qiskit>=2.5.2; extra == "chemistry"
|
|
48
|
+
Requires-Dist: openfermion>=1.5; extra == "chemistry"
|
|
49
|
+
Requires-Dist: pyscf>=2.6; extra == "chemistry"
|
|
50
|
+
Provides-Extra: ibm
|
|
51
|
+
Requires-Dist: qiskit>=2.5.2; extra == "ibm"
|
|
52
|
+
Requires-Dist: qiskit-ibm-runtime>=0.49.0; extra == "ibm"
|
|
53
|
+
Provides-Extra: ionq
|
|
54
|
+
Requires-Dist: qiskit>=2.5.2; extra == "ionq"
|
|
55
|
+
Requires-Dist: qiskit-ionq>=1.1.1; extra == "ionq"
|
|
56
|
+
Requires-Dist: requests>=2.34.2; extra == "ionq"
|
|
57
|
+
Requires-Dist: urllib3>=2.8.0; extra == "ionq"
|
|
58
|
+
Provides-Extra: nexus
|
|
59
|
+
Requires-Dist: qiskit>=2.5.2; extra == "nexus"
|
|
60
|
+
Requires-Dist: qnexus>=0.49.0; extra == "nexus"
|
|
61
|
+
Requires-Dist: pytket>=2.18.1; extra == "nexus"
|
|
62
|
+
Requires-Dist: pytket-qiskit>=0.78.0; extra == "nexus"
|
|
63
|
+
Requires-Dist: selene-core>=0.3.2; extra == "nexus"
|
|
64
|
+
Dynamic: license-file
|
|
65
|
+
|
|
66
|
+
# NWQLib: Northwest Quantum Library
|
|
67
|
+
|
|
68
|
+
[](https://doi.org/10.5281/zenodo.23074265)
|
|
69
|
+
|
|
70
|
+
**Documentation: <https://pnnl.github.io/NWQLib/>**
|
|
71
|
+
|
|
72
|
+
NWQLib applies quantum algorithms to scientific problems. A workflow connects your inputs and requested output to a selected method, execution and a report of the result, evidence and resources. Native circuit execution uses Qiskit and an explicitly selected backend.
|
|
73
|
+
|
|
74
|
+
IR# PNNL-SA-227989
|
|
75
|
+
|
|
76
|
+
## Start here
|
|
77
|
+
|
|
78
|
+
**The [example notebooks](examples/) solve complete scientific problems from input to result, error and circuit cost, and the [examples guide](docs/examples.md) points you to the one that matches your problem. The [mathematics page](docs/mathematics.md) states the bounds, resource laws and error budgets that NWQLib uses, each with its proof or source and the code that implements it.**
|
|
79
|
+
|
|
80
|
+
From a source checkout, install the package with the local Aer executor:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
python -m pip install -e ".[aer]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To solve `du/dt = -A u` with a small physical input:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from nwqlib import LinearDynamics, solve
|
|
90
|
+
from nwqlib.algorithms import LCHS
|
|
91
|
+
|
|
92
|
+
problem = LinearDynamics(
|
|
93
|
+
A=[[0.4, 0.15], [0.05, 0.25]],
|
|
94
|
+
initial_state=[1.0, 0.0],
|
|
95
|
+
time=0.1,
|
|
96
|
+
)
|
|
97
|
+
result = solve(problem, method=LCHS())
|
|
98
|
+
print(result.solution)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The default returns the physical solution approximation using nine total qubits. The [quickstart](docs/quickstart.md) compares it with an independent reference and shows how to change the approximation. The base install, `python -m pip install -e .`, supports metadata, admitted inputs, default LCHS planning and supported classical methods. Other planning paths follow their Method's input/conversion requirements; native preparation and execution require the selected backend extra. Method guides describe these boundaries.
|
|
102
|
+
|
|
103
|
+
The notebooks in `examples/` apply NWQLib to molecular ground-state energy, a linear system, linear dynamics and optimization, and one estimates the resources of a linear system, heat flow, two spin chains, a GCiM trial basis and a QHD optimization step at up to 100 qubits. The [examples guide](docs/examples.md) describes the work each notebook performs.
|
|
104
|
+
|
|
105
|
+
## Choose a task
|
|
106
|
+
|
|
107
|
+
| Task | Read |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| Learn the Python workflow | [Quickstart](docs/quickstart.md), [examples](docs/examples.md) |
|
|
110
|
+
| Compare NWQLib with other quantum packages | [Why NWQLib](docs/why_nwqlib.md) |
|
|
111
|
+
| Discover methods or use the command line | [CLI guide](docs/cli.md) |
|
|
112
|
+
| Compare methods and inspect results | [Scientist workflow](docs/scientist.md) |
|
|
113
|
+
| Supply operators and states | [Input access](docs/inputs.md) |
|
|
114
|
+
| Estimate resources and assess a device | [Resource estimates](docs/resources.md), [device profiles](docs/profiles.md) |
|
|
115
|
+
| Run locally or submit to a provider | [Prepared execution](docs/prepared_execution.md), [backends](docs/backends.md) |
|
|
116
|
+
| Save results or continue a workflow | [Saved evidence](docs/saved_evidence.md), [run archives](docs/run_archives.md) |
|
|
117
|
+
| Look up a signature | [API reference](docs/api/index.md) |
|
|
118
|
+
| Check known defects in Qiskit and other dependencies, and how NWQLib handles them | [Dependency issues](docs/dependency_issues.md) |
|
|
119
|
+
| Extend or maintain NWQLib | [Run your own circuit](docs/own_circuit.md), [Contributing](CONTRIBUTING.md), [code tour](docs/CODE_TOUR.md), [maintenance](docs/MAINTENANCE.md) |
|
|
120
|
+
| Trace code to its paper, equation and reason | [Code tour](docs/CODE_TOUR.md#find-the-source-and-reason-for-a-line-of-code), [references](docs/references.md) |
|
|
121
|
+
| Find the bound, resource law or error budget behind a result, its proof or source, and its code | [Mathematics](docs/mathematics.md) |
|
|
122
|
+
|
|
123
|
+
## Algorithms
|
|
124
|
+
|
|
125
|
+
| Scientific task | Methods |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| Normalized expectation of a finite real Pauli sum | [Expectation](docs/algorithms/expectation.md) |
|
|
128
|
+
| Energy estimates from moments or a selected subspace | [Chebyshev Lanczos](docs/algorithms/lanczos.md), [fixed and adaptive GCiM](docs/algorithms/gcim.md) |
|
|
129
|
+
| Phase or energy estimation | [QPE: QCELS, RWPE, SPE and RFE](docs/algorithms/qpe.md) |
|
|
130
|
+
| Time-independent linear dynamics | [LCHS](docs/algorithms/lchs.md) |
|
|
131
|
+
| Linear systems | [QLS: QSVT inverse polynomial (`qsvt_inverse`, the default) and the Dalzell kernel shortcut (`shortcut_native_svp`, `shortcut_dilation`)](docs/algorithms/qls.md) |
|
|
132
|
+
| Box-constrained optimization | [QHD](docs/algorithms/qhd.md) |
|
|
133
|
+
| Optimization over a box with equality or inequality constraints | [QHD augmented Lagrangian](docs/algorithms/qhd.md#constrained-problems) |
|
|
134
|
+
|
|
135
|
+
Methods report the quantity actually obtained and any unresolved accuracy conditions. A projected energy, local statistical interval or completed simulation does not by itself establish the full requested scientific claim. The [roadmap](docs/ROADMAP.md) records current limitations and open work. Reusable state preparation, block encoding, LCU, QSP/QSVT and evolution primitives have their own [API references](docs/api/index.md).
|
|
136
|
+
|
|
137
|
+
## Backend support
|
|
138
|
+
|
|
139
|
+
Aer supports local execution. NWQ-Sim CPU execution and process-exit continuation have been exercised on macOS and Linux with the qualified build described in the [backend guide](docs/backends.md). IBM Runtime, IonQ and Nexus have offline SDK and injected-result qualification. Live provider accounts, queues and QPUs remain unqualified. Slurm and GPU/site support have their documented offline qualification boundaries.
|
|
140
|
+
|
|
141
|
+
The [Nexus guide](docs/nexus.md#costs-timeout-and-qualification) documents its pandas dependency exception and missing per-request timeout. See [Slurm](docs/slurm.md) for explicit site configuration. Each method/backend/readout combination must satisfy its own capability checks.
|
|
142
|
+
|
|
143
|
+
## Authors and Developers
|
|
144
|
+
|
|
145
|
+
For questions, bug reports or collaboration, contact Muqing Zheng (muqing.zheng@pnnl.gov).
|
|
146
|
+
|
|
147
|
+
Affiliations are those at the time of contribution.
|
|
148
|
+
|
|
149
|
+
- Muqing Zheng, Pacific Northwest National Laboratory
|
|
150
|
+
- Chenxu Liu, Pacific Northwest National Laboratory
|
|
151
|
+
- Zhixin Song, Pacific Northwest National Laboratory and Georgia Institute of Technology
|
|
152
|
+
- Zeguan Wu, Pacific Northwest National Laboratory and University of Pittsburgh
|
|
153
|
+
- Xiangyu Li, Pacific Northwest National Laboratory
|
|
154
|
+
- Mingze Li, Pacific Northwest National Laboratory
|
|
155
|
+
- Nicholas P. Bauman, Pacific Northwest National Laboratory
|
|
156
|
+
- Samuel A. Stein, Pacific Northwest National Laboratory
|
|
157
|
+
- Johannes Mülmenstädt, Pacific Northwest National Laboratory
|
|
158
|
+
- Yousu Chen, Pacific Northwest National Laboratory
|
|
159
|
+
- Nathan Wiebe, Pacific Northwest National Laboratory and University of Toronto
|
|
160
|
+
- Ang Li, Pacific Northwest National Laboratory and University of Washington
|
|
161
|
+
- Karol Kowalski, Pacific Northwest National Laboratory
|
|
162
|
+
|
|
163
|
+
## Acknowledgements
|
|
164
|
+
|
|
165
|
+
This work was supported by Pacific Northwest National Laboratory's Quantum Algorithms and Architecture for Domain Science (QuAADS) Laboratory Directed Research and Development (LDRD) Initiative. This material is based upon work supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Science Center (QSC). The Pacific Northwest National Laboratory is operated by Battelle for the U.S. Department of Energy under Contract DE-AC05-76RL01830.
|
|
166
|
+
|
|
167
|
+
[Algorithm and subroutine references](docs/references.md).
|
|
168
|
+
|
|
169
|
+
NWQLib is released under the BSD 2-Clause License; see `LICENSE`.
|
nwqlib-1.0.0/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# NWQLib: Northwest Quantum Library
|
|
2
|
+
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.23074265)
|
|
4
|
+
|
|
5
|
+
**Documentation: <https://pnnl.github.io/NWQLib/>**
|
|
6
|
+
|
|
7
|
+
NWQLib applies quantum algorithms to scientific problems. A workflow connects your inputs and requested output to a selected method, execution and a report of the result, evidence and resources. Native circuit execution uses Qiskit and an explicitly selected backend.
|
|
8
|
+
|
|
9
|
+
IR# PNNL-SA-227989
|
|
10
|
+
|
|
11
|
+
## Start here
|
|
12
|
+
|
|
13
|
+
**The [example notebooks](examples/) solve complete scientific problems from input to result, error and circuit cost, and the [examples guide](docs/examples.md) points you to the one that matches your problem. The [mathematics page](docs/mathematics.md) states the bounds, resource laws and error budgets that NWQLib uses, each with its proof or source and the code that implements it.**
|
|
14
|
+
|
|
15
|
+
From a source checkout, install the package with the local Aer executor:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python -m pip install -e ".[aer]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
To solve `du/dt = -A u` with a small physical input:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from nwqlib import LinearDynamics, solve
|
|
25
|
+
from nwqlib.algorithms import LCHS
|
|
26
|
+
|
|
27
|
+
problem = LinearDynamics(
|
|
28
|
+
A=[[0.4, 0.15], [0.05, 0.25]],
|
|
29
|
+
initial_state=[1.0, 0.0],
|
|
30
|
+
time=0.1,
|
|
31
|
+
)
|
|
32
|
+
result = solve(problem, method=LCHS())
|
|
33
|
+
print(result.solution)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The default returns the physical solution approximation using nine total qubits. The [quickstart](docs/quickstart.md) compares it with an independent reference and shows how to change the approximation. The base install, `python -m pip install -e .`, supports metadata, admitted inputs, default LCHS planning and supported classical methods. Other planning paths follow their Method's input/conversion requirements; native preparation and execution require the selected backend extra. Method guides describe these boundaries.
|
|
37
|
+
|
|
38
|
+
The notebooks in `examples/` apply NWQLib to molecular ground-state energy, a linear system, linear dynamics and optimization, and one estimates the resources of a linear system, heat flow, two spin chains, a GCiM trial basis and a QHD optimization step at up to 100 qubits. The [examples guide](docs/examples.md) describes the work each notebook performs.
|
|
39
|
+
|
|
40
|
+
## Choose a task
|
|
41
|
+
|
|
42
|
+
| Task | Read |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| Learn the Python workflow | [Quickstart](docs/quickstart.md), [examples](docs/examples.md) |
|
|
45
|
+
| Compare NWQLib with other quantum packages | [Why NWQLib](docs/why_nwqlib.md) |
|
|
46
|
+
| Discover methods or use the command line | [CLI guide](docs/cli.md) |
|
|
47
|
+
| Compare methods and inspect results | [Scientist workflow](docs/scientist.md) |
|
|
48
|
+
| Supply operators and states | [Input access](docs/inputs.md) |
|
|
49
|
+
| Estimate resources and assess a device | [Resource estimates](docs/resources.md), [device profiles](docs/profiles.md) |
|
|
50
|
+
| Run locally or submit to a provider | [Prepared execution](docs/prepared_execution.md), [backends](docs/backends.md) |
|
|
51
|
+
| Save results or continue a workflow | [Saved evidence](docs/saved_evidence.md), [run archives](docs/run_archives.md) |
|
|
52
|
+
| Look up a signature | [API reference](docs/api/index.md) |
|
|
53
|
+
| Check known defects in Qiskit and other dependencies, and how NWQLib handles them | [Dependency issues](docs/dependency_issues.md) |
|
|
54
|
+
| Extend or maintain NWQLib | [Run your own circuit](docs/own_circuit.md), [Contributing](CONTRIBUTING.md), [code tour](docs/CODE_TOUR.md), [maintenance](docs/MAINTENANCE.md) |
|
|
55
|
+
| Trace code to its paper, equation and reason | [Code tour](docs/CODE_TOUR.md#find-the-source-and-reason-for-a-line-of-code), [references](docs/references.md) |
|
|
56
|
+
| Find the bound, resource law or error budget behind a result, its proof or source, and its code | [Mathematics](docs/mathematics.md) |
|
|
57
|
+
|
|
58
|
+
## Algorithms
|
|
59
|
+
|
|
60
|
+
| Scientific task | Methods |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| Normalized expectation of a finite real Pauli sum | [Expectation](docs/algorithms/expectation.md) |
|
|
63
|
+
| Energy estimates from moments or a selected subspace | [Chebyshev Lanczos](docs/algorithms/lanczos.md), [fixed and adaptive GCiM](docs/algorithms/gcim.md) |
|
|
64
|
+
| Phase or energy estimation | [QPE: QCELS, RWPE, SPE and RFE](docs/algorithms/qpe.md) |
|
|
65
|
+
| Time-independent linear dynamics | [LCHS](docs/algorithms/lchs.md) |
|
|
66
|
+
| Linear systems | [QLS: QSVT inverse polynomial (`qsvt_inverse`, the default) and the Dalzell kernel shortcut (`shortcut_native_svp`, `shortcut_dilation`)](docs/algorithms/qls.md) |
|
|
67
|
+
| Box-constrained optimization | [QHD](docs/algorithms/qhd.md) |
|
|
68
|
+
| Optimization over a box with equality or inequality constraints | [QHD augmented Lagrangian](docs/algorithms/qhd.md#constrained-problems) |
|
|
69
|
+
|
|
70
|
+
Methods report the quantity actually obtained and any unresolved accuracy conditions. A projected energy, local statistical interval or completed simulation does not by itself establish the full requested scientific claim. The [roadmap](docs/ROADMAP.md) records current limitations and open work. Reusable state preparation, block encoding, LCU, QSP/QSVT and evolution primitives have their own [API references](docs/api/index.md).
|
|
71
|
+
|
|
72
|
+
## Backend support
|
|
73
|
+
|
|
74
|
+
Aer supports local execution. NWQ-Sim CPU execution and process-exit continuation have been exercised on macOS and Linux with the qualified build described in the [backend guide](docs/backends.md). IBM Runtime, IonQ and Nexus have offline SDK and injected-result qualification. Live provider accounts, queues and QPUs remain unqualified. Slurm and GPU/site support have their documented offline qualification boundaries.
|
|
75
|
+
|
|
76
|
+
The [Nexus guide](docs/nexus.md#costs-timeout-and-qualification) documents its pandas dependency exception and missing per-request timeout. See [Slurm](docs/slurm.md) for explicit site configuration. Each method/backend/readout combination must satisfy its own capability checks.
|
|
77
|
+
|
|
78
|
+
## Authors and Developers
|
|
79
|
+
|
|
80
|
+
For questions, bug reports or collaboration, contact Muqing Zheng (muqing.zheng@pnnl.gov).
|
|
81
|
+
|
|
82
|
+
Affiliations are those at the time of contribution.
|
|
83
|
+
|
|
84
|
+
- Muqing Zheng, Pacific Northwest National Laboratory
|
|
85
|
+
- Chenxu Liu, Pacific Northwest National Laboratory
|
|
86
|
+
- Zhixin Song, Pacific Northwest National Laboratory and Georgia Institute of Technology
|
|
87
|
+
- Zeguan Wu, Pacific Northwest National Laboratory and University of Pittsburgh
|
|
88
|
+
- Xiangyu Li, Pacific Northwest National Laboratory
|
|
89
|
+
- Mingze Li, Pacific Northwest National Laboratory
|
|
90
|
+
- Nicholas P. Bauman, Pacific Northwest National Laboratory
|
|
91
|
+
- Samuel A. Stein, Pacific Northwest National Laboratory
|
|
92
|
+
- Johannes Mülmenstädt, Pacific Northwest National Laboratory
|
|
93
|
+
- Yousu Chen, Pacific Northwest National Laboratory
|
|
94
|
+
- Nathan Wiebe, Pacific Northwest National Laboratory and University of Toronto
|
|
95
|
+
- Ang Li, Pacific Northwest National Laboratory and University of Washington
|
|
96
|
+
- Karol Kowalski, Pacific Northwest National Laboratory
|
|
97
|
+
|
|
98
|
+
## Acknowledgements
|
|
99
|
+
|
|
100
|
+
This work was supported by Pacific Northwest National Laboratory's Quantum Algorithms and Architecture for Domain Science (QuAADS) Laboratory Directed Research and Development (LDRD) Initiative. This material is based upon work supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Science Center (QSC). The Pacific Northwest National Laboratory is operated by Battelle for the U.S. Department of Energy under Contract DE-AC05-76RL01830.
|
|
101
|
+
|
|
102
|
+
[Algorithm and subroutine references](docs/references.md).
|
|
103
|
+
|
|
104
|
+
NWQLib is released under the BSD 2-Clause License; see `LICENSE`.
|