pub unsafe extern "C" fn applyGateSubDiagonalOp(
qureg: Qureg,
targets: *mut c_int,
numTargets: c_int,
op: SubDiagonalOp,
)Expand description
Apply a many-qubit unitary specified as a diagonal matrix upon a specific set of qubits of a quantum register.
This is identical to function diagonalUnitary(), except here unitarity is not numerically checked nor enforced. That is, \p op is mathematically treated as if it were unitary despite its true unitarity. This is useful for numerically relaxing the precision of unitarity.
To apply the operator as if it were e.g. Hermitian, use applySubDiagonalOp().
@see
- createSubDiagonalOp()
- diagonalUnitary()
- applySubDiagonalOp()
- applyDiagonalOp()
@ingroup operator @param[in,out] qureg the ::Qureg instance to operate upon @param[in] targets the list of target qubit indices @param[in] numTargets the length of list \p targets, which must match the dimension of \p op @param[in] op a ::SubDiagonalOp initialised to any complex values @throws invalidQuESTInputError()
- if \p numTargets does not match the size of \p op
- if \p numTargets is invalid (<0 or larger than \p qureg)
- if \p numTargets contains an invalid qubit index, or a repetition @author Tyson Jones