qat.core.wrappers.result.State

class qat.core.wrappers.result.State(int_msb_value, qregs=None)

Class representing a ‘classical’ state

Its __str__ method is overloaded to possibly take a QRegister type as format argument.

Parameters
  • int_msb_value (int) – the state (integer, msb format)

  • qregs (list<QRegister>, optional) – a list of QRegister to use for formatting purposes.

property bitstring

Returns a bitstring representation of the state

property int

Returns a msb representation of the state

property lsb_int

Returns a lsb reprensentation of the state

property value

Casts the state into a classical value using the information from the quantum registers