uniqc.circuit_builder.qasm_spec module#

OpenQASM 2.0 language specification for quantum gates.

This module defines the available gates in OpenQASM 2.0 format, including their qubit requirements and parameter counts. It provides a utility function for generating subsets of gates based on a given list.

Key exports:

available_qasm_gates: Dictionary of all available OpenQASM 2.0 gates. generate_sub_gateset_qasm: Function to generate a subset of gates.

uniqc.circuit_builder.qasm_spec.generate_sub_gateset_qasm(gate_list)[source]#

Generate a subset of the OpenQASM gateset filtered by gate names.

Parameters:

gate_list (list[str]) – List of gate names to include in the subset.

Returns:

A dictionary containing only the gates specified in

gate_list, with their qubit and parameter requirements.

Return type:

dict[str, dict]