# Standard Gates

## Basic Gates

The following are the most common or well-known gates in quantum computing. All of these allow for any number of `target_qubits`.

• `I`: Identity gate (this has no effect on a qubit but might be used for clarification)
• `X`: Standard X gate
• `Y`: Standard Y gate
• `Z`: Standard Z gate
• `S`: Standard S gate
• `T`: Standard T gate
• `H`: Standard Hadamard Gate

### R-value Gates

The following are R-value gates that require an `rvalue` (or `rvalue_expr`, `rvalue_dyadic_denom`) to be specified in the gate definition. For example:

``````{
"gate_type": "Rx",
"rvalue": 0.4,
"target_qubits": 
}
``````
• `R1`: Standard R1 gate
• `Rx`: Standard Rx gate
• `Ry`: Standard Ry gate
• `Rz`: Standard Rz gate

## Controlled Gates

Note that any of the above gates can be controlled by simply specifying the `control_qubits` and a single `target_qubit` in the gate definition. However, the following are provided for compatibility and standardization with other systems.

• `CNOT`: The controlled NOT gate. Note that this is identical to the following gate definition, where the 0 qubit is the control and the 1 qubit is the target:

``````{
"gate_type": "X",
"control_qubits": ,
"target_qubits": 
}
``````
• `CZ`: The controlled Z gate. Note that this is identical to the following gate definition, where the 0 qubit is the control and the 1 qubit is the target:

``````{
"gate_type": "Z",
"control_qubits": ,
"target_qubits": 
}
``````

## Measurement Gates

Measurement gates collapse the state of a qubit. Refer to the `rand_source_type` gate object property to learn more about the randomness used to simulate quantum collapse.

• `M` or `Mz`: Measurement gate in the Z-basis.
• `Mx`: Measurement gate in the X-basis.
• `My`: Measurement gate in the Y-basis.
• `Mz`: Measurement gate in the Z-basis.

## Miscellaneous Gates

• `SWAP`: Swaps the two qubits specified in `target_qubits`.