Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

Clifford

class Clifford(num_qubits=None, table=None, phases=None)

GitHub

Clifford Operator Class.


Attributes

num_qubits

Return the number of qubits for the Clifford.

phases

Return the Clifford phases.

table

Return the Clifford table.


Methods

__getitem__

Clifford.__getitem__(index)

Get element from internal symplectic table.

as_dict

Clifford.as_dict()

Return dictionary (JSON) represenation of Clifford object

cx

Clifford.cx(qubit_ctrl, qubit_trgt)

Apply a Controlled-NOT “cx” gate.

cz

Clifford.cz(qubit_ctrl, qubit_trgt)

Apply a Controlled-z “cz” gate.

destabilizer

Clifford.destabilizer(row)

Return the destabilizer as a Pauli object.

from_dict

classmethod Clifford.from_dict(clifford_dict)

Load a Clifford from a dictionary.

h

Clifford.h(qubit)

Apply an Hadamard “h” gate to qubit.

index

Clifford.index()

Returns a unique index for the Clifford.

Returns

A unique index (integer) for the Clifford object.

Return type

int

s

Clifford.s(qubit)

Apply a phase “s” gate to qubit.

sdg

Clifford.sdg(qubit)

Apply an adjoint phase “sdg” gate to qubit.

stabilizer

Clifford.stabilizer(qubit)

Return the qubit stabilizer as a Pauli object.

swap

Clifford.swap(qubit0, qubit1)

Apply SWAP gate between two qubits.

update_destabilizer

Clifford.update_destabilizer(qubit, pauli)

Update the qubit destabilizer row from a Pauli object.

update_stabilizer

Clifford.update_stabilizer(qubit, pauli)

Update the qubit stabilizer row from a Pauli object.

v

Clifford.v(qubit)

Apply v gate v = sdg.h .

w

Clifford.w(qubit)

Apply w gate w = v.v .

x

Clifford.x(qubit)

Apply a Pauli “x” gate to a qubit.

y

Clifford.y(qubit)

Apply an Pauli “y” gate to a qubit.

z

Clifford.z(qubit)

Apply an Pauli “z” gate to qubit.

Was this page helpful?
Report a bug or request content on GitHub.