Bursts

qrobot.bursts module class diagram:

Inheritance diagram of qrobot.bursts.Burst, qrobot.bursts.ZeroBurst, qrobot.bursts.OneBurst


The Burst abstract class

class qrobot.bursts.Burst[source]

Parent abstract class of all bursts. Every burst sould work by being called and returning a float (the burst value).


The ZeroBurst class

class qrobot.bursts.ZeroBurst[source]

When called, ZeroBurst converts a measured state into a float number which is:

\[\frac{ \text{Number of 0s for the state in the computational base} }{ \text{State dimension} }\]

For example, for "00100100" we have \(\frac{6}{8}\):

>>> from qrobot.bursts import ZeroBurst
>>> state = "00100100"
>>> ZeroBurst(state)
0.75

The OneBurst class

class qrobot.bursts.OneBurst[source]

When called, ZeroBurst converts a measured state into a float number which is:

\[\frac{ \text{Number of 1s for the state in the computational base} }{ \text{State dimension} }\]

For example, for "00100100" we have \(\frac{2}{8}\):

>>> from qrobot.bursts import OneBurst
>>> state = "00100100"
>>> OneBurst(state)
0.25