Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

added P gate to list of available gates that can be parsed from QASM

Open googlercolin opened this issue 3 years ago • 2 comments

Summary

P gate was previously unable to be parsed from QASM to Cirq circuit. Added ability for p(params[0]) gates to be parsed as QasmUGate(0, 0, params[0] / np.pi).

Details & Comments

  • Previously not able to parse P gate using circuit_from_qasm(qasm) method under cirq.contrib.qasm_import module.
  • Added P gate into qelib_gates dictionary under _parser.py.

googlercolin avatar Jul 21 '22 07:07 googlercolin

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jul 21 '22 07:07 google-cla[bot]

It seemed like the format check failed. I ran the python code through black to match the format required.

googlercolin avatar Jul 22 '22 01:07 googlercolin