Class RunOptions

java.lang.Object
com.quantum4j.core.backend.RunOptions

public final class RunOptions extends Object
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 Details

    • shots

      public static RunOptions shots(int 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

      public static RunOptions withBackend(BackendType type)
      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

      public RunOptions withShots(int shots)
      Set the number of shots for this execution.
      Parameters:
      shots - number of repetitions (must be > 0)
      Returns:
      this RunOptions for chaining
    • getBackendType

      public BackendType getBackendType()
      Get the backend type to use for execution.
      Returns:
      backend type