pygsti.tools.gatetools
Functions for creating gates
Module Contents
Functions
|
Construct the single-qubit operation matrix. |
|
Construct the single-qubit operation matrix. |
Attributes
- pygsti.tools.gatetools.sigmaii
- pygsti.tools.gatetools.sigmaix
- pygsti.tools.gatetools.sigmaiy
- pygsti.tools.gatetools.sigmaiz
- pygsti.tools.gatetools.sigmaxi
- pygsti.tools.gatetools.sigmaxx
- pygsti.tools.gatetools.sigmaxy
- pygsti.tools.gatetools.sigmaxz
- pygsti.tools.gatetools.sigmayi
- pygsti.tools.gatetools.sigmayx
- pygsti.tools.gatetools.sigmayy
- pygsti.tools.gatetools.sigmayz
- pygsti.tools.gatetools.sigmazi
- pygsti.tools.gatetools.sigmazx
- pygsti.tools.gatetools.sigmazy
- pygsti.tools.gatetools.sigmazz
- pygsti.tools.gatetools.single_qubit_gate(hx, hy, hz, noise=0)
Construct the single-qubit operation matrix.
Build the operation matrix given by exponentiating -i * (hx*X + hy*Y + hz*Z), where X, Y, and Z are the sigma matrices. Thus, hx, hy, and hz correspond to rotation angles divided by 2. Additionally, a uniform depolarization noise can be applied to the gate.
Parameters
- hxfloat
Coefficient of sigma-X matrix in exponent.
- hyfloat
Coefficient of sigma-Y matrix in exponent.
- hzfloat
Coefficient of sigma-Z matrix in exponent.
- noisefloat, optional
The amount of uniform depolarizing noise.
Returns
- numpy array
4x4 operation matrix which operates on a 1-qubit density matrix expressed as a vector in the Pauli basis ( {I,X,Y,Z}/sqrt(2) ).
- pygsti.tools.gatetools.two_qubit_gate(ix=0, iy=0, iz=0, xi=0, xx=0, xy=0, xz=0, yi=0, yx=0, yy=0, yz=0, zi=0, zx=0, zy=0, zz=0, ii=0)
Construct the single-qubit operation matrix.
Build the operation matrix given by exponentiating -i * (xx*XX + xy*XY + …) where terms in the exponent are tensor products of two Pauli matrices.
Parameters
- ixfloat, optional
Coefficient of IX matrix in exponent.
- iyfloat, optional
Coefficient of IY matrix in exponent.
- izfloat, optional
Coefficient of IZ matrix in exponent.
- xifloat, optional
Coefficient of XI matrix in exponent.
- xxfloat, optional
Coefficient of XX matrix in exponent.
- xyfloat, optional
Coefficient of XY matrix in exponent.
- xzfloat, optional
Coefficient of XZ matrix in exponent.
- yifloat, optional
Coefficient of YI matrix in exponent.
- yxfloat, optional
Coefficient of YX matrix in exponent.
- yyfloat, optional
Coefficient of YY matrix in exponent.
- yzfloat, optional
Coefficient of YZ matrix in exponent.
- zifloat, optional
Coefficient of ZI matrix in exponent.
- zxfloat, optional
Coefficient of ZX matrix in exponent.
- zyfloat, optional
Coefficient of ZY matrix in exponent.
- zzfloat, optional
Coefficient of ZZ matrix in exponent.
- iifloat, optional
Coefficient of II matrix in exponent.
Returns
- numpy array
16x16 operation matrix which operates on a 2-qubit density matrix expressed as a vector in the Pauli-Product basis.