A verifiable quantum advantage towards real world applications: Quantum Echoes
Learn more cirq.QasmArgs
Formatting Arguments for outputting QASM code.
cirq.QasmArgs( precision: int = 10, version: str = '2.0', qubit_id_map: (Mapping[cirq.Qid, str] | None) = None, meas_key_id_map: (dict[str, str] | None) = None, meas_key_bitcount: (dict[str, int] | None) = None ) -> None
Used in the notebooks
Args |
precision | The number of digits after the decimal to show for numbers in the qasm code. |
version | The QASM version to target. Objects may return different qasm depending on version. |
qubit_id_map | A dictionary mapping qubits to qreg QASM identifiers. |
meas_key_id_map | A dictionary mapping measurement keys to creg QASM identifiers. |
meas_key_bitcount | A dictionary with of bits for each measurement key. |
Methods
check_unused_args
check_unused_args( used_args, args, kwargs )
convert_field
convert_field( value, conversion )
format( format_string, *args, /, **kwargs )
View source
format_field( value: Any, spec: str ) -> str
Method of string.Formatter that specifies the output of format().
get_field
get_field( field_name, args, kwargs )
get_value
get_value( key, args, kwargs )
parse
parse( format_string )
validate_version
View source
validate_version( *supported_versions ) -> None
vformat( format_string, args, kwargs )
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 2025-08-14 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 2025-08-14 UTC."],[],[]]