Package com.quantum4j.transpile.passes
Class CXToCZDecompositionPass
java.lang.Object
com.quantum4j.transpile.passes.CXToCZDecompositionPass
- All Implemented Interfaces:
TranspilerPass
Transpiler pass that decomposes CX/CNOT into:
H(target) + CZ(control, target) + H(target)
This pass is intentionally robust: it detects CNOT even if the gate did not originate from
StandardGates.CNOTGate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(QuantumCircuit circuit) Apply this pass to the given circuit and return a new circuit.name()Human-readable name of this pass (for logging, debugging, profiling).
-
Constructor Details
-
CXToCZDecompositionPass
public CXToCZDecompositionPass()Create the CX-to-CZ decomposition pass.
-
-
Method Details
-
name
Description copied from interface:TranspilerPassHuman-readable name of this pass (for logging, debugging, profiling).- Specified by:
namein interfaceTranspilerPass- Returns:
- pass identifier
-
apply
Description copied from interface:TranspilerPassApply this pass to the given circuit and return a new circuit. Implementations should not mutate the input circuit.- Specified by:
applyin interfaceTranspilerPass- Parameters:
circuit- input circuit (not mutated)- Returns:
- transformed circuit
-