pdft.circuit.sorted_gate_program#
- pdft.circuit.sorted_gate_program(gates)[source]#
Return
(kind, qubits)per tensor in sorted operand order.Uses the same Hadamard-first sort
compile_circuitapplies, so the returned order lines up element-for-element with the tensor list a basis stores. Handy for mapping gates (and the qubits they touch) to tensor indices after compilation.