q2m3 0.1.1__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.
- q2m3-0.1.1/.env.example +37 -0
- q2m3-0.1.1/.github/codecov.yml +31 -0
- q2m3-0.1.1/.github/pull_request_template.md +48 -0
- q2m3-0.1.1/.github/release-drafter.yml +64 -0
- q2m3-0.1.1/.github/workflows/ci.yml +104 -0
- q2m3-0.1.1/.github/workflows/release-drafter.yml +18 -0
- q2m3-0.1.1/.gitignore +80 -0
- q2m3-0.1.1/.pre-commit-config.yaml +40 -0
- q2m3-0.1.1/.zenodo.json +31 -0
- q2m3-0.1.1/CHANGELOG.md +104 -0
- q2m3-0.1.1/CITATION.cff +35 -0
- q2m3-0.1.1/LICENSE +21 -0
- q2m3-0.1.1/Makefile +116 -0
- q2m3-0.1.1/PKG-INFO +389 -0
- q2m3-0.1.1/README.md +325 -0
- q2m3-0.1.1/data/h3o_plus.xyz +6 -0
- q2m3-0.1.1/doc/Makefile +18 -0
- q2m3-0.1.1/doc/source/_static/css/style.css +41 -0
- q2m3-0.1.1/doc/source/_static/logo.svg +67 -0
- q2m3-0.1.1/doc/source/_templates/sidebar/brand.html +18 -0
- q2m3-0.1.1/doc/source/api-reference/core.rst +56 -0
- q2m3-0.1.1/doc/source/api-reference/index.rst +39 -0
- q2m3-0.1.1/doc/source/api-reference/interfaces.rst +9 -0
- q2m3-0.1.1/doc/source/api-reference/package.rst +32 -0
- q2m3-0.1.1/doc/source/api-reference/profiling.rst +34 -0
- q2m3-0.1.1/doc/source/api-reference/sampling.rst +32 -0
- q2m3-0.1.1/doc/source/api-reference/solvation.rst +80 -0
- q2m3-0.1.1/doc/source/api-reference/utils.rst +14 -0
- q2m3-0.1.1/doc/source/architecture.md +112 -0
- q2m3-0.1.1/doc/source/conf.py +101 -0
- q2m3-0.1.1/doc/source/core-concepts.md +143 -0
- q2m3-0.1.1/doc/source/development.md +78 -0
- q2m3-0.1.1/doc/source/getting-started.md +98 -0
- q2m3-0.1.1/doc/source/glossary.rst +60 -0
- q2m3-0.1.1/doc/source/index.rst +38 -0
- q2m3-0.1.1/doc/source/tutorials/full-oneelectron-embedding.md +76 -0
- q2m3-0.1.1/doc/source/tutorials/h2-mc-solvation.md +70 -0
- q2m3-0.1.1/doc/source/tutorials/h2-qpe-validation.md +55 -0
- q2m3-0.1.1/doc/source/tutorials/h2-resource-estimation.md +62 -0
- q2m3-0.1.1/doc/source/tutorials/index.rst +27 -0
- q2m3-0.1.1/doc/source/tutorials/three-mode-solvation.md +59 -0
- q2m3-0.1.1/examples/README.md +179 -0
- q2m3-0.1.1/examples/catalyst_benchmark.py +248 -0
- q2m3-0.1.1/examples/full_oneelectron_embedding.py +120 -0
- q2m3-0.1.1/examples/h2_8bit_qpe_benchmark.py +140 -0
- q2m3-0.1.1/examples/h2_mc_solvation.py +90 -0
- q2m3-0.1.1/examples/h2_qpe_validation.py +517 -0
- q2m3-0.1.1/examples/h2_resource_estimation.py +95 -0
- q2m3-0.1.1/examples/h2_three_mode_comparison.py +494 -0
- q2m3-0.1.1/examples/h3o_8bit_qpe_benchmark.py +288 -0
- q2m3-0.1.1/examples/h3o_dynamic_trotter_oom_scan.py +459 -0
- q2m3-0.1.1/examples/h3o_mc_solvation.py +104 -0
- q2m3-0.1.1/examples/ir_qre_correlation_analysis.py +625 -0
- q2m3-0.1.1/examples/ir_qre_trotter5_compile_survey.py +403 -0
- q2m3-0.1.1/examples/qpe_memory_profile.py +572 -0
- q2m3-0.1.1/examples/resource_estimation_survey.py +474 -0
- q2m3-0.1.1/poetry.lock +4138 -0
- q2m3-0.1.1/pyproject.toml +164 -0
- q2m3-0.1.1/setup.cfg +4 -0
- q2m3-0.1.1/src/q2m3/__init__.py +75 -0
- q2m3-0.1.1/src/q2m3/constants.py +35 -0
- q2m3-0.1.1/src/q2m3/core/__init__.py +62 -0
- q2m3-0.1.1/src/q2m3/core/device_utils.py +232 -0
- q2m3-0.1.1/src/q2m3/core/hamiltonian_utils.py +88 -0
- q2m3-0.1.1/src/q2m3/core/qmmm_system.py +163 -0
- q2m3-0.1.1/src/q2m3/core/qpe.py +603 -0
- q2m3-0.1.1/src/q2m3/core/quantum_qmmm.py +497 -0
- q2m3-0.1.1/src/q2m3/core/quantum_solver.py +66 -0
- q2m3-0.1.1/src/q2m3/core/rdm.py +503 -0
- q2m3-0.1.1/src/q2m3/core/resource_estimation.py +301 -0
- q2m3-0.1.1/src/q2m3/interfaces/__init__.py +21 -0
- q2m3-0.1.1/src/q2m3/interfaces/fixed_mo_embedding.py +357 -0
- q2m3-0.1.1/src/q2m3/interfaces/pyscf_pennylane.py +758 -0
- q2m3-0.1.1/src/q2m3/molecule.py +77 -0
- q2m3-0.1.1/src/q2m3/profiling/__init__.py +60 -0
- q2m3-0.1.1/src/q2m3/profiling/catalyst_ir.py +89 -0
- q2m3-0.1.1/src/q2m3/profiling/memory.py +249 -0
- q2m3-0.1.1/src/q2m3/profiling/orchestrator.py +390 -0
- q2m3-0.1.1/src/q2m3/profiling/qpe_profiler.py +384 -0
- q2m3-0.1.1/src/q2m3/profiling/timing.py +145 -0
- q2m3-0.1.1/src/q2m3/sampling/__init__.py +35 -0
- q2m3-0.1.1/src/q2m3/sampling/mc_moves.py +117 -0
- q2m3-0.1.1/src/q2m3/sampling/metropolis.py +130 -0
- q2m3-0.1.1/src/q2m3/sampling/mm_forcefield.py +134 -0
- q2m3-0.1.1/src/q2m3/sampling/water_molecule.py +158 -0
- q2m3-0.1.1/src/q2m3/solvation/__init__.py +58 -0
- q2m3-0.1.1/src/q2m3/solvation/analysis.py +352 -0
- q2m3-0.1.1/src/q2m3/solvation/circuit_builder.py +388 -0
- q2m3-0.1.1/src/q2m3/solvation/config.py +188 -0
- q2m3-0.1.1/src/q2m3/solvation/energy.py +510 -0
- q2m3-0.1.1/src/q2m3/solvation/ir_cache.py +345 -0
- q2m3-0.1.1/src/q2m3/solvation/mc_loop.py +197 -0
- q2m3-0.1.1/src/q2m3/solvation/orchestrator.py +439 -0
- q2m3-0.1.1/src/q2m3/solvation/phase_extraction.py +102 -0
- q2m3-0.1.1/src/q2m3/solvation/plotting.py +152 -0
- q2m3-0.1.1/src/q2m3/solvation/solvent.py +453 -0
- q2m3-0.1.1/src/q2m3/solvation/statistics.py +170 -0
- q2m3-0.1.1/src/q2m3/solvation/structure_analysis.py +340 -0
- q2m3-0.1.1/src/q2m3/utils/__init__.py +16 -0
- q2m3-0.1.1/src/q2m3/utils/io.py +152 -0
- q2m3-0.1.1/src/q2m3/utils/plotting.py +76 -0
- q2m3-0.1.1/src/q2m3/version.py +52 -0
- q2m3-0.1.1/src/q2m3.egg-info/PKG-INFO +389 -0
- q2m3-0.1.1/src/q2m3.egg-info/SOURCES.txt +155 -0
- q2m3-0.1.1/src/q2m3.egg-info/dependency_links.txt +1 -0
- q2m3-0.1.1/src/q2m3.egg-info/requires.txt +48 -0
- q2m3-0.1.1/src/q2m3.egg-info/top_level.txt +1 -0
- q2m3-0.1.1/tests/__init__.py +6 -0
- q2m3-0.1.1/tests/conftest.py +188 -0
- q2m3-0.1.1/tests/core/__init__.py +2 -0
- q2m3-0.1.1/tests/core/test_eftqc_resource_estimation.py +342 -0
- q2m3-0.1.1/tests/examples/__init__.py +3 -0
- q2m3-0.1.1/tests/examples/conftest.py +78 -0
- q2m3-0.1.1/tests/examples/test_full_oneelectron_embedding.py +57 -0
- q2m3-0.1.1/tests/examples/test_h2_resource_estimation.py +43 -0
- q2m3-0.1.1/tests/examples/test_h3o_dynamic_trotter_oom_scan.py +64 -0
- q2m3-0.1.1/tests/examples/test_ir_qre_correlation_analysis.py +296 -0
- q2m3-0.1.1/tests/examples/test_ir_qre_trotter5_compile_survey.py +142 -0
- q2m3-0.1.1/tests/examples/test_qpe_memory_profile.py +297 -0
- q2m3-0.1.1/tests/examples/test_resource_estimation_survey.py +42 -0
- q2m3-0.1.1/tests/interfaces/__init__.py +1 -0
- q2m3-0.1.1/tests/interfaces/test_fixed_mo_embedding.py +173 -0
- q2m3-0.1.1/tests/profiling/__init__.py +2 -0
- q2m3-0.1.1/tests/profiling/conftest.py +20 -0
- q2m3-0.1.1/tests/profiling/test_catalyst_ir.py +79 -0
- q2m3-0.1.1/tests/profiling/test_init.py +80 -0
- q2m3-0.1.1/tests/profiling/test_memory.py +80 -0
- q2m3-0.1.1/tests/profiling/test_orchestrator.py +345 -0
- q2m3-0.1.1/tests/profiling/test_qpe_profiler.py +59 -0
- q2m3-0.1.1/tests/profiling/test_timing.py +105 -0
- q2m3-0.1.1/tests/solvation/__init__.py +2 -0
- q2m3-0.1.1/tests/solvation/conftest.py +237 -0
- q2m3-0.1.1/tests/solvation/test_analysis.py +237 -0
- q2m3-0.1.1/tests/solvation/test_circuit_builder.py +414 -0
- q2m3-0.1.1/tests/solvation/test_config.py +319 -0
- q2m3-0.1.1/tests/solvation/test_energy.py +410 -0
- q2m3-0.1.1/tests/solvation/test_integration.py +236 -0
- q2m3-0.1.1/tests/solvation/test_ir_cache.py +443 -0
- q2m3-0.1.1/tests/solvation/test_mc_loop.py +470 -0
- q2m3-0.1.1/tests/solvation/test_orchestrator.py +455 -0
- q2m3-0.1.1/tests/solvation/test_phase_extraction.py +303 -0
- q2m3-0.1.1/tests/solvation/test_solvent.py +296 -0
- q2m3-0.1.1/tests/solvation/test_structure_analysis.py +97 -0
- q2m3-0.1.1/tests/test_basic.py +540 -0
- q2m3-0.1.1/tests/test_device_utils.py +236 -0
- q2m3-0.1.1/tests/test_energy_shifted_qpe.py +298 -0
- q2m3-0.1.1/tests/test_hamiltonian_utils.py +67 -0
- q2m3-0.1.1/tests/test_molecule.py +92 -0
- q2m3-0.1.1/tests/test_pennylane_hamiltonian.py +120 -0
- q2m3-0.1.1/tests/test_qpe_circuit.py +636 -0
- q2m3-0.1.1/tests/test_quantum_qmmm_integration.py +250 -0
- q2m3-0.1.1/tests/test_rdm.py +530 -0
- q2m3-0.1.1/tests/test_resource_estimation.py +415 -0
- q2m3-0.1.1/tests/test_sampling.py +416 -0
- q2m3-0.1.1/tests/utils/__init__.py +2 -0
- q2m3-0.1.1/tests/utils/test_plotting.py +50 -0
- q2m3-0.1.1/uv.lock +3949 -0
q2m3-0.1.1/.env.example
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Quantum-QM/MM POC Environment Configuration
|
|
2
|
+
# Copy this file to .env and adjust values as needed
|
|
3
|
+
|
|
4
|
+
# GPU Configuration
|
|
5
|
+
CUDA_VISIBLE_DEVICES=0
|
|
6
|
+
PENNYLANE_DEVICE=default.qubit
|
|
7
|
+
# Use lightning.gpu for GPU acceleration
|
|
8
|
+
# PENNYLANE_DEVICE=lightning.gpu
|
|
9
|
+
|
|
10
|
+
# Quantum Computation Settings
|
|
11
|
+
MAX_QUBITS=20
|
|
12
|
+
QPE_ITERATIONS=8
|
|
13
|
+
QPE_ALGORITHM=iterative
|
|
14
|
+
MAPPING_SCHEME=jordan_wigner
|
|
15
|
+
|
|
16
|
+
# QM/MM System Settings
|
|
17
|
+
MM_MODEL=tip3p
|
|
18
|
+
NUM_WATERS=8
|
|
19
|
+
SOLVATION_SHELLS=1
|
|
20
|
+
|
|
21
|
+
# Computation Resources
|
|
22
|
+
OMP_NUM_THREADS=4
|
|
23
|
+
MKL_NUM_THREADS=4
|
|
24
|
+
|
|
25
|
+
# Output Configuration
|
|
26
|
+
OUTPUT_DIR=data/output
|
|
27
|
+
LOG_LEVEL=INFO
|
|
28
|
+
SAVE_INTERMEDIATE=true
|
|
29
|
+
|
|
30
|
+
# Performance Settings
|
|
31
|
+
USE_CACHE=true
|
|
32
|
+
CACHE_DIR=.cache
|
|
33
|
+
BATCH_SIZE=1
|
|
34
|
+
|
|
35
|
+
# Debug Options
|
|
36
|
+
DEBUG_MODE=false
|
|
37
|
+
PROFILE_EXECUTION=false
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Reference docs at https://docs.codecov.com/docs/codecovyml-reference
|
|
2
|
+
|
|
3
|
+
codecov:
|
|
4
|
+
require_ci_to_pass: yes
|
|
5
|
+
|
|
6
|
+
coverage:
|
|
7
|
+
status:
|
|
8
|
+
project:
|
|
9
|
+
default:
|
|
10
|
+
target: auto
|
|
11
|
+
threshold: 0.5%
|
|
12
|
+
patch:
|
|
13
|
+
default:
|
|
14
|
+
target: auto
|
|
15
|
+
threshold: 0.5%
|
|
16
|
+
|
|
17
|
+
parsers:
|
|
18
|
+
gcov:
|
|
19
|
+
branch_detection:
|
|
20
|
+
conditional: yes
|
|
21
|
+
loop: yes
|
|
22
|
+
method: no
|
|
23
|
+
macro: no
|
|
24
|
+
|
|
25
|
+
comment:
|
|
26
|
+
layout: "reach,diff,flags,tree"
|
|
27
|
+
behavior: default
|
|
28
|
+
require_changes: no
|
|
29
|
+
|
|
30
|
+
github_checks:
|
|
31
|
+
annotations: false
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Brief description of the changes in this PR.
|
|
3
|
+
|
|
4
|
+
## Type Of Change
|
|
5
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
6
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
7
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
8
|
+
- [ ] Documentation update
|
|
9
|
+
- [ ] Performance improvement
|
|
10
|
+
- [ ] Code refactoring
|
|
11
|
+
- [ ] CI / repository configuration
|
|
12
|
+
|
|
13
|
+
## Related Issue
|
|
14
|
+
Fixes #(issue number)
|
|
15
|
+
|
|
16
|
+
## Changes Made
|
|
17
|
+
- List the main changes made in this PR
|
|
18
|
+
- Be specific about what was modified
|
|
19
|
+
|
|
20
|
+
## Scientific / Numerical Impact
|
|
21
|
+
- [ ] This change has no scientific or numerical behavior impact
|
|
22
|
+
- [ ] Energy estimates, resource estimates, or sampling behavior changed
|
|
23
|
+
- [ ] Numerical tolerances or validation baselines changed
|
|
24
|
+
|
|
25
|
+
## Testing
|
|
26
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
27
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
28
|
+
- [ ] I have added integration or scientific validation tests where applicable
|
|
29
|
+
- [ ] I have run `uv run pytest tests/ -v` locally
|
|
30
|
+
- [ ] I have run `uv run ruff check src/ tests/` locally
|
|
31
|
+
- [ ] I have run `uv run black --check src/ tests/ --line-length 100` locally
|
|
32
|
+
|
|
33
|
+
## Checklist
|
|
34
|
+
- [ ] My code follows the style guidelines (black, ruff)
|
|
35
|
+
- [ ] I have performed a self-review of my own code
|
|
36
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
37
|
+
- [ ] I have made corresponding documentation changes where applicable
|
|
38
|
+
- [ ] My changes generate no new warnings
|
|
39
|
+
- [ ] Tests are passing
|
|
40
|
+
- [ ] Coverage does not decrease
|
|
41
|
+
|
|
42
|
+
## Performance Impact
|
|
43
|
+
- [ ] This change has no performance impact
|
|
44
|
+
- [ ] This change improves performance (describe briefly)
|
|
45
|
+
- [ ] This change may degrade performance (describe mitigation)
|
|
46
|
+
|
|
47
|
+
## Additional Notes
|
|
48
|
+
Add any additional notes or context about the PR here.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
tag-prefix: 'v'
|
|
4
|
+
categories:
|
|
5
|
+
- title: 'Breaking Changes'
|
|
6
|
+
labels:
|
|
7
|
+
- 'major'
|
|
8
|
+
- title: 'Features'
|
|
9
|
+
labels:
|
|
10
|
+
- 'feat'
|
|
11
|
+
- 'minor'
|
|
12
|
+
- title: 'Bug Fixes'
|
|
13
|
+
labels:
|
|
14
|
+
- 'fix'
|
|
15
|
+
- 'patch'
|
|
16
|
+
- title: 'Documentation'
|
|
17
|
+
labels:
|
|
18
|
+
- 'docs'
|
|
19
|
+
- title: 'Tests'
|
|
20
|
+
labels:
|
|
21
|
+
- 'test'
|
|
22
|
+
- title: 'Performance'
|
|
23
|
+
labels:
|
|
24
|
+
- 'perf'
|
|
25
|
+
- title: 'Refactoring'
|
|
26
|
+
labels:
|
|
27
|
+
- 'refactor'
|
|
28
|
+
- title: 'CI'
|
|
29
|
+
labels:
|
|
30
|
+
- 'ci'
|
|
31
|
+
- title: 'Maintenance'
|
|
32
|
+
labels:
|
|
33
|
+
- 'chore'
|
|
34
|
+
exclude-labels:
|
|
35
|
+
- 'skip-changelog'
|
|
36
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
37
|
+
change-title-escapes: '\<*_&'
|
|
38
|
+
version-resolver:
|
|
39
|
+
major:
|
|
40
|
+
labels:
|
|
41
|
+
- 'major'
|
|
42
|
+
minor:
|
|
43
|
+
labels:
|
|
44
|
+
- 'minor'
|
|
45
|
+
- 'feat'
|
|
46
|
+
patch:
|
|
47
|
+
labels:
|
|
48
|
+
- 'patch'
|
|
49
|
+
- 'fix'
|
|
50
|
+
- 'docs'
|
|
51
|
+
- 'test'
|
|
52
|
+
- 'perf'
|
|
53
|
+
- 'refactor'
|
|
54
|
+
- 'ci'
|
|
55
|
+
- 'chore'
|
|
56
|
+
default: patch
|
|
57
|
+
template: |
|
|
58
|
+
## What's Changed
|
|
59
|
+
|
|
60
|
+
$CHANGES
|
|
61
|
+
|
|
62
|
+
## Contributors
|
|
63
|
+
|
|
64
|
+
$CONTRIBUTORS
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main, mvp]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main, mvp]
|
|
9
|
+
merge_group:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
quality:
|
|
20
|
+
name: quality (${{ matrix.python-version }})
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
python-version: ['3.11', '3.12']
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
timeout-minutes: 45
|
|
27
|
+
env:
|
|
28
|
+
OMP_NUM_THREADS: '1'
|
|
29
|
+
OPENBLAS_NUM_THREADS: '1'
|
|
30
|
+
MKL_NUM_THREADS: '1'
|
|
31
|
+
NUMEXPR_NUM_THREADS: '1'
|
|
32
|
+
VECLIB_MAXIMUM_THREADS: '1'
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v4
|
|
39
|
+
with:
|
|
40
|
+
enable-cache: true
|
|
41
|
+
cache-dependency-glob: "uv.lock"
|
|
42
|
+
|
|
43
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
44
|
+
run: uv python install ${{ matrix.python-version }}
|
|
45
|
+
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: uv sync --extra dev --extra catalyst --extra solvation --extra viz
|
|
48
|
+
|
|
49
|
+
- name: Run linting (ruff)
|
|
50
|
+
run: uv run ruff check src/ tests/
|
|
51
|
+
|
|
52
|
+
- name: Check formatting (black)
|
|
53
|
+
run: uv run black --check src/ tests/ --line-length 100
|
|
54
|
+
|
|
55
|
+
- name: Verify pytest collection
|
|
56
|
+
run: uv run pytest tests/ --collect-only -q --no-cov
|
|
57
|
+
|
|
58
|
+
- name: Run tests with coverage
|
|
59
|
+
run: |
|
|
60
|
+
uv run pytest tests/ \
|
|
61
|
+
--cov=src/q2m3 \
|
|
62
|
+
--cov-report=xml \
|
|
63
|
+
--cov-report=term \
|
|
64
|
+
-m "not slow and not gpu"
|
|
65
|
+
|
|
66
|
+
- name: Upload coverage to Codecov
|
|
67
|
+
uses: codecov/codecov-action@v4
|
|
68
|
+
with:
|
|
69
|
+
files: ./coverage.xml
|
|
70
|
+
flags: pytest-${{ matrix.python-version }}
|
|
71
|
+
name: codecov-${{ matrix.python-version }}
|
|
72
|
+
fail_ci_if_error: false
|
|
73
|
+
verbose: true
|
|
74
|
+
env:
|
|
75
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
76
|
+
|
|
77
|
+
docs:
|
|
78
|
+
name: docs (3.11)
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
timeout-minutes: 30
|
|
81
|
+
env:
|
|
82
|
+
OMP_NUM_THREADS: '1'
|
|
83
|
+
OPENBLAS_NUM_THREADS: '1'
|
|
84
|
+
MKL_NUM_THREADS: '1'
|
|
85
|
+
NUMEXPR_NUM_THREADS: '1'
|
|
86
|
+
VECLIB_MAXIMUM_THREADS: '1'
|
|
87
|
+
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v4
|
|
90
|
+
|
|
91
|
+
- name: Install uv
|
|
92
|
+
uses: astral-sh/setup-uv@v4
|
|
93
|
+
with:
|
|
94
|
+
enable-cache: true
|
|
95
|
+
cache-dependency-glob: "uv.lock"
|
|
96
|
+
|
|
97
|
+
- name: Set up Python 3.11
|
|
98
|
+
run: uv python install 3.11
|
|
99
|
+
|
|
100
|
+
- name: Install documentation dependencies
|
|
101
|
+
run: uv sync --extra docs --extra catalyst --extra solvation --extra viz
|
|
102
|
+
|
|
103
|
+
- name: Build documentation
|
|
104
|
+
run: uv run --extra docs --extra catalyst --extra solvation --extra viz sphinx-build -W --keep-going -b html doc/source doc/build/html
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
update_release_draft:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: release-drafter/release-drafter@v7
|
|
17
|
+
env:
|
|
18
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
q2m3-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Virtual Environment
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
ENV/
|
|
28
|
+
env/
|
|
29
|
+
|
|
30
|
+
# Environment variables
|
|
31
|
+
.env
|
|
32
|
+
.env.local
|
|
33
|
+
|
|
34
|
+
# IDE
|
|
35
|
+
.vscode/
|
|
36
|
+
.idea/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
*~
|
|
40
|
+
.DS_Store
|
|
41
|
+
|
|
42
|
+
# Jupyter Notebook
|
|
43
|
+
.ipynb_checkpoints/
|
|
44
|
+
*.ipynb_checkpoints
|
|
45
|
+
|
|
46
|
+
# Project specific
|
|
47
|
+
data/output/
|
|
48
|
+
logs/
|
|
49
|
+
*.log
|
|
50
|
+
results/
|
|
51
|
+
tmp/
|
|
52
|
+
cache/
|
|
53
|
+
|
|
54
|
+
# Testing
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
.coverage
|
|
57
|
+
.coverage.*
|
|
58
|
+
coverage.xml
|
|
59
|
+
coverage.json
|
|
60
|
+
htmlcov/
|
|
61
|
+
.tox/
|
|
62
|
+
.nox/
|
|
63
|
+
.hypothesis/
|
|
64
|
+
.ruff_cache/
|
|
65
|
+
.mypy_cache/
|
|
66
|
+
.cache/
|
|
67
|
+
|
|
68
|
+
# Documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
docs/_static/
|
|
71
|
+
docs/_templates/
|
|
72
|
+
|
|
73
|
+
# Others
|
|
74
|
+
CLAUDE.md
|
|
75
|
+
AGENTS.md
|
|
76
|
+
.plan/
|
|
77
|
+
.docs/
|
|
78
|
+
.templates/
|
|
79
|
+
.claude/
|
|
80
|
+
dev/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autofix_prs: true
|
|
3
|
+
autoupdate_schedule: monthly
|
|
4
|
+
|
|
5
|
+
repos:
|
|
6
|
+
# Basic file checks
|
|
7
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
8
|
+
rev: v6.0.0
|
|
9
|
+
hooks:
|
|
10
|
+
- id: trailing-whitespace
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: check-added-large-files
|
|
14
|
+
args: ['--maxkb=1024']
|
|
15
|
+
- id: check-json
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: check-merge-conflict
|
|
18
|
+
- id: detect-private-key
|
|
19
|
+
- id: debug-statements
|
|
20
|
+
- id: check-ast
|
|
21
|
+
|
|
22
|
+
# Black remains q2m3's source formatter.
|
|
23
|
+
- repo: https://github.com/psf/black
|
|
24
|
+
rev: 24.1.1
|
|
25
|
+
hooks:
|
|
26
|
+
- id: black
|
|
27
|
+
|
|
28
|
+
# Ruff handles linting and import ordering.
|
|
29
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
30
|
+
rev: v0.9.10
|
|
31
|
+
hooks:
|
|
32
|
+
- id: ruff
|
|
33
|
+
args: [--fix]
|
|
34
|
+
|
|
35
|
+
# Commit message linting (Conventional Commits)
|
|
36
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
37
|
+
rev: v4.13.6
|
|
38
|
+
hooks:
|
|
39
|
+
- id: commitizen
|
|
40
|
+
stages: [commit-msg]
|
q2m3-0.1.1/.zenodo.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "q2m3: A Hybrid Quantum-Classical Framework for QM/MM Simulations",
|
|
3
|
+
"description": "<p>q2m3 is a hybrid quantum-classical QM/MM proof-of-concept framework for coupling PySCF, PennyLane Quantum Phase Estimation (QPE), and explicit MM point-charge environments in a single Python package. It targets Early Fault-Tolerant Quantum Computers (EFTQC) and provides compile-once / run-many solvation experiments, fixed-MO one-electron embedding, and EFTQC resource estimation for active-space Hamiltonians.</p>",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"upload_type": "software",
|
|
6
|
+
"access_right": "open",
|
|
7
|
+
"creators": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Ye, Jun",
|
|
10
|
+
"affiliation": "Independent",
|
|
11
|
+
"orcid": "0000-0003-1963-0865"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"quantum computing",
|
|
16
|
+
"quantum chemistry",
|
|
17
|
+
"QM/MM",
|
|
18
|
+
"quantum phase estimation",
|
|
19
|
+
"PySCF",
|
|
20
|
+
"PennyLane",
|
|
21
|
+
"EFTQC",
|
|
22
|
+
"Catalyst"
|
|
23
|
+
],
|
|
24
|
+
"related_identifiers": [
|
|
25
|
+
{
|
|
26
|
+
"relation": "isSupplementTo",
|
|
27
|
+
"identifier": "https://github.com/yjmaxpayne/q2m3",
|
|
28
|
+
"resource_type": "software"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
q2m3-0.1.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.1.1 (2026-05-11)
|
|
4
|
+
|
|
5
|
+
### Feat
|
|
6
|
+
|
|
7
|
+
- expose full one-electron embedding API
|
|
8
|
+
- add fixed-MO embedding and fast parallel tests
|
|
9
|
+
|
|
10
|
+
## v0.1.0 (2026-05-08)
|
|
11
|
+
|
|
12
|
+
### Feat
|
|
13
|
+
|
|
14
|
+
- **solvation**: add trajectory replay and structure analysis workflows
|
|
15
|
+
- **examples**: add standardized IR-QRE trotter-5 analysis
|
|
16
|
+
- **examples**: add H3O+ 4-bit/6-bit/8-bit QPE benchmark
|
|
17
|
+
- **core**: support active space in QPE resource estimation
|
|
18
|
+
- **examples**: add 4-bit vs 8-bit QPE resolution benchmark
|
|
19
|
+
- **profiling**: add general-purpose timing utilities module
|
|
20
|
+
- **core**: add EFTQC resource estimation module
|
|
21
|
+
- **solvation**: add pure-NumPy analysis module for δ_corr-pol
|
|
22
|
+
- **utils**: add energy comparison plotting utility
|
|
23
|
+
- **solvation**: add Catalyst LLVM IR cache for QPE compilation
|
|
24
|
+
- **solvation**: add integration tests and migrate examples to production API
|
|
25
|
+
- **solvation**: add orchestrator with end-to-end three-mode MC workflow
|
|
26
|
+
- **solvation**: add MC loop with Metropolis acceptance and three-mode energy branching
|
|
27
|
+
- **solvation**: add energy computation module with three-mode callback factories
|
|
28
|
+
- **solvation**: add QPE circuit builder with parameterized @qjit compilation
|
|
29
|
+
- **solvation**: add phase extraction module for QPE energy decoding
|
|
30
|
+
- **solvation**: add data layer — config dataclasses and solvent models
|
|
31
|
+
- **solvation**: add package skeleton and test infrastructure
|
|
32
|
+
- **profiling**: expose public API in profiling/__init__.py
|
|
33
|
+
- **profiling**: add orchestrator with subprocess isolation and callback-based progress
|
|
34
|
+
- **profiling**: add qpe_profiler with three-phase QPE compilation profiling
|
|
35
|
+
- **profiling**: add catalyst_ir module with ir_output_dir and analyze_ir_stages
|
|
36
|
+
- **profiling**: add memory measurement module with MemorySnapshot, MemoryTimeline, ParentSideMonitor
|
|
37
|
+
- **core**: promote hamiltonian_utils from examples to src/q2m3/core/
|
|
38
|
+
- **core**: promote MoleculeConfig from examples to src/q2m3/molecule.py
|
|
39
|
+
- **examples**: add H2 cached QPE-driven MC solvation script
|
|
40
|
+
- **examples**: add QPE compile cache verification script
|
|
41
|
+
- **examples**: add parent-side monitoring and compiler subprocess RSS tracking
|
|
42
|
+
- **examples**: add H_fixed mode and IR lifecycle management to QPE profiler
|
|
43
|
+
- **examples**: add QPE compilation memory profiler for Catalyst IR analysis
|
|
44
|
+
- **orchestrator**: connect qpe_driven mode with statistics label adaptation
|
|
45
|
+
- **mc_loop**: add QPE-driven MC loop factory with every-step quantum evaluation
|
|
46
|
+
- **energy**: add vacuum cache and fused QPE callback for qpe_driven mode
|
|
47
|
+
- **config**: add qpe_driven mode to SolvationConfig
|
|
48
|
+
- **examples**: add mm_embedded QPE mode with runtime coefficient architecture
|
|
49
|
+
- **examples**: add solvation stabilization and Mulliken charge output to MC workflow
|
|
50
|
+
- **analysis**: add Catalyst timing aggregation for Dual-Circuit precompilation
|
|
51
|
+
- **examples**: add time statistics breakdown to h2_mc_solvation_qjit
|
|
52
|
+
- **examples**: add QJIT pre-compilation example and Catalyst performance guidelines
|
|
53
|
+
- **sampling**: add Monte Carlo solvation optimization module
|
|
54
|
+
- **profiling**: add fine-grained timing breakdown for QPE bottleneck analysis
|
|
55
|
+
- **examples**: integrate profiling to diagnose jit+lightning.gpu bottlenecks
|
|
56
|
+
- **examples**: add Catalyst benchmark to H2 QPE minimal example
|
|
57
|
+
- added badages to the landing github page of the repo
|
|
58
|
+
- added CI/CD workflow for the repo
|
|
59
|
+
- add EFTQC resource estimation using PennyLane DoubleFactorization API
|
|
60
|
+
- implement MM point charge embedding in QPE Hamiltonian
|
|
61
|
+
- add circuit visualization for QPE and RDM using qml.draw
|
|
62
|
+
- add RDM GPU acceleration and batched measurement optimization
|
|
63
|
+
- add quantum 1-RDM measurement for Mulliken charge analysis
|
|
64
|
+
- added lightning.gpu and lightning.qubit support for fast simulation with/without catalyst
|
|
65
|
+
- **qpe**: add Catalyst @qjit JIT compilation support
|
|
66
|
+
- **interfaces**: implement pyscf_to_pennylane_hamiltonian for molecular Hamiltonian generation
|
|
67
|
+
|
|
68
|
+
### Fix
|
|
69
|
+
|
|
70
|
+
- revised release-drafter workflow to avoid draft release on PR
|
|
71
|
+
- **solvation**: resolved warnings due to problematic solvent placement
|
|
72
|
+
- **solvation**: propagate hf_corrected deferred circuit metadata and IR cache status
|
|
73
|
+
- **solvation**: replace deprecated device shots with qml.set_shots transform
|
|
74
|
+
- **solvation**: use compile-time constant circuits for fixed mode QPE
|
|
75
|
+
- **examples**: restore hamiltonian_utils re-export removed by ruff autofix
|
|
76
|
+
- **examples**: fix catastrophic MM energy for large n_waters in cached QPE-MC
|
|
77
|
+
- resolve ruff lint errors and consolidate pre-commit hooks
|
|
78
|
+
- **examples**: improve scientific accuracy of three-mode QPE output
|
|
79
|
+
- **tests**: removed debug only test
|
|
80
|
+
- migrate DoubleFactorization API and enhance Catalyst GPU detection
|
|
81
|
+
- resolved CI/CD lint errors
|
|
82
|
+
- resolved all lint errors
|
|
83
|
+
- migrate to qml.set_shots() API for PennyLane v0.43+ compatibility
|
|
84
|
+
- resolve Catalyst @qjit BasisState incompatibility in QPE
|
|
85
|
+
- resolve Catalyst @qjit BasisState incompatibility in QPE
|
|
86
|
+
- correct QPE phase extraction with MSB-first bit ordering
|
|
87
|
+
- Catalyst results now correctly report lightning.qubit device
|
|
88
|
+
- correct Mulliken charge calculation and improve QPE demo output
|
|
89
|
+
- add active space MO-to-AO RDM transformation for Mulliken analysis
|
|
90
|
+
|
|
91
|
+
### Refactor
|
|
92
|
+
|
|
93
|
+
- **examples**: archive superseded scripts and restructure README
|
|
94
|
+
- **examples**: split h2_qpe_validation into three focused scripts
|
|
95
|
+
- **examples**: replace re-export imports with direct q2m3.profiling imports
|
|
96
|
+
- **examples**: slim qpe_memory_profile.py from 1555 to 579 lines
|
|
97
|
+
- **examples**: updated h2_three_mode_qpe_mc.py example and corresponding module files to enhance description accuracy in output file
|
|
98
|
+
- **examples**: fair three-mode comparison with rigorous analysis
|
|
99
|
+
- consolidate shared infrastructure into core library
|
|
100
|
+
- **examples**: updated naming for all existing examples and revised detail contents for all key readme files
|
|
101
|
+
- **example**: modularized mc_solvation and refactored all e2e examples
|
|
102
|
+
- **output**: add Catalyst Performance Summary to profiling report
|
|
103
|
+
- **examples**: address code review feedback
|
|
104
|
+
- **examples**: modularize h3op_qpe demo into package structure
|
q2m3-0.1.1/CITATION.cff
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# YAML 1.2
|
|
2
|
+
# Citation File Format -- https://citation-file-format.github.io/
|
|
3
|
+
# GitHub renders a "Cite this repository" button from this file.
|
|
4
|
+
cff-version: 1.2.0
|
|
5
|
+
title: "q2m3: A Hybrid Quantum-Classical Framework for QM/MM Simulations"
|
|
6
|
+
message: >-
|
|
7
|
+
If you use q2m3 in your research, please cite it using the metadata
|
|
8
|
+
from this file. After the first Zenodo release, prefer the
|
|
9
|
+
version-specific DOI to reference the exact code used.
|
|
10
|
+
type: software
|
|
11
|
+
authors:
|
|
12
|
+
- given-names: Jun
|
|
13
|
+
family-names: Ye
|
|
14
|
+
email: yjmaxpayne@hotmail.com
|
|
15
|
+
orcid: "https://orcid.org/0000-0003-1963-0865"
|
|
16
|
+
repository-code: "https://github.com/yjmaxpayne/q2m3"
|
|
17
|
+
url: "https://github.com/yjmaxpayne/q2m3"
|
|
18
|
+
abstract: >-
|
|
19
|
+
q2m3 is a research and workflow framework that bridges PySCF classical
|
|
20
|
+
quantum chemistry, PennyLane Quantum Phase Estimation circuits, and
|
|
21
|
+
explicit MM point-charge environments. It targets Early Fault-Tolerant
|
|
22
|
+
Quantum Computers (EFTQC) and provides compile-once / run-many
|
|
23
|
+
solvation experiments, fixed-MO one-electron embedding, and EFTQC
|
|
24
|
+
resource estimation for active-space Hamiltonians.
|
|
25
|
+
keywords:
|
|
26
|
+
- quantum computing
|
|
27
|
+
- quantum chemistry
|
|
28
|
+
- QM/MM
|
|
29
|
+
- quantum phase estimation
|
|
30
|
+
- PySCF
|
|
31
|
+
- PennyLane
|
|
32
|
+
- EFTQC
|
|
33
|
+
license: MIT
|
|
34
|
+
version: 0.1.1
|
|
35
|
+
date-released: "2026-05-11"
|
q2m3-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ye Jun <yjmaxpayne@hotmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|