mindquantum.algorithm.compiler.KroneckerSeqCompiler

View Source On Gitee
class mindquantum.algorithm.compiler.KroneckerSeqCompiler(compilers: List[BasicCompilerRule], rule_name='KroneckerSeqCompiler', log_level=0)[source]

Kronecker sequential compiler.

Every compiler rule in this KroneckerSeqCompiler will be execute until they do not compile any gate.

Parameters
  • compilers (List[BasicCompilerRule]) – compiler rules.

  • rule_name (str) – the name of compiler rule. Default: "KroneckerSeqCompiler".

  • log_level (int) – the display log level. Could be 0, 1 or 2. Default: 0. For more explanation of log level, please refers to BasicCompilerRule.

do(dag_circuit: DAGCircuit)[source]

Apply kronecker compiler to dag circuit.

Parameters

dag_circuit (DAGCircuit) – The DAG graph of quantum circuit.