qrisp.PassManager.verify#

PassManager.verify(qc: QuantumCircuit, verification_type: str, visualize_failures: bool = False, **verification_kwargs: Any) list[tuple[str, bool]][source]#

Verify every pass in the manager against qc one by one.

For each pass, the method captures the circuit state before applying the pass and then verifies that the pass preserves it using either CircuitPass.compare_unitary() or CircuitPass.compare_measurement().

Parameters:
qcQuantumCircuit

The input quantum circuit to test the pipeline against.

verification_typestr

Which verification method to use — "unitary" or "measurements".

visualize_failuresbool, optional

If True, call CircuitPass.visualize() on any pass that fails verification. The default is False.

**verification_kwargsAny

Keyword arguments forwarded to the verification method (e.g. precision, ignore_gphase, backend).

Returns:
list of tuple(str, bool)

A list of (pass_name, passed) pairs, one for each pass in verification order.

Raises:
ValueError

If verification_type is not "unitary" or "measurements".