graphix.states module¶
Quantum states and operators.
- class State[source]¶
Bases:
ABCAbstract base class for single qubit states objects.
Only requirement for concrete classes is to have a to_statevector_numpy() method that returns the statevector representation of the state
- class PlanarState(plane: Plane, angle: float)[source]¶
Bases:
StateLight object used to instantiate backends.
doesn’t cover all possible states but this is covered in
graphix.sim.statevec.Statevectorandgraphix.sim.densitymatrix.DensityMatrixconstructors.- Parameters:
plane (
graphix.pauli.Plane) – One of the three planes (XY, XZ, YZ)angle (float) – Angle (in units of π)
- Returns:
State
- Return type:
graphix.states.Stateobject
- class BasicStates[source]¶
Bases:
objectBasic states.
- ZERO: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XZ, 0)¶
- ONE: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XZ, 1)¶
- PLUS: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XY, 0)¶
- MINUS: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XY, 1)¶
- PLUS_I: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XY, 0.5)¶
- MINUS_I: ClassVar[PlanarState] = graphix.states.PlanarState(Plane.XY, -0.5)¶
- VEC: ClassVar[list[PlanarState]] = [graphix.states.PlanarState(Plane.XY, 0), graphix.states.PlanarState(Plane.XY, 1), graphix.states.PlanarState(Plane.XZ, 0), graphix.states.PlanarState(Plane.XZ, 1), graphix.states.PlanarState(Plane.XY, 0.5), graphix.states.PlanarState(Plane.XY, -0.5)]¶