pasqal-io / qadence

Digital-analog quantum programming interface
https://pasqal-io.github.io/qadence/latest/
Apache License 2.0
71 stars 21 forks source link

[Refactoring] Centralize matrix - state multiplication with proper qubit-support #10

Open jpmoutinho opened 1 year ago

jpmoutinho commented 1 year ago

In certain places in qadence matrix - state multiplications are computed, e.g., when calculating observables. Mostly this uses the block_to_tensor function which by default sets use_full_support = True. However, we should by default have use_full_support = False in this function so that we only initialize the smallest matrices needed depending on the qubit support, and make sure that all matrix - state multiplications take that into account by multiplying only the small matrix into the correct qubit support.

mlahariya commented 1 week ago

If this is inherent in Q2, please close it. @jpmoutinho