Types of Quantum Gates
Note
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
This topic provides a list functions that you can use to create quantum gates in MATLAB®. Quantum gates are reversible and have unitary matrix representations.
Creation Functions for SimpleGate
Objects
Gates on One Target Qubit
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
hGate
| Hadamard gate | 1 |
| |
idGate | Identity gate | 1 |
| |
xGate | Pauli X gate | 1 |
| |
yGate | Pauli Y gate | 1 |
| |
zGate | Pauli Z gate | 1 |
|
Rotation Gates
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
rxGate | x-axis rotation gate | 1 |
| |
ryGate | y-axis rotation gate | 1 |
| |
rzGate | z-axis rotation gate | 1 |
| |
r1Gate | z-axis rotation gate with global phase | 1 |
| |
sGate | S gate | 1 | ||
siGate | Inverse S gate | 1 | ||
tGate | T gate | 1 | ||
tiGate | Inverse T gate | 1 |
Gates with One Control Qubit and One Target Qubit
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
chGate
| Controlled Hadamard gate | 2 |
| |
Controlled X or CNOT gate | 2 |
| ||
cyGate | Controlled Y gate | 2 |
| |
czGate | Controlled Z gate | 2 |
|
Gate That Swap States of Two Qubits
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
swapGate | Swap gate | 2 |
|
Controlled Rotation Gates
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
crxGate | Controlled x-axis rotation gate | 2 |
| |
cryGate | Controlled y-axis rotation gate | 2 |
| |
crzGate | Controlled z-axis rotation gate | 2 |
| |
cr1Gate | Controlled z-axis rotation gate with global phase | 2 |
|
Controlled Controlled X Gate
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
ccxGate | Controlled controlled X gate (CCNOT or Toffoli gate) | 3 |
|
Ising Coupling Gates
Creation Function | Gate Name | No. of Qubits | Matrix Representation | Properties |
---|---|---|---|---|
rxxGate | Ising XX coupling gate | 2 |
| |
ryyGate | Ising YY coupling gate | 2 |
| |
rzzGate | Ising ZZ coupling gate | 2 |
|
Creation Functions for CompositeGate
Objects
Composite and Specialized Gates
Creation Function | Gate Name | No. of Qubits | Gate Symbol | Equivalent Internal Gates | Matrix Representation |
---|---|---|---|---|---|
compositeGate | Composite gate | Varies | Example:
Quantum circuit with two composite gates named | ||
| |||||
qftGate | Quantum Fourier transform (QFT) gate | Varies | Example: Quantum Fourier transform gate on three qubits. The equivalent internal gates are Hadamard gates, R1 gates, and a swap gate. | ||
| |||||
mcxGate | Multi-controlled X gate | Varies | Example: Multi-controlled X gate with three control qubits, one target qubit, and no ancilla qubit. The equivalent internal gates are Hadamard gates, controlled R1 gates, and controlled X gates. | ||
|
See Also
quantum.gate.SimpleGate
| quantum.gate.CompositeGate