class QPanda::CrossEntropyBenchmarking¶
Overview¶
use cross entropy benchmarking (XEB) to calibrate general single- and two-qubit gates More…
#include <CrossEntropyBenchmarking.h> class CrossEntropyBenchmarking { public: // typedefs typedef std::vector<std::vector<std::vector<double>>> ProbsDict; // construction CrossEntropyBenchmarking( MeasureQVMType type, QuantumMachine* qvm ); // methods std::map<int, double> calculate_xeb_fidelity( GateType gt, Qubit* qbit0, Qubit* qbit1, const std::vector<int>& cycle_range, int num_circuits, int shots ); };
Detailed Documentation¶
use cross entropy benchmarking (XEB) to calibrate general single- and two-qubit gates
Methods¶
std::map<int, double> calculate_xeb_fidelity( GateType gt, Qubit* qbit0, Qubit* qbit1, const std::vector<int>& cycle_range, int num_circuits, int shots )
calculate xeb fidelity
Parameters:
GateType |
gate type for calculating fidelity, must be double gate |
Qubit* |
qubit0 |
Qubit* |
qubit1 , Must be adjacent to qubit0 |
const |
std::vector<int>& the size of each layer |
int |
number of circuits of each layer |
int |
measure shot number |
Returns:
std::map<int, double> xeb result of each layer