CharacterizationResult¶
- class CharacterizationResult(job_id, status, hardness=None, report=None, recommendations=<factory>, created_at=None, completed_at=None, *, html='')[source]¶
Bases:
objectResult container for QUBO/HUBO characterization.
Returned by
characterize_and_validate()andcharacterize_and_validate(). Displays a rich HTML report when rendered in a Jupyter notebook.Note
Credit cost scales with QUBO size.
Attributes Summary
Approximation ratio achieved by the QAOA ansatz at the returned
best_parameters(and depth specified in the sweep options).Best QAOA parameters found during parameter sweep (if requested).
ISO timestamp when the characterization job completed.
Probability mass on target states relative to the uniform baseline.
ISO timestamp when the characterization job was created.
Fraction of sampled states that satisfy all constraints.
Hardness analysis — difficulty rating, spectral gap, condition number.
Server-rendered HTML report.
Whether the penalty parameter is well-tuned based on the analysis.
Unique identifier for the characterization job.
Recommended penalty multiplier for constrained problems.
Composite metric (0–100) of the QUBO's structural amenability to QAOA.
Actionable suggestions for tuning the QUBO or QAOA setup, derived from the characterization report.
Full characterization report — quality score, state probabilities, etc.
Per-qubit sensitivity analysis (if requested).
Per-state probability data from the characterization report.
Job status (
COMPLETED,FAILED, etc.).Methods Summary
display()Print a rich console report of the characterization result.
summary()Return a rich text summary of the characterization result.
Attributes Documentation
- approximation_ratio¶
Approximation ratio achieved by the QAOA ansatz at the returned
best_parameters(and depth specified in the sweep options).This is the server’s diagnostic estimate, not a measurement from a live QAOA run. Comparing it against your own QAOA’s approximation ratio is only meaningful at the same depth and ansatz configuration.
- best_parameters¶
Best QAOA parameters found during parameter sweep (if requested).
- concentration_ratio¶
Probability mass on target states relative to the uniform baseline.
1.0matches a uniform distribution;> 1means the ansatz concentrates mass on targets;< 1means it concentrates away from them. Values near or below 1 at the returned parameters indicate the ansatz at this depth cannot resolve the target — increasing circuit depth (more QAOA layers) or running a deeper parameter sweep is the typical remedy.Prefers the value at the best sweep parameters (
concentration_at_best) when available.
- feasibility_rate¶
Fraction of sampled states that satisfy all constraints.
- hardness: dict | None = None¶
Hardness analysis — difficulty rating, spectral gap, condition number.
- is_well_tuned¶
Whether the penalty parameter is well-tuned based on the analysis.
- penalty_recommendation¶
Recommended penalty multiplier for constrained problems.
- quality_score¶
Composite metric (0–100) of the QUBO’s structural amenability to QAOA.
Derived server-side from spectral and concentration features of the QUBO matrix. Does not predict approximation ratio at any specific depth — a high score means the QUBO is well-conditioned for QAOA, not that p=1 will solve it.
When a parameter sweep was run, returns the score at the best parameters found (
quality_at_best); otherwise the score at the user-supplied or default parameters.
- recommendations: list[dict] = <dataclasses._MISSING_TYPE object>¶
Actionable suggestions for tuning the QUBO or QAOA setup, derived from the characterization report.
Always a list — empty when no rules fire or the job didn’t complete. Each entry is a dict with these keys:
level— one of"info","warn","action".actionrecommends a concrete change;warnflags a risk;infois contextual.metric— which report field triggered the rule (e.g."quality_score","feasibility_rate").text— plain-text message, suitable for terminal/log output.html— the same message with inline<strong>markup, consumed by the notebook_repr_html_renderer.textandhtmlcarry the same content; choose by output medium.
- sensitivity¶
Per-qubit sensitivity analysis (if requested).
- state_probabilities¶
Per-state probability data from the characterization report.
Methods Documentation