You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug transpiling Cirq circuits containing the XXPowGate, YYPowGate or ZZPowGate to pyQuil. Below is a self-contained example showing the bug for the XXPowGate:
importcirqfromqbraid.transpilerimporttranspilefromqbraid.interfaceimportcircuits_allclose# Create a quantum circuit with two qubitsq0, q1=cirq.LineQubit.range(2)
cirq_in=cirq.Circuit()
# Add XX, YY, and ZZ gates to the circuitexponents= [0.5, 1]
forthetainexponents:
cirq_in.append(cirq.XXPowGate(exponent=theta).on(q0, q1))
pyquil_program=transpile(cirq_in, "pyquil")
cirq_out=transpile(pyquil_program, "cirq")
cirq_roundtrip_equal=circuits_allclose(cirq_in, cirq_out)
print(f"Cirq input:\n{cirq_in}\n")
print(f"Cirq -> pyQuil:\n{pyquil_program}\n")
print(f"pyQuil -> Cirq:\n{cirq_out}\n")
print(f"Cirq expected output:\n{cirq_in}\n")
print(f"Cirq roundtrip unitaries equal: {cirq_roundtrip_equal}")
Activity