qat.lang.AQASM.qbool.QBoolArray
- class qat.lang.AQASM.qbool.QBoolArray(start=0, length=1, scope=None, qbits_list=None)
Class describing an array of
QBool
.This class is not designed to be instantiated by hand, but rather via the .qalloc method of the
Program
class or the .new_wires method of theQRoutine
class.See documentation of the
QClause
class for more information.from qat.lang.AQASM.qbool import QBoolArray from qat.lang.AQASM import QRoutine rout = QRoutine() qbool_array = rout.new_wires(2, QBoolArray) print(type(qbool_array))
<class 'qat.lang.AQASM.qbool.QBoolArray'>
- Parameters
- Instance attributes:
index (int): the index of the underlying qbit
qbits (list of
QBool
): a list of quantum booleans
- cast(val)
Cast some integer value as a list of bools.
This method is used when casting execution samples to proper python values.
- Parameters
val (int) – some integer
- Returns
a list of boolean values
- Return type
list of bools