CQCL / pytket-qir

Public repo for the pytket-qir package
Apache License 2.0
6 stars 1 forks source link

Prefer `init_reg` over `reg2var` for empty classical registers #59

Closed qartik closed 1 year ago

qartik commented 1 year ago

As discussed in #57 and later.

I would like to use this PR for stabilizing the design of the API. For example, here are a couple options:

  1. remove reg2var completely and keep init_reg as is
  2. use reg2var for only creating registers with initial values and init_reg for empty cregs
  3. add an additional parameter to init_reg for an initial value and remove reg2var.

PS: Please ignore changes from #58, see https://github.com/CQCL/pytket-qir/pull/59/commits/b3a04dd30c79ce024cd3c22b2f2682395c3bb52d for the changes introduced in this PR.

qartik commented 1 year ago

Also see another option #61

qartik commented 1 year ago

Closing in favor of #61