Conditional qc-UNet

Quantum circuit U-Net architecture predicting the noise for noisy quantum circuits.

Blocks


source

UNet_block

 UNet_block (ch_in, ch_out, t_emb_size, cond_emb_size, num_heads=8,
             num_res_blocks=1, transformer_depth=1)

The basic block of the U-Net. Is conditioned via cross-attention in SpatialTransformer and addition of the time ebedding in ResBlock2D_Conditional.


source

Encoder

 Encoder (model_features, t_emb_size, cond_emb_size, num_heads,
          num_res_blocks, transformer_depths)

Encoder definition of the U-Net.


source

Decoder

 Decoder (model_features, t_emb_size, cond_emb_size, num_heads,
          num_res_blocks, transformer_depths)

Decoder definition of the U-Net.

Model definition


source

QC_Cond_UNet_config

 QC_Cond_UNet_config (model_features:list[int], clr_dim:int, num_clrs:int,
                      t_emb_size:int, cond_emb_size:int,
                      num_heads:list[int], num_res_blocks:list[int],
                      transformer_depths:list[int])

source

QC_Cond_UNet

 QC_Cond_UNet (model_features=[32, 32, 64], clr_dim=8, num_clrs=8,
               t_emb_size=128, cond_emb_size=512, num_heads=[8, 8, 2],
               num_res_blocks=[2, 2, 4], transformer_depths=[1, 2, 1])

Conditional U-Net model for quantum circuits. Implemets embedd_clrs and invert_clr functions to embed and decode color-tensors.

Unitary compilation extension


source

QC_Compilation_UNet_config

 QC_Compilation_UNet_config (model_features:list[int], clr_dim:int,
                             num_clrs:int, t_emb_size:int,
                             cond_emb_size:int, num_heads:list[int],
                             num_res_blocks:list[int],
                             transformer_depths:list[int], unitary_encoder
                             _config:genQC.models.unitary_encoder.Unitary_
                             encoder_config)

source

QC_Compilation_UNet

 QC_Compilation_UNet (model_features=[32, 32, 64], clr_dim=8, num_clrs=8,
                      t_emb_size=128, cond_emb_size=512, num_heads=[8, 8,
                      2], num_res_blocks=[2, 2, 4], transformer_depths=[1,
                      2, 1], unitary_encoder_config=None)

Extension of the QC_Cond_UNet to accept unitary conditions.

Back to top