Coverage for src/braket/device_schema/dwave/dwave_provider_level_parameters_v1.py : 100%

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.
14from enum import Enum
15from typing import List, Optional
17from pydantic import BaseModel, Field
19from braket.schema_common import BraketSchemaBase, BraketSchemaHeader
22class PostProcessingType(str, Enum):
23 """
24 The type of processing for D-Wave.
25 """
27 RAW = "raw"
28 HISTOGRAM = "histogram"
31class DwaveProviderLevelParameters(BraketSchemaBase):
32 """
33 This is the description of the D-Wave parameters
35 Examples:
36 >>> import json
37 >>> input_json = {
38 ... "braketSchemaHeader": {
39 ... "name": "braket.device_schema.dwave.dwave_provider_level_parameters",
40 ... "version": "1",
41 ... },
42 ... "beta": 1
43 ... }
44 >>> DwaveProviderLevelParameters.parse_raw_schema(json.dumps(input_json))
46 """
48 _PROGRAM_HEADER = BraketSchemaHeader(
49 name="braket.device_schema.dwave.dwave_provider_level_parameters", version="1"
50 )
51 braketSchemaHeader: BraketSchemaHeader = Field(default=_PROGRAM_HEADER, const=_PROGRAM_HEADER)
52 annealingOffsets: Optional[List[int]]
53 annealingSchedule: Optional[List[List[int]]]
54 annealingDuration: Optional[int] = Field(gt=1)
55 autoScale: Optional[bool]
56 beta: Optional[int]
57 chains: Optional[List[List[int]]]
58 compensateFluxDrift: Optional[bool]
59 fluxBiases: Optional[List[int]]
60 initialState: Optional[List[int]]
61 maxResults: Optional[int] = Field(gt=1)
62 postprocessingType: Optional[PostProcessingType]
63 programmingThermalizationDuration: Optional[int]
64 readoutThermalizationDuration: Optional[int]
65 reduceIntersampleCorrelation: Optional[bool]
66 reinitializeState: Optional[bool]
67 resultFormat: Optional[str]
68 spinReversalTransformCount: Optional[int] = Field(gt=0)