github XanaduAI/blackbird v0.3.0
Release 0.3.0

latest releases: v0.5.0, v0.4.0
4 years ago

New features since last release

  • Arrays and variables now support being defined as parameters (using braces) in a Blackbird template. (#34)

  • Time-domain multiplexing programs are now supported, using the syntax type tdm (temporal_modes=3, copies=1). (#30)

  • For-loops are supported inside Blackbird scripts. (#24)

    They can be defined using ranges via the syntax from:to:step:

    for float v in 2:10:3
      MZgate(v, v/2) | [0, 1]

    or lists

    for int m in [0, 2, 4]
      MeasureFock() | m
  • Keyword arguments are supported inside operations; for example, MeasureHomodyne(select=[0, 1]) or MeasureFock(dark_counts=[1, 0.5, 3]). (#23)

  • Indexing is supported inside both modes and arguments; for example, MZgate(list[2], list[0]) | [list[3], list[1]])). All indices allow expressions such as phases[-3 + 2*2]. (#23)

Bug fixes

  • Templates are no longer changed when calling them and replacing the parameters with actual values. (#34)

Documentation

  • TDM programs, for-loops and array indexing is added to the docs, along with other minor updates. (#28)

This release contains contributions from (in alphabetical order):

Theodor Isacsson

Don't miss a new blackbird release

NewReleases is sending notifications on new releases.