SXGate#
- class qiskit.circuit.library.SXGate(label=None)[fuente]#
Bases:
Gate
The single-qubit Sqrt(X) gate (\(\sqrt{X}\)).
Can be applied to a
QuantumCircuit
with thesx()
method.Matrix Representation:
\[\begin{split}\sqrt{X} = \frac{1}{2} \begin{pmatrix} 1 + i & 1 - i \\ 1 - i & 1 + i \end{pmatrix}\end{split}\]Circuit symbol:
┌────┐ q_0: ┤ √X ├ └────┘
Nota
A global phase difference exists between the definitions of \(RX(\pi/2)\) and \(\sqrt{X}\).
\[\begin{split}RX(\pi/2) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -i \\ -i & 1 \end{pmatrix} = e^{-i \pi/4} \sqrt{X}\end{split}\]Create new SX gate.
Attributes
- condition_bits#
Get Clbits in condition.
- decompositions#
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
- definition#
Return definition in terms of other basic gates.
- duration#
Get the duration.
- label#
Return instruction label
- name#
Return the name.
- num_clbits#
Return the number of clbits.
- num_qubits#
Return the number of qubits.
- params#
return instruction params.
- unit#
Get the time unit of duration.
Methods