Package com.quantum4j.transpile
Class PassManager
java.lang.Object
com.quantum4j.transpile.PassManager
Manages and applies a sequence of transpiler passes to a quantum circuit.
Architecture rules enforced:
- Input circuits are deep-cloned before any pass runs.
- Passes are executed sequentially in insertion order.
- Pass names must be non-null/non-empty for traceability.
- Pass outputs are fed as inputs to the next pass.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPass(TranspilerPass pass) Append a transpiler pass to the pipeline.Get the configured passes in insertion order.run(QuantumCircuit circuit) Run all passes sequentially on the given circuit.
-
Constructor Details
-
PassManager
public PassManager()
-
-
Method Details
-
addPass
Append a transpiler pass to the pipeline.- Parameters:
pass- pass to add- Returns:
- this manager for chaining
-
getPasses
Get the configured passes in insertion order.- Returns:
- unmodifiable list of passes
-
run
Run all passes sequentially on the given circuit. The input circuit is deep-cloned before any transformation to preserve immutability guarantees.- Parameters:
circuit- input circuit (not mutated)- Returns:
- transformed circuit after all passes
-