Module: cirq.interop.quirk

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

References:

https://github.com/strilanc/quirk - Quirk source code. https://algassert.com/quirk - Live version of Quirk.

Modules

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

url_to_circuit module

Classes

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.

Functions

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.