QPanda3  0.1.0
Supported by OriginQ
Loading...
Searching...
No Matches
pyqpanda3.qcloud.QCloudResult Class Reference

Public Member Functions

None __init__ (self, str arg0)
 init(self: qcloud.QCloudResult, arg0: str) -> None
 
complex get_amplitude (self)
 get_amplitude(self: qcloud.QCloudResult) -> complex
 
list[complex] get_amplitude_list (self)
 get_amplitude_list(self: qcloud.QCloudResult) -> list[complex]
 
dict[str, int] get_counts (self, DataBase base=...)
 get_counts(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> dict[str, int]
 
list[dict[str, int]] get_counts_list (self, DataBase base=...)
 get_counts_list(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> list[dict[str, int]]
 
dict[str, float] get_probs (self, DataBase base=...)
 get_probs(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> dict[str, float]
 
list[dict[str, float]] get_probs_list (self, DataBase base=...)
 get_probs_list(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> list[dict[str, float]]
 
JobStatus job_status (self)
 job_status(self: qcloud.QCloudResult) -> qcloud.JobStatus
 

Constructor & Destructor Documentation

◆ __init__()

None pyqpanda3.qcloud.QCloudResult.__init__ ( self,
str arg0 )

init(self: qcloud.QCloudResult, arg0: str) -> None

Initializes a QCloudResult from a result string.

Parameters
[in]result_stringA string containing the job result data.

Member Function Documentation

◆ get_amplitude()

complex pyqpanda3.qcloud.QCloudResult.get_amplitude ( self)

get_amplitude(self: qcloud.QCloudResult) -> complex

Retrieves the amplitude for a particular quantum state.

Returns
A complex number representing the amplitude.

◆ get_amplitude_list()

list[complex] pyqpanda3.qcloud.QCloudResult.get_amplitude_list ( self)

get_amplitude_list(self: qcloud.QCloudResult) -> list[complex]

Retrieves the list of amplitudes for different quantum states.

Returns
A list of complex numbers representing the amplitudes for each state.

◆ get_counts()

dict[str, int] pyqpanda3.qcloud.QCloudResult.get_counts ( self,
DataBase base = ... )

get_counts(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> dict[str, int]

Retrieves the counts for each state.

Returns
A map where the keys are the state strings and the values are the corresponding counts.

◆ get_counts_list()

list[dict[str, int]] pyqpanda3.qcloud.QCloudResult.get_counts_list ( self,
DataBase base = ... )

get_counts_list(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> list[dict[str, int]]

Retrieves the list of counts for each state across different measurements.

Returns
A list of maps, each containing state strings as keys and corresponding counts as values.

◆ get_probs()

dict[str, float] pyqpanda3.qcloud.QCloudResult.get_probs ( self,
DataBase base = ... )

get_probs(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> dict[str, float]

Retrieves the probabilities for each state.

Returns
A map where the keys are the state strings and the values are the corresponding probabilities.

◆ get_probs_list()

list[dict[str, float]] pyqpanda3.qcloud.QCloudResult.get_probs_list ( self,
DataBase base = ... )

get_probs_list(self: qcloud.QCloudResult, base: qcloud.DataBase = <DataBase.Binary: 0>) -> list[dict[str, float]]

Retrieves the list of probabilities for each state across different measurements.

Returns
A list of maps, each containing state strings as keys and corresponding probabilities as values.

◆ job_status()

JobStatus pyqpanda3.qcloud.QCloudResult.job_status ( self)

job_status(self: qcloud.QCloudResult) -> qcloud.JobStatus

Retrieves the status of the quantum job.

Returns
A JobStatus enum representing the job status.

The documentation for this class was generated from the following file: