Skip to content

Types

Define the types that only the engine reads.

HilbertSpaceProtocol

Bases: Protocol

A protocol of the vector space of the states of a subsystem, such as a qubit.

A field package defines the space of a subsystem, such as the two states of a qubit with its Pauli operators, and the operator compiler reads its dimension, its named local operators, its basis states, and the compiler of its systems. An element that takes such a space and declares a complex value is a subsystem, and a group of them is the tensor product of their spaces. It describes a qubit of a quantum computer, a spin of a magnet, and an atom in a cavity.

Read more in the user guide, under Extend the library.

See Also

OperatorKernel: A matrix that the compiler builds from the operators of the space.

Examples:

>>> from skcomplex.core.engine.types import HilbertSpaceProtocol
>>> from skcomplex.systems.physics.common.quantum import QubitElement
>>> space = QubitElement('a').hilbert
>>> isinstance(space, HilbertSpaceProtocol), space.dimension
(True, 2)

basis property

The index of every basis state by label.

dimension property

The dimension of the space.

display property

The operator whose expectation visuals show for a group, or None.

operators property

The matrix of every local operator by name and whether it is Hermitian.