[Qmod core-library function]Performs the Pauli-X rotation gate on a qubit.This operation is represented by the following matrix:RX(θ)=e−i2θX=[cos(2θ)−isin(2θ)−isin(2θ)cos(2θ)]Parameters:
[Qmod core-library function]Performs the Pauli-Y rotation gate on a qubit.This operation is represented by the following matrix:RY(θ)=e−i2θY=[cos(2θ)sin(2θ)−sin(2θ)cos(2θ)]Parameters:
[Qmod core-library function]Performs the Pauli-Z rotation gate on a qubit.This operation is represented by the following matrix:RZ(θ)=e−i2θZ=[e−i2θ00ei2θ]Parameters:
[Qmod core-library function]Performs a rotation of θ around the cos(ϕ){^x}+sin(ϕ){^y} axis on a qubit.This operation is represented by the following matrix:R(θ,ϕ)=e−i2θ(cos(ϕ)X+sin(ϕ)Y)=[cos(2θ)−ieiϕsin(2θ)−ie−iϕsin(2θ)cos(2θ)]Parameters:
Name
Type
Description
Default
theta
CReal
The rotation angle in radians.
required
phi
CReal
The phase angle in radians.
required
target
QBit
The qubit to apply the general single-qubit rotation gate to.
[Qmod core-library function]Performs the XX rotation gate on a pair of qubits.This operation is represented by the following matrix:RXX(θ)=e−i2θX⊗X=cos(2θ)00−isin(2θ)0cos(2θ)−isin(2θ)00−isin(2θ)cos(2θ)0−isin(2θ)00cos(2θ)Parameters:
Name
Type
Description
Default
theta
CReal
The rotation angle in radians.
required
target
QArray[QBit, Literal[2]]
The pair of qubits to apply the XX rotation gate to.
[Qmod core-library function]Performs the YY rotation gate on a pair of qubits.This operation is represented by the following matrix:RYY(θ)=e−i2θY⊗Y=cos(2θ)00−sin(2θ)0cos(2θ)sin(2θ)00sin(2θ)cos(2θ)0−sin(2θ)00cos(2θ)Parameters:
Name
Type
Description
Default
theta
CReal
The rotation angle in radians.
required
target
QArray[QBit, Literal[2]]
The pair of qubits to apply the YY rotation gate to.
[Qmod core-library function]Performs the ZZ rotation gate on a pair of qubits.This operation is represented by the following matrix:RZZ(θ)=e−i2θZ⊗Z=e−i2θ0000ei2θ0000ei2θ0000e−i2θParameters:
Name
Type
Description
Default
theta
CReal
The rotation angle in radians.
required
target
Const[QArray[QBit, Literal[2]]]
The pair of qubits to apply the ZZ rotation gate to.
[Qmod core-library function]Applies the Hadamard gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CH=21100001000011001−1Parameters:
[Qmod core-library function]Applies the Pauli-X gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CX=1000010000010010Parameters:
[Qmod core-library function]Applies the Pauli-Y gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CY=10000100000i00−i0Parameters:
[Qmod core-library function]Applies the Pauli-Z gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CZ=100001000010000−1Parameters:
[Qmod core-library function]Applies the RX gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CRX=1000010000cos(2θ)−i∗sin(2θ)00−i∗sin(2θ)cos(2θ)Parameters:
[Qmod core-library function]Applies the RY gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CRY=1000010000cos(2θ)sin(2θ)00−sin(2θ)cos(2θ)Parameters:
[Qmod core-library function]Applies the RZ gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CRZ=1000010000e−i2θ0000ei2θParameters:
[Qmod core-library function]Applies the PHASE gate to the target qubit, conditioned on the control qubit.This operation is represented by the following matrix:CPHASE=100001000010000eiθParameters:
[Qmod core-library function]Swaps the states of two qubits.This operation is represented by the following matrix:SWAP=1000001001000001Parameters:
[Qmod core-library function]Performs a general single-qubit unitary gate that applies phase and rotation with three Euler angles on a qubit.This operation is represented by the following matrix:U(θ,ϕ,λ,γ)=eiγ[cos(θ/2)eiϕsin(θ/2)−ei(λ)sin(θ/2)ei(ϕ+λ)cos(θ/2)]Parameters:
Name
Type
Description
Default
theta
CReal
The first Euler angle in radians.
required
phi
CReal
The second Euler angle in radians.
required
lam
CReal
The third Euler angle in radians.
required
gam
CReal
The global phase angle in radians.
required
target
QBit
The qubit to apply the general single-qubit unitary gate to.
[Qmod core-library function]Applies the Pauli-X gate to the target qubit, conditioned on the two control qubits (Toffoli).This operation is represented by the following matrix:CCX=1000000001000000001000000001000000001000000001000000000100000010Parameters:
Name
Type
Description
Default
ctrl
Const[QArray[QBit, Literal[2]]]
The control qubits.
required
target
QBit
The qubit to apply the conditioned Pauli-X gate on.