namespace QPanda¶
Overview¶
Detailed Documentation¶
Typedefs¶
typedef MetadataValidity_cb that add all functions of metadata validity
Global Variables¶
Int infinite.
Error identifier.
Global Functions¶
BravyiKitaev transform from FermionOperator to PauliOperator.
Parameters:
FermionOperator& |
fermion operator |
std::vector<Eigen::MatrixXi> |
BK |
Returns:
PauliOperator
See also:
FermionOperator
PauliOperator
Overload operator +.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
ClassicalCondition type right operand |
Returns:
Uverload operator +.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator +.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator -.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator -.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator -.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator *.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator *.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator -.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator /.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator /.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator /.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator ==.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator ==.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator ==.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator !=.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator !=.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator !=.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator &&.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator &&.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator &&.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator ||.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator ||.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator ||.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator >
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator >
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator >
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator >=.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator >=.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator >=.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator <.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator <.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator <.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator <=.
Parameters:
left_operand |
left operand |
right_operand |
right operand |
Returns:
Overload operator <=.
Parameters:
left_operand |
left operand |
right_operand |
cbit_size_t type right operand |
Returns:
Overload operator <=.
Parameters:
value |
cbit_size_t type left operand |
class_cond |
right operand |
Returns:
Overload operator !
Parameters:
right_operand |
right operand |
Returns:
Construct a new quantum iSWAP gate.
Parameters:
Qubit* |
control qubit |
Qubit* |
target qubit |
Returns:
QPanda::QGate quantum gate
Construct a new quantum iSWAP gate.
Parameters:
int |
qaddr control qubit phy addr |
int |
qaddr target qubit phy addr |
Returns:
QPanda::QGate quantum gate
Get Qubit by physics addr.
Parameters:
int |
qaddr target qubit phy addr |
Returns:
Qubit*
Get Qubit vector by physics addr vector.
Parameters:
const |
std::vector<int>& qubits physical address vector |
Returns:
Qubit*
calculate double gate xeb
Parameters:
NoiseQVM* |
noise quantum machine |
Qubit* |
qubit0 |
Qubit* |
qubit1 |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
GateType |
gate type |
Returns:
std::map<int, double> xeb result of each layer
calculate double gate xeb
Parameters:
QCloudMachine* |
cloud quantum machine |
Qubit* |
qubit0 |
Qubit* |
qubit1 |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
GateType |
gate type |
Returns:
std::map<int, double> xeb result of each layer
Judge whether the prog is related to the target qubits.
Parameters:
the target prog |
|
cir_param& |
QCircuit param |
std::vector<int>& |
the appointed qubits vector |
Returns:
if the prog have operated any qubit in qubits_vec return true, or else return false
Verify the validity of double quantum gates.
Parameters:
std::vector<std::string>& |
the gates is judged |
std::vector<std::string>& |
output the valid gates |
Returns:
int double quantum gate type
Count quantum program unsupported gate numner.
Parameters:
_Ty& |
quantum program, quantum circuit, quantum while or quantum if |
const |
std::vector<std::vector<std::string>>& support gates |
Returns:
size_t Unsupported QGate number
calculate quantum volume
Parameters:
NoiseQVM* |
noise quantum machine |
std::vector |
<std::vector<int>> qubit_lists, eg: {{1,2}, {1,2,3,4,5}} |
const |
std::vector<int>& number of layer |
int |
number of random iterations |
int |
shots |
Returns:
size_t quantum volume
calculate quantum volume
Parameters:
QCloudMachine* |
real chip |
std::vector |
<std::vector<int>> qubit_lists, eg: {{1,2}, {1,2,3,4,5}} |
const |
std::vector<int>& number of layer |
int |
number of random iterations |
int |
shots |
Returns:
size_t quantum volume
single gate rb experiment
Parameters:
NoiseQVM* |
noise quantum machine |
Qubit* |
qubit |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
const |
std::vector<QGate> interleaved gates |
Returns:
std::map<int, double> rb result of each layer
single gate rb experiment
Parameters:
NoiseQVM* |
noise quantum machine |
Qubit* |
qubit0 |
Qubit* |
qubit1 |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
const |
std::vector<QGate> interleaved gates |
Returns:
std::map<int, double> rb result of each layer
single gate rb experiment
Parameters:
QCloudMachine* |
cloud quantum machine |
Qubit* |
qubit |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
const |
std::vector<QGate> interleaved gates |
Returns:
std::map<int, double> rb result of each layer
single gate rb experiment
Parameters:
QCloudMachine* |
cloud quantum machine |
Qubit* |
qubit0 |
Qubit* |
qubit1 |
const |
std::vector<int>& number of layer |
int |
number of circuit per layer |
int |
run number |
const |
std::vector<QGate> interleaved gates |
Returns:
std::map<int, double> rb result of each layer
convert unicode string to UTF8 string
Parameters:
std::wstring& |
the source wstring encoded by Unicode |
Returns:
string Converted String
convert UTF8 string to wide string
Parameters:
std::string& |
the source string |
Returns:
wstring Converted wide String
convert unsigned long to string
Parameters:
unsigned long |
the source val |
Returns:
std::string Converted string
set windows console to utf-8 encode