Currently, the equivalence of two quantum circuits, 𝑈 and 𝑉, is checked by comparing 𝑈𝑉† to the identity DD in isCloseToIdentity. However, this approach does not account for approximate equivalence, which can be sufficient in practice.
Describe the solution you'd like
To address this, the Frobenius inner product between 𝑈 and 𝑉 can be computed and compared to a predefined threshold to determine approximate equivalence.
AlternatingChecker:
Compute the trace of 𝑈𝑉† and compare it with the threshold.
ConstructionChecker:
Invert circuit 𝑉
Compute 𝑈𝑉†
Compute the trace of 𝑈𝑉† and compare it with the threshold.
What's the problem this feature will solve?
Currently, the equivalence of two quantum circuits, 𝑈 and 𝑉, is checked by comparing 𝑈𝑉† to the identity DD in
isCloseToIdentity
. However, this approach does not account for approximate equivalence, which can be sufficient in practice.Describe the solution you'd like
To address this, the Frobenius inner product between 𝑈 and 𝑉 can be computed and compared to a predefined threshold to determine approximate equivalence.
AlternatingChecker:
ConstructionChecker:
SimulationChecker: