-
Notifications
You must be signed in to change notification settings - Fork 19
Description
It would be nice to have simplification rules for inner products, at least between standard states (e.g., Z1 or X2).
A particularly simple example of desired behavior is qsimplify(dagger(Z1) * Z1)
returning 1.
Having such functionality would make it much easier to analyze the results of circuits that involve (projective) measurements symbolically. An example of a use case is starting with a state
@variables α, β
ψ = α * Z1 ⊗ Z1 + β * Z2 ⊗ Z2
and then determining the output state and success probability of an entanglement-concentration protocol executed on two copies of this state (realized by performing some gates and some projective measurements), both expressed in terms of α and β.
Note that express
can be used to calculate inner products, but that does not seem to be compatible with having symbolic variables within the state. Moreover, I think having a symbolic solution for such simple inner products would also be more elegant and better at fostering understanding than using numerics.