Module: cirq.interop.quirk

Code related to interoperating with Quirk, a drag-and-drop circuit simulator.

References: - Quirk source code. - Live version of Quirk.


cells module: This module defines building blocks for parsing Quirk circuits.

url_to_circuit module


class QuirkArithmeticOperation: Applies arithmetic to a target and some inputs.

class QuirkInputRotationOperation: Operates on target qubits in a way that varies based on an input qureg.

class QuirkQubitPermutationGate: A qubit permutation gate specified by a permutation list.


quirk_json_to_circuit(...): Constructs a Cirq circuit from Quirk's JSON format.

quirk_url_to_circuit(...): Parses a Cirq circuit out of a Quirk URL.