qml.labs.zxopt

Optimization passes using ZX calculus

Circuit optimization passes using ZX calculus (i.e., pyzx)

full_optimize(tape[, clifford_t_args])

Full optimization pipeline applying TODD and ZX-based T gate reduction to a PennyLane (Clifford + T) circuit.

full_reduce(tape)

ZX-based T gate reduction on an arbitrary PennyLane circuit.

todd(tape[, pre_optimize, post_optimize])

Apply Third Order Duplicate and Destroy (TODD) by means of zx.phase_block_optimize to a PennyLane (Clifford + T) circuit.

basic_optimization(tape)

Apply zx.basic_optimization to a PennyLane phase polynomial circuit with Hadamard gates.