Package com.quantum4j.core.backend
Class Result
java.lang.Object
com.quantum4j.core.backend.Result
Immutable container for quantum circuit execution results.
Stores measurement outcome counts from multiple circuit executions (shots). Each key is a classical bit string (e.g., "110") and each value is the number of times that outcome was measured across all shots.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a Result from measurement counts.Result(Map<String, Integer> counts, BackendType backendType, StateVector stateVector) Construct a Result from measurement counts and backend metadata. -
Method Summary
Modifier and TypeMethodDescriptionGet the backend type used for execution.Get the measurement outcome counts.Get the final statevector, if available.toString()
-
Constructor Details
-
Result
Construct a Result from measurement counts.- Parameters:
counts- map of classical bit strings to outcome frequencies
-
Result
Construct a Result from measurement counts and backend metadata.- Parameters:
counts- map of classical bit strings to outcome frequenciesbackendType- backend that produced this resultstateVector- optional final statevector (may be null)
-
-
Method Details
-
getCounts
Get the measurement outcome counts.- Returns:
- immutable map of bit strings to outcome counts
-
getBackendType
Get the backend type used for execution.- Returns:
- backend type
-
getStateVector
Get the final statevector, if available.- Returns:
- statevector or null
-
toString
-