.. index:: pair: class; QPanda::OptBMTQAllocator .. _doxid-class_q_panda_1_1_opt_b_m_t_q_allocator: class QPanda::OptBMTQAllocator ============================== .. toctree:: :hidden: Subgraph Isomorphism based :ref:`Qubit ` Allocator. This QAllocator is split into 3 phases: 1.Partitions the program into a number of smaller programs, and find all\* subgraph isomorphisms from the graph of that program to the coupling graph (architecture); 2.Dynamic programming that tests all combinations of subgraph isomorphisms, while estimating the cost of glueing themtogether; 3.Reconstructs the selected sequence of subgraph isomorphismsinto a program. .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class OptBMTQAllocator: public :ref:`QPanda::AbstractQubitMapping` { public: // typedefs typedef OptBMTQAllocator* :target:`Ref`; typedef std::unique_ptr :target:`uRef`; // fields std::vector> :target:`mCnotReliability`; std::vector> :target:`mSwapDist`; std::vector :target:`mMeaReliability`; double :target:`mCirReliability` = 1.0; // methods static :ref:`uRef` :target:`Create`( :ref:`QPanda::ArchGraph::sRef` ag, bool optimization = false, uint32_t max_partial = (std::numeric_limits::max)(), uint32_t max_children = (std::numeric_limits::max)() ); static :ref:`QPanda::ArchGraph::sRef` :target:`build_arch_graph`(const std::string& config_data = :ref:`CONFIG_PATH`); void :target:`setChildrenSelector`(:ref:`CandidateSelector::uRef` sel); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef :ref:`AbstractQubitMapping`* :ref:`Ref`; typedef std::unique_ptr<:ref:`AbstractQubitMapping`> :ref:`uRef`; // methods bool :ref:`run`(:ref:`QPanda::QProg` prog, :ref:`QPanda::QuantumMachine`* qvm); void :ref:`setGateWeightMap`(const :ref:`GateWeightMap`& weightMap); const :ref:`Mapping`& :ref:`get_final_mapping`() const; const :ref:`Mapping`& :ref:`get_init_mapping`() const; :ref:`QPanda::QProg` :ref:`get_mapped_prog`() const;