View on GitHub
Open this notebook in GitHub to run it yourself
All gates are covered in the reference manual.
Single Qubit Gates
An example is given for gate. The gates , , , , , are used in the same way.For example: X
Function:X
Arguments:
target:QBit
Single Qubit Rotation Gates
An example is given for gate. The gates , , are used in the same way except for parameter name.Parameter names for different rotation gates
RX:thetaRY:thetaRZ:phi
For example: RZ
Function:RZ
Arguments:
theta:CRealtarget:QBit
R Gate
Rotation by around the axis. Parameters:theta:CRealphi:CRealtarget:QBit
Phase Gate
Rotation about the Z axis by with global phase of . Parameters:theta:CRealtarget:QBit
Double Qubits Rotation Gates
An example is given for gate. The gates , , are used in the same way.RZZ Gate
Rotation about ZZ. Parameters:theta:CRealtarget:QArray[QBit]
Controlled Gates
An example is given for gate. The gates , , , , , are used in a similar way. In Gate thectrl_state parameter receives a value suitable for 2 control qubits. for example: "01".
CX Gate
The Controlled gate. Applies Gate on the target qubit, based on the state of the control qubit (by default if the controlled state is ). Parameters:control:QBittarget:QBit
Controlled Rotations
An example is given for gate. The gates , , , CPhase are used in the same way.CRX Gate
Controlled rotation around the X axis. Parameters:theta:CRealcontrol:QBittarget:QBit
Swap Gate
Swaps between two qubit states. Parameters:qbit0:QBitqbit1:QBit
U Gate
The single-qubit gate applies phase and rotation with three Euler angles. Matrix representation: Parameters:theta:CRealphi:CReallam:CRealgam:CRealtarget:QBit