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 List 

15 

16from pydantic import Field 

17 

18from braket.schema_common import BraketSchemaBase, BraketSchemaHeader 

19 

20 

21class DwaveProviderProperties(BraketSchemaBase): 

22 

23 """ 

24 

25 This defines the properties specific to D-Wave device 

26 

27 Attributes: 

28 qubits: the list of the qubits available in D-Wave 

29 qubitCount: number of qubits available in D-Wave 

30 topology: the connections between each qubits 

31 

32 Examples: 

33 >>> import json 

34 >>> input_json = { 

35 ... "braketSchemaHeader": { 

36 ... "name": "braket.device_schema.dwave.dwave_provider_properties", 

37 ... "version": "1", 

38 ... }, 

39 ... "annealingOffsetStep": 1.45, 

40 ... "annealingOffsetStepPhi0": 1.45, 

41 ... "annealingOffsetRanges": [[1.45, 1.45], [1.45, 1.45]], 

42 ... "annealingDurationRange": [1, 2, 3], 

43 ... "couplers": [[1, 2, 3], [1, 2, 3]], 

44 ... "defaultAnnealingDuration": 1, 

45 ... "defaultProgrammingThermalizationDuration": 1, 

46 ... "defaultReadoutThermalizationDuration": 1, 

47 ... "extendedJRange": [1, 2, 3], 

48 ... "hGainScheduleRange": [1, 2, 3], 

49 ... "hRange": [1, 2, 3], 

50 ... "jRange": [1, 2, 3], 

51 ... "maximumAnnealingSchedulePoints": 1, 

52 ... "maximumHGainSchedulePoints": 1, 

53 ... "perQubitCouplingRange": [1, 2, 3], 

54 ... "programmingThermalizationDurationRange": [1, 2, 3], 

55 ... "qubits": [1, 2, 3], 

56 ... "qubitCount": 1, 

57 ... "quotaConversionRate": 1, 

58 ... "readoutThermalizationDurationRange": [1, 2, 3], 

59 ... "taskRunDurationRange": [1, 2, 3], 

60 ... "topology": {}, 

61 ... } 

62 >>> DwaveProviderProperties.parse_raw_schema(json.dumps(input_json)) 

63 """ 

64 

65 _PROGRAM_HEADER = BraketSchemaHeader( 

66 name="braket.device_schema.dwave.dwave_provider_properties", version="1" 

67 ) 

68 braketSchemaHeader: BraketSchemaHeader = Field(default=_PROGRAM_HEADER, const=_PROGRAM_HEADER) 

69 annealingOffsetStep: float 

70 annealingOffsetStepPhi0: float 

71 annealingOffsetRanges: List[List[float]] 

72 annealingDurationRange: List[int] 

73 couplers: List[List[int]] 

74 defaultAnnealingDuration: int 

75 defaultProgrammingThermalizationDuration: int 

76 defaultReadoutThermalizationDuration: int 

77 extendedJRange: List[int] 

78 hGainScheduleRange: List[int] 

79 hRange: List[int] 

80 jRange: List[int] 

81 maximumAnnealingSchedulePoints: int 

82 maximumHGainSchedulePoints: int 

83 perQubitCouplingRange: List[int] 

84 programmingThermalizationDurationRange: List[int] 

85 qubits: List[int] 

86 qubitCount: int 

87 quotaConversionRate: int 

88 readoutThermalizationDurationRange: List[int] 

89 taskRunDurationRange: List[int] 

90 topology: dict