# AUTOGENERATED! DO NOT EDIT! File to edit: ../../src/platform/qcircuit_metrics.ipynb.

# %% auto 0
__all__ = ['Unitary_FrobeniusNorm']

# %% ../../src/platform/qcircuit_metrics.ipynb 3
from ..imports import *

# %% ../../src/platform/qcircuit_metrics.ipynb 5
class Unitary_FrobeniusNorm:
    #defined in https://arxiv.org/pdf/2106.05649.pdf
    
    @staticmethod
    def distance(approx_U: torch.tensor, target_U: torch.tensor):
        d = 0.5 * torch.linalg.matrix_norm((approx_U-target_U), ord="fro")**2
        return d
        
    @staticmethod
    def name():
        return "Frobenius-Norm"
