Options
All
  • Public
  • Public/Protected
  • All
Menu

SIMULATION CLASS Loads a grid Convert its elements into operators and merge them into a global operator. Generate simulation frames and absorptions.

Hierarchy

  • Simulation

Index

Constructors

Properties

frames: Frame[]
globalOperator: Operator
operators: IXYOperator[]
sizeX: number
sizeY: number

Accessors

  • get probabilityPerFrame(): number[]
  • Quantum state probability for each frame.

    Returns number[]

    probability of frame

  • get totalAbsorptionPerFrame(): number[]
  • Quantum state probability of absorption for each frame.

    Returns number[]

  • Total (summed over all frames) absorption per tile. {x: -1, y: -1, probability: ...} means falling of the board.

    todo

    If needed, I we can add exact (off-board) coordinates of all lost photons.

    Returns IAbsorption[]

    E.g. [{x: 2, y: 1, probability: 0.25}, {x: 3, y: 5, probability: 0.25}, {x: -1, y: -1, probability: 0.25}]

Methods

  • generateFrames(n?: number, stopThreshold?: number, logging?: boolean): void
  • Compute next frames until probability threshold

    Parameters

    • n: number = 20

      default number of frames

    • stopThreshold: number = 1e-6

      stop if probability below threshold

    • logging: boolean = false

      toggle console debug

    Returns void

  • initializeFromIndicator(indicator: IIndicator): void
  • sampleRandomRealization(): { probability: number; statePerFrame: Frame[]; step: number; x: number; y: number }
  • Create a random realization. So - the state is normalized, until a successful measurement.

    remark

    So far for 1 particle.

    todo

    Make it work for more particles.

    todo

    Maybe make it another object? Or use QuantumFrame?

    todo

    Kinda ugly return

    Returns { probability: number; statePerFrame: Frame[]; step: number; x: number; y: number }

    • probability: number
    • statePerFrame: Frame[]
    • step: number
    • x: number
    • y: number

Generated using TypeDoc