.. index:: pair: class; QPanda::CrossEntropyBenchmarking .. _doxid-class_q_panda_1_1_cross_entropy_benchmarking: class QPanda::CrossEntropyBenchmarking ====================================== .. toctree:: :hidden: Overview ~~~~~~~~ use cross entropy benchmarking (XEB) to calibrate general single- and two-qubit gates :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class CrossEntropyBenchmarking { public: // typedefs typedef std::vector>> :target:`ProbsDict`; // construction :target:`CrossEntropyBenchmarking`( :ref:`MeasureQVMType` type, :ref:`QuantumMachine`* qvm ); // methods std::map :ref:`calculate_xeb_fidelity`( :ref:`GateType` gt, :ref:`Qubit`* qbit0, :ref:`Qubit`* qbit1, const std::vector& cycle_range, int num_circuits, int shots ); }; .. _details-class_q_panda_1_1_cross_entropy_benchmarking: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ use cross entropy benchmarking (XEB) to calibrate general single- and two-qubit gates Methods ------- .. index:: pair: function; calculate_xeb_fidelity .. _doxid-class_q_panda_1_1_cross_entropy_benchmarking_1a89d403574af963bef2856af5562fb845: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::map calculate_xeb_fidelity( :ref:`GateType` gt, :ref:`Qubit`* qbit0, :ref:`Qubit`* qbit1, const std::vector& cycle_range, int num_circuits, int shots ) calculate xeb fidelity .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - GateType - gate type for calculating fidelity, must be double gate * - Qubit\* - qubit0 * - Qubit\* - qubit1 , Must be adjacent to qubit0 * - const - std::vector& the size of each layer * - int - number of circuits of each layer * - int - measure shot number .. rubric:: Returns: std::map xeb result of each layer