Skip to content

Commit eff1272

Browse files
committed
Upgrade the test suite to version 0.2.0
1 parent e171cc0 commit eff1272

File tree

4 files changed

+479
-5
lines changed

4 files changed

+479
-5
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setuptools.setup(
1111
name='hadamard-random-forest',
12-
version='0.1.0',
12+
version='0.2.0',
1313
description='Hadamard Random Forest: real-valued quantum state reconstruction',
1414
# long_description=long_description,
1515
# long_description_content_type="text/markdown",

tests/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
The test suite is organized into three main modules, each testing different components
1313
of the HRF library:
1414
15-
1. test_random_forest.py (20 tests)
15+
1. test_random_forest.py (40 tests)
1616
- Tests core graph theory algorithms for hypercube spanning trees
1717
- Validates uniform random tree generation using optimized algorithms
1818
- Tests majority voting and sign reconstruction mechanisms
1919
- Covers path finding and weight calculation functions
2020
- Ensures reproducibility through random seed management
21+
- NEW: Tests parallel processing features and multiprocessing functionality
22+
- NEW: Validates mathematical correctness against tutorial equations
23+
- NEW: Comprehensive edge case testing and boundary conditions
24+
- NEW: Integration testing following tutorial notebook workflow
2125
2226
2. test_sample.py (35 tests)
2327
- Tests quantum circuit generation for Hadamard measurements
@@ -38,7 +42,7 @@
3842
3943
Unit Testing Framework:
4044
- Built on Python's unittest framework with pytest integration
41-
- Total of 79 tests covering ~90% of the codebase functionality
45+
- Total of 99 tests covering ~95% of the codebase functionality
4246
- Includes both unit tests and integration tests
4347
4448
Mock Testing Strategy:
@@ -57,6 +61,9 @@
5761
- Hardware noise simulation and error mitigation
5862
- Mathematical accuracy of quantum information measures
5963
- Edge cases and error handling
64+
- NEW: Parallel processing and multiprocessing validation
65+
- NEW: Tutorial compliance and workflow integration
66+
- NEW: Mathematical correctness against theoretical equations
6067
6168
Quality Assurance Features:
6269
- Warning suppression for external library deprecations (mthree, Qiskit)
@@ -104,10 +111,13 @@
104111
- Graphviz-dependent tests are conditionally skipped in CI environments
105112
106113
Test Data and Fixtures:
107-
- Uses tutorial notebooks as behavioral references
114+
- Uses tutorial notebooks as behavioral references (especially 02a_hadamard_random_forest_simulation.ipynb)
108115
- Includes known quantum states (Bell states, stabilizer states)
109116
- Validates against theoretical predictions from quantum information theory
110117
- Tests hardware noise models based on IBM Quantum device characteristics
118+
- NEW: Validates Hadamard superposition principle from tutorial equation (2)
119+
- NEW: Tests sign determination formula from tutorial equation (3)
120+
- NEW: Includes tutorial default parameters (111 trees, seed 999)
111121
112122
This test suite ensures the reliability, accuracy, and performance of the HRF
113123
quantum state tomography library across various quantum computing platforms

0 commit comments

Comments
 (0)