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 pydantic import Field 

15 

16from braket.schema_common import BraketSchemaBase, BraketSchemaHeader 

17 

18 

19class GateModelParameters(BraketSchemaBase): 

20 """ 

21 This defines the parameters common to all the gatemodel devices. 

22 

23 Attributes: 

24 qubitCount: number of qubits for a device 

25 

26 Examples: 

27 >>> import json 

28 >>> input_json = { 

29 ... "braketSchemaHeader": { 

30 ... "name": "braket.device_schema.gate_model_parameters", 

31 ... "version": "1", 

32 ... }, 

33 ... "qubitCount": 1 

34 ... } 

35 >>> GateModelParameters.parse_raw_schema(json.dumps(input_json)) 

36 """ 

37 

38 _PROGRAM_HEADER = BraketSchemaHeader( 

39 name="braket.device_schema.gate_model_parameters", version="1" 

40 ) 

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

42 qubitCount: int = Field(gt=0)