You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework how transpilation of the experiment circuits happens. Currently, all of the experiment circuits are separately transpiled. For multiple cuts in a large circuit, this will quickly become slow and unfeasible. A better way would be to transpile the circuits before operations from a qpd are inserted. The problem then becomes how to retain placeholder operations in the circuit through the transpilation. A custom transpiler could be a solution. Alternatively, if it is possible to insert the placeholder operations into the native operations the transpiler considers that could be a solution.
Solution:
Rename CutCircuit class to CutExperiment.
Define a new CutCircuit class that would house the subcircuit containing the placeholder operations before experiments are generated.
Additionally, the new CutCircuit also contains cut_locations and observables that can be passed to e.g. transpilation.
CutCircuit will also have a basis_gates field to determine later if qpd_combination gates need transpilation. This field will correspond to the basis gates of the backend if transpilation has been done or an empty list otherwise.
The new transpile function would take a CutCircuit and a backend and simply call:
This will fully transpile the circuits without rolling placeholders.
Transpile fiction will then return a new CutCircuit object.
get_experiment_circuits() will be changed so that it takes a CutCircuit as an argument. Before inserting qpd_combinations will be decomposed to the basis_gates of passed CutCircuit.
The text was updated successfully, but these errors were encountered:
Rework how transpilation of the experiment circuits happens. Currently, all of the experiment circuits are separately transpiled. For multiple cuts in a large circuit, this will quickly become slow and unfeasible. A better way would be to transpile the circuits before operations from a qpd are inserted. The problem then becomes how to retain placeholder operations in the circuit through the transpilation. A custom transpiler could be a solution. Alternatively, if it is possible to insert the placeholder operations into the native operations the transpiler considers that could be a solution.
Solution:
Rename CutCircuit class to CutExperiment.
Define a new CutCircuit class that would house the subcircuit containing the placeholder operations before experiments are generated.
Additionally, the new CutCircuit also contains cut_locations and observables that can be passed to e.g. transpilation.
CutCircuit will also have a basis_gates field to determine later if qpd_combination gates need transpilation. This field will correspond to the basis gates of the backend if transpilation has been done or an empty list otherwise.
The new transpile function would take a CutCircuit and a backend and simply call:
This will fully transpile the circuits without rolling placeholders.
Transpile fiction will then return a new CutCircuit object.
get_experiment_circuits()
will be changed so that it takes a CutCircuit as an argument. Before inserting qpd_combinations will be decomposed to the basis_gates of passed CutCircuit.The text was updated successfully, but these errors were encountered: