![]() |
Implement the evolution of a hopping term using two sqrt_iswap gates and single qubit gates.
cirq_google.optimizers.convert_to_sqrt_iswap.swap_to_sqrt_iswap(
a, b, turns
)
Output unitary:
[[1, 0, 0, 0], [0, g·c, -i·g·s, 0], [0, -i·g·s, g·c, 0], [0, 0, 0, 1]] where c = cos(theta) and s = sin(theta).
Args | |
---|---|
a
|
the first qubit |
b
|
the second qubit |
turns
|
The rotational angle that specifies the gate, where c = cos(π·t/2), s = sin(π·t/2), g = exp(i·π·t/2). |
Yields | |
---|---|
A cirq.OP_TREE representing the decomposition.
|