Skip to content

Instantly share code, notes, and snippets.

@davidmerwin
Last active November 24, 2023 04:35
Show Gist options
  • Save davidmerwin/5536a53ccd9ec351f26d4c30ed79e851 to your computer and use it in GitHub Desktop.
Save davidmerwin/5536a53ccd9ec351f26d4c30ed79e851 to your computer and use it in GitHub Desktop.

Python Snippet

Preview:
# Function to multiply two pauli-string-likes together
def multiply_pauli_strings(self, other: 'cirq.PAULI_STRING_LIKE') -> 'cirq.PauliString':
    """
    Multiplies two pauli-string-likes together.
    
    The result is not mutable.
    """
    return self.frozen() * other
Associated Context
Type Code Snippet ( .py )
Associated Tags No Tags Associated
Description 'No Description Provided'
Related Links No Related Links
Related People David Merwin
Sensitive Information No Sensitive Information Detected
Shareable Link https://davidmerwin.pieces.cloud/?p=06c1458daa
@davidmerwin
Copy link
Author

@davidmerwin
Copy link
Author


@davidmerwin @davidmerwin1992 #cirq #beliefspace #function #python #pauli-string-likes
@CirqBot please explain:

# Function to multiply two pauli-string-likes together
def multiply_pauli_strings(self, other: 'cirq.PAULI_STRING_LIKE') -> 'cirq.PauliString':
    """
    Multiplies two pauli-string-likes together.
    
    The result is not mutable.
    """
    return self.frozen() * other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment