QPanda3
Supported by OriginQ
载入中...
搜索中...
未找到
pyqpanda3.core.core.QResult类 参考
类 pyqpanda3.core.core.QResult 继承关系图:
[图例]

Public 成员函数

None __init__ (self)
 init(self: core.QResult) -> None
 
dict[str, int] get_counts (self)
 get_counts(self: core.QResult) -> dict[str, int]
 
dict[str, float] get_prob_dict (self, list[int] qubits=...)
 get_prob_dict(self: core.QResult, qubits: list[int] = []) -> dict[str, float]
 
list[float] get_prob_list (self, list[int] qubits=...)
 get_prob_list(self: core.QResult, qubits: list[int] = []) -> list[float]
 
list[complex] get_state_vector (self)
 get_state_vector(self: core.QResult) -> list[complex]
 
None print_results (self)
 print_results(self: core.QResult) -> None
 
int shots (self)
 shots(self: core.QResult) -> int
 

构造及析构函数说明

◆ __init__()

None pyqpanda3.core.core.QResult.__init__ ( self)

init(self: core.QResult) -> None

成员函数说明

◆ get_counts()

dict[str, int] pyqpanda3.core.core.QResult.get_counts ( self)

get_counts(self: core.QResult) -> dict[str, int]

Get the counts of measurement results.

返回
A dictionary of counts for each possible result.

◆ get_prob_dict()

dict[str, float] pyqpanda3.core.core.QResult.get_prob_dict ( self,
list[int] qubits = ... )

get_prob_dict(self: core.QResult, qubits: list[int] = []) -> dict[str, float]

Get the dictionary of probabilities for specific qubits.

参数
qubitsA list of qubit indices to get the probabilities for.
返回
A dictionary with qubit indices as keys and their probabilities as values.

◆ get_prob_list()

list[float] pyqpanda3.core.core.QResult.get_prob_list ( self,
list[int] qubits = ... )

get_prob_list(self: core.QResult, qubits: list[int] = []) -> list[float]

Get the list of probabilities for specific qubits.

参数
qubitsA list of qubit indices to get the probabilities for.
返回
A list of probabilities.

◆ get_state_vector()

list[complex] pyqpanda3.core.core.QResult.get_state_vector ( self)

get_state_vector(self: core.QResult) -> list[complex]

Get the state vector of the quantum system.

返回
A vector representing the state of the quantum system.

pyqpanda3.core.core.StabilizerResult 重载.

◆ print_results()

None pyqpanda3.core.core.QResult.print_results ( self)

print_results(self: core.QResult) -> None

Print the results of the quantum measurements.

返回
None

◆ shots()

int pyqpanda3.core.core.QResult.shots ( self)

shots(self: core.QResult) -> int

Get the number of shots for the measurement.

返回
The number of shots.

该类的文档由以下文件生成: