Usage

Installation

To use Lumache, first install it using pip:

(.venv) $ pip install lumache

Creating recipes

To retrieve a list of random ingredients, you can use the lumache.get_random_ingredients() function:

class lumache.Experiment

Variables
  • test (str) – This is a test class variable

  • pulses (List[str]) – List of names to lookup in the pulse library.

  • pulse_library (Dict[str, List[complex]]) – Dictionary which maps names to complex pulse envelopes.

  • config (Dict[str, Any]) –

  • clock_period (float) –

lumache.get_random_ingredients(kind=None)

Run-length encode a vector of complex numbers.

e.g.

>>> v = np.asarray([0+1j,1+2j,1j,1j])
>>> iqx_rle(v)
[(1j,), ((1+2j),), (1j, 2)]
Parameters

vec (list[complex] or ArrayLike) – Input vector to encode.

Returns

Run-length encoded vector.

Return type

list[tuple[complex, int]]

lumache.iqx_rld(rle_seq: List[Union[Tuple[Any], Tuple[Any, int]]]) List[Any]

Decode a run-length encoded sequence of complex numbers. See also iqx_rld().

This is an example of a code block:

from rich import print
print("Hello World!")

Note

This is note text

it has indentation rules

Warning

This is warning

it has identation rules

Parameters

rle_seq (list[tuple[complex, int]]) – Input sequence to decode.

Returns

Original sequence.

Return type

list[complex]

The kind parameter should be either "meat", "fish", or "veggies". Otherwise, lumache.get_random_ingredients() will raise an exception.

exception lumache.InvalidKindError

Raised if the kind is invalid.

For example:

>>> import lumache
>>> lumache.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']