Repository navigation
v0.7.5
Fixes VQE register handling when a Hamiltonian acts on only part of the declared circuit.
- Preserve the declared qubit count for built-in and custom ansatzes, including repeated solver runs.
- Support constant Hamiltonians without attempting to construct a zero-qubit circuit.
- Reject Hamiltonians that exceed the declared register and custom ansatzes with a mismatched width, with actionable errors.
- Add focused regression coverage for exact and sampled energy evaluation, spectator qubits, constant Hamiltonians, and width validation.
For example, a three-qubit VQE solver evaluating Z0 now retains all three qubits. A constant Hamiltonian 2.5 I retains the declared register and evaluates to 2.5.