HighLevelSynthesis#
- class qiskit.transpiler.passes.HighLevelSynthesis(*args, **kwargs)[source]#
Bases :
TransformationPass
Synthesize higher-level objects using synthesis plugins.
Synthesis plugins apply synthesis methods specified in the high-level-synthesis config (refer to the documentation for
HLSConfig
).As an example, let us assume that
op_a
andop_b
are names of two higher-level objects, thatop_a
-objects have two synthesis methodsdefault
which does require any additional parameters andother
with two optional integer parametersoption_1
andoption_2
, thatop_b
-objects have a single synthesis methoddefault
, andqc
is a quantum circuit containingop_a
andop_b
objects. The following code snippet:hls_config = HLSConfig(op_b=[("other", {"option_1": 7, "option_2": 4})]) pm = PassManager([HighLevelSynthesis(hls_config=hls_config)]) transpiled_qc = pm.run(qc)
shows how to run the alternative synthesis method
other
forop_b
-objects, while using thedefault
methods for all other high-level objects, includingop_a
-objects.Attributes
- is_analysis_pass#
Check if the pass is an analysis pass.
If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
- is_transformation_pass#
Check if the pass is a transformation pass.
If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
Methods
- name()#
Return the name of the pass.
- run(dag)[source]#
Run the HighLevelSynthesis pass on dag. :param dag: input dag.
- Renvoie:
Output dag with certain Operations synthesized (as specified by the hls_config).
- Lève:
TranspilerError – when the specified synthesis method is not available.
- Type renvoyé: