uniqc.circuit_builder.originir_spec module#

OriginIR language specification for quantum gates and error channels.

This module defines the available gates and error channels in OriginIR format, including their qubit requirements and parameter counts. It also provides utility functions for generating subsets of gates and error channels.

Key exports:

available_originir_gates: Dictionary of all available OriginIR gates. angular_gates: List of gates that accept angular parameters. available_originir_error_channels: Dictionary of available error channels. available_originir_error_channels_without_kraus: Error channels excluding Kraus operators. generate_sub_gateset_originir: Function to generate a subset of gates. generate_sub_error_channel_originir: Function to generate a subset of error channels.

uniqc.circuit_builder.originir_spec.generate_sub_error_channel_originir(channel_list)[source]#

Generate a subset of the OriginIR error channels filtered by channel names.

Parameters:

channel_list (list[str]) – List of error channel names to include in the subset.

Returns:

A dictionary containing only the error channels specified

in channel_list, with their qubit and parameter requirements.

Return type:

dict[str, dict]

uniqc.circuit_builder.originir_spec.generate_sub_gateset_originir(gate_list)[source]#

Generate a subset of the OriginIR 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]