You're reading the documentation of the v1.0. For the latest released version, please have a look at v1.2.

BSDistribution

BSCount

class exqalibur.BSCount

Measured sample count data structure. For given states, holds a positive number of occurrence.

Parameters:

bscount – (optional) can be initialised from another BSCount or a dictionary in which all keys are of type FockState and all values are positive integers

add(self: exqalibur.exqalibur.BSCount, fs: exqalibur.exqalibur.FockState, value: SupportsInt) None

Increment the count of a given state. Zeroes are discarded.

Parameters:
  • fs – Fock state

  • value – Count to add

items(self: exqalibur.exqalibur.BSCount) exqalibur.exqalibur.ItemsView
keys(self: exqalibur.exqalibur.BSCount) exqalibur.exqalibur.KeysView
total(self: exqalibur.exqalibur.BSCount) int

Compute the total number of samples.

Returns:

the sum of occurrence of all contained states

values(self: exqalibur.exqalibur.BSCount) exqalibur.exqalibur.ValuesView

BSSamples

class exqalibur.BSSamples

Measured samples ordered container, suited to save a sample stream data acquisition.

It basically acts like a list.

append(self: exqalibur.exqalibur.BSSamples, x: exqalibur.exqalibur.FockState) None

Add an item to the end of the list

clear(self: exqalibur.exqalibur.BSSamples) None

Clear the contents

count(self: exqalibur.exqalibur.BSSamples, x: exqalibur.exqalibur.FockState) int

Return the number of times x appears in the list

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: exqalibur.exqalibur.BSSamples, L: exqalibur.exqalibur.BSSamples) -> None

Extend the list by appending all the items in the given list

  1. extend(self: exqalibur.exqalibur.BSSamples, L: collections.abc.Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: exqalibur.exqalibur.BSSamples, i: SupportsInt, x: exqalibur.exqalibur.FockState) None

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: exqalibur.exqalibur.BSSamples) -> exqalibur.exqalibur.FockState

Remove and return the last item

  1. pop(self: exqalibur.exqalibur.BSSamples, i: typing.SupportsInt) -> exqalibur.exqalibur.FockState

Remove and return the item at index i

remove(self: exqalibur.exqalibur.BSSamples, x: exqalibur.exqalibur.FockState) None

Remove the first item from the list whose value is x. It is an error if there is no such item.