Closed tanujkhattar closed 1 month ago
We need the
target_0_0_..._0
'th register and not thetarget_0
th register; which can be multidimensional.
I was a little confused by the underscores here given our weird target register convention, you just mean you want the actual zero'th target register not the zero'th row (in the 2D example)
I was a little confused by the underscores here given our weird target register convention, you just mean you want the actual zero'th target register not the zero'th row (in the 2D example)
Yup
Why are we using value_equality_values at all?
Why are we using value_equality_values at all?
We store tuples of numpy arrays, which don't support value equality by default.
In several of the chemistry bloqs I ended up using tuples of tuples etc which is horrendous, but maybe this is solved in attrs now: https://www.attrs.org/en/stable/comparison.html#customization?
@fdmalone @mpharrigan Removed the use of _value_equality_values_
with the fancy attrs functionality Fionn mentioned above. This is ready to go now.
Two bugfixes:
self.use_dirty_ancilla
in_value_equality_values_
-- This is important to make surebloq.t_complexity()
returns different values whenbloq
is initialized withuse_dirty_ancilla=True
vsuse_dirty_ancilla=False
. Right now, they can return the same value because the t-complexity is cachedqrom_batched_target[0]
can return a numpy array because the target shapes can be multi-dimensional. This is especially true when input data is multi-dimensional (i.e.data[N][M] --> bached_qrom_data[N / k1][M / k2]
). We need thetarget_0_0_..._0
'th register and not thetarget_0
th register; which can be multidimensional.The added tests fail on main but pass with this PR.