Options
All
  • Public
  • Public/Protected
  • All
Menu

Frame class

remarks

Merge between Photons and QuantumFrame from QG2

todo

Think about how to pass the operators in a better way

Hierarchy

  • Frame

Index

Constructors

  • Create a board for photons. Mostly for internal use.

    Parameters

    • sim: Simulation
    • vector: Vector = ...

      Vector with [x1, y1, dir1, pol1, ..., xn, yn, dirn, poln].

    Returns Frame

Properties

absorptions: IAbsorption[]
dimX: Dimension
dimY: Dimension
probAfter?: number
probBefore: number
probPropagated?: number
probThreshold: number = 1e-6
vector: Vector

Accessors

  • get nPhotons(): number
  • The total number of photons.

    Returns number

  • remark

    from QuantumFrame, non interesting gluecode

    note

    Coord and Particle will need a serious rewrite

    Returns IParticle[]

  • get polarizationSuperpositions(): IParticle[]
  • remark

    from QuantumFrame, non interesting gluecode

    note

    Coord and Particle will need a serious rewrite

    Returns IParticle[]

  • get probability(): number
  • remark

    Moved from QuantumFrame State vector norm.

    Returns number

    Frame vector norm squared

  • get sizeX(): number
  • Size x ('width') of the board.

    Returns number

  • get sizeY(): number
  • Size y ('height') of the board.

    Returns number

  • get totalProbabilityLoss(): number
  • remark

    Moved from QuantumFrame should be same as this.probAfter

    Returns number

Methods

  • actOnSinglePhotons(): Frame
  • Act on single photons with the precomputed globalOperator.

    remark

    Absorption for states with n>1 photons is broken.

    • it tracks only a fixed-number of photons subspace.

    Returns Frame

    Itself, for chaining.

  • addPhotonFromIndicator(posX: number, posY: number, dir: string, pol: string): Frame
  • Add one more photon to the state, using Photons.vectorFromIndicator.

    Parameters

    • posX: number

      Position of the photon, x.

    • posY: number

      Position of the photon, y.

    • dir: string

      Direction from ['>', '^', '<', 'v].

    • pol: string

      Polarization from ['H', 'V', 'D', 'A', 'L', 'R'].

    Returns Frame

    Itself, for chaining.

  • Combine H and V polarization, to Right now kind od dirty, but should work

    todo

    Interface is clunky and restrictred to 1 particle.

    Returns IParticle[]

    Angles 0-360, starting from --> and moving counterclockwise |psi> = (are + i aim) |H> + (bre + i bim) |V>

  • todo

    Check that the globalOperator doesn't hammer performance.

    Returns Frame

    A deep copy of the same object.

  • ketString(complexFormat?: ComplexFormat, precision?: number): string
  • Generates a string for kets. See Vector.toString for formatting options.

    Parameters

    • complexFormat: ComplexFormat = 'cartesian'

      .

    • precision: number = 2

      Float precision.

    Returns string

    A ket string, e.g. (0.71 +0.00i) |3,1,>,V⟩ + (0.00 +0.71i) |2,2,v,V⟩.

  • measureAbsorptionAtOperator(op: IXYOperator, photonId?: number): number
  • Measure the absolute absorbtion on a given tile.

    Parameters

    • op: IXYOperator

      Operator, assumed to be with dimensions [pol, dir].

    • photonId: number = 0

    Returns number

    Probability lost at tile (x, y) after applying the operator. Does not change the photon object.

  • propagateAndInteract(): void
  • remark

    moved from QuantumFrame

    Returns void

  • propagatePhotons(): Frame
  • propagatePhotonsWithOperator(): Frame
  • Propagate all particles, using {@link createPhotonPropagator}.

    remarks

    lets stick with Y means down conveniton and remove clutter

    Returns Frame

    Itself, for chaining.

  • vectorIndicesForParticle(i: number): number[]
  • Dimension indices for particle i, for [posX, posY, dir, pol].

    note

    For internal use.

    Parameters

    • i: number

      Photon id, from [0, ..., nPhotons - 1]

    Returns number[]

    E.g. for 1: [4, 5, 6, 7]

  • vectorPosDirIndicesForParticle(i: number): number[]
  • Dimension indices for particle i, for [posX, posY, dir].

    note

    For internal use.

    Parameters

    • i: number

      Photon id, from [0, ..., nPhotons - 1]

    Returns number[]

    E.g. for 1: [4, 5, 6]

  • vectorPosIndicesForParticle(i: number): number[]
  • Dimension indices for particle i, for [posX, posY].

    note

    For internal use.

    Parameters

    • i: number

      Photon id, from [0, ..., nPhotons - 1]

    Returns number[]

    E.g. for 1: [4, 5]

  • vectorValuedMeasurement(op: IXYOperator, photonId?: number): any
  • Demo of measurement of one particle So far the basis is FIXED, so it won't give corrent results with operators absorbing in a basis that does not commute with this basis. Vide measureAbsorptionAtOperator as the structure is

    Parameters

    Returns any

    Only measurement (zeros excluded). Conditional state is NOT normalized (to avoid issues with division by ) FIXME: No return type

  • Create an operator for a particular place, projecting only on the particular position.

    Parameters

    • sizeX: number

      Board size, x.

    • sizeY: number

      Board size, y.

    • op: IXYOperator

      Operator, assumed to be with dimensions [pol, dir].

    Returns Operator

    An operator [dimX, dimY, pol, dir].

  • propagator(sizeX: number, sizeY: number): Operator
  • Create a propagator, given the board size.

    remarks

    lets stick with Y means down conveniton and remove clutter

    Parameters

    • sizeX: number

      Board size, x.

    • sizeY: number

      Board size, y.

    Returns Operator

    An operator, with dimensions [dimX, dimY, {@link Dimension.direction()}].

  • Turn an list of operators in a complete one-photon iteraction operator for the board.

    remark

    Some space for improvement with avoiding identity (direct sum structure), vide Operator.mulVecPartial.

    Parameters

    • sizeX: number

      Board size, x.

    • sizeY: number

      Board size, y.

    • opsWithPos: IXYOperator[]

      A list of [x, y, operator with [dir, pol]].

    Returns Operator

  • Turn an list of operators in a complete one-photon iteraction operator for the board (U - Id).

    Parameters

    • sizeX: number

      Board size, x.

    • sizeY: number

      Board size, y.

    • opsWithPos: IXYOperator[]

      A list of [x, y, operator with [dir, pol]].

    Returns Operator

  • vectorFromIndicator(sizeX: number, sizeY: number, posX: number, posY: number, dir: string, pol: string): Vector
  • Create a single photon vector.

    todo

    Aupport 'D', 'A', 'L' and 'R'.

    Parameters

    • sizeX: number

      Board size, x.

    • sizeY: number

      Board size, y.

    • posX: number

      Position of the photon, x.

    • posY: number

      Position of the photon, y.

    • dir: string
    • pol: string

      Polarization from ['H', 'V', 'D', 'A', 'L', 'R'].

    Returns Vector

    A vector [dimX, DimY, dir, pol], does not modify the object.

Generated using TypeDoc