cirq.NamedQubit

class cirq.NamedQubit(name: str)[source]

A qubit identified by name.

By default, NamedQubit has a lexicographic order. However, numbers within
the name are handled correctly. So, for example, if you print a circuit
containing cirq.NamedQubit('qubit22') and cirq.NamedQubit('qubit3'), the
wire for ‘qubit3’ will correctly come before ‘qubit22’.
__init__(name: str) → None[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

range(*args, prefix)

Returns a range of NamedQubits.

validate_dimension(dimension)

Raises an exception if dimension is not positive.

with_dimension(dimension)

Returns a new qid with a different dimension.

Attributes

dimension

Returns the dimension or the number of quantum levels this qid has.

name