qat.linalg.oracles.QRAM
- class qat.linalg.oracles.QRAM(matrix, msb_first=True, arity=None)
The QRAM oracle performs a unitary operator of the form:
\(|i\rangle |0\rangle \mapsto |i\rangle |x(i)\rangle\)
where \(x(i) \in \mathbb{R}^d\) is real vector.
Warning
The emulation of this gate is only supported using the
LinAlg
simulator at this time.- Parameters
matrix (np.ndarray, np.matrix, list<list<float>>) – a matrix whose rows are the \(x(i)\). Its number of rows and columns should be both powers of 2
msb_first (bool, optional) – If set to True, the input vector will be ordered using the most-significant-bit first ordering convention (for both addresses and data). If set to False, assumes least-significant-bit first ordering. Defaults to True.
arity (int, optional) – the arity of the oracle. Default is None. If left to None, no static check of the arity will be performed.