I just started using python cirq library and I came across the following line of code in the tutorial:
XX_obs = cirq.X(q0) * cirq.X(q1)
I just want to find in the code what this * operator do on this two specific cirq objects. How to do so?
I just started using python cirq library and I came across the following line of code in the tutorial:
XX_obs = cirq.X(q0) * cirq.X(q1)
I just want to find in the code what this * operator do on this two specific cirq objects. How to do so?
Copyright © 2021 Jogjafile Inc.
 
                        
First, you need to find what the type of
cirq.X(q0)is:Then look for the definition, in that class, of the method
__mul__. The__mul__method of a class defines how an object behaves as a left operant of a multiplication operation.