quri_parts.circuit.transpile.clifford_approximation module#

class CliffordApproximationTranspiler(*args, **kwargs)#

Bases: GateDecomposer

CircuitTranspiler, which replaces the non_clifford gate into sequence of non-parametric Clifford gates.

If the input gate has angles, this transpiler replaces them with the closest value in the set \(\{\pi n /2| n\in\mathbb{Z}\}\). Then by using the rotation gate transpilers, it is decomposed into a sequence of non-parametric Clifford gates.

is_target_gate(gate)#

Determine if a given gate is subject to decomposition.

Parameters:

gate (QuantumGate) – Gates in the circuit that are scanned from the front.

Return type:

bool

decompose(gate)#

Describe the specific decomposition process. Only the target gates satisfying is_target_gate() method are passed.

Parameters:

gate (QuantumGate) – The gates to be decomposed.

Return type:

Sequence[QuantumGate]