It is good both to be explicit with optimisations and to provide a simple API to allow regular users to run a common routine.
For future consideration and discussion:
- Add
transpile_swaps field to Circuit.transpile() to provide easy access to the transpile_swaps method
- Add
optimize method to Pattern which runs a chosen regular sequence of commands (likely some combination of standardize and minimize_space)
- Add
presimulate_paulis method to Pattern which runs the sequence of remove_input_nodes, infer_pauli_measurements and perform_pauli_measurements
- Add a method to
Pattern which applies in-place the infer_pauli_measurements method (to avoid the requirement to write pattern = pattern.infer_pauli_measurements().
It is good both to be explicit with optimisations and to provide a simple API to allow regular users to run a common routine.
For future consideration and discussion:
transpile_swapsfield toCircuit.transpile()to provide easy access to thetranspile_swapsmethodoptimizemethod toPatternwhich runs a chosen regular sequence of commands (likely some combination ofstandardizeandminimize_space)presimulate_paulismethod toPatternwhich runs the sequence ofremove_input_nodes,infer_pauli_measurementsandperform_pauli_measurementsPatternwhich applies in-place theinfer_pauli_measurementsmethod (to avoid the requirement to writepattern = pattern.infer_pauli_measurements().