Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for dealing with bases.

Hierarchy

  • Basis

Index

Constructors

  • new Basis(namedVectorValues: { name: string; values: Complex[] }[], computationalDimension: Dimension): Basis
  • As most constructors, for intenal use only.

    Parameters

    • namedVectorValues: { name: string; values: Complex[] }[]
    • computationalDimension: Dimension

    Returns Basis

Properties

namedVectors: INamedVector[]

Accessors

  • get basisCoordNames(): string[]
  • get basisStr(): string
  • Get basis string.

    Returns string

Methods

  • toString(): string
  • Generates a string.

    Returns string

  • fromString(dimName: string, basisStr: string): Basis
  • polarization(basisStr: string): Basis
  • qubit(basisStr: string): Basis
  • Bases for qubit Dimension.qubit

    note

    Different from polarization, as |-⟩ ~ |0⟩ - |1⟩.

    note

    |i+⟩ and |i-⟩ will test the ground for multichar coord names.

    Parameters

    • basisStr: string

      '01' for computational, '+-' for diagonal, '+i-i' for circular

    Returns Basis

  • spin(basisStr: string): Basis
  • Bases for spin-1/2 Dimension.spin

    note

    Let's test multiple names.

    Parameters

    • basisStr: string

      'ud' or 'spin-z' or 'uzdz' for z, 'spin-x' or 'uxdx', 'spin-y' or 'uydy'

    Returns Basis

Generated using TypeDoc