Skip to main content

QCOS: Quantum Circuit Optimization System

Scientific Validation Report and Technical White Paper​

Softquantus Inc. Version 1.0 β€” January 2026


Abstract​

We present QCOS (Quantum Circuit Optimization System), a comprehensive framework for optimizing variational quantum algorithms on near-term quantum hardware. This white paper documents the rigorous scientific validation of QCOS using the hydrogen molecule (Hβ‚‚) ground state energy problem as a benchmark. Our validation demonstrates: (1) exact spectral equivalence between independently-derived Hamiltonians (Qiskit Nature vs OpenFermion), confirming implementation correctness; (2) systematic characterization of shot noise scaling following the expected σ² ∝ 1/N relationship with RΒ² = 0.994; (3) optimal multi-start configuration analysis showing 10 restarts provides best exploration-exploitation trade-off; and (4) a comprehensive test suite of 35 unit tests covering Pauli conventions, energy calculations, and ansatz properties. All experiments use reproducible random seeds and paired statistical comparisons to ensure publication-grade rigor.

Keywords: Variational Quantum Eigensolver, VQE, Quantum Chemistry, NISQ, Quantum Optimization, Shot Noise, Multi-start Optimization


1. Introduction​

1.1 Motivation​

Near-term quantum computers operate in the Noisy Intermediate-Scale Quantum (NISQ) era, characterized by limited qubit counts (50–1000), short coherence times, and significant gate errors. Variational Quantum Algorithms (VQAs) have emerged as the leading approach for extracting computational value from these devices by combining parameterized quantum circuits with classical optimization.

The Variational Quantum Eigensolver (VQE) represents the canonical VQA for quantum chemistry, enabling ground state energy calculations for molecular systems. However, VQE faces several practical challenges:

  1. Shot noise: Finite measurement samples introduce statistical uncertainty
  2. Barren plateaus: Gradient vanishing in high-dimensional parameter spaces
  3. Local minima: Non-convex optimization landscapes trap gradient-based methods
  4. Hardware noise: Gate errors and decoherence corrupt quantum states

QCOS addresses these challenges through systematic optimization techniques including adaptive shot allocation, multi-start exploration, and intelligent parameter initialization.

1.2 Contributions​

This white paper makes the following contributions:

  1. Rigorous Hamiltonian Validation: We prove spectral equivalence between Qiskit Nature and OpenFermion Hβ‚‚ Hamiltonians, with all 16 eigenvalues matching within machine precision (< 10⁻¹² Ha).

  2. Shot Noise Characterization: We demonstrate that energy estimation variance follows the theoretical σ² ∝ 1/N scaling with RΒ² = 0.994, validating our measurement implementation.

  3. Multi-start Optimization Analysis: We systematically compare 1, 2, 3, 5, and 10 restarts with fixed total budget, identifying optimal configurations for the Hβ‚‚ problem.

  4. Comprehensive Test Suite: We provide 35 unit tests covering Pauli string conventions, Hamiltonian properties, energy calculations, and ansatz correctness.

  5. Reproducible Methodology: All experiments use fixed random seeds, paired comparisons, and bootstrap confidence intervals for publication-grade statistical rigor.


2. Theoretical Background​

2.1 The Variational Quantum Eigensolver​

The VQE algorithm estimates ground state energies by minimizing the expectation value:

$$E(\vec{\theta}) = \langle \psi(\vec{\theta}) | \hat{H} | \psi(\vec{\theta}) \rangle$$

where $|\psi(\vec{\theta})\rangle = U(\vec{\theta})|0\rangle$ is a parameterized quantum state prepared by ansatz circuit $U(\vec{\theta})$, and $\hat{H}$ is the molecular Hamiltonian expressed in the Pauli basis:

$$\hat{H} = \sum_i h_i \hat{P}_i, \quad \hat{P}_i \in {I, X, Y, Z}^{\otimes n}$$

2.2 Hβ‚‚ Molecular System​

We use the hydrogen molecule as our benchmark system with the following parameters:

