qml.labs.intermediate_reps

Quantum circuit intermediate representations

Intermediate representations (IRs) are alternative representations of quantum circuits, typically offering a more efficient classical description for special classes of circuits.

parity_matrix(circ[, wire_order])

Compute the parity matrix intermediate representation of a CNOT circuit.

phase_polynomial(circ[, wire_order, verbose])

Phase polynomial intermediate representation for circuits consisting of CNOT and RZ gates.

postorder_traverse(tree, source[, source_parent])

Post-order traverse a tree graph, starting from (but excluding) the node source.

preorder_traverse(tree, source[, source_parent])

Pre-order traverse a tree graph, starting from (but excluding) the node source.

rowcol(P[, connectivity, verbose])

CNOT routing algorithm ROWCOL.