We're celebrating World Quantum Day 2022! Join us

Module: cirq.interop.quirk

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


https://github.com/strilanc/quirk - Quirk source code. https://algassert.com/quirk - 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.