braket.circuits.circuit_helpers module

braket.circuits.circuit_helpers.validate_circuit_and_shots(circuit: Circuit, shots: int) None[source]

Validates if circuit and shots are correct before running on a device

Parameters:
  • circuit (Circuit) – circuit to validate

  • shots (int) – shots to validate

Raises:

ValueError – If circuit has no instructions; if circuit has a non-gphase instruction; if no result types specified for circuit and shots=0. See braket.circuit.result_types; if circuit has observables that cannot be simultaneously measured and shots>0; or, if StateVector or Amplitude are specified as result types when shots>0.