I'm working on wolfram cloud notebook to simulate Discrete-Time Quantum Random Walk on hypercube. But, in the QuatumCircuitOperator, I found an unexpected behaviour. Here is my code:
PacletInstall[ResourceObject["https://wolfr.am/11ftY6W2s"]]
Needs["Wolfram`QuantumFramework`"]
n = 4;
d = 4;
m = Ceiling[Evaluate[Log[2,Evaluate[n]]]];
m = Evaluate[m];
posn = QuantumState["Register"[n]];
coin = QuantumState["Register"[m]];
list =Table[x,{x,m}]
qc = QuantumOperator[{"C","X"->{m},Delete[list,m]}]
qc["CircuitDiagram"]
coin_op=QuantumCircuitOperator[{QuantumOperator["H"->list],QuantumOperator["X"->list],QuantumOperator["H"->{m}],QuantumOperator["H"->{m}],QuantumOperator["X"->list],QuantumOperator["H"->list]}];
coin_op["Diagram"]
Here, last line just prints "coin_op[Diagram]" string in stead of the circuit diagram, however when I change the code like:
coin_op=QuantumCircuitOperator[{QuantumOperator["H"->list],QuantumOperator["X"->list],QuantumOperator["H"->{m}],QuantumOperator["H"->{m}],QuantumOperator["X"->list],QuantumOperator["H"->list]}]["Diagram"]
It prints the circuit diagram, so how can I resolve this issue ? Thanks for the help.
coin_op. Also you don't have to useEvaluatein your code, it is doing nothing at all. $\endgroup$