cirq.QasmArgs

class cirq.QasmArgs(precision: int = 10, version: str = '2.0', qubit_id_map: Dict[cirq.QubitId, str] = None, meas_key_id_map: Dict[str, str] = None)[source]
__init__(precision: int = 10, version: str = '2.0', qubit_id_map: Dict[cirq.QubitId, str] = None, meas_key_id_map: Dict[str, str] = None) → None[source]
Parameters:
  • 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.

Methods

check_unused_args(used_args, args, kwargs)
convert_field(value, conversion)
format(**kwargs)
format_field(value, spec) Method of string.Formatter that specifies the output of format().
get_field(field_name, args, kwargs)
get_value(key, args, kwargs)
parse(format_string)
validate_version(*supported_versions)
vformat(format_string, args, kwargs)