def METHOD_NAME(encoder, vector):
    """Evaluate loss function for one test sample.
    Args:
        encoder (qibo.models.Circuit): variational quantum circuit (trained).
        vector (tf.Tensor): test sample, in the form of 1d vector.
    Returns:
        loss (tf.Variable): loss of the test sample.
    """
    reconstructed = encoder(vector)
    # 3 qubits compression
    loss = (
        reconstructed.probabilities(qubits=[0])[0]
        + reconstructed.probabilities(qubits=[1])[0]
        + reconstructed.probabilities(qubits=[2])[0]
    )
    return loss