We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
lifted_gate
lifted_gate does not guard against parameterised gates.
In [6]: lifted_gate(Program("RX(%theta) 0")[0], 1) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-b6c85b4cfc00> in <module> ----> 1 lifted_gate(Program("RX(%theta) 0")[0], 1) ~/hackery/python/pyquil/pyquil/unitary_tools.py in lifted_gate(gate, n_qubits) 321 raise TypeError("Unsupported gate modifier {}".format(mod)) 322 --> 323 matrix = _gate_matrix(gate) 324 325 return lifted_gate_matrix(matrix=matrix, ~/hackery/python/pyquil/pyquil/unitary_tools.py in _gate_matrix(gate) 295 if len(gate.modifiers) == 0: # base case 296 if len(gate.params) > 0: --> 297 return QUANTUM_GATES[gate.name](*gate.params) 298 else: 299 return QUANTUM_GATES[gate.name] ~/hackery/python/pyquil/pyquil/gate_matrices.py in RX(phi) 105 106 def RX(phi): --> 107 return np.array([[np.cos(phi / 2.0), -1j * np.sin(phi / 2.0)], 108 [-1j * np.sin(phi / 2.0), np.cos(phi / 2.0)]]) 109 AttributeError: 'Div' object has no attribute 'cos'
The text was updated successfully, but these errors were encountered:
Closed by #1012
Sorry, something went wrong.
No branches or pull requests
lifted_gate
does not guard against parameterised gates.lifted_gate
does not guard against parameterised gates.The text was updated successfully, but these errors were encountered: