-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting between KronBlock, Scale, and Add Objects #522
Comments
Hello, I cannot reproduce your issue with the following code. Did I miss-understood your mininmal working example? If this persists, could you please send the version of your Yao.jl?
|
Closing due to inactivity |
Hi, Please see below for a MWE. Also, it's not an error per se but I am just not sure how to convert between different objects from the Yao package in a clean way. Thanks!
|
Sorry for misunderstanding your question. To convert between |
I have defined a quantum circuit
circuit
usingchain
and want to runexpect'(ham, Yao.zero_state(nq) => circuit).
However, if I define my hamiltonian to be aKronBlock
or aScale
object, by e.g.I cannot pass it through the desired function, and it seems like it only takes
Add
objects as input. I am able to bypass this issue but doingham = ham + 0*kron(nq, 1 => Z)
, but am wondering if there is a more elegant way to convert between these objects.The text was updated successfully, but these errors were encountered: