qarp.errors¶
OpenQARP exception types.
- exception qarp.errors.CapabilityError[source]¶
Bases:
ValueErrorA declared capability is incompatible with the engine, circuit, or call.
The single exception type for every engine-capability rejection: raised by the
Enginetemplate’s validation hooks atbuild(),run()andbatch_run()time (targets, exactness, noise×amplitudes, mid-circuit operations,initial_statesupport/routing), by engine constructors for self-contradictory configuration, byStructuredQPEPlan.sample(), and by primitives whose own construction detects an unsupported combination.Also the rejection type of the emit/absorb SDK boundary: an emitter whose declared gate set or
EmitterCapabilitiescannot represent a command raises it fromemit()(viavalidate(), before any SDK import), with the offendingqarpx.Commandattached as the exception’scommandattribute; an absorber handed the wrong SDK’s object, or a parameter expression outside the single-symbol linear form, raises it too. A missing SDK isImportErrorinstead — environment, not circuit. SubclassesValueErrorso broadexcept ValueErrorhandlers keep working.