mindquantum.core.gates.SWAPalpha
- class mindquantum.core.gates.SWAPalpha(pr)[源代码]
SWAPalpha 门。更多用法,请参见
RX
。\[\begin{split}\text{SWAP}(\alpha) = \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & \frac{1}{2}\left(1+e^{i\pi\alpha}\right) & \frac{1}{2}\left(1-e^{i\pi\alpha}\right) & 0\\ 0 & \frac{1}{2}\left(1-e^{i\pi\alpha}\right) & \frac{1}{2}\left(1+e^{i\pi\alpha}\right) & 0\\ 0 & 0 & 0 & 1\\ \end{pmatrix}\end{split}\]- 参数:
pr (Union[int, float, str, dict, ParameterResolver]) - 参数化门的参数,详细解释请参见上文。