mqt.qcec.verify_hard_timeout¶
Run equivalence checks in a terminable process.
Functions¶
|
Verify two circuits in a process that is killed after |
Module Contents¶
- verify_with_hard_timeout(circ1: str | PathLike[str] | QuantumCircuit, circ2: str | PathLike[str] | QuantumCircuit, deadline: float, **kwargs: Unpack[ConfigurationOptions]) dict[str, Any][source]¶
Verify two circuits in a process that is killed after
deadlineseconds.Use this function only when a check needs forced termination. For other checks, prefer
verify()with its cooperativetimeoutoption. A worker process adds substantial overhead, especially for Qiskit inputs.Inputs may be file paths, OpenQASM text, or Qiskit circuits. Qiskit circuits are serialized with QPY before the worker starts. The timeout covers worker startup and circuit loading after process creation, but not serialization in the caller. Process creation itself may delay the timeout on some platforms. Successful checks return the JSON result of
verify(), including checker statistics but no DD counterexamples. A deadline raisesTimeoutError; other worker failures raiseRuntimeError.- Parameters:
circ1 – First circuit as a file path, OpenQASM text, or Qiskit circuit.
circ2 – Second circuit in the same supported forms.
deadline – Positive worker timeout in seconds.
**kwargs – Options accepted by
verify().
- Returns:
The verification result as a JSON-style dictionary.