Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"). You 

4# may not use this file except in compliance with the License. A copy of 

5# the License is located at 

6# 

7# http://aws.amazon.com/apache2.0/ 

8# 

9# or in the "license" file accompanying this file. This file is 

10# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 

11# ANY KIND, either express or implied. See the License for the specific 

12# language governing permissions and limitations under the License 

13 

14from typing import Optional 

15 

16from pydantic import BaseModel, conint, conlist 

17from braket.schema_common.schema_base import BraketSchemaBase 

18 

19 

20class DWaveTiming(BaseModel): 

21 """ 

22 The D-Wave timing metadata result schema. 

23 

24 The times represented are in milliseconds. 

25 

26 Examples: 

27 >>> DWaveTiming(qpuSamplingTime=1575, qpuAnnealTimePerSample=20) 

28 """ 

29 

30 qpuSamplingTime: Optional[conint(ge=0)] 

31 qpuAnnealTimePerSample: Optional[conint(ge=0)] 

32 qpuAccessTime: Optional[conint(ge=0)] 

33 qpuAccessOverheadTime: Optional[conint(ge=0)] 

34 qpuReadoutTimePerSample: Optional[conint(ge=0)] 

35 qpuProgrammingTime: Optional[conint(ge=0)] 

36 qpuDelayTimePerSample: Optional[conint(ge=0)] 

37 postProcessingOverheadTime: Optional[conint(ge=0)] 

38 totalPostProcessingTime: Optional[conint(ge=0)] 

39 totalRealTime: Optional[conint(ge=0)] 

40 runTimeChip: Optional[conint(ge=0)] 

41 annealTimePerRun: Optional[conint(ge=0)] 

42 readoutTimePerRun: Optional[conint(ge=0)] 

43 

44 

45class DWaveMetadata(BraketSchemaBase): 

46 """ 

47 The D-Wave metadata result schema. 

48 

49 Attributes: 

50 - activeVariables (List[int]): the active variables of the task on D-Wave 

51 - timing (DWaveTiming): additional timing metadata of the task on D-Wave 

52 

53 Examples: 

54 >>> timing = DWaveTiming(qpuSamplingTime=1575, qpuAnnealTimePerSample=20) 

55 >>> DWaveMetadata(activeVariables=[0, 3, 4], timing=timing) 

56 """ 

57 

58 activeVariables: conlist(conint(ge=0)) 

59 timing: DWaveTiming