ParameterValue
Bond length0.735 Γ… (equilibrium)
Basis setSTO-3G (minimal)
Electrons2
Spatial orbitals2
Qubits4 (Jordan-Wigner mapping)
Hamiltonian terms15 (including identity)
Measurement bases5 (ZZZZ, XXXX, XXYY, YYXX, YYYY)

The exact ground state energy is:

$$E_0 = -1.1373060358 \text{ Ha}$$

This value serves as our reference for all error calculations.

2.3 Ansatz Design​

For Hβ‚‚ in the STO-3G basis, the exact ground state lies in a 2-dimensional subspace spanned by the Hartree-Fock state $|0101\rangle$ and the doubly-excited state $|1010\rangle$:

$$|\psi(\theta)\rangle = \cos(\theta/2)|0101\rangle + \sin(\theta/2)|1010\rangle$$

This "Hβ‚‚ minimal 1-parameter ansatz" achieves exact results with a single variational parameter, making it ideal for validating our optimization framework without confounding factors from ansatz expressibility.

Circuit Implementation:

q0: ─────────────X───────
q1: ───X─────────●───────
q2: ─────────────────────
q3: ───X───Ry(ΞΈ)───●─────

The optimal parameter is $\theta_{\text{opt}} \approx -0.2235$ radians.


3. Hamiltonian Validation​

3.1 Methodology​

We independently derived the Hβ‚‚ Hamiltonian using two software stacks:

  1. Qiskit Nature Pipeline: PySCF β†’ Qiskit Nature β†’ Jordan-Wigner
  2. OpenFermion Pipeline: PySCF β†’ OpenFermion β†’ Jordan-Wigner

Both pipelines start from the same molecular specification and basis set but use independent codebases for the fermion-to-qubit transformation.

3.2 Convention Handling​

A key discovery during validation was the different treatment of nuclear repulsion energy:

FrameworkIIII CoefficientEigenvalue Interpretation
Qiskit Nature-0.8105 HaElectronic energy (add nuclear separately)
OpenFermion-0.0906 HaTotal energy (nuclear included)

The difference equals exactly the nuclear repulsion energy: $$\Delta_{IIII} = 0.7199 \text{ Ha} = E_{\text{nuclear}}$$

To compare properly, we add nuclear repulsion to the Qiskit electronic Hamiltonian: $$H_{\text{Qiskit}}^{\text{total}} = H_{\text{Qiskit}}^{\text{elec}} + E_{\text{nuclear}} \cdot I$$

3.3 Spectral Equivalence Results​

After convention correction, we compared all 16 eigenvalues:

LevelQiskit (Ha)OpenFermion (Ha)Difference (mHa)
Eβ‚€-1.1373060358-1.13730603580.000000
E₁-0.5363700786-0.53637007860.000000
Eβ‚‚-0.5363700786-0.53637007860.000000
E₃-0.5246155554-0.52461555540.000000
Eβ‚„-0.5246155554-0.52461555540.000000
Eβ‚…-0.5246155554-0.52461555540.000000
E₆-0.4406627433-0.44066274330.000000
E₇-0.4406627433-0.44066274330.000000
Eβ‚ˆ-0.1627531558-0.16275315580.000000
E₉+0.2480729872+0.24807298720.000000
E₁₀+0.2480729872+0.24807298720.000000
E₁₁+0.3666438903+0.36664389030.000000
E₁₂+0.3666438903+0.36664389030.000000
E₁₃+0.4950577416+0.49505774160.000000
E₁₄+0.7199689944+0.71996899440.000000
E₁₅+0.9342472329+0.93424723290.000000

Maximum eigenvalue difference: 2.44 Γ— 10⁻¹² mHa

3.4 Matrix Invariants​

MetricQiskitOpenFermionDifference
Trace-1.4493-1.44933.33 Γ— 10⁻¹⁡
Frobenius norm2.26662.26664.44 Γ— 10⁻¹⁢

3.5 Physical Subspace Validation​

The 2-electron sector (physical subspace) contains 6 states. After projection:

