cirq.pasqal.ThreeDQubit

A qubit in 3d.

Inherits From: Qid

Used in the notebooks

Used in the tutorials

ThreeDQubits use z-y-x ordering:

ThreeDQubit(0, 0, 0) < ThreeDQubit(1, 0, 0)
< ThreeDQubit(0, 1, 0) < ThreeDQubit(1, 1, 0)
< ThreeDQubit(0, 0, 1) < ThreeDQubit(1, 0, 1)
< ThreeDQubit(0, 1, 1) < ThreeDQubit(1, 1, 1)

dimension Returns the dimension or the number of quantum levels this qid has. E.g. 2 for a qubit, 3 for a qutrit, etc.

Methods

cube

View source

Returns a cube of ThreeDQubits.

Args
diameter Length of a side of the square
x0 x-coordinate of the first qubit
y0 y-coordinate of the first qubit
z0 z-coordinate of the first qubit

Returns
A list of ThreeDQubits filling in a square grid

distance

View source

Returns the distance between two qubits in 3d.

parallelep

View source

Returns a parallelepiped of ThreeDQubits.

Args
rows Number of rows in the rectangle
cols Number of columns in the rectangle
x0 x-coordinate of the first qubit
y0 y-coordinate of the first qubit
z0 z-coordinate of the first qubit

Returns
A list of ThreeDQubits filling in a 3d grid

validate_dimension

View source

Raises an exception if dimension is not positive.

Raises
ValueError dimension is not positive.

with_dimension

View source

Returns a new qid with a different dimension.

Child classes can override. Wraps the qubit object by default.

Args
dimension The new dimension or number of levels.

__eq__

View source

Return self==value.

__ge__

View source

Return self>=value.

__gt__

View source

Return self>value.

__le__

View source

Return self<=value.

__lt__

View source

Return self<value.

__ne__

View source

Return self!=value.