qat.linalg.oracles.StatePreparation
- class qat.linalg.oracles.StatePreparation(vector, msb_first=True, arity=None)
State preparation prepares the state vector in a particular state.
Warning
The emulation of this gate is only supported using the
LinAlg
simulator at this time.Warning
The state vector is assumed to be in state \(|0...0\rangle\). The behavior is undefined if this condition is not met.
- Parameters
vector (np.matrix, np.ndarray, list<complex>) – a vector describing the state to prepare. The vector is expected to be of length \(2^n\) where n is the number of qbits passed as arguments
msb_first (bool, optional) – If set to True, the input matrix will be enumerated using the most-significant-bit first ordering convention. If set to False, assumes least-significant-bit first orderring. 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.