Main Content
xGate
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Syntax
Description
applies a Pauli X gate to a single target qubit and returns a g
= xGate(targetQubit
)quantum.gate.SimpleGate
object.
If targetQubit
is a vector of qubit indices, xGate
returns a column vector of gates, where g(i)
represents a Pauli X gate
applied to a qubit with index targetQubit(i)
.
Examples
Input Arguments
More About
Version History
Introduced in R2023a