rcc-refcert 0.1.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.
- rcc_refcert-0.1.0/.github/ISSUE_TEMPLATE/bug-report.yml +46 -0
- rcc_refcert-0.1.0/.github/ISSUE_TEMPLATE/config.yml +3 -0
- rcc_refcert-0.1.0/.github/ISSUE_TEMPLATE/documentation.yml +34 -0
- rcc_refcert-0.1.0/.github/ISSUE_TEMPLATE/scientific-proposal.yml +57 -0
- rcc_refcert-0.1.0/.github/workflows/ci.yml +160 -0
- rcc_refcert-0.1.0/CHANGELOG.md +55 -0
- rcc_refcert-0.1.0/CITATION.cff +52 -0
- rcc_refcert-0.1.0/CONTRIBUTING.md +99 -0
- rcc_refcert-0.1.0/LICENSE +21 -0
- rcc_refcert-0.1.0/MANIFEST.in +14 -0
- rcc_refcert-0.1.0/NOTICE.md +5 -0
- rcc_refcert-0.1.0/PKG-INFO +369 -0
- rcc_refcert-0.1.0/RCC_Quickstart.ipynb +227 -0
- rcc_refcert-0.1.0/README.md +335 -0
- rcc_refcert-0.1.0/docs/CONVENTIONS.md +147 -0
- rcc_refcert-0.1.0/docs/END_TO_END_EXAMPLE.md +163 -0
- rcc_refcert-0.1.0/docs/MODEL_GUIDE.md +173 -0
- rcc_refcert-0.1.0/docs/OUTPUT_CONTRACT.md +149 -0
- rcc_refcert-0.1.0/docs/PAPER_MAP.md +97 -0
- rcc_refcert-0.1.0/docs/SCIENTIFIC_SCOPE.md +168 -0
- rcc_refcert-0.1.0/examples/paired_reset_lower_bound.py +47 -0
- rcc_refcert-0.1.0/pyproject.toml +75 -0
- rcc_refcert-0.1.0/quickstart.py +176 -0
- rcc_refcert-0.1.0/requirements-quickstart.txt +6 -0
- rcc_refcert-0.1.0/results/reference_report.md +134 -0
- rcc_refcert-0.1.0/results/reference_suite.json +1574 -0
- rcc_refcert-0.1.0/setup.cfg +4 -0
- rcc_refcert-0.1.0/src/rcc_refcert/__init__.py +63 -0
- rcc_refcert-0.1.0/src/rcc_refcert/__main__.py +3 -0
- rcc_refcert-0.1.0/src/rcc_refcert/_version.py +3 -0
- rcc_refcert-0.1.0/src/rcc_refcert/audit.py +421 -0
- rcc_refcert-0.1.0/src/rcc_refcert/bellman_choi.py +338 -0
- rcc_refcert-0.1.0/src/rcc_refcert/cases.py +151 -0
- rcc_refcert-0.1.0/src/rcc_refcert/certificate_error.py +106 -0
- rcc_refcert-0.1.0/src/rcc_refcert/cli.py +303 -0
- rcc_refcert-0.1.0/src/rcc_refcert/domination.py +160 -0
- rcc_refcert-0.1.0/src/rcc_refcert/examples.py +507 -0
- rcc_refcert-0.1.0/src/rcc_refcert/fixed_point.py +112 -0
- rcc_refcert-0.1.0/src/rcc_refcert/gain_bounds.py +102 -0
- rcc_refcert-0.1.0/src/rcc_refcert/gain_cost.py +356 -0
- rcc_refcert-0.1.0/src/rcc_refcert/metadata.py +49 -0
- rcc_refcert-0.1.0/src/rcc_refcert/model.py +262 -0
- rcc_refcert-0.1.0/src/rcc_refcert/numeric.py +67 -0
- rcc_refcert-0.1.0/src/rcc_refcert/paired_reset_example.py +455 -0
- rcc_refcert-0.1.0/src/rcc_refcert/prefix.py +62 -0
- rcc_refcert-0.1.0/src/rcc_refcert/quantum.py +217 -0
- rcc_refcert-0.1.0/src/rcc_refcert/rank_encoding.py +86 -0
- rcc_refcert-0.1.0/src/rcc_refcert/reference_data/reference_report.md +134 -0
- rcc_refcert-0.1.0/src/rcc_refcert/reference_data/reference_suite.json +1574 -0
- rcc_refcert-0.1.0/src/rcc_refcert/reference_potential.py +430 -0
- rcc_refcert-0.1.0/src/rcc_refcert/render.py +743 -0
- rcc_refcert-0.1.0/src/rcc_refcert/report.py +360 -0
- rcc_refcert-0.1.0/src/rcc_refcert/semantics.py +248 -0
- rcc_refcert-0.1.0/src/rcc_refcert/status.py +34 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/PKG-INFO +369 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/SOURCES.txt +74 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/dependency_links.txt +1 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/entry_points.txt +2 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/requires.txt +12 -0
- rcc_refcert-0.1.0/src/rcc_refcert.egg-info/top_level.txt +1 -0
- rcc_refcert-0.1.0/tests/notebook_smoke.py +38 -0
- rcc_refcert-0.1.0/tests/test_audit_cli_report.py +153 -0
- rcc_refcert-0.1.0/tests/test_bellman_choi.py +109 -0
- rcc_refcert-0.1.0/tests/test_boundaries.py +87 -0
- rcc_refcert-0.1.0/tests/test_certificate_numerics.py +233 -0
- rcc_refcert-0.1.0/tests/test_conventions.py +57 -0
- rcc_refcert-0.1.0/tests/test_dephase_or_halt.py +190 -0
- rcc_refcert-0.1.0/tests/test_documentation.py +384 -0
- rcc_refcert-0.1.0/tests/test_domination.py +109 -0
- rcc_refcert-0.1.0/tests/test_f5_generation.py +14 -0
- rcc_refcert-0.1.0/tests/test_gain_cost.py +188 -0
- rcc_refcert-0.1.0/tests/test_multiblock.py +76 -0
- rcc_refcert-0.1.0/tests/test_paired_reset_example.py +139 -0
- rcc_refcert-0.1.0/tests/test_product_interface.py +187 -0
- rcc_refcert-0.1.0/tests/test_rank_encoding.py +99 -0
- rcc_refcert-0.1.0/tests/test_scientific_invariants.py +789 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report an unexpected numerical, interface, or documentation result.
|
|
3
|
+
title: "[Bug] "
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: observed
|
|
7
|
+
attributes:
|
|
8
|
+
label: Observed behavior
|
|
9
|
+
description: Include the command, API call, case, and complete outcome that differed from expectation.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: expected
|
|
14
|
+
attributes:
|
|
15
|
+
label: Expected behavior
|
|
16
|
+
description: Explain the expected numerical, mathematical, or interface result.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: reproduce
|
|
21
|
+
attributes:
|
|
22
|
+
label: Minimal reproduction
|
|
23
|
+
description: Provide a minimal model or the shortest sequence of commands that reproduces the issue.
|
|
24
|
+
render: shell
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: input
|
|
28
|
+
id: version
|
|
29
|
+
attributes:
|
|
30
|
+
label: Package version or commit
|
|
31
|
+
placeholder: rcc-refcert 0.1.0 or commit SHA
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: input
|
|
35
|
+
id: environment
|
|
36
|
+
attributes:
|
|
37
|
+
label: Python, NumPy, and operating system
|
|
38
|
+
placeholder: Python 3.12, NumPy 2.x, Ubuntu
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: diagnostics
|
|
43
|
+
attributes:
|
|
44
|
+
label: Relevant diagnostics
|
|
45
|
+
description: Add residuals, tolerances, support warnings, or JSON fields that help localize the issue. Remove private data before posting.
|
|
46
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Documentation improvement
|
|
2
|
+
description: Improve a scientific explanation, example, or RCC paper-to-code connection.
|
|
3
|
+
title: "[Docs] "
|
|
4
|
+
body:
|
|
5
|
+
- type: input
|
|
6
|
+
id: location
|
|
7
|
+
attributes:
|
|
8
|
+
label: Location
|
|
9
|
+
description: Name the page, section, notebook cell, CLI output, or report passage.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: dropdown
|
|
13
|
+
id: audience
|
|
14
|
+
attributes:
|
|
15
|
+
label: Intended reader
|
|
16
|
+
options:
|
|
17
|
+
- First-time RCC paper reader
|
|
18
|
+
- Quantum-information researcher
|
|
19
|
+
- Model or certificate contributor
|
|
20
|
+
- Numerical or software contributor
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: problem
|
|
25
|
+
attributes:
|
|
26
|
+
label: What is unclear or missing?
|
|
27
|
+
description: Identify the scientific distinction, workflow step, or project boundary that is difficult to understand.
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: improvement
|
|
32
|
+
attributes:
|
|
33
|
+
label: Suggested improvement
|
|
34
|
+
description: A draft is welcome but not required.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Scientific proposal
|
|
2
|
+
description: Propose a model, certificate method, or structure-fair research extension.
|
|
3
|
+
title: "[Research] "
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Use this form for a concrete extension to the finite-control RCC research kernel. Proposals may introduce a model, certificate method, cost assignment, negative witness, or verification technique. The form keeps the scientific question distinct from the claims the current package can already verify.
|
|
9
|
+
- type: textarea
|
|
10
|
+
id: question
|
|
11
|
+
attributes:
|
|
12
|
+
label: Scientific question
|
|
13
|
+
description: What structural resource, model family, certificate problem, or boundary should this work clarify?
|
|
14
|
+
placeholder: State the research question and why it matters for structure-fair complexity.
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- type: dropdown
|
|
18
|
+
id: area
|
|
19
|
+
attributes:
|
|
20
|
+
label: Primary area
|
|
21
|
+
options:
|
|
22
|
+
- Physical or finite-control model
|
|
23
|
+
- Bellman–Choi certificate
|
|
24
|
+
- Reference-potential certificate
|
|
25
|
+
- Reference gain–cost encoding
|
|
26
|
+
- Family-uniform or scaling analysis
|
|
27
|
+
- Numerical verification
|
|
28
|
+
- Interface or simulation backend
|
|
29
|
+
- Documentation or example
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: construction
|
|
34
|
+
attributes:
|
|
35
|
+
label: Proposed construction
|
|
36
|
+
description: Describe the reference, controls, operations, certificate object, or algorithm at the level currently known.
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: evidence
|
|
41
|
+
attributes:
|
|
42
|
+
label: Expected executable evidence
|
|
43
|
+
description: Which finite-model outcome, invariant, negative witness, or regression should the package produce?
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
- type: textarea
|
|
47
|
+
id: claim_boundary
|
|
48
|
+
attributes:
|
|
49
|
+
label: Claim boundary
|
|
50
|
+
description: Identify the accompanying analytic or physical obligations, such as RCon, TC, family uniformity, or theorem-level interpretation.
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
- type: textarea
|
|
54
|
+
id: references
|
|
55
|
+
attributes:
|
|
56
|
+
label: RCC paper map and references
|
|
57
|
+
description: List the RCC sections, equations, or external results needed to evaluate the proposal.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
RCC_REFCERT_SOURCE_REVISION: ${{ github.sha }}
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
source-tree:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.10"
|
|
22
|
+
cache: pip
|
|
23
|
+
- name: Install source-tree test dependencies
|
|
24
|
+
run: python -m pip install "numpy==1.26.4" "pytest>=8"
|
|
25
|
+
- name: Test without installed package metadata
|
|
26
|
+
run: PYTHONPATH=src python -W error -m pytest
|
|
27
|
+
- name: Reproduce frozen report from source
|
|
28
|
+
run: >-
|
|
29
|
+
PYTHONPATH=src python -m rcc_refcert reproduce --check
|
|
30
|
+
results/reference_report.md
|
|
31
|
+
|
|
32
|
+
test:
|
|
33
|
+
needs: source-tree
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
include:
|
|
39
|
+
- python-version: "3.10"
|
|
40
|
+
numpy-spec: "numpy==1.26.4"
|
|
41
|
+
- python-version: "3.11"
|
|
42
|
+
numpy-spec: "numpy>=1.26"
|
|
43
|
+
- python-version: "3.12"
|
|
44
|
+
numpy-spec: "numpy>=1.26"
|
|
45
|
+
- python-version: "3.13"
|
|
46
|
+
numpy-spec: "numpy>=1.26"
|
|
47
|
+
- python-version: "3.14"
|
|
48
|
+
numpy-spec: "numpy>=1.26"
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
51
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
52
|
+
with:
|
|
53
|
+
python-version: ${{ matrix.python-version }}
|
|
54
|
+
cache: pip
|
|
55
|
+
- name: Install
|
|
56
|
+
run: |
|
|
57
|
+
python -m pip install "${{ matrix.numpy-spec }}"
|
|
58
|
+
python -m pip install -e ".[dev]"
|
|
59
|
+
- name: Test
|
|
60
|
+
run: |
|
|
61
|
+
ruff check src tests examples quickstart.py RCC_Quickstart.ipynb
|
|
62
|
+
ruff format --check src tests examples quickstart.py RCC_Quickstart.ipynb
|
|
63
|
+
python -W error -m pytest
|
|
64
|
+
- name: Check installed version identity
|
|
65
|
+
run: |
|
|
66
|
+
python -c "from importlib.metadata import version; import rcc_refcert; assert rcc_refcert.__version__ == version('rcc-refcert')"
|
|
67
|
+
- name: Reproduce frozen report
|
|
68
|
+
run: rcc-refcert reproduce --check
|
|
69
|
+
|
|
70
|
+
distribution-smoke:
|
|
71
|
+
needs: source-tree
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
75
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
76
|
+
with:
|
|
77
|
+
python-version: "3.12"
|
|
78
|
+
cache: pip
|
|
79
|
+
- name: Build wheel and source distribution
|
|
80
|
+
run: |
|
|
81
|
+
python -m pip install "build>=1.2"
|
|
82
|
+
python -m build
|
|
83
|
+
- name: Install and exercise each distribution outside the checkout
|
|
84
|
+
run: |
|
|
85
|
+
distribution_directory="$PWD/dist"
|
|
86
|
+
for artifact in "$distribution_directory"/*.whl "$distribution_directory"/*.tar.gz; do
|
|
87
|
+
installation_root="$(mktemp -d)"
|
|
88
|
+
environment="$installation_root/environment"
|
|
89
|
+
python -m venv "$environment"
|
|
90
|
+
"$environment/bin/python" -m pip install "$artifact"
|
|
91
|
+
mkdir "$installation_root/run"
|
|
92
|
+
cd "$installation_root/run"
|
|
93
|
+
"$environment/bin/rcc-refcert" reproduce --check
|
|
94
|
+
"$environment/bin/rcc-refcert" example dephase-or-halt --format json
|
|
95
|
+
"$environment/bin/python" -c "from importlib.metadata import version; import rcc_refcert; assert rcc_refcert.__version__ == version('rcc-refcert')"
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
public-entry-smoke:
|
|
99
|
+
needs: source-tree
|
|
100
|
+
strategy:
|
|
101
|
+
fail-fast: false
|
|
102
|
+
matrix:
|
|
103
|
+
os:
|
|
104
|
+
- windows-latest
|
|
105
|
+
- macos-latest
|
|
106
|
+
runs-on: ${{ matrix.os }}
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
109
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
110
|
+
with:
|
|
111
|
+
python-version: "3.12"
|
|
112
|
+
cache: pip
|
|
113
|
+
- name: Run the complete public quickstart entry point on Windows
|
|
114
|
+
if: runner.os == 'Windows'
|
|
115
|
+
run: python quickstart.py
|
|
116
|
+
- name: Run the reproduction entry point on macOS
|
|
117
|
+
if: runner.os == 'macOS'
|
|
118
|
+
run: python quickstart.py --reproduce-only
|
|
119
|
+
|
|
120
|
+
notebook:
|
|
121
|
+
needs: source-tree
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
125
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
126
|
+
with:
|
|
127
|
+
python-version: "3.12"
|
|
128
|
+
cache: pip
|
|
129
|
+
- name: Install Notebook environment
|
|
130
|
+
run: python -m pip install -e ".[notebook]"
|
|
131
|
+
- name: Register declared kernel
|
|
132
|
+
run: >-
|
|
133
|
+
python -m ipykernel install --user --name rcc-refcert
|
|
134
|
+
--display-name "Python (rcc-refcert)"
|
|
135
|
+
- name: Validate and execute Notebook
|
|
136
|
+
run: python tests/notebook_smoke.py
|
|
137
|
+
|
|
138
|
+
required:
|
|
139
|
+
if: ${{ always() }}
|
|
140
|
+
needs:
|
|
141
|
+
- source-tree
|
|
142
|
+
- test
|
|
143
|
+
- notebook
|
|
144
|
+
- distribution-smoke
|
|
145
|
+
- public-entry-smoke
|
|
146
|
+
runs-on: ubuntu-latest
|
|
147
|
+
steps:
|
|
148
|
+
- name: Verify required jobs
|
|
149
|
+
env:
|
|
150
|
+
SOURCE_TREE_RESULT: ${{ needs.source-tree.result }}
|
|
151
|
+
TEST_RESULT: ${{ needs.test.result }}
|
|
152
|
+
NOTEBOOK_RESULT: ${{ needs.notebook.result }}
|
|
153
|
+
DISTRIBUTION_SMOKE_RESULT: ${{ needs.distribution-smoke.result }}
|
|
154
|
+
PUBLIC_ENTRY_SMOKE_RESULT: ${{ needs.public-entry-smoke.result }}
|
|
155
|
+
run: |
|
|
156
|
+
test "$SOURCE_TREE_RESULT" = success
|
|
157
|
+
test "$TEST_RESULT" = success
|
|
158
|
+
test "$NOTEBOOK_RESULT" = success
|
|
159
|
+
test "$DISTRIBUTION_SMOKE_RESULT" = success
|
|
160
|
+
test "$PUBLIC_ENTRY_SMOKE_RESULT" = success
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-09-06)
|
|
4
|
+
|
|
5
|
+
Initial release of `rcc-refcert`, a Python research toolkit for finite-control
|
|
6
|
+
models and reference certificates in structure-fair quantum circuit complexity.
|
|
7
|
+
The implementation follows manuscript version 4; see the
|
|
8
|
+
[paper-to-code map](docs/PAPER_MAP.md) for its relation to the public paper.
|
|
9
|
+
|
|
10
|
+
### Models and certificates
|
|
11
|
+
|
|
12
|
+
- Define prefix-controlled quantum processes and compute their terminating
|
|
13
|
+
program semidensities, with explicit treatment of nonhalting sectors.
|
|
14
|
+
- Check fixed-model reference domination, verify Bellman–Choi and
|
|
15
|
+
reference-potential certificates, and analyze reference gain–cost assignments
|
|
16
|
+
and sufficient prefix-code completions.
|
|
17
|
+
- Construct and audit new finite-control models through the public Python API.
|
|
18
|
+
|
|
19
|
+
### Examples and reproducibility
|
|
20
|
+
|
|
21
|
+
- Three reference cases cover a closed-form construction, a multiblock model
|
|
22
|
+
with an intentional sufficient-route failure, and a recurrent nonhalting
|
|
23
|
+
boundary.
|
|
24
|
+
- A complete paired-reset example connects a declared model and its reference
|
|
25
|
+
certificate to an RCC lower bound of one slot, attained by an explicit
|
|
26
|
+
one-slot preparation.
|
|
27
|
+
- The `examples`, `example`, and `reproduce` commands provide readable reports
|
|
28
|
+
and versioned JSON. Packaged reference results support reproducibility checks
|
|
29
|
+
from both source checkouts and installed distributions.
|
|
30
|
+
- A guided Jupyter notebook and model guide support a first run and the
|
|
31
|
+
construction of new research inputs.
|
|
32
|
+
|
|
33
|
+
### Results and numerical conventions
|
|
34
|
+
|
|
35
|
+
- Reports identify check outcomes, evidence levels, numerical tolerances, and
|
|
36
|
+
agreement with reference expectations.
|
|
37
|
+
- Certificate reports separate candidate constants from usable upper bounds
|
|
38
|
+
that include numerical error corrections. Unresolved checks return
|
|
39
|
+
`inconclusive` with no usable constant; valid certificates can remain
|
|
40
|
+
unresolved for slowly halting dynamics.
|
|
41
|
+
- Gain–cost checks account for numerical uncertainty at the Kraft boundary,
|
|
42
|
+
and suggested prefix codes use upper gain estimates. Unresolved linear
|
|
43
|
+
outputs retain finite-depth evidence and return no domination constant.
|
|
44
|
+
- The [output contract](docs/OUTPUT_CONTRACT.md) and
|
|
45
|
+
[numerical conventions](docs/CONVENTIONS.md) describe result fields, support
|
|
46
|
+
diagnostics, and precision requirements.
|
|
47
|
+
|
|
48
|
+
### Installation
|
|
49
|
+
|
|
50
|
+
- Supports Python 3.10–3.14, with verified entry points on Linux, Windows, and
|
|
51
|
+
macOS.
|
|
52
|
+
- A one-command quickstart creates an isolated environment with locked
|
|
53
|
+
verification dependencies, runs the test suite, and reproduces the reference
|
|
54
|
+
results. Fresh output is written separately from the reference files.
|
|
55
|
+
- Wheel and source distributions include the reference evidence and CLI.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, cite the software and the associated RCC paper."
|
|
3
|
+
title: "rcc-refcert: a Python research toolkit for structure-fair quantum circuit complexity"
|
|
4
|
+
type: software
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
date-released: 2026-09-06
|
|
7
|
+
license: MIT
|
|
8
|
+
repository-code: "https://github.com/yeruciwenrou-dotcom/rcc-refcert"
|
|
9
|
+
abstract: >-
|
|
10
|
+
rcc-refcert is a Python research toolkit for structure-fair quantum circuit
|
|
11
|
+
complexity. It implements finite-control models and reference-certificate
|
|
12
|
+
methods of Reference-Contingent Complexity (RCC), making the supplied resources,
|
|
13
|
+
allowed quantum processes, and description and generation costs explicit.
|
|
14
|
+
Researchers can construct prefix-controlled quantum-process models, compute
|
|
15
|
+
terminating program semidensities, and check Bellman-Choi, reference-potential,
|
|
16
|
+
fixed-model domination, and reference gain-cost certificates. Three bundled
|
|
17
|
+
reference cases cover closed-form, multiblock, and nonhalting behavior. A worked
|
|
18
|
+
paired-reset model connects the physical declaration to a numerical RCC lower
|
|
19
|
+
bound of one slot, attained by an explicit one-slot preparation. The package
|
|
20
|
+
provides a Python API, command-line tools, a Jupyter quickstart, and versioned
|
|
21
|
+
numerical reports. Its checks provide reproducible evidence for declared
|
|
22
|
+
finite models, with explicit pass, fail, inconclusive, and not-applicable
|
|
23
|
+
outcomes. The accompanying paper supplies the physical and analytic premises
|
|
24
|
+
of the general RCC framework.
|
|
25
|
+
keywords:
|
|
26
|
+
- quantum circuit complexity
|
|
27
|
+
- structure-fairness
|
|
28
|
+
- reference-contingent complexity
|
|
29
|
+
- quantum information
|
|
30
|
+
- finite-control quantum processes
|
|
31
|
+
- reference certificates
|
|
32
|
+
- reproducible research
|
|
33
|
+
authors:
|
|
34
|
+
- family-names: Liu
|
|
35
|
+
given-names: HongZheng
|
|
36
|
+
- family-names: Tian
|
|
37
|
+
given-names: YiNuo
|
|
38
|
+
- family-names: Wu
|
|
39
|
+
given-names: Zhiyue
|
|
40
|
+
preferred-citation:
|
|
41
|
+
type: article
|
|
42
|
+
title: "Structure-Fair Quantum Circuit Complexity: An Auditable Information-Theoretic Lower Bound"
|
|
43
|
+
authors:
|
|
44
|
+
- family-names: Liu
|
|
45
|
+
given-names: HongZheng
|
|
46
|
+
- family-names: Tian
|
|
47
|
+
given-names: YiNuo
|
|
48
|
+
- family-names: Wu
|
|
49
|
+
given-names: Zhiyue
|
|
50
|
+
year: 2025
|
|
51
|
+
journal: "arXiv preprint arXiv:2509.18205"
|
|
52
|
+
doi: "10.48550/arXiv.2509.18205"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
RCC studies quantum circuit complexity under an explicit physical generation
|
|
4
|
+
model. Its structure-fairness principle accounts for the structure supplied by
|
|
5
|
+
the reference background, available dynamics, and program description, together
|
|
6
|
+
with the resources spent on generation.
|
|
7
|
+
|
|
8
|
+
`rcc-refcert` makes finite models and certificate methods available for
|
|
9
|
+
researchers to test and extend. Contributions can bring new physical models
|
|
10
|
+
into the framework, compare certificate constructions, improve numerical
|
|
11
|
+
reliability, or help readers reproduce and understand the results.
|
|
12
|
+
|
|
13
|
+
Contributions can address one layer at a time:
|
|
14
|
+
|
|
15
|
+
- **physical models:** new finite-control examples, resource assignments,
|
|
16
|
+
nonhalting mechanisms, or controlled counterexamples;
|
|
17
|
+
- **certificate methods:** Bellman–Choi or reference-potential construction,
|
|
18
|
+
gain–cost encodings, negative witnesses, or family-scaling diagnostics;
|
|
19
|
+
- **numerical reliability:** interval bounds, exact arithmetic, conditioning
|
|
20
|
+
diagnostics, solver integrations, or independent realizations;
|
|
21
|
+
- **interfaces:** model serialization, larger simulation backends, and stable
|
|
22
|
+
machine-readable outputs;
|
|
23
|
+
- **explanation and reproduction:** clearer derivations, examples, notebooks,
|
|
24
|
+
tests, and RCC paper-to-code maps.
|
|
25
|
+
|
|
26
|
+
For a substantial scientific change, open a **Scientific proposal** describing
|
|
27
|
+
the model or certificate object, the RCC result it affects, and the evidence
|
|
28
|
+
needed to assess it. Use the bug or documentation issue form for a specific
|
|
29
|
+
problem, with a reproducible input or a link to the affected passage.
|
|
30
|
+
|
|
31
|
+
## Scientific contract
|
|
32
|
+
|
|
33
|
+
Read [`docs/SCIENTIFIC_SCOPE.md`](docs/SCIENTIFIC_SCOPE.md) and
|
|
34
|
+
[`docs/CONVENTIONS.md`](docs/CONVENTIONS.md) before changing the mathematical
|
|
35
|
+
core. Changes to code weighting, Kraus composition, direct-sum order,
|
|
36
|
+
vectorization, Choi tensor order, support handling, or fixed-point gates must
|
|
37
|
+
explain their mathematical effect and include a focused regression.
|
|
38
|
+
|
|
39
|
+
A convention or certificate change normally needs both:
|
|
40
|
+
|
|
41
|
+
- a positive example that exercises the intended path;
|
|
42
|
+
- a controlled negative or boundary example that catches the likely wrong
|
|
43
|
+
convention.
|
|
44
|
+
|
|
45
|
+
Keep the claim layers visible in code, tests, and prose:
|
|
46
|
+
|
|
47
|
+
1. a floating-point outcome for one finite input;
|
|
48
|
+
2. a fixed-model semidensity, domination, or certificate statement;
|
|
49
|
+
3. a model-family statement requiring a uniform argument;
|
|
50
|
+
4. the RCC theorem under its complete physical and transcription hypotheses.
|
|
51
|
+
|
|
52
|
+
The package directly produces the first two layers. A family-level or
|
|
53
|
+
theorem-level claim also needs its uniform analytic, physical, and transcription
|
|
54
|
+
arguments.
|
|
55
|
+
|
|
56
|
+
## Adding a model or certificate
|
|
57
|
+
|
|
58
|
+
A bundled model should expose a distinct physical mechanism, formula,
|
|
59
|
+
convention risk, or mathematical boundary. Document:
|
|
60
|
+
|
|
61
|
+
- the reference state, control spaces, actions, codewords, and intended
|
|
62
|
+
physical interpretation;
|
|
63
|
+
- the Appendix F/H objects it exercises;
|
|
64
|
+
- the expected outcomes, including designed route failures or boundaries;
|
|
65
|
+
- the test that would fail under the most plausible incorrect implementation.
|
|
66
|
+
|
|
67
|
+
An expected H.70 failure records a code-length shortfall along that sufficient
|
|
68
|
+
route. An `inconclusive` result records an unresolved numerical condition. Check
|
|
69
|
+
the other certificate routes for the original model; adopting suggested
|
|
70
|
+
codewords changes its program weights and defines a re-encoded model.
|
|
71
|
+
Family-uniform reference admissibility needs the corresponding uniform analytic
|
|
72
|
+
argument.
|
|
73
|
+
|
|
74
|
+
Keep dependencies few and tied to a clear package responsibility. Add parameter
|
|
75
|
+
sweeps or user interfaces when they support a defined scientific use case and
|
|
76
|
+
preserve the minimal kernel.
|
|
77
|
+
|
|
78
|
+
## Local verification
|
|
79
|
+
|
|
80
|
+
Install the development environment and run the core checks:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
python -m pip install -e ".[dev]"
|
|
84
|
+
ruff check src tests examples quickstart.py RCC_Quickstart.ipynb
|
|
85
|
+
ruff format --check src tests examples quickstart.py RCC_Quickstart.ipynb
|
|
86
|
+
python -W error -m pytest
|
|
87
|
+
rcc-refcert reproduce --check
|
|
88
|
+
python -m build
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
CI also executes the Notebook in its declared kernel, installs both distribution
|
|
92
|
+
formats outside the checkout, and checks the public entry points on Windows
|
|
93
|
+
and macOS. Certificate changes must preserve the distinction between a supplied
|
|
94
|
+
candidate and the returned upper constant, including near-critical and
|
|
95
|
+
nonhalting boundary regressions.
|
|
96
|
+
|
|
97
|
+
If the scientific output intentionally changes, explain why, update the
|
|
98
|
+
declared expectations, and regenerate both frozen reference files from the same
|
|
99
|
+
verified run.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HongZheng Liu, YiNuo Tian, and Zhiyue Wu
|
|
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.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include CHANGELOG.md
|
|
2
|
+
include CITATION.cff
|
|
3
|
+
include CONTRIBUTING.md
|
|
4
|
+
include RCC_Quickstart.ipynb
|
|
5
|
+
include quickstart.py
|
|
6
|
+
include requirements-quickstart.txt
|
|
7
|
+
recursive-include .github *.yml
|
|
8
|
+
recursive-include docs *.md
|
|
9
|
+
recursive-include examples *.py
|
|
10
|
+
recursive-include results *.md
|
|
11
|
+
recursive-include results *.json
|
|
12
|
+
recursive-include tests *.py
|
|
13
|
+
recursive-include src/rcc_refcert/reference_data *.md
|
|
14
|
+
recursive-include src/rcc_refcert/reference_data *.json
|