cqcHeader

class cqc.cqcHeader.CQCType[source]

An enumeration.

class cqc.cqcHeader.CQCLogicalOperator[source]

An enumeration.

class cqc.cqcHeader.Header(headerBytes=None)[source]

Abstact class for headers. Should be subclassed

__init__(headerBytes=None)[source]

Initialize using values received from a packet. Don’t override this but rather _setVals

setVals(*args, **kwargs)[source]

Set using given values. Don’t override this but rather _setVals

Returns

None

unpack(headerBytes)[source]

Unpack packet data. Don’t override this but rather _unpack

Returns

None

pack()[source]

Pack data into packet format. Don’t override this but rather _pack

Returns

bytes

printable()[source]

Produce a printable string for information purposes. Don’t override this but rather _printable

Returns

str

class cqc.cqcHeader.CQCHeader(headerBytes=None)[source]

Definition of the general CQC header.

class cqc.cqcHeader.CQCTypeHeader(headerBytes=None)[source]

Definition of the CQC Type header. This header announces the type of the headers that will follow.

make_equivalent_CQCHeader(version: int, app_id: int) → cqc.cqcHeader.CQCHeader[source]

Produce a CQC Header that is equivalent to this CQCTypeHeader. This method does not make any modifications to self.

class cqc.cqcHeader.CQCIfHeader(headerBytes=None)[source]

Definition of the CQC IF header.

class cqc.cqcHeader.CQCCmdHeader(headerBytes=None)[source]

Header for a command instruction packet.

class cqc.cqcHeader.CQCAssignHeader(headerBytes=None)[source]

Sub header that follows a CMD Measure header. It contains the reference id which can be used to refer to the measurement outcome

class cqc.cqcHeader.CQCXtraHeader(headerBytes=None)[source]

Optional addtional cmd header information. Only relevant for certain commands.

__init__(headerBytes=None)[source]

Initialize using values received from a packet.

class cqc.cqcHeader.CQCSequenceHeader(headerBytes=None)[source]

Header used to indicate size of a sequence. Currently exactly the same as CQCRotationHeaer. Seperate classes used clearity and for possible future adaptability. (Increase length for example)

class cqc.cqcHeader.CQCRotationHeader(headerBytes=None)[source]

Header used to define the rotation angle of a gate

class cqc.cqcHeader.CQCXtraQubitHeader(headerBytes=None)[source]

Header used to send qubit of a secondary qubit for two qubit gates

class cqc.cqcHeader.CQCCommunicationHeader(headerBytes=None, cqc_version=2)[source]

Header used to send information to which node to send information to. Used for example in Send and EPR commands This header has a size of 8

__init__(headerBytes=None, cqc_version=2)[source]

Initialize from packet data :param headerBytes: packet data

class cqc.cqcHeader.CQCFactoryHeader(headerBytes=None)[source]

Header used to send factory information

class cqc.cqcHeader.CQCNotifyHeader(headerBytes=None)[source]

Header used to specify notification details.

__init__(headerBytes=None)[source]

Initialize from packet data.

class cqc.cqcHeader.CQCMeasOutHeader(headerBytes=None)[source]

Header used to send a measurement outcome.

class cqc.cqcHeader.CQCTimeinfoHeader(headerBytes=None)[source]

Header used to send timing information

class cqc.cqcHeader.CQCEPRRequestHeader(headerBytes=None)[source]