qat.linalg.oracles.BinaryQRAM
- class qat.linalg.oracles.BinaryQRAM(vector, data_reg_size, msb_first=True)
Binary QRAM implements the following types of unitary operator:
\(|i\rangle|0\rangle \mapsto |i\rangle|x(i)\rangle\)
where \(x(i)\in\{0,1\}^{2^d}\) is a basis state.
The function is represented by an integer array V such that V[i] = \(x(i)\).
By convention, the first qbits passed as argument will be considered to be
the address register. The sizes of the address registers are infered from the length of the array.
Warning
The emulation of this gate is only supported using the
LinAlg
simulator at this time.- Parameters
vector (np.ndarray, np.matrix, list<int>) – the array describing \(x\)
msb_first (bool, optional) – If set to True, the data vector indexes and the data values will be enumerated/stored using a most-significant-bit first ordering. If set to False, assumes least-significant-bit first ordering. Defaults to True.
arity (int, optional) – the total arity of the QRAM. Default to None.