class ExperimentResultDataSchema(BaseSchema): """Schema for ExperimentResultData.""" counts = Nested(ObjSchema, validate=PatternProperties( {Regexp('^0x([0-9A-Fa-f])+$'): Integer()})) snapshots = Nested(ObjSchema) memory = List(Raw(), validate=Length(min=1)) statevector = List(Complex(), validate=Length(min=1)) unitary = List(List(Complex(), validate=Length(min=1)), validate=Length(min=1))
class PulseLibraryItemSchema(BaseSchema): """Schema for PulseLibraryItem.""" # Required properties. name = String(required=True) samples = List(Complex(), required=True, validate=Length(min=1))
class PulseQobjInstructionSchema(QobjInstructionSchema): """Schema for PulseQobjInstruction.""" # pylint: disable=invalid-name # Required properties t0 = Integer(required=True, validate=Range(min=0)) # Optional properties. ch = String(validate=Regexp('[dum]([0-9])+')) conditional = Integer(validate=Range(min=0)) val = ByType([Complex(), String()]) phase = ByType([Float(), String()]) duration = Integer(validate=Range(min=1)) qubits = List(Integer(validate=Range(min=0)), validate=Length(min=1)) memory_slot = List(Integer(validate=Range(min=0)), validate=Length(min=1)) register_slot = List(Integer(validate=Range(min=0)), validate=Length(min=1)) kernels = Nested(QobjMeasurementOptionSchema, many=True) discriminators = Nested(QobjMeasurementOptionSchema, many=True) label = String() type = String()
class UchannelLOSchema(BaseSchema): """Schema for uchannel LO.""" # Required properties. q = Integer(required=True, validate=Range(min=0)) scale = Complex(required=True)