cirq.contrib.quirk.circuit_to_quirk_url
Returns a Quirk URL for the given circuit.
cirq.contrib.quirk.circuit_to_quirk_url(
circuit: cirq.Circuit
,
prefer_unknown_gate_to_failure: bool = False,
escape_url=True
) -> str
Used in the notebooks
Args |
circuit
|
The circuit to open in Quirk.
|
prefer_unknown_gate_to_failure
|
If not set, gates that fail to convert
will cause this function to raise an error. If set, a URL
containing bad gates will be generated. (Quirk will open the URL,
and replace the bad gates with parse errors, but still get the rest
of the circuit.)
|
escape_url
|
If set, the generated URL will have special characters such
as quotes escaped using %. This makes it possible to paste the URL
into forums and the command line and etc and have it properly
parse. If not set, the generated URL will be more compact and human
readable (and can still be pasted directly into a browser's address
bar).
|
Returns:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]