SGate

class SGate(label=None)[source]

Single qubit S gate (Z**0.5).

It induces a \(\pi/2\) phase, and is sometimes called the P gate (phase).

This is a Clifford gate and a square-root of Pauli-Z.

Matrix Representation:

\[\begin{split}S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}\end{split}\]

Circuit symbol:

     ┌───┐
q_0: ┤ S ├
     └───┘

Equivalent to a \(\pi/2\) radian rotation about the Z axis.

Create new S gate.

Attributes

SGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

SGate.definition

Return definition in terms of other basic gates.

SGate.label

Return gate label

SGate.params

return instruction params.

Methods

SGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

SGate.assemble()

Assemble a QasmQobjInstruction

SGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

SGate.c_if(classical, val)

Add classical condition on register classical and value val.

SGate.control([num_ctrl_qubits, label, …])

Return controlled version of gate.

SGate.copy([name])

Copy of the instruction.

SGate.inverse()

Return inverse of S (SdgGate).

SGate.is_parameterized()

Return True .IFF.

SGate.mirror()

For a composite instruction, reverse the order of sub-gates.

SGate.power(exponent)

Creates a unitary gate as gate^exponent.

SGate.qasm()

Return a default OpenQASM string for the instruction.

SGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

SGate.to_matrix()

Return a numpy.array for the S gate.