Package com.quantum4j.core.backend
Class RunOptions
java.lang.Object
com.quantum4j.core.backend.RunOptions
Configuration for quantum circuit execution.
Specifies execution parameters such as the number of measurement shots (repeated circuit runs) to collect statistics on measurement outcomes.
-
Method Summary
Modifier and TypeMethodDescriptionGet the backend type to use for execution.intgetShots()Get the number of shots for this execution.static RunOptionsshots(int shots) Create RunOptions with the specified number of shots.static RunOptionswithBackend(BackendType type) Create RunOptions selecting a backend.withShots(int shots) Set the number of shots for this execution.
-
Method Details
-
shots
Create RunOptions with the specified number of shots.- Parameters:
shots- number of times to measure the circuit (must be > 0)- Returns:
- RunOptions configured with the given shot count
- Throws:
IllegalArgumentException- if shots <= 0
-
withBackend
Create RunOptions selecting a backend.- Parameters:
type- backend type- Returns:
- RunOptions configured with the given backend
-
getShots
public int getShots()Get the number of shots for this execution.- Returns:
- the shot count
-
withShots
Set the number of shots for this execution.- Parameters:
shots- number of repetitions (must be > 0)- Returns:
- this RunOptions for chaining
-
getBackendType
Get the backend type to use for execution.- Returns:
- backend type
-