LevelQiskit (Ha)OpenFermion (Ha)Match
1-1.13730604-1.13730604βœ“
2-0.52461556-0.52461556βœ“
3-0.52461556-0.52461556βœ“
4-0.52461556-0.52461556βœ“
5-0.16275316-0.16275316βœ“
6+0.49505774+0.49505774βœ“

Conclusion: The Hamiltonians are spectrally equivalent, representing identical physical systems.


4. Shot Noise Analysis​

4.1 Theoretical Background​

For Pauli measurements with finite shots, the variance of energy estimation scales as:

$$\sigma^2_E \propto \frac{1}{N_{\text{shots}}}$$

This fundamental relationship determines the trade-off between measurement accuracy and quantum resource consumption.

4.2 Experimental Design​

We measured energy estimation variance across shot counts:

  • Shot levels: 512, 1024, 2048, 4096, 8192, 16384
  • Runs per level: 20 (independent random seeds)
  • Parameter: Fixed at optimal ΞΈ = -0.2235
  • Measurement bases: 5 circuits per evaluation

4.3 Results​

ShotsMean Energy (Ha)Std Dev (Ha)VarianceError (mHa)
512-1.13670.007475.58Γ—10⁻⁡0.65
1024-1.13620.005402.92Γ—10⁻⁡1.15
2048-1.13710.003321.10Γ—10⁻⁡0.19
4096-1.13690.002576.60Γ—10⁻⁢0.39
8192-1.13710.002234.97Γ—10⁻⁢0.16
16384-1.13750.001391.94Γ—10⁻⁢0.23

4.4 Scaling Analysis​

Linear regression of variance vs. 1/shots:

$$\sigma^2 = \frac{0.0286}{N_{\text{shots}}} - 8.67 \times 10^{-8}$$

Goodness of fit: RΒ² = 0.994

This excellent fit confirms our measurement implementation correctly follows the theoretical shot noise scaling.

4.5 Practical Implications​

ShotsRelative CostTypical Error
1,0241Γ—~1 mHa
4,0964Γ—~0.4 mHa
16,38416Γ—~0.2 mHa

Recommendation: 4,096 shots provides a good balance between accuracy (~0.4 mHa) and cost for Hβ‚‚ VQE.


5. Multi-Start Optimization Analysis​

5.1 Motivation​

Multi-start optimization addresses the local minima problem by running multiple independent optimizations from different initial points and selecting the best result. The key trade-off is:

  • More restarts β†’ Better exploration of the landscape
  • Fewer evaluations per restart β†’ Less thorough local optimization

With a fixed total budget, there exists an optimal number of restarts.

5.2 Experimental Design​

  • Total budget: 100 energy evaluations per run
  • Restart counts: 1, 2, 3, 5, 10
  • Evaluations per restart: 100, 50, 33, 20, 10 respectively
  • Runs: 20 independent trials per configuration
  • Optimizer: Random perturbation search (gradient-free)

5.3 Results​

RestartsEvals/RestartMean Error (mHa)Std Dev (mHa)
11007.712.3
2507.002.1
3337.212.0
5206.961.9
10106.731.8

5.4 Analysis​

The trend shows more restarts improve performance for this problem:

  • 1 restart: 7.71 mHa error
  • 10 restarts: 6.73 mHa error
  • Improvement: 12.7%

This suggests the Hβ‚‚ optimization landscape has multiple local minima that benefit from broader exploration, even with reduced per-restart budget.

5.5 Statistical Significance​

Comparing 1 restart vs 10 restarts:

  • Mean difference: 0.98 mHa
  • t-statistic: 2.14
  • p-value: 0.038

The improvement is statistically significant at Ξ± = 0.05.


6. Warm Start Comparison​

6.1 Initialization Strategies​

We compared three parameter initialization methods:

  1. Random: Uniform random in [-0.5, 0.5]
  2. HF Zero: Start at ΞΈ = 0 (Hartree-Fock reference)
  3. Heuristic: Start near optimal ΞΈ β‰ˆ -0.2 with small perturbation

6.2 Results​

MethodMean Energy (Ha)Mean Error (mHa)Convergence (iters)
Random-1.13962.3520.1
HF Zero-1.14043.1018.9
Heuristic-1.14214.7911.9

6.3 Statistical Analysis​

ANOVA results: F = 3.66, p = 0.032

Post-hoc pairwise t-tests:

  • Random vs HF Zero: p = 0.46 (not significant)
  • Random vs Heuristic: p = 0.012 (significant)
  • HF Zero vs Heuristic: p = 0.041 (significant)

6.4 Interpretation​

Counter-intuitively, random initialization performs best for this 1-parameter problem. This occurs because:

  1. The optimization landscape is simple (single global minimum)
  2. Heuristic initialization converges too quickly, missing the true minimum due to shot noise
  3. Random exploration provides robustness against noise-induced bias

Note: This finding may not generalize to higher-dimensional problems where intelligent initialization becomes more important.


7. Unit Test Suite​

7.1 Test Categories​

We developed a comprehensive test suite covering:

CategoryTestsDescription
Pauli String Indexing7Little-endian qubit convention
Measurement Basis Rotation3X/Y basis transformations
Hamiltonian Matrix4Hermiticity, dimension, eigenvalues
Energy Calculation4Exact energy vs PySCF FCI
Hamiltonian Coefficients4Coefficient correctness, symmetry
Statevector vs Counts3Measurement agreement
Measurement Basis Grouping35-basis circuit structure
Basis Convention2XXYY/YYXX qubit mapping
Hβ‚‚ Minimal Ansatz5Ansatz properties, limits
Total35

7.2 Key Test Descriptions​

Test: test_exact_energy_matches_pyscf_fci

  • Verifies matrix diagonalization matches PySCF FCI reference
  • Tolerance: < 0.01 mHa

Test: test_theta_zero_gives_hf_state

  • Confirms ΞΈ = 0 produces |0101⟩ (Hartree-Fock)
  • Validates ansatz initial state

Test: test_theta_pi_gives_1010_only

  • Confirms ΞΈ = Ο€ produces |1010⟩ (doubly-excited)
  • Validates ansatz range

Test: test_ansatz_amplitudes_match_theory

  • Verifies |ψ(ΞΈ)⟩ = cos(ΞΈ/2)|0101⟩ + sin(ΞΈ/2)|1010⟩
  • Tests multiple ΞΈ values

Test: test_optimal_theta_achieves_chemical_accuracy

  • Optimizes ΞΈ and confirms < 0.01 mHa error
  • End-to-end ansatz validation

7.3 Test Execution​

$ python -m pytest test_pauli_convention.py -v
========================= 35 passed in 1.21s =========================

All 35 tests pass consistently.


8. Software Architecture​

8.1 System Components​

QCOS Framework
β”œβ”€β”€ scientific_protocol.py # Core VQE implementation
β”œβ”€β”€ test_pauli_convention.py # 35 unit tests
β”œβ”€β”€ test_qcos_features.py # Feature validation suite
β”œβ”€β”€ validate_hamiltonian_equivalence_v2.py # Hamiltonian proof
└── results/scientific/ # JSON result storage

8.2 Key Dependencies​

PackageVersionPurpose
Qiskit1.xQuantum circuit simulation
Qiskit Nature0.7.2Molecular Hamiltonian generation
PySCF2.12.0Electronic structure calculations
OpenFermion1.6.1Alternative Hamiltonian derivation
NumPy1.26+Numerical operations
SciPy1.11+Statistical analysis

8.3 Reproducibility​

All experiments use:

  • Fixed random seeds: Base seed 42, incremented per run
  • Paired comparisons: Same seeds for baseline vs QCOS
  • JSON logging: Complete results saved with timestamps
  • Version pinning: Explicit package versions documented

9. Conclusions and Future Work​

9.1 Key Findings​

  1. Implementation Correctness: Spectral equivalence between independent Hamiltonian derivations proves our implementation is correct (all 16 eigenvalues match within 10⁻¹² Ha).

  2. Shot Noise Scaling: Variance follows theoretical 1/N relationship with RΒ² = 0.994, confirming proper measurement implementation.

  3. Multi-Start Benefits: 10 restarts provide 12.7% improvement over single-start optimization for Hβ‚‚, with statistical significance (p = 0.038).

  4. Test Coverage: 35 unit tests provide comprehensive validation of conventions, calculations, and ansatz properties.

9.2 Limitations​

  1. Single Molecule: Results are specific to Hβ‚‚; larger molecules may show different optimization dynamics.

  2. Simulator Only: All tests use Qiskit Aer; real hardware validation is needed.

  3. 1-Parameter Ansatz: The minimal ansatz eliminates ansatz expressibility issues but limits generalization to multi-parameter circuits.

  4. Chemical Accuracy: Best achieved error (~0.16 mHa) is below chemical accuracy threshold (1.6 mHa), but systematic bias from shot noise remains.

9.3 Future Work​

  1. Larger Molecules: Extend validation to LiH (12 qubits), BeHβ‚‚, and Hβ‚‚O.

  2. Hardware Validation: Run experiments on IBM Quantum and IonQ hardware.

  3. Adaptive Shots: Implement variance-based shot allocation across Hamiltonian terms.

  4. Gradient Methods: Compare SPSA, parameter-shift, and finite-difference gradients.

  5. Noise Mitigation: Integrate zero-noise extrapolation and probabilistic error cancellation.


10. References​

  1. Peruzzo, A. et al. "A variational eigenvalue solver on a photonic quantum processor." Nature Communications 5, 4213 (2014).

  2. O'Malley, P. J. J. et al. "Scalable Quantum Simulation of Molecular Energies." Physical Review X 6, 031007 (2016).

  3. McClean, J. R. et al. "The theory of variational hybrid quantum-classical algorithms." New Journal of Physics 18, 023023 (2016).

  4. Kandala, A. et al. "Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets." Nature 549, 242–246 (2017).

  5. McArdle, S. et al. "Quantum computational chemistry." Reviews of Modern Physics 92, 015003 (2020).


Appendix A: Hamiltonian Coefficients​

The Hβ‚‚ Hamiltonian in the Pauli basis (Qiskit convention, rightmost = q0):

Pauli StringCoefficient (Ha)
IIII-0.81054798
IIIZ+0.17218393
IIZI-0.22575350
IIZZ+0.12091263
IZII+0.17218393
IZIZ+0.16892754
IZZI+0.16614543
ZIII-0.22575350
ZIIZ+0.16614543
ZIZI+0.17464343
ZZII+0.12091263
XXXX+0.04523280
XXYY+0.04523280
YYXX+0.04523280
YYYY+0.04523280

Nuclear repulsion: 0.71996899 Ha

Total terms: 15


Appendix B: Raw Experimental Data​

B.1 Adaptive Shots (20 runs per level)​

{
"512_shots": {
"mean": -1.1367,
"std": 0.00747,
"variance": 5.58e-5
},
"16384_shots": {
"mean": -1.1375,
"std": 0.00139,
"variance": 1.94e-6
}
}

B.2 Multi-Start Results​

{
"1_restart": {"mean_error_mha": 7.71, "std": 2.3},
"10_restarts": {"mean_error_mha": 6.73, "std": 1.8}
}

Complete JSON results available in results/scientific/ directory.


Appendix C: Code Availability​

The QCOS validation suite is available at:

  • Repository: qcos_core (private)
  • Test directory: tests/api-test/benchmarks/
  • Key files:
    • scientific_protocol.py (1,588 lines)
    • test_pauli_convention.py (680 lines)
    • test_qcos_features.py (550 lines)
    • validate_hamiltonian_equivalence_v2.py (200 lines)

Document Version: 1.0 Last Updated: January 30, 2026 Authors: Softquantus Research Team Contact: research@softquantus.com


Β© 2026 Softquantus Inc. All rights reserved.