Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi representation #488

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Multi representation #488

wants to merge 13 commits into from

Conversation

arsalan-motamedi
Copy link
Collaborator

@arsalan-motamedi arsalan-motamedi commented Sep 12, 2024

User description

Context:
This is the first try at allowing multi representations for our objects. Every CircuitComponent has a dictionary called multi_rep that contains information about representation of each mode.

Description of the Change:
.representation computes in the desired rep, while ._representation computes the Bargmann rep always. We sort of delay the evaluation of BtoQ on our representation to the end of the circuit.

Benefits:
Allows contracting any objects even if there is BtoQ in the middle.

Possible Drawbacks:
Contractions always occur in Bargmann.

Related GitHub Issues:
To be determined


PR Type

enhancement


Description

  • Introduced a multi_rep attribute to CircuitComponent to support multiple representations.
  • Updated CircuitComponent methods to handle multi_rep, allowing dynamic representation conversion.
  • Enhanced state and transformation classes to initialize and manage multi_rep.
  • Added utility functions to facilitate operations involving multiple representations.

Changes walkthrough 📝

Relevant files
Enhancement
circuit_components.py
Add multi-representation support to CircuitComponent class

mrmustard/lab_dev/circuit_components.py

  • Introduced multi_rep attribute to CircuitComponent.
  • Modified methods to incorporate multi_rep handling.
  • Added logic for representation conversion in representation property.
  • Updated arithmetic operations to consider multi_rep.
  • +98/-43 
    b_to_ps.py
    Initialize multi_rep for BtoPS components                               

    mrmustard/lab_dev/circuit_components_utils/b_to_ps.py

    • Added multi_rep initialization for BtoPS.
    +1/-0     
    b_to_q.py
    Initialize multi_rep for BtoQ components                                 

    mrmustard/lab_dev/circuit_components_utils/b_to_q.py

    • Added multi_rep initialization for BtoQ.
    +1/-0     
    base.py
    Integrate multi_rep in state initialization                           

    mrmustard/lab_dev/states/base.py

  • Incorporated multi_rep in state initialization.
  • Adjusted state creation methods to set multi_rep.
  • +13/-8   
    base.py
    Support multi_rep in transformation initialization             

    mrmustard/lab_dev/transformations/base.py

    • Added multi_rep handling in transformation initialization.
    +5/-1     
    utils.py
    Add utility functions for multi_rep operations                     

    mrmustard/lab_dev/utils.py

  • Added utility functions for multi_rep contraction and BtoQ
    multiplication.
  • +46/-0   

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @codiumai-pr-agent-pro codiumai-pr-agent-pro bot added the enhancement New feature or request label Sep 12, 2024
    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned an exit code 1. This indicates that the file .github/CHANGELOG.md was
    not modified in the latest commit, which might be a requirement for the PR.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    511:  HEAD is now at 4e0634d Merge f68e5f75e6d7a7a4346ee01b5b75129ae713fcc5 into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    512:  ##[endgroup]
    513:  [command]/usr/bin/git log -1 --format='%H'
    514:  '4e0634d46c2a618f3e4660c45b3de2157d8a6d61'
    515:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    516:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    517:  shell: /usr/bin/bash -e {0}
    518:  ##[endgroup]
    519:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: black

    Failed stage: Check formatting [❌]

    Failure summary:

    The action failed because the code formatting check identified that the file circuit_components.py
    in the mrmustard/lab_dev directory does not adhere to the required code style. The tool used for
    formatting detected that:

  • 1 file would be reformatted.
  • 177 files would be left unchanged.
    The process exited with code 1 due to this formatting issue.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    520:  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    521:  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    522:  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    523:  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
    524:  ##[endgroup]
    525:  would reformat /home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py
    526:  Oh no! 💥 💔 💥
    527:  1 file would be reformatted, 177 files would be left unchanged.
    528:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Potential Performance Issue
    The representation property now computes the desired representation on-the-fly, which may impact performance for frequent access.

    Possible Bug
    The __eq__ method now compares multi_rep, which may cause unexpected behavior if two components are functionally equivalent but have different multi_rep values.

    Code Complexity
    The __rshift__ method has become significantly more complex with the addition of multi_rep handling, which may make it harder to maintain and debug.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned an exit code 1. This indicates that the file .github/CHANGELOG.md was
    not modified in the latest commit, which might be required for the PR to pass.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    513:  HEAD is now at 4e0634d Merge f68e5f75e6d7a7a4346ee01b5b75129ae713fcc5 into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    514:  ##[endgroup]
    515:  [command]/usr/bin/git log -1 --format='%H'
    516:  '4e0634d46c2a618f3e4660c45b3de2157d8a6d61'
    517:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    518:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    519:  shell: /usr/bin/bash -e {0}
    520:  ##[endgroup]
    521:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned a non-zero exit code. This indicates that there were no changes
    detected in the .github/CHANGELOG.md file between the last two commits, which might be a required
    change for the PR.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    509:  HEAD is now at 4e0634d Merge f68e5f75e6d7a7a4346ee01b5b75129ae713fcc5 into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    510:  ##[endgroup]
    511:  [command]/usr/bin/git log -1 --format='%H'
    512:  '4e0634d46c2a618f3e4660c45b3de2157d8a6d61'
    513:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    514:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    515:  shell: /usr/bin/bash -e {0}
    516:  ##[endgroup]
    517:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    codiumai-pr-agent-pro bot commented Sep 12, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Use an enumeration for representation types to improve code maintainability and type safety

    Consider using an enumeration or a mapping for the representation types in the
    multi_rep_contraction function to make the code more maintainable and less
    error-prone.

    mrmustard/lab_dev/utils.py [97-134]

    -def multi_rep_contraction(str1, str2):
    -    r"""
    -    A representation's name in multi_rep can be either of the following:
    -        None: Bargmann
    -        Q: quadrature
    -        PS: phase space
    -        BtoQ: Bargmann to quadrature
    -        BtoPS: Bargmann to phase space
    -        QtoB: quadrature to Bargmann
    -        PStoB: phase space to Bargmann
    +from enum import Enum, auto
     
    -    This function's goal is to compute the multiplication between any of these objects.
    +class Representation(Enum):
    +    BARGMANN = auto()
    +    QUADRATURE = auto()
    +    PHASE_SPACE = auto()
    +    B_TO_Q = auto()
    +    B_TO_PS = auto()
    +    Q_TO_B = auto()
    +    PS_TO_B = auto()
     
    -        Args:
    -            str1: The representation of the first object (on the input side)
    -            str2: The representation of the second object (on the output side)
    +def multi_rep_contraction(rep1: Representation, rep2: Representation) -> Representation:
    +    if rep1 == rep2:
    +        return rep1
    +    elif rep1 == Representation.BARGMANN:
    +        if rep2 == Representation.B_TO_Q:
    +            return Representation.QUADRATURE
    +        elif rep2 == Representation.B_TO_PS:
    +            return Representation.PHASE_SPACE
    +    raise ValueError(f"Incompatible representations: {rep1} and {rep2}")
     
    -    We have the following multiplication table implemented:
    -    None * None = None
    -    Q * Q = Q
    -    PS * PS = PS
    -
    -    None * BtoQ = Q
    -    None * BtoPS = PS
    -
    -    anything else raises an error.
    -    """
    -
    -    if str1 == str2:
    -        return str1
    -    elif str1 == None and str2 == "BtoQ":
    -        return "Q"
    -    elif str1 == None and str2 == "BtoPS":
    -        return "PS"
    -    else:
    -        raise ValueError(
    -            f"Trying to multiply objects of inconsistant representation i.e., rep1={str1} and rep2={str2}"
    -        )
    -
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion significantly improves code maintainability and reduces the risk of errors by using an enumeration, which provides better type safety and clarity in handling representation types.

    8
    Rename the 'multi_rep' attribute to a more descriptive name

    Consider using a more descriptive name for the multi_rep dictionary. For example,
    representation_mapping or mode_representation would better convey its purpose.

    mrmustard/lab_dev/circuit_components.py [114-117]

     if multi_rep:
    -    self._multi_rep = multi_rep
    +    self._mode_representation = multi_rep
     else:
    -    self._multi_rep = {key: None for key in self.wires.modes}
    +    self._mode_representation = {key: None for key in self.wires.modes}
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: The suggestion improves code readability by using a more descriptive name for the 'multi_rep' attribute, which helps convey its purpose more clearly. However, it is not crucial for functionality.

    6
    Simplify and clarify the purpose of the 'BtoQ_mult_table' function

    The BtoQ_mult_table function can be simplified and made more explicit about its
    purpose. Consider renaming it to better reflect its functionality and use a more
    straightforward conditional statement.

    mrmustard/lab_dev/utils.py [137-140]

    -def BtoQ_mult_table(s: str) -> str:
    -    if s:
    -        return None
    -    return "Q"
    +def convert_bargmann_to_quadrature(representation: str | None) -> str | None:
    +    return None if representation else "Q"
     
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: The suggestion makes the function more explicit and easier to understand, improving code readability. However, the functional impact is minimal as it does not change the logic or performance significantly.

    5
    Performance
    Optimize the updating of the 'multi_rep' dictionary in the '__rshift__' method

    Consider using a more efficient method to update the multi_rep dictionary in the
    rshift method. Instead of iterating through all modes, you could use dictionary
    comprehension or dict.update() method.

    mrmustard/lab_dev/circuit_components.py [818-827]

    -for mode in ret.modes:
    -    if mode in list(set(self.modes) & set(other.modes)):
    -        if not self.multi_rep[mode]:
    -            ret.multi_rep[mode] = self.multi_rep[mode]
    -        elif not other.multi_rep[mode]:
    -            ret.multi_rep[mode] = self.multi_rep[mode]
    -    elif mode in self.modes:
    -        ret.multi_rep[mode] = self.multi_rep[mode]
    -    else:
    -        ret.multi_rep[mode] = other.multi_rep[mode]
    +common_modes = set(self.modes) & set(other.modes)
    +ret.multi_rep.update({
    +    mode: self.multi_rep[mode] if mode in self.modes else other.multi_rep[mode]
    +    for mode in ret.modes
    +})
    +for mode in common_modes:
    +    if not self.multi_rep[mode] or not other.multi_rep[mode]:
    +        ret.multi_rep[mode] = self.multi_rep[mode] or other.multi_rep[mode]
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion enhances performance by using a more efficient method for updating the 'multi_rep' dictionary, which can improve execution speed, especially with larger datasets.

    7

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: docs

    Failed stage: Run tests [❌]

    Failed test name: mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut

    Failure summary:

    The action failed because a TypeError occurred in the doctest for TraceOut in the file trace_out.py.

  • The error message was "'NoneType' object is not subscriptable".
  • This error happened because the code attempted to subscript a NoneType object in the representation
    method of circuit_components.py.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    828:  mrmustard/lab_dev/transformations/bsgate.py .                            [ 71%]
    829:  mrmustard/lab_dev/transformations/dgate.py .                             [ 75%]
    830:  mrmustard/lab_dev/transformations/fockdamping.py .                       [ 78%]
    831:  mrmustard/lab_dev/transformations/identity.py .                          [ 81%]
    832:  mrmustard/lab_dev/transformations/rgate.py .                             [ 84%]
    833:  mrmustard/lab_dev/transformations/s2gate.py .                            [ 87%]
    834:  mrmustard/lab_dev/transformations/sgate.py .                             [ 90%]
    835:  mrmustard/lab_dev/wires.py ...                                           [100%]
    836:  =================================== FAILURES ===================================
    ...
    
    840:  040         >>> from mrmustard.lab_dev import *
    841:  041         >>> import numpy as np
    842:  042 
    843:  043         >>> # initialize a multi-mode state
    844:  044         >>> state = Coherent([0, 1, 2], x=1)
    845:  045 
    846:  046         >>> # trace out some of the modes
    847:  047         >>> assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    848:  UNEXPECTED EXCEPTION: TypeError("'NoneType' object is not subscriptable")
    ...
    
    851:  exec(compile(example.source, filename, "single",
    852:  File "<doctest mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut[3]>", line 1, in <module>
    853:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    854:  result = DM(result.wires.modes, result.representation)
    855:  ^^^^^^^^^^^^^^^^^^^^^
    856:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    857:  if self.multi_rep[mode] == 'Q':
    858:  ~~~~~~~~~~~~~~^^^^^^
    859:  TypeError: 'NoneType' object is not subscriptable
    860:  /home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components_utils/trace_out.py:47: UnexpectedException
    861:  =========================== short test summary info ============================
    862:  FAILED mrmustard/lab_dev/circuit_components_utils/trace_out.py::mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut
    863:  ======================== 1 failed, 31 passed in 17.95s =========================
    864:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: pytest

    Failed stage: Run tests [❌]

    Failed test name: TestCircuitComponent::test_from_attributes[0.4-0.1]

    Failure summary:

    The action failed due to multiple test failures in the test_lab_dev and test_states directories. The
    main reasons for the failures are:

  • IndexError: string index out of range occurred in several tests, indicating that the code attempted
    to access an index that does not exist in a string.
  • TypeError: 'NoneType' object is not subscriptable was raised in multiple tests, suggesting that the
    code attempted to access an element of a NoneType object as if it were a list or dictionary.
  • AssertionError occurred in tests where expected and actual values did not match, particularly in
    tests comparing representations of quantum states.
  • ValueError: Cannot compare arrays of different shapes was raised, indicating a mismatch in array
    dimensions during comparison.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1024:  .......................................                                  [ 94%]
    1025:  tests/test_physics/test_triples.py .......................               [ 96%]
    1026:  tests/test_physics/test_wigner.py ........................               [ 97%]
    1027:  tests/test_utils/test_argsort.py .                                       [ 97%]
    1028:  tests/test_utils/test_logger.py .....                                    [ 98%]
    1029:  tests/test_utils/test_serialize.py .....ss..                             [ 98%]
    1030:  tests/test_utils/test_settings.py ....s..                                [ 99%]
    1031:  tests/test_utils/test_typing.py .............                            [100%]
    1032:  =================================== FAILURES ===================================
    ...
    
    1103:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1104:  assert cc1 == cc
    1105:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1106:  self.representation == other.representation
    1107:  ^^^^^^^^^^^^^^^^^^^^
    1108:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1109:  if self.multi_rep[mode] == 'Q':
    1110:  ~~~~~~~~~~~~~~^^^^^^
    1111:  IndexError: string index out of range
    ...
    
    1182:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1183:  assert cc1 == cc
    1184:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1185:  self.representation == other.representation
    1186:  ^^^^^^^^^^^^^^^^^^^^
    1187:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1188:  if self.multi_rep[mode] == 'Q':
    1189:  ~~~~~~~~~~~~~~^^^^^^
    1190:  IndexError: string index out of range
    ...
    
    1261:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1262:  assert cc1 == cc
    1263:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1264:  self.representation == other.representation
    1265:  ^^^^^^^^^^^^^^^^^^^^
    1266:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1267:  if self.multi_rep[mode] == 'Q':
    1268:  ~~~~~~~~~~~~~~^^^^^^
    1269:  IndexError: string index out of range
    ...
    
    1340:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1341:  assert cc1 == cc
    1342:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1343:  self.representation == other.representation
    1344:  ^^^^^^^^^^^^^^^^^^^^
    1345:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1346:  if self.multi_rep[mode] == 'Q':
    1347:  ~~~~~~~~~~~~~~^^^^^^
    1348:  IndexError: string index out of range
    ...
    
    1417:  result = testfunction(**testargs)
    1418:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1419:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 113, in test_from_to_quadrature
    1420:  cc = CircuitComponent._from_attributes(c.representation, c.wires, c.name)
    1421:  ^^^^^^^^^^^^^^^^
    1422:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1423:  if self.multi_rep[mode] == 'Q':
    1424:  ~~~~~~~~~~~~~~^^^^^^
    1425:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1493:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1494:  result = testfunction(**testargs)
    1495:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1496:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 214, in test_add
    1497:  assert d12.representation == d1.representation + d2.representation
    1498:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1499:  if self.multi_rep[mode] == 'Q':
    1500:  ~~~~~~~~~~~~~~^^^^^^
    1501:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1569:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1570:  result = testfunction(**testargs)
    1571:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1572:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 220, in test_sub
    1573:  assert s12.representation == s1.representation - s2.representation
    1574:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1575:  if self.multi_rep[mode] == 'Q':
    1576:  ~~~~~~~~~~~~~~^^^^^^
    1577:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1649:  result3 = vac012 >> (d0 >> (d1 >> a0 >> a1) >> a2 >> d2)
    1650:  ~~~~~~~~~^^~~~
    1651:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/transformations/base.py", line 267, in __rshift__
    1652:  ret = super().__rshift__(other)
    1653:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1654:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 880, in __rshift__
    1655:  ret.multi_rep[mode] = self.multi_rep[mode]
    1656:  ~~~~~~~~~~~~~~^^^^^^
    1657:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1722:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1723:  res = hook_impl.function(*args)
    1724:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1725:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1726:  result = testfunction(**testargs)
    1727:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1728:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 455, in test_quadrature_ket
    1729:  assert ket == back
    1730:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    ...
    
    1797:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1798:  res = hook_impl.function(*args)
    1799:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1800:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1801:  result = testfunction(**testargs)
    1802:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1803:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 461, in test_quadrature_dm
    1804:  assert dm == back
    1805:  AssertionError: assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    ...
    
    1882:  return self.to_quadrature(phi=phi).representation.data
    1883:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1884:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 366, in to_quadrature
    1885:  if isinstance(self.representation, Fock):
    1886:  ^^^^^^^^^^^^^^^^^^^
    1887:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1888:  if self.multi_rep[mode] == 'Q':
    1889:  ~~~~~~~~~~~~~~^^^^^^
    1890:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1968:  ret = self.adjoint @ (self @ other)
    1969:  ^^^^^^^^^^^^
    1970:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    1971:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    1972:  ^^^^^^^^^^^^^^^^^^^
    1973:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1974:  if self.multi_rep[mode] == 'Q':
    1975:  ~~~~~~~~~~~~~~^^^^^^
    1976:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2047:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 59, in test_trace_out_bargmann_states
    2048:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    2049:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2050:  result = DM(result.wires.modes, result.representation)
    2051:  ^^^^^^^^^^^^^^^^^^^^^
    2052:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2053:  if self.multi_rep[mode] == 'Q':
    2054:  ~~~~~~~~~~~~~~^^^^^^
    2055:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2126:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 79, in test_trace_out_fock_states
    2127:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).to_fock(7).dm()
    2128:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2129:  result = DM(result.wires.modes, result.representation)
    2130:  ^^^^^^^^^^^^^^^^^^^^^
    2131:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2132:  if self.multi_rep[mode] == 'Q':
    2133:  ~~~~~~~~~~~~~~^^^^^^
    2134:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2199:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2200:  res = hook_impl.function(*args)
    2201:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2202:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2203:  result = testfunction(**testargs)
    2204:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2205:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 266, in test_BtoQ_with_displacement
    2206:  assert np.allclose(wavefunction(quad), wavefunction_coh(x + 1j * y, quad, axis_angle))
    2207:  AssertionError: assert False
    ...
    
    2283:  lc = state1 + state2 - state3
    2284:  ~~~~~~~~~~~~~~~~^~~~~~~~
    2285:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 896, in __sub__
    2286:  rep = self.representation - other.representation
    2287:  ^^^^^^^^^^^^^^^^^^^
    2288:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2289:  if self.multi_rep[mode] == 'Q':
    2290:  ~~~~~~~~~~~~~~^^^^^^
    2291:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2356:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2357:  res = hook_impl.function(*args)
    2358:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2359:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2360:  result = testfunction(**testargs)
    2361:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2362:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2363:  assert state_in_fock == state_out
    2364:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    ...
    
    2434:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2435:  res = hook_impl.function(*args)
    2436:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2437:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2438:  result = testfunction(**testargs)
    2439:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2440:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2441:  assert state_in_fock == state_out
    2442:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    ...
    
    2518:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2519:  assert state_in_fock == state_out
    2520:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    2521:  self.representation == other.representation
    2522:  ^^^^^^^^^^^^^^^^^^^^
    2523:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2524:  if self.multi_rep[mode] == 'Q':
    2525:  ~~~~~~~~~~~~~~^^^^^^
    2526:  IndexError: string index out of range
    ...
    
    2591:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2592:  res = hook_impl.function(*args)
    2593:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2594:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2595:  result = testfunction(**testargs)
    2596:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2597:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2598:  assert state1 == Vacuum(modes)
    2599:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2669:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2670:  res = hook_impl.function(*args)
    2671:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2672:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2673:  result = testfunction(**testargs)
    2674:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2675:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2676:  assert state1 == Vacuum(modes)
    2677:  AssertionError: assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2747:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2748:  res = hook_impl.function(*args)
    2749:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2750:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2751:  result = testfunction(**testargs)
    2752:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2753:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2754:  assert state1 == Vacuum(modes)
    2755:  AssertionError: assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2825:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2826:  res = hook_impl.function(*args)
    2827:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2828:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2829:  result = testfunction(**testargs)
    2830:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2831:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 172, in test_to_from_quadrature
    2832:  assert math.allclose(Atest2, A0)
    2833:  AssertionError: assert False
    ...
    
    2912:  return math.sum(math.real(self >> self.dual))
    2913:  ^^^^^^^^^
    2914:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    2915:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    2916:  ^^^^^^^^^^^^^^^^^^^
    2917:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2918:  if self.multi_rep[mode] == 'Q':
    2919:  ~~~~~~~~~~~~~~^^^^^^
    2920:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2985:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2986:  res = hook_impl.function(*args)
    2987:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2988:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2989:  result = testfunction(**testargs)
    2990:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2991:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 202, in test_dm
    2992:  assert dm.name == ket.name
    2993:  AssertionError: assert 'DM01' == 'Coherent'
    ...
    
    3066:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 246, in test_quadrature_batch
    3067:  assert math.allclose(state.quadrature(quad), psi_q)
    3068:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 398, in quadrature
    3069:  if isinstance(self.representation, Fock):
    3070:  ^^^^^^^^^^^^^^^^^^^
    3071:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3072:  if self.multi_rep[mode] == 'Q':
    3073:  ~~~~~~~~~~~~~~^^^^^^
    3074:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3148:  return self.dm()[modes]
    3149:  ~~~~~~~~~^^^^^^^
    3150:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3151:  representation = self.representation.trace(idxz, idxz_conj)
    3152:  ^^^^^^^^^^^^^^^^^^^
    3153:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3154:  if self.multi_rep[mode] == 'Q':
    3155:  ~~~~~~~~~~~~~~^^^^^^
    3156:  IndexError: string index out of range
    ...
    
    3230:  return self.dm()[modes]
    3231:  ~~~~~~~~~^^^^^^^
    3232:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3233:  representation = self.representation.trace(idxz, idxz_conj)
    3234:  ^^^^^^^^^^^^^^^^^^^
    3235:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3236:  if self.multi_rep[mode] == 'Q':
    3237:  ~~~~~~~~~~~~~~^^^^^^
    3238:  IndexError: string index out of range
    ...
    
    3312:  return self.dm()[modes]
    3313:  ~~~~~~~~~^^^^^^^
    3314:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3315:  representation = self.representation.trace(idxz, idxz_conj)
    3316:  ^^^^^^^^^^^^^^^^^^^
    3317:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3318:  if self.multi_rep[mode] == 'Q':
    3319:  ~~~~~~~~~~~~~~^^^^^^
    3320:  IndexError: string index out of range
    ...
    
    3394:  return self.dm()[modes]
    3395:  ~~~~~~~~~^^^^^^^
    3396:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3397:  representation = self.representation.trace(idxz, idxz_conj)
    3398:  ^^^^^^^^^^^^^^^^^^^
    3399:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3400:  if self.multi_rep[mode] == 'Q':
    3401:  ~~~~~~~~~~~~~~^^^^^^
    3402:  IndexError: string index out of range
    ...
    
    3479:  rep = self >> self.dual
    3480:  ^^^^^^^^^
    3481:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3482:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3483:  ^^^^^^^^^^^^^^^^^^^
    3484:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3485:  if self.multi_rep[mode] == 'Q':
    3486:  ~~~~~~~~~~~~~~^^^^^^
    3487:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3559:  better_cat = cat >> displacements
    3560:  ~~~~^^~~~~~~~~~~~~~~
    3561:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1194, in __rshift__
    3562:  result = super().__rshift__(other)
    3563:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3564:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 875, in __rshift__
    3565:  if not self.multi_rep[mode]:
    3566:  ~~~~~~~~~~~~~~^^^^^^
    3567:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3632:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3633:  res = hook_impl.function(*args)
    3634:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3635:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3636:  result = testfunction(**testargs)
    3637:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3638:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3639:  assert state_in_fock == state_out
    3640:  AssertionError: assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    ...
    
    3707:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3708:  res = hook_impl.function(*args)
    3709:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3710:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3711:  result = testfunction(**testargs)
    3712:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3713:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3714:  assert state_in_fock == state_out
    3715:  AssertionError: assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    ...
    
    3788:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3789:  assert state_in_fock == state_out
    3790:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    3791:  self.representation == other.representation
    3792:  ^^^^^^^^^^^^^^^^^^^^
    3793:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3794:  if self.multi_rep[mode] == 'Q':
    3795:  ~~~~~~~~~~~~~~^^^^^^
    3796:  IndexError: string index out of range
    ...
    
    3861:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3862:  res = hook_impl.function(*args)
    3863:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3864:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3865:  result = testfunction(**testargs)
    3866:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3867:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 578, in test_to_from_quadrature
    3868:  assert np.allclose(Atest2, A0)
    3869:  AssertionError: assert False
    ...
    
    3945:  rep = self >> self.dual
    3946:  ^^^^^^^^^
    3947:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3948:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3949:  ^^^^^^^^^^^^^^^^^^^
    3950:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3951:  if self.multi_rep[mode] == 'Q':
    3952:  ~~~~~~~~~~~~~~^^^^^^
    3953:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4027:  return math.sum(self._probabilities)
    4028:  ^^^^^^^^^^^^^^^^^^^
    4029:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 681, in _probabilities
    4030:  rep = self.representation.trace(idx_ket, idx_bra)
    4031:  ^^^^^^^^^^^^^^^^^^^
    4032:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4033:  if self.multi_rep[mode] == 'Q':
    4034:  ~~~~~~~~~~~~~~^^^^^^
    4035:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4110:  dm = self @ self.adjoint
    4111:  ^^^^^^^^^^^^
    4112:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    4113:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    4114:  ^^^^^^^^^^^^^^^^^^^
    4115:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4116:  if self.multi_rep[mode] == 'Q':
    4117:  ~~~~~~~~~~~~~~^^^^^^
    4118:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4190:  assert math.allclose(dm.expectation(k01), res_k01.representation.c[0])
    4191:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 221, in allclose
    4192:  return self._apply("allclose", (array1, array2, atol))
    4193:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4194:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 111, in _apply
    4195:  return attr(*args)
    4196:  ^^^^^^^^^^^
    4197:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_numpy.py", line 73, in allclose
    4198:  raise ValueError("Cannot compare arrays of different shapes.")
    4199:  ValueError: Cannot compare arrays of different shapes.
    ...
    
    4277:  return self.dm()[modes]
    4278:  ~~~~~~~~~^^^^^^^
    4279:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4280:  representation = self.representation.trace(idxz, idxz_conj)
    4281:  ^^^^^^^^^^^^^^^^^^^
    4282:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4283:  if self.multi_rep[mode] == 'Q':
    4284:  ~~~~~~~~~~~~~~^^^^^^
    4285:  IndexError: string index out of range
    ...
    
    4363:  return self.dm()[modes]
    4364:  ~~~~~~~~~^^^^^^^
    4365:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4366:  representation = self.representation.trace(idxz, idxz_conj)
    4367:  ^^^^^^^^^^^^^^^^^^^
    4368:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4369:  if self.multi_rep[mode] == 'Q':
    4370:  ~~~~~~~~~~~~~~^^^^^^
    4371:  IndexError: string index out of range
    ...
    
    4446:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4447:  ^^^^^^^^^^^^^^^^^
    4448:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4449:  if self.representation.ansatz.batch_size == 1:
    4450:  ^^^^^^^^^^^^^^^^^^^
    4451:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4452:  if self.multi_rep[mode] == 'Q':
    4453:  ~~~~~~~~~~~~~~^^^^^^
    4454:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4532:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4533:  ^^^^^^^^^^^^^^^^^
    4534:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4535:  if self.representation.ansatz.batch_size == 1:
    4536:  ^^^^^^^^^^^^^^^^^^^
    4537:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4538:  if self.multi_rep[mode] == 'Q':
    4539:  ~~~~~~~~~~~~~~^^^^^^
    4540:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4615:  val = self.func(instance)
    4616:  ^^^^^^^^^^^^^^^^^^^
    4617:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 224, in manual_shape
    4618:  return list(self.representation.array.shape[1:])
    4619:  ^^^^^^^^^^^^^^^^^^^
    4620:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4621:  if self.multi_rep[mode] == 'Q':
    4622:  ~~~~~~~~~~~~~~^^^^^^
    4623:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4691:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    4692:  result = testfunction(**testargs)
    4693:  ^^^^^^^^^^^^^^^^^^^^^^^^
    4694:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 85, in test_operation
    4695:  )
    4696:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4697:  if self.multi_rep[mode] == 'Q':
    4698:  ~~~~~~~~~~~~~~^^^^^^
    4699:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4770:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4771:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4772:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    4773:  self.representation == other.representation
    4774:  ^^^^^^^^^^^^^^^^^^^
    4775:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4776:  if self.multi_rep[mode] == 'Q':
    4777:  ~~~~~~~~~~~~~~^^^^^^
    4778:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4849:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4850:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4851:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    4852:  self.representation == other.representation
    4853:  ^^^^^^^^^^^^^^^^^^^
    4854:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4855:  if self.multi_rep[mode] == 'Q':
    4856:  ~~~~~~~~~~~~~~^^^^^^
    4857:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4928:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4929:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4930:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    4931:  self.representation == other.representation
    4932:  ^^^^^^^^^^^^^^^^^^^
    4933:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4934:  if self.multi_rep[mode] == 'Q':
    4935:  ~~~~~~~~~~~~~~^^^^^^
    4936:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5007:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5008:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5009:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    5010:  self.representation == other.representation
    5011:  ^^^^^^^^^^^^^^^^^^^
    5012:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5013:  if self.multi_rep[mode] == 'Q':
    5014:  ~~~~~~~~~~~~~~^^^^^^
    5015:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5086:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5087:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5088:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    5089:  self.representation == other.representation
    5090:  ^^^^^^^^^^^^^^^^^^^
    5091:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5092:  if self.multi_rep[mode] == 'Q':
    5093:  ~~~~~~~~~~~~~~^^^^^^
    5094:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5159:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5160:  res = hook_impl.function(*args)
    5161:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5162:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5163:  result = testfunction(**testargs)
    5164:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5165:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 88, in test_repr
    5166:  assert repr(u_component) == "CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)"
    5167:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5246:  unitary_dual = self.dual
    5247:  ^^^^^^^^^
    5248:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    5249:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    5250:  ^^^^^^^^^^^^^^^^^^^
    5251:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5252:  if self.multi_rep[mode] == 'Q':
    5253:  ~~~~~~~~~~~~~~^^^^^^
    5254:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5319:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5320:  res = hook_impl.function(*args)
    5321:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5322:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5323:  result = testfunction(**testargs)
    5324:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5325:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 171, in test_repr
    5326:  assert repr(ch_component) == "CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)"
    5327:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5409:  ret = self.adjoint @ (self @ other)
    5410:  ^^^^^^^^^^^^
    5411:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    5412:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    5413:  ^^^^^^^^^^^^^^^^^^^
    5414:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5415:  if self.multi_rep[mode] == 'Q':
    5416:  ~~~~~~~~~~~~~~^^^^^^
    5417:  TypeError: 'NoneType' object is not subscriptable
    5418:  =========================== short test summary info ============================
    5419:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-0.1] - IndexError: string index out of range
    5420:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-x1] - IndexError: string index out of range
    5421:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-0.1] - IndexError: string index out of range
    5422:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-x1] - IndexError: string index out of range
    5423:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_to_quadrature - TypeError: 'NoneType' object is not subscriptable
    5424:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_add - TypeError: 'NoneType' object is not subscriptable
    5425:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_sub - TypeError: 'NoneType' object is not subscriptable
    5426:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_rshift_is_associative - TypeError: 'NoneType' object is not subscriptable
    5427:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_ket - assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    5428:  Full diff:
    5429:  Ket(modes=[0], name=Ket0, repr=Bargmann)
    5430:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_dm - assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    5431:  Full diff:
    5432:  DM(modes=[0], name=DM0, repr=Bargmann)
    5433:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_unitary - TypeError: 'NoneType' object is not subscriptable
    5434:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_channel - TypeError: 'NoneType' object is not subscriptable
    5435:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_bargmann_states - TypeError: 'NoneType' object is not subscriptable
    5436:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_fock_states - TypeError: 'NoneType' object is not subscriptable
    5437:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestBtoQ::test_BtoQ_with_displacement - assert False
    5438:  +  where False = <function allclose at 0x7fdc20b04370>(array([3.02604723+4.02070011j]), (0.70909550750147+0.09188016198960242j))
    5439:  +    where <function allclose at 0x7fdc20b04370> = np.allclose
    5440:  +    and   array([3.02604723+4.02070011j]) = <mrmustard.physics.ansatze.PolyExpAnsatz object at 0x7fdbacdb9950>(0.8320706890813477)
    5441:  +    and   (0.70909550750147+0.09188016198960242j) = <function TestBtoQ.test_BtoQ_with_displacement.<locals>.wavefunction_coh at 0x7fdbacd49300>((0.739551360894687 + (1j * 0.4830316476434483)), 0.8320706890813477, 0.16912431137439643)
    5442:  FAILED tests/test_lab_dev/test_states/test_coherent.py::TestCoherent::test_linear_combinations - TypeError: 'NoneType' object is not subscriptable
    5443:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes0] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    5444:  Full diff:
    5445:  - Ket(modes=[0], name=Ket0, repr=Fock)
    5446:  ? ^                   ^  -
    5447:  + Coherent(modes=[0], name=Coherent, repr=Fock)
    5448:  ? ^^^ +++                  ^^^ +++
    5449:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes1] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    5450:  Full diff:
    5451:  - Ket(modes=[0, 1], name=Ket01, repr=Fock)
    5452:  ? ^                      ^  --
    5453:  + Coherent(modes=[0, 1], name=Coherent, repr=Fock)
    5454:  ? ^^^ +++                     ^^^ +++
    5455:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes2] - IndexError: string index out of range
    5456:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes0] - assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5457:  Full diff:
    5458:  - Vacuum(modes=[0], name=Vac, repr=Bargmann)
    5459:  ? ^^^^^^                 ^^^
    5460:  + Ket(modes=[0], name=Ket0, repr=Bargmann)
    5461:  ? ^^^                 ^^^^
    5462:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes1] - assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5463:  Full diff:
    5464:  - Vacuum(modes=[0, 1], name=Vac, repr=Bargmann)
    5465:  ? ^^^^^^                    ^^^
    5466:  + Ket(modes=[0, 1], name=Ket01, repr=Bargmann)
    5467:  ? ^^^                    ^^^^^
    5468:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes2] - assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5469:  Full diff:
    5470:  - Vacuum(modes=[2, 3, 19], name=Vac, repr=Bargmann)
    5471:  ? ^^^^^^                        ^^^
    5472:  + Ket(modes=[2, 3, 19], name=Ket2319, repr=Bargmann)
    5473:  ? ^^^                        ^^^^^^^
    5474:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_quadrature - assert False
    5475:  +  where False = <bound method BackendManager.allclose of Backend(numpy)>(array([[1.+1.2246468e-16j]]), array([[0]]))
    5476:  +    where <bound method BackendManager.allclose of Backend(numpy)> = Backend(numpy).allclose
    5477:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_probability - TypeError: 'NoneType' object is not subscriptable
    5478:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_dm - AssertionError: assert 'DM01' == 'Coherent'
    5479:  - Coherent
    5480:  + DM01
    5481:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5482:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m0-modes0] - IndexError: string index out of range
    5483:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m1-modes0] - IndexError: string index out of range
    5484:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m2-modes0] - IndexError: string index out of range
    5485:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m3-modes0] - IndexError: string index out of range
    5486:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_private_batched_properties - TypeError: 'NoneType' object is not subscriptable
    5487:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_unsafe_batch_zipping - TypeError: 'NoneType' object is not subscriptable
    5488:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes0] - assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    5489:  Full diff:
    5490:  DM(modes=[0], name=DM0, repr=Fock)
    5491:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes1] - assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    5492:  Full diff:
    5493:  DM(modes=[0, 1], name=DM01, repr=Fock)
    5494:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes2] - IndexError: string index out of range
    5495:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_quadrature - assert False
    5496:  +  where False = <function allclose at 0x7fdc20b04370>(array([[0.-2.46519033e-32j, 0.+0.00000000e+00j],\n       [0.+0.00000000e+00j, 1.+1.22464680e-16j]]), array([[0, 0],\n       [0, 0]]))
    5497:  +    where <function allclose at 0x7fdc20b04370> = np.allclose
    5498:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_L2_norms - TypeError: 'NoneType' object is not subscriptable
    5499:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_probability - TypeError: 'NoneType' object is not subscriptable
    5500:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5501:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_expectation_bargmann_ket - ValueError: Cannot compare arrays of different shapes.
    5502:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_random[modes0] - IndexError: string index out of range
    5503:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_is_physical[modes0] - IndexError: string index out of range
    5504:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_2d - TypeError: 'NoneType' object is not subscriptable
    5505:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_3d - TypeError: 'NoneType' object is not subscriptable
    5506:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_dm - TypeError: 'NoneType' object is not subscriptable
    5507:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_operation - TypeError: 'NoneType' object is not subscriptable
    5508:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[1] - TypeError: 'NoneType' object is not subscriptable
    5509:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[2] - TypeError: 'NoneType' object is not subscriptable
    5510:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[3] - TypeError: 'NoneType' object is not subscriptable
    5511:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[4] - TypeError: 'NoneType' object is not subscriptable
    5512:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[5] - TypeError: 'NoneType' object is not subscriptable
    5513:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5514:  - CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)
    5515:  ?                                     ^^^^^
    5516:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5517:  ?                                     ^^^^
    5518:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_inverse_unitary - TypeError: 'NoneType' object is not subscriptable
    5519:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5520:  - CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)
    5521:  ?                                     ^^^
    5522:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5523:  ?                                     ^^^^
    5524:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_inverse_channel - TypeError: 'NoneType' object is not subscriptable
    5525:  =========== 55 failed, 1513 passed, 22 skipped in 145.51s (0:02:25) ============
    5526:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: pytest

    Failed stage: Run tests [❌]

    Failed test name: test_multiplication_dm

    Failure summary:

    The action failed due to multiple test failures, primarily caused by:

  • An AssertionError in test_multiplication_dm where the expected and actual results of a matrix
    multiplication did not match.
  • Several IndexError: string index out of range errors in tests related to test_from_attributes and
    test_get_item, indicating issues with accessing elements in a list or string.
  • Numerous TypeError: 'NoneType' object is not subscriptable errors in various tests, suggesting that
    some objects were None when they were expected to be a subscriptable type like a list or dictionary.
  • AssertionError in tests like test_quadrature_ket, test_quadrature_dm, and test_to_from_fock,
    indicating mismatches between expected and actual values.
  • A ValueError in test_expectation_bargmann_ket due to attempting to compare arrays of different
    shapes.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1031:  tests/test_training/test_opt.py ..................                       [ 96%]
    1032:  tests/test_training/test_riemannian_opt.py ...                           [ 96%]
    1033:  tests/test_training/test_trainer.py ....................                 [ 97%]
    1034:  tests/test_utils/test_argsort.py .                                       [ 97%]
    1035:  tests/test_utils/test_logger.py .....                                    [ 98%]
    1036:  tests/test_utils/test_serialize.py .........                             [ 98%]
    1037:  tests/test_utils/test_settings.py .......                                [ 99%]
    1038:  tests/test_utils/test_typing.py .............                            [100%]
    1039:  =================================== FAILURES ===================================
    ...
    
    1104:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1105:  res = hook_impl.function(*args)
    1106:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1107:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1108:  result = testfunction(**testargs)
    1109:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1110:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab/test_state.py", line 33, in test_multiplication_dm
    1111:  assert np.allclose(scaled.dm(G.cutoffs), 42.0 * G.dm())
    1112:  AssertionError: assert False
    ...
    
    1190:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1191:  assert cc1 == cc
    1192:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1193:  self.representation == other.representation
    1194:  ^^^^^^^^^^^^^^^^^^^^
    1195:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1196:  if self.multi_rep[mode] == 'Q':
    1197:  ~~~~~~~~~~~~~~^^^^^^
    1198:  IndexError: string index out of range
    ...
    
    1269:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1270:  assert cc1 == cc
    1271:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1272:  self.representation == other.representation
    1273:  ^^^^^^^^^^^^^^^^^^^^
    1274:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1275:  if self.multi_rep[mode] == 'Q':
    1276:  ~~~~~~~~~~~~~~^^^^^^
    1277:  IndexError: string index out of range
    ...
    
    1348:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1349:  assert cc1 == cc
    1350:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1351:  self.representation == other.representation
    1352:  ^^^^^^^^^^^^^^^^^^^^
    1353:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1354:  if self.multi_rep[mode] == 'Q':
    1355:  ~~~~~~~~~~~~~~^^^^^^
    1356:  IndexError: string index out of range
    ...
    
    1427:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1428:  assert cc1 == cc
    1429:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    1430:  self.representation == other.representation
    1431:  ^^^^^^^^^^^^^^^^^^^^
    1432:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1433:  if self.multi_rep[mode] == 'Q':
    1434:  ~~~~~~~~~~~~~~^^^^^^
    1435:  IndexError: string index out of range
    ...
    
    1504:  result = testfunction(**testargs)
    1505:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1506:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 113, in test_from_to_quadrature
    1507:  cc = CircuitComponent._from_attributes(c.representation, c.wires, c.name)
    1508:  ^^^^^^^^^^^^^^^^
    1509:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1510:  if self.multi_rep[mode] == 'Q':
    1511:  ~~~~~~~~~~~~~~^^^^^^
    1512:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1580:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1581:  result = testfunction(**testargs)
    1582:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1583:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 214, in test_add
    1584:  assert d12.representation == d1.representation + d2.representation
    1585:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1586:  if self.multi_rep[mode] == 'Q':
    1587:  ~~~~~~~~~~~~~~^^^^^^
    1588:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1656:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1657:  result = testfunction(**testargs)
    1658:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1659:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 220, in test_sub
    1660:  assert s12.representation == s1.representation - s2.representation
    1661:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1662:  if self.multi_rep[mode] == 'Q':
    1663:  ~~~~~~~~~~~~~~^^^^^^
    1664:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1736:  result3 = vac012 >> (d0 >> (d1 >> a0 >> a1) >> a2 >> d2)
    1737:  ~~~~~~~~~^^~~~
    1738:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/transformations/base.py", line 267, in __rshift__
    1739:  ret = super().__rshift__(other)
    1740:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1741:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 880, in __rshift__
    1742:  ret.multi_rep[mode] = self.multi_rep[mode]
    1743:  ~~~~~~~~~~~~~~^^^^^^
    1744:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1809:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1810:  res = hook_impl.function(*args)
    1811:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1812:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1813:  result = testfunction(**testargs)
    1814:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1815:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 455, in test_quadrature_ket
    1816:  assert ket == back
    1817:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    ...
    
    1884:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1885:  res = hook_impl.function(*args)
    1886:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1887:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1888:  result = testfunction(**testargs)
    1889:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1890:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 461, in test_quadrature_dm
    1891:  assert dm == back
    1892:  AssertionError: assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    ...
    
    1969:  return self.to_quadrature(phi=phi).representation.data
    1970:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1971:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 366, in to_quadrature
    1972:  if isinstance(self.representation, Fock):
    1973:  ^^^^^^^^^^^^^^^^^^^
    1974:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    1975:  if self.multi_rep[mode] == 'Q':
    1976:  ~~~~~~~~~~~~~~^^^^^^
    1977:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2055:  ret = self.adjoint @ (self @ other)
    2056:  ^^^^^^^^^^^^
    2057:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    2058:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    2059:  ^^^^^^^^^^^^^^^^^^^
    2060:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2061:  if self.multi_rep[mode] == 'Q':
    2062:  ~~~~~~~~~~~~~~^^^^^^
    2063:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2134:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 59, in test_trace_out_bargmann_states
    2135:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    2136:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2137:  result = DM(result.wires.modes, result.representation)
    2138:  ^^^^^^^^^^^^^^^^^^^^^
    2139:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2140:  if self.multi_rep[mode] == 'Q':
    2141:  ~~~~~~~~~~~~~~^^^^^^
    2142:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2213:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 79, in test_trace_out_fock_states
    2214:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).to_fock(7).dm()
    2215:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2216:  result = DM(result.wires.modes, result.representation)
    2217:  ^^^^^^^^^^^^^^^^^^^^^
    2218:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2219:  if self.multi_rep[mode] == 'Q':
    2220:  ~~~~~~~~~~~~~~^^^^^^
    2221:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2286:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2287:  res = hook_impl.function(*args)
    2288:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2289:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2290:  result = testfunction(**testargs)
    2291:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2292:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 266, in test_BtoQ_with_displacement
    2293:  assert np.allclose(wavefunction(quad), wavefunction_coh(x + 1j * y, quad, axis_angle))
    2294:  AssertionError: assert False
    ...
    
    2370:  lc = state1 + state2 - state3
    2371:  ~~~~~~~~~~~~~~~~^~~~~~~~
    2372:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 896, in __sub__
    2373:  rep = self.representation - other.representation
    2374:  ^^^^^^^^^^^^^^^^^^^
    2375:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2376:  if self.multi_rep[mode] == 'Q':
    2377:  ~~~~~~~~~~~~~~^^^^^^
    2378:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2443:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2444:  res = hook_impl.function(*args)
    2445:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2446:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2447:  result = testfunction(**testargs)
    2448:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2449:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2450:  assert state_in_fock == state_out
    2451:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    ...
    
    2521:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2522:  res = hook_impl.function(*args)
    2523:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2524:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2525:  result = testfunction(**testargs)
    2526:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2527:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2528:  assert state_in_fock == state_out
    2529:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    ...
    
    2605:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2606:  assert state_in_fock == state_out
    2607:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    2608:  self.representation == other.representation
    2609:  ^^^^^^^^^^^^^^^^^^^^
    2610:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    2611:  if self.multi_rep[mode] == 'Q':
    2612:  ~~~~~~~~~~~~~~^^^^^^
    2613:  IndexError: string index out of range
    ...
    
    2678:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2679:  res = hook_impl.function(*args)
    2680:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2681:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2682:  result = testfunction(**testargs)
    2683:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2684:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2685:  assert state1 == Vacuum(modes)
    2686:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2756:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2757:  res = hook_impl.function(*args)
    2758:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2759:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2760:  result = testfunction(**testargs)
    2761:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2762:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2763:  assert state1 == Vacuum(modes)
    2764:  AssertionError: assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2834:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2835:  res = hook_impl.function(*args)
    2836:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2837:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2838:  result = testfunction(**testargs)
    2839:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2840:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2841:  assert state1 == Vacuum(modes)
    2842:  AssertionError: assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2912:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2913:  res = hook_impl.function(*args)
    2914:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2915:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2916:  result = testfunction(**testargs)
    2917:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2918:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 172, in test_to_from_quadrature
    2919:  assert math.allclose(Atest2, A0)
    2920:  AssertionError: assert <tf.Tensor: shape=(), dtype=bool, numpy=False>
    ...
    
    2999:  return math.sum(math.real(self >> self.dual))
    3000:  ^^^^^^^^^
    3001:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3002:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3003:  ^^^^^^^^^^^^^^^^^^^
    3004:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3005:  if self.multi_rep[mode] == 'Q':
    3006:  ~~~~~~~~~~~~~~^^^^^^
    3007:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3072:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3073:  res = hook_impl.function(*args)
    3074:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3075:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3076:  result = testfunction(**testargs)
    3077:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3078:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 202, in test_dm
    3079:  assert dm.name == ket.name
    3080:  AssertionError: assert 'DM01' == 'Coherent'
    ...
    
    3153:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 246, in test_quadrature_batch
    3154:  assert math.allclose(state.quadrature(quad), psi_q)
    3155:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 398, in quadrature
    3156:  if isinstance(self.representation, Fock):
    3157:  ^^^^^^^^^^^^^^^^^^^
    3158:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3159:  if self.multi_rep[mode] == 'Q':
    3160:  ~~~~~~~~~~~~~~^^^^^^
    3161:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3235:  return self.dm()[modes]
    3236:  ~~~~~~~~~^^^^^^^
    3237:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3238:  representation = self.representation.trace(idxz, idxz_conj)
    3239:  ^^^^^^^^^^^^^^^^^^^
    3240:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3241:  if self.multi_rep[mode] == 'Q':
    3242:  ~~~~~~~~~~~~~~^^^^^^
    3243:  IndexError: string index out of range
    ...
    
    3317:  return self.dm()[modes]
    3318:  ~~~~~~~~~^^^^^^^
    3319:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3320:  representation = self.representation.trace(idxz, idxz_conj)
    3321:  ^^^^^^^^^^^^^^^^^^^
    3322:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3323:  if self.multi_rep[mode] == 'Q':
    3324:  ~~~~~~~~~~~~~~^^^^^^
    3325:  IndexError: string index out of range
    ...
    
    3399:  return self.dm()[modes]
    3400:  ~~~~~~~~~^^^^^^^
    3401:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3402:  representation = self.representation.trace(idxz, idxz_conj)
    3403:  ^^^^^^^^^^^^^^^^^^^
    3404:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3405:  if self.multi_rep[mode] == 'Q':
    3406:  ~~~~~~~~~~~~~~^^^^^^
    3407:  IndexError: string index out of range
    ...
    
    3481:  return self.dm()[modes]
    3482:  ~~~~~~~~~^^^^^^^
    3483:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3484:  representation = self.representation.trace(idxz, idxz_conj)
    3485:  ^^^^^^^^^^^^^^^^^^^
    3486:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3487:  if self.multi_rep[mode] == 'Q':
    3488:  ~~~~~~~~~~~~~~^^^^^^
    3489:  IndexError: string index out of range
    ...
    
    3566:  rep = self >> self.dual
    3567:  ^^^^^^^^^
    3568:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3569:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3570:  ^^^^^^^^^^^^^^^^^^^
    3571:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3572:  if self.multi_rep[mode] == 'Q':
    3573:  ~~~~~~~~~~~~~~^^^^^^
    3574:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3646:  better_cat = cat >> displacements
    3647:  ~~~~^^~~~~~~~~~~~~~~
    3648:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1194, in __rshift__
    3649:  result = super().__rshift__(other)
    3650:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3651:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 875, in __rshift__
    3652:  if not self.multi_rep[mode]:
    3653:  ~~~~~~~~~~~~~~^^^^^^
    3654:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3719:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3720:  res = hook_impl.function(*args)
    3721:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3722:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3723:  result = testfunction(**testargs)
    3724:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3725:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3726:  assert state_in_fock == state_out
    3727:  AssertionError: assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    ...
    
    3794:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3795:  res = hook_impl.function(*args)
    3796:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3797:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3798:  result = testfunction(**testargs)
    3799:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3800:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3801:  assert state_in_fock == state_out
    3802:  AssertionError: assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    ...
    
    3875:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3876:  assert state_in_fock == state_out
    3877:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    3878:  self.representation == other.representation
    3879:  ^^^^^^^^^^^^^^^^^^^^
    3880:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    3881:  if self.multi_rep[mode] == 'Q':
    3882:  ~~~~~~~~~~~~~~^^^^^^
    3883:  IndexError: string index out of range
    ...
    
    3948:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3949:  res = hook_impl.function(*args)
    3950:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3951:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3952:  result = testfunction(**testargs)
    3953:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3954:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 578, in test_to_from_quadrature
    3955:  assert np.allclose(Atest2, A0)
    3956:  AssertionError: assert False
    ...
    
    4032:  rep = self >> self.dual
    4033:  ^^^^^^^^^
    4034:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    4035:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    4036:  ^^^^^^^^^^^^^^^^^^^
    4037:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4038:  if self.multi_rep[mode] == 'Q':
    4039:  ~~~~~~~~~~~~~~^^^^^^
    4040:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4114:  return math.sum(self._probabilities)
    4115:  ^^^^^^^^^^^^^^^^^^^
    4116:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 681, in _probabilities
    4117:  rep = self.representation.trace(idx_ket, idx_bra)
    4118:  ^^^^^^^^^^^^^^^^^^^
    4119:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4120:  if self.multi_rep[mode] == 'Q':
    4121:  ~~~~~~~~~~~~~~^^^^^^
    4122:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4197:  dm = self @ self.adjoint
    4198:  ^^^^^^^^^^^^
    4199:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    4200:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    4201:  ^^^^^^^^^^^^^^^^^^^
    4202:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4203:  if self.multi_rep[mode] == 'Q':
    4204:  ~~~~~~~~~~~~~~^^^^^^
    4205:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4277:  assert math.allclose(dm.expectation(k01), res_k01.representation.c[0])
    4278:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 221, in allclose
    4279:  return self._apply("allclose", (array1, array2, atol))
    4280:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4281:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 111, in _apply
    4282:  return attr(*args)
    4283:  ^^^^^^^^^^^
    4284:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_tensorflow.py", line 78, in allclose
    4285:  raise ValueError("Cannot compare arrays of different shapes.")
    4286:  ValueError: Cannot compare arrays of different shapes.
    ...
    
    4364:  return self.dm()[modes]
    4365:  ~~~~~~~~~^^^^^^^
    4366:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4367:  representation = self.representation.trace(idxz, idxz_conj)
    4368:  ^^^^^^^^^^^^^^^^^^^
    4369:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4370:  if self.multi_rep[mode] == 'Q':
    4371:  ~~~~~~~~~~~~~~^^^^^^
    4372:  IndexError: string index out of range
    ...
    
    4450:  return self.dm()[modes]
    4451:  ~~~~~~~~~^^^^^^^
    4452:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4453:  representation = self.representation.trace(idxz, idxz_conj)
    4454:  ^^^^^^^^^^^^^^^^^^^
    4455:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4456:  if self.multi_rep[mode] == 'Q':
    4457:  ~~~~~~~~~~~~~~^^^^^^
    4458:  IndexError: string index out of range
    ...
    
    4533:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4534:  ^^^^^^^^^^^^^^^^^
    4535:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4536:  if self.representation.ansatz.batch_size == 1:
    4537:  ^^^^^^^^^^^^^^^^^^^
    4538:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4539:  if self.multi_rep[mode] == 'Q':
    4540:  ~~~~~~~~~~~~~~^^^^^^
    4541:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4619:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4620:  ^^^^^^^^^^^^^^^^^
    4621:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4622:  if self.representation.ansatz.batch_size == 1:
    4623:  ^^^^^^^^^^^^^^^^^^^
    4624:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4625:  if self.multi_rep[mode] == 'Q':
    4626:  ~~~~~~~~~~~~~~^^^^^^
    4627:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4702:  val = self.func(instance)
    4703:  ^^^^^^^^^^^^^^^^^^^
    4704:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 224, in manual_shape
    4705:  return list(self.representation.array.shape[1:])
    4706:  ^^^^^^^^^^^^^^^^^^^
    4707:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4708:  if self.multi_rep[mode] == 'Q':
    4709:  ~~~~~~~~~~~~~~^^^^^^
    4710:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4778:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    4779:  result = testfunction(**testargs)
    4780:  ^^^^^^^^^^^^^^^^^^^^^^^^
    4781:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 85, in test_operation
    4782:  )
    4783:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4784:  if self.multi_rep[mode] == 'Q':
    4785:  ~~~~~~~~~~~~~~^^^^^^
    4786:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4857:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4858:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4859:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    4860:  self.representation == other.representation
    4861:  ^^^^^^^^^^^^^^^^^^^
    4862:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4863:  if self.multi_rep[mode] == 'Q':
    4864:  ~~~~~~~~~~~~~~^^^^^^
    4865:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4936:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4937:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4938:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    4939:  self.representation == other.representation
    4940:  ^^^^^^^^^^^^^^^^^^^
    4941:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    4942:  if self.multi_rep[mode] == 'Q':
    4943:  ~~~~~~~~~~~~~~^^^^^^
    4944:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5015:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5016:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5017:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    5018:  self.representation == other.representation
    5019:  ^^^^^^^^^^^^^^^^^^^
    5020:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5021:  if self.multi_rep[mode] == 'Q':
    5022:  ~~~~~~~~~~~~~~^^^^^^
    5023:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5094:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5095:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5096:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    5097:  self.representation == other.representation
    5098:  ^^^^^^^^^^^^^^^^^^^
    5099:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5100:  if self.multi_rep[mode] == 'Q':
    5101:  ~~~~~~~~~~~~~~^^^^^^
    5102:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5173:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5174:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5175:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 735, in __eq__
    5176:  self.representation == other.representation
    5177:  ^^^^^^^^^^^^^^^^^^^
    5178:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5179:  if self.multi_rep[mode] == 'Q':
    5180:  ~~~~~~~~~~~~~~^^^^^^
    5181:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5246:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5247:  res = hook_impl.function(*args)
    5248:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5249:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5250:  result = testfunction(**testargs)
    5251:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5252:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 88, in test_repr
    5253:  assert repr(u_component) == "CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)"
    5254:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5333:  unitary_dual = self.dual
    5334:  ^^^^^^^^^
    5335:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    5336:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    5337:  ^^^^^^^^^^^^^^^^^^^
    5338:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5339:  if self.multi_rep[mode] == 'Q':
    5340:  ~~~~~~~~~~~~~~^^^^^^
    5341:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5406:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5407:  res = hook_impl.function(*args)
    5408:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5409:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5410:  result = testfunction(**testargs)
    5411:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5412:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 171, in test_repr
    5413:  assert repr(ch_component) == "CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)"
    5414:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5496:  ret = self.adjoint @ (self @ other)
    5497:  ^^^^^^^^^^^^
    5498:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    5499:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    5500:  ^^^^^^^^^^^^^^^^^^^
    5501:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 268, in representation
    5502:  if self.multi_rep[mode] == 'Q':
    5503:  ~~~~~~~~~~~~~~^^^^^^
    5504:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5608:  mrmustard/utils/settings.py                                                  130      0   100%
    5609:  mrmustard/utils/typing.py                                                     29      0   100%
    5610:  mrmustard/widgets/__init__.py                                                107      2    98%   171-172
    5611:  mrmustard/widgets/css.py                                                       4      0   100%
    5612:  --------------------------------------------------------------------------------------------------------
    5613:  TOTAL                                                                       7487    819    89%
    5614:  Coverage XML written to file coverage.xml
    5615:  =========================== short test summary info ============================
    5616:  FAILED tests/test_lab/test_state.py::test_multiplication_dm - assert False
    5617:  +  where False = <function allclose at 0x7fc4d65dc2f0>(<tf.Tensor: shape=(3, 3), dtype=complex128, numpy=\narray([[ 1.76397062e+03+0.j        ,  0.00000000e+00+0.j        ,\n ...0.j        ],\n       [-1.96217585e-01-6.50836533j,  0.00000000e+00+0.j        ,\n         2.40351625e-02+0.j        ]])>, (42.0 * <tf.Tensor: shape=(3, 3), dtype=complex128, numpy=\narray([[ 9.99983346e-01+0.j        ,  0.00000000e+00+0.j        ,\n ...0.j        ],\n       [-1.11234459e-04-0.00368955j,  0.00000000e+00+0.j        ,\n         1.36253756e-05+0.j        ]])>))
    5618:  +    where <function allclose at 0x7fc4d65dc2f0> = np.allclose
    5619:  +    and   <tf.Tensor: shape=(3, 3), dtype=complex128, numpy=\narray([[ 1.76397062e+03+0.j        ,  0.00000000e+00+0.j        ,\n ...0.j        ],\n       [-1.96217585e-01-6.50836533j,  0.00000000e+00+0.j        ,\n         2.40351625e-02+0.j        ]])> = <bound method State.dm of <mrmustard.lab.abstract.state.State object at 0x7fc420ac88d0>>([3])
    5620:  +      where <bound method State.dm of <mrmustard.lab.abstract.state.State object at 0x7fc420ac88d0>> = <mrmustard.lab.abstract.state.State object at 0x7fc420ac88d0>.dm
    5621:  +      and   [3] = <mrmustard.lab.abstract.state.State object at 0x7fc44c62e390>.cutoffs
    5622:  +    and   <tf.Tensor: shape=(3, 3), dtype=complex128, numpy=\narray([[ 9.99983346e-01+0.j        ,  0.00000000e+00+0.j        ,\n ...0.j        ],\n       [-1.11234459e-04-0.00368955j,  0.00000000e+00+0.j        ,\n         1.36253756e-05+0.j        ]])> = <bound method State.dm of <mrmustard.lab.abstract.state.State object at 0x7fc44c62e390>>()
    5623:  +      where <bound method State.dm of <mrmustard.lab.abstract.state.State object at 0x7fc44c62e390>> = <mrmustard.lab.abstract.state.State object at 0x7fc44c62e390>.dm
    5624:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-0.1] - IndexError: string index out of range
    5625:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-x1] - IndexError: string index out of range
    5626:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-0.1] - IndexError: string index out of range
    5627:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-x1] - IndexError: string index out of range
    5628:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_to_quadrature - TypeError: 'NoneType' object is not subscriptable
    5629:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_add - TypeError: 'NoneType' object is not subscriptable
    5630:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_sub - TypeError: 'NoneType' object is not subscriptable
    5631:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_rshift_is_associative - TypeError: 'NoneType' object is not subscriptable
    5632:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_ket - assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    5633:  Full diff:
    5634:  Ket(modes=[0], name=Ket0, repr=Bargmann)
    5635:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_dm - assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    5636:  Full diff:
    5637:  DM(modes=[0], name=DM0, repr=Bargmann)
    5638:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_unitary - TypeError: 'NoneType' object is not subscriptable
    5639:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_channel - TypeError: 'NoneType' object is not subscriptable
    5640:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_bargmann_states - TypeError: 'NoneType' object is not subscriptable
    5641:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_fock_states - TypeError: 'NoneType' object is not subscriptable
    5642:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestBtoQ::test_BtoQ_with_displacement - assert False
    5643:  +  where False = <function allclose at 0x7fc4d65dc2f0>(<tf.Tensor: shape=(1,), dtype=complex128, numpy=array([0.78956394+0.27548282j])>, (0.5172739292264957-0.15548261142068237j))
    5644:  +    where <function allclose at 0x7fc4d65dc2f0> = np.allclose
    5645:  +    and   <tf.Tensor: shape=(1,), dtype=complex128, numpy=array([0.78956394+0.27548282j])> = <mrmustard.physics.ansatze.PolyExpAnsatz object at 0x7fc400423d50>(0.16020797536455933)
    5646:  +    and   (0.5172739292264957-0.15548261142068237j) = <function TestBtoQ.test_BtoQ_with_displacement.<locals>.wavefunction_coh at 0x7fc400449da0>((0.13641165922392073 + (1j * 0.9248417213522125)), 0.16020797536455933, 0.6798736706428877)
    5647:  FAILED tests/test_lab_dev/test_states/test_coherent.py::TestCoherent::test_linear_combinations - TypeError: 'NoneType' object is not subscriptable
    5648:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes0] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    5649:  Full diff:
    5650:  - Ket(modes=[0], name=Ket0, repr=Fock)
    5651:  ? ^                   ^  -
    5652:  + Coherent(modes=[0], name=Coherent, repr=Fock)
    5653:  ? ^^^ +++                  ^^^ +++
    5654:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes1] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    5655:  Full diff:
    5656:  - Ket(modes=[0, 1], name=Ket01, repr=Fock)
    5657:  ? ^                      ^  --
    5658:  + Coherent(modes=[0, 1], name=Coherent, repr=Fock)
    5659:  ? ^^^ +++                     ^^^ +++
    5660:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes2] - IndexError: string index out of range
    5661:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes0] - assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5662:  Full diff:
    5663:  - Vacuum(modes=[0], name=Vac, repr=Bargmann)
    5664:  ? ^^^^^^                 ^^^
    5665:  + Ket(modes=[0], name=Ket0, repr=Bargmann)
    5666:  ? ^^^                 ^^^^
    5667:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes1] - assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5668:  Full diff:
    5669:  - Vacuum(modes=[0, 1], name=Vac, repr=Bargmann)
    5670:  ? ^^^^^^                    ^^^
    5671:  + Ket(modes=[0, 1], name=Ket01, repr=Bargmann)
    5672:  ? ^^^                    ^^^^^
    5673:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes2] - assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5674:  Full diff:
    5675:  - Vacuum(modes=[2, 3, 19], name=Vac, repr=Bargmann)
    5676:  ? ^^^^^^                        ^^^
    5677:  + Ket(modes=[2, 3, 19], name=Ket2319, repr=Bargmann)
    5678:  ? ^^^                        ^^^^^^^
    5679:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_quadrature - assert <tf.Tensor: shape=(), dtype=bool, numpy=False>
    5680:  +  where <tf.Tensor: shape=(), dtype=bool, numpy=False> = <bound method BackendManager.allclose of Backend(tensorflow)>(<tf.Tensor: shape=(1, 1), dtype=complex128, numpy=array([[1.+1.2246468e-16j]])>, array([[0]]))
    5681:  +    where <bound method BackendManager.allclose of Backend(tensorflow)> = Backend(tensorflow).allclose
    5682:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_probability - TypeError: 'NoneType' object is not subscriptable
    5683:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_dm - AssertionError: assert 'DM01' == 'Coherent'
    5684:  - Coherent
    5685:  + DM01
    5686:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5687:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m0-modes0] - IndexError: string index out of range
    5688:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m1-modes0] - IndexError: string index out of range
    5689:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m2-modes0] - IndexError: string index out of range
    5690:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m3-modes0] - IndexError: string index out of range
    5691:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_private_batched_properties - TypeError: 'NoneType' object is not subscriptable
    5692:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_unsafe_batch_zipping - TypeError: 'NoneType' object is not subscriptable
    5693:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes0] - assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    5694:  Full diff:
    5695:  DM(modes=[0], name=DM0, repr=Fock)
    5696:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes1] - assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    5697:  Full diff:
    5698:  DM(modes=[0, 1], name=DM01, repr=Fock)
    5699:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes2] - IndexError: string index out of range
    5700:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_quadrature - assert False
    5701:  +  where False = <function allclose at 0x7fc4d65dc2f0>(<tf.Tensor: shape=(2, 2), dtype=complex128, numpy=\narray([[0.+0.0000000e+00j, 0.+0.0000000e+00j],\n       [0.+0.0000000e+00j, 1.+1.2246468e-16j]])>, array([[0, 0],\n       [0, 0]]))
    5702:  +    where <function allclose at 0x7fc4d65dc2f0> = np.allclose
    5703:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_L2_norms - TypeError: 'NoneType' object is not subscriptable
    5704:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_probability - TypeError: 'NoneType' object is not subscriptable
    5705:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5706:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_expectation_bargmann_ket - ValueError: Cannot compare arrays of different shapes.
    5707:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_random[modes0] - IndexError: string index out of range
    5708:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_is_physical[modes0] - IndexError: string index out of range
    5709:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_2d - TypeError: 'NoneType' object is not subscriptable
    5710:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_3d - TypeError: 'NoneType' object is not subscriptable
    5711:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_dm - TypeError: 'NoneType' object is not subscriptable
    5712:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_operation - TypeError: 'NoneType' object is not subscriptable
    5713:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[1] - TypeError: 'NoneType' object is not subscriptable
    5714:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[2] - TypeError: 'NoneType' object is not subscriptable
    5715:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[3] - TypeError: 'NoneType' object is not subscriptable
    5716:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[4] - TypeError: 'NoneType' object is not subscriptable
    5717:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[5] - TypeError: 'NoneType' object is not subscriptable
    5718:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5719:  - CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)
    5720:  ?                                     ^^^^^
    5721:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5722:  ?                                     ^^^^
    5723:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_inverse_unitary - TypeError: 'NoneType' object is not subscriptable
    5724:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5725:  - CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)
    5726:  ?                                     ^^^
    5727:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5728:  ?                                     ^^^^
    5729:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_inverse_channel - TypeError: 'NoneType' object is not subscriptable
    5730:  ================= 56 failed, 1576 passed in 872.29s (0:14:32) ==================
    5731:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned a non-zero exit code. This indicates that there were no changes
    detected in the .github/CHANGELOG.md file between the last commit and the current commit.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    510:  HEAD is now at f52479b Merge be61a7c38dbfa09fd7101251e68390075ac2bb49 into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    511:  ##[endgroup]
    512:  [command]/usr/bin/git log -1 --format='%H'
    513:  'f52479b170a8adcc8c9c3683c8d1ed1832bdce01'
    514:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    515:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    516:  shell: /usr/bin/bash -e {0}
    517:  ##[endgroup]
    518:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: black

    Failed stage: Check formatting [❌]

    Failure summary:

    The action failed because the code formatting check identified that the file circuit_components.py
    in the mrmustard/lab_dev directory would be reformatted. This indicates that the file does not
    comply with the required code style guidelines.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    522:  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    523:  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    524:  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    525:  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
    526:  ##[endgroup]
    527:  would reformat /home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py
    528:  Oh no! 💥 💔 💥
    529:  1 file would be reformatted, 177 files would be left unchanged.
    530:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: black

    Failed stage: Check formatting [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the code formatting check identified that the file circuit_components.py
    in the mrmustard/lab_dev directory does not adhere to the required code style. Specifically:

  • One file would need reformatting to meet the style guidelines.
  • The process exited with code 1 due to this formatting issue.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    524:  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    525:  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    526:  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    527:  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
    528:  ##[endgroup]
    529:  would reformat /home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py
    530:  Oh no! 💥 💔 💥
    531:  1 file would be reformatted, 177 files would be left unchanged.
    532:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned a non-zero exit code. This indicates that the file
    .github/CHANGELOG.md was not modified in the latest commit, which is likely required for the PR to
    pass the check.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    504:  HEAD is now at 76191ca Merge adfa877d48666c5f04c51586a5f78ce011567b9c into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    505:  ##[endgroup]
    506:  [command]/usr/bin/git log -1 --format='%H'
    507:  '76191ca9204880074168c659172517ca0aea7249'
    508:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    509:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    510:  shell: /usr/bin/bash -e {0}
    511:  ##[endgroup]
    512:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: docs

    Failed stage: Run tests [❌]

    Failed test name: mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut

    Failure summary:

    The action failed because the test in the file
    mrmustard/lab_dev/circuit_components_utils/trace_out.py encountered an unexpected exception:

  • A TypeError occurred with the message "'NoneType' object is not subscriptable".
  • This error happened when attempting to access self.multi_rep[mode] in the representation method of
    the circuit_components.py file.
  • The issue suggests that self.multi_rep is None, leading to the failure when trying to subscript it.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    829:  mrmustard/lab_dev/transformations/bsgate.py .                            [ 71%]
    830:  mrmustard/lab_dev/transformations/dgate.py .                             [ 75%]
    831:  mrmustard/lab_dev/transformations/fockdamping.py .                       [ 78%]
    832:  mrmustard/lab_dev/transformations/identity.py .                          [ 81%]
    833:  mrmustard/lab_dev/transformations/rgate.py .                             [ 84%]
    834:  mrmustard/lab_dev/transformations/s2gate.py .                            [ 87%]
    835:  mrmustard/lab_dev/transformations/sgate.py .                             [ 90%]
    836:  mrmustard/lab_dev/wires.py ...                                           [100%]
    837:  =================================== FAILURES ===================================
    ...
    
    841:  040         >>> from mrmustard.lab_dev import *
    842:  041         >>> import numpy as np
    843:  042 
    844:  043         >>> # initialize a multi-mode state
    845:  044         >>> state = Coherent([0, 1, 2], x=1)
    846:  045 
    847:  046         >>> # trace out some of the modes
    848:  047         >>> assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    849:  UNEXPECTED EXCEPTION: TypeError("'NoneType' object is not subscriptable")
    ...
    
    852:  exec(compile(example.source, filename, "single",
    853:  File "<doctest mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut[3]>", line 1, in <module>
    854:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    855:  result = DM(result.wires.modes, result.representation)
    856:  ^^^^^^^^^^^^^^^^^^^^^
    857:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    858:  if self.multi_rep[mode] == "Q":
    859:  ~~~~~~~~~~~~~~^^^^^^
    860:  TypeError: 'NoneType' object is not subscriptable
    861:  /home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components_utils/trace_out.py:47: UnexpectedException
    862:  =========================== short test summary info ============================
    863:  FAILED mrmustard/lab_dev/circuit_components_utils/trace_out.py::mrmustard.lab_dev.circuit_components_utils.trace_out.TraceOut
    864:  ======================== 1 failed, 31 passed in 18.46s =========================
    865:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: pytest

    Failed stage: Run tests [❌]

    Failed test name: TestCircuitComponent::test_from_attributes[0.4-0.1]

    Failure summary:

    The action failed due to multiple test failures in the test_lab_dev suite. The primary reasons for
    failure include:

  • IndexError: string index out of range in the test_from_attributes and other related tests,
    indicating an issue with accessing elements in a string or list.
  • TypeError: 'NoneType' object is not subscriptable in several tests, such as test_from_to_quadrature,
    test_add, test_sub, and others, suggesting that a variable expected to be a list or string is None.
  • AssertionError in tests like test_quadrature_ket, test_quadrature_dm, and test_to_from_fock,
    indicating mismatches between expected and actual values.
  • ValueError: Cannot compare arrays of different shapes in test_expectation_bargmann_ket, indicating a
    shape mismatch in array comparisons.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1024:  .......................................                                  [ 94%]
    1025:  tests/test_physics/test_triples.py .......................               [ 96%]
    1026:  tests/test_physics/test_wigner.py ........................               [ 97%]
    1027:  tests/test_utils/test_argsort.py .                                       [ 97%]
    1028:  tests/test_utils/test_logger.py .....                                    [ 98%]
    1029:  tests/test_utils/test_serialize.py .....ss..                             [ 98%]
    1030:  tests/test_utils/test_settings.py ....s..                                [ 99%]
    1031:  tests/test_utils/test_typing.py .............                            [100%]
    1032:  =================================== FAILURES ===================================
    ...
    
    1103:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1104:  assert cc1 == cc
    1105:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1106:  self.representation == other.representation
    1107:  ^^^^^^^^^^^^^^^^^^^^
    1108:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1109:  if self.multi_rep[mode] == "Q":
    1110:  ~~~~~~~~~~~~~~^^^^^^
    1111:  IndexError: string index out of range
    ...
    
    1182:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1183:  assert cc1 == cc
    1184:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1185:  self.representation == other.representation
    1186:  ^^^^^^^^^^^^^^^^^^^^
    1187:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1188:  if self.multi_rep[mode] == "Q":
    1189:  ~~~~~~~~~~~~~~^^^^^^
    1190:  IndexError: string index out of range
    ...
    
    1261:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1262:  assert cc1 == cc
    1263:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1264:  self.representation == other.representation
    1265:  ^^^^^^^^^^^^^^^^^^^^
    1266:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1267:  if self.multi_rep[mode] == "Q":
    1268:  ~~~~~~~~~~~~~~^^^^^^
    1269:  IndexError: string index out of range
    ...
    
    1340:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1341:  assert cc1 == cc
    1342:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1343:  self.representation == other.representation
    1344:  ^^^^^^^^^^^^^^^^^^^^
    1345:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1346:  if self.multi_rep[mode] == "Q":
    1347:  ~~~~~~~~~~~~~~^^^^^^
    1348:  IndexError: string index out of range
    ...
    
    1417:  result = testfunction(**testargs)
    1418:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1419:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 113, in test_from_to_quadrature
    1420:  cc = CircuitComponent._from_attributes(c.representation, c.wires, c.name)
    1421:  ^^^^^^^^^^^^^^^^
    1422:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1423:  if self.multi_rep[mode] == "Q":
    1424:  ~~~~~~~~~~~~~~^^^^^^
    1425:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1493:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1494:  result = testfunction(**testargs)
    1495:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1496:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 214, in test_add
    1497:  assert d12.representation == d1.representation + d2.representation
    1498:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1499:  if self.multi_rep[mode] == "Q":
    1500:  ~~~~~~~~~~~~~~^^^^^^
    1501:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1569:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1570:  result = testfunction(**testargs)
    1571:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1572:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 220, in test_sub
    1573:  assert s12.representation == s1.representation - s2.representation
    1574:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1575:  if self.multi_rep[mode] == "Q":
    1576:  ~~~~~~~~~~~~~~^^^^^^
    1577:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1649:  result3 = vac012 >> (d0 >> (d1 >> a0 >> a1) >> a2 >> d2)
    1650:  ~~~~~~~~~^^~~~
    1651:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/transformations/base.py", line 267, in __rshift__
    1652:  ret = super().__rshift__(other)
    1653:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1654:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 882, in __rshift__
    1655:  ret._multi_rep[mode] = self.multi_rep[mode]
    1656:  ~~~~~~~~~~~~~~^^^^^^
    1657:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1722:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1723:  res = hook_impl.function(*args)
    1724:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1725:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1726:  result = testfunction(**testargs)
    1727:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1728:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 455, in test_quadrature_ket
    1729:  assert ket == back
    1730:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    ...
    
    1797:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1798:  res = hook_impl.function(*args)
    1799:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1800:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1801:  result = testfunction(**testargs)
    1802:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1803:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 461, in test_quadrature_dm
    1804:  assert dm == back
    1805:  AssertionError: assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    ...
    
    1882:  return self.to_quadrature(phi=phi).representation.data
    1883:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1884:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 367, in to_quadrature
    1885:  if isinstance(self.representation, Fock):
    1886:  ^^^^^^^^^^^^^^^^^^^
    1887:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1888:  if self.multi_rep[mode] == "Q":
    1889:  ~~~~~~~~~~~~~~^^^^^^
    1890:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1968:  ret = self.adjoint @ (self @ other)
    1969:  ^^^^^^^^^^^^
    1970:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    1971:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    1972:  ^^^^^^^^^^^^^^^^^^^
    1973:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1974:  if self.multi_rep[mode] == "Q":
    1975:  ~~~~~~~~~~~~~~^^^^^^
    1976:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2047:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 59, in test_trace_out_bargmann_states
    2048:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    2049:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2050:  result = DM(result.wires.modes, result.representation)
    2051:  ^^^^^^^^^^^^^^^^^^^^^
    2052:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2053:  if self.multi_rep[mode] == "Q":
    2054:  ~~~~~~~~~~~~~~^^^^^^
    2055:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2126:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 79, in test_trace_out_fock_states
    2127:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).to_fock(7).dm()
    2128:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2129:  result = DM(result.wires.modes, result.representation)
    2130:  ^^^^^^^^^^^^^^^^^^^^^
    2131:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2132:  if self.multi_rep[mode] == "Q":
    2133:  ~~~~~~~~~~~~~~^^^^^^
    2134:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2199:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2200:  res = hook_impl.function(*args)
    2201:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2202:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2203:  result = testfunction(**testargs)
    2204:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2205:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 266, in test_BtoQ_with_displacement
    2206:  assert np.allclose(wavefunction(quad), wavefunction_coh(x + 1j * y, quad, axis_angle))
    2207:  AssertionError: assert False
    ...
    
    2283:  lc = state1 + state2 - state3
    2284:  ~~~~~~~~~~~~~~~~^~~~~~~~
    2285:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 898, in __sub__
    2286:  rep = self.representation - other.representation
    2287:  ^^^^^^^^^^^^^^^^^^^
    2288:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2289:  if self.multi_rep[mode] == "Q":
    2290:  ~~~~~~~~~~~~~~^^^^^^
    2291:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2356:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2357:  res = hook_impl.function(*args)
    2358:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2359:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2360:  result = testfunction(**testargs)
    2361:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2362:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2363:  assert state_in_fock == state_out
    2364:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    ...
    
    2434:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2435:  res = hook_impl.function(*args)
    2436:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2437:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2438:  result = testfunction(**testargs)
    2439:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2440:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2441:  assert state_in_fock == state_out
    2442:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    ...
    
    2518:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2519:  assert state_in_fock == state_out
    2520:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    2521:  self.representation == other.representation
    2522:  ^^^^^^^^^^^^^^^^^^^^
    2523:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2524:  if self.multi_rep[mode] == "Q":
    2525:  ~~~~~~~~~~~~~~^^^^^^
    2526:  IndexError: string index out of range
    ...
    
    2591:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2592:  res = hook_impl.function(*args)
    2593:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2594:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2595:  result = testfunction(**testargs)
    2596:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2597:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2598:  assert state1 == Vacuum(modes)
    2599:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2669:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2670:  res = hook_impl.function(*args)
    2671:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2672:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2673:  result = testfunction(**testargs)
    2674:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2675:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2676:  assert state1 == Vacuum(modes)
    2677:  AssertionError: assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2747:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2748:  res = hook_impl.function(*args)
    2749:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2750:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2751:  result = testfunction(**testargs)
    2752:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2753:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2754:  assert state1 == Vacuum(modes)
    2755:  AssertionError: assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2825:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2826:  res = hook_impl.function(*args)
    2827:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2828:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2829:  result = testfunction(**testargs)
    2830:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2831:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 172, in test_to_from_quadrature
    2832:  assert math.allclose(Atest2, A0)
    2833:  AssertionError: assert False
    ...
    
    2912:  return math.sum(math.real(self >> self.dual))
    2913:  ^^^^^^^^^
    2914:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    2915:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    2916:  ^^^^^^^^^^^^^^^^^^^
    2917:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2918:  if self.multi_rep[mode] == "Q":
    2919:  ~~~~~~~~~~~~~~^^^^^^
    2920:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2985:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2986:  res = hook_impl.function(*args)
    2987:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2988:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2989:  result = testfunction(**testargs)
    2990:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2991:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 202, in test_dm
    2992:  assert dm.name == ket.name
    2993:  AssertionError: assert 'DM01' == 'Coherent'
    ...
    
    3066:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 246, in test_quadrature_batch
    3067:  assert math.allclose(state.quadrature(quad), psi_q)
    3068:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 399, in quadrature
    3069:  if isinstance(self.representation, Fock):
    3070:  ^^^^^^^^^^^^^^^^^^^
    3071:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3072:  if self.multi_rep[mode] == "Q":
    3073:  ~~~~~~~~~~~~~~^^^^^^
    3074:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3148:  return self.dm()[modes]
    3149:  ~~~~~~~~~^^^^^^^
    3150:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3151:  representation = self.representation.trace(idxz, idxz_conj)
    3152:  ^^^^^^^^^^^^^^^^^^^
    3153:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3154:  if self.multi_rep[mode] == "Q":
    3155:  ~~~~~~~~~~~~~~^^^^^^
    3156:  IndexError: string index out of range
    ...
    
    3230:  return self.dm()[modes]
    3231:  ~~~~~~~~~^^^^^^^
    3232:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3233:  representation = self.representation.trace(idxz, idxz_conj)
    3234:  ^^^^^^^^^^^^^^^^^^^
    3235:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3236:  if self.multi_rep[mode] == "Q":
    3237:  ~~~~~~~~~~~~~~^^^^^^
    3238:  IndexError: string index out of range
    ...
    
    3312:  return self.dm()[modes]
    3313:  ~~~~~~~~~^^^^^^^
    3314:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3315:  representation = self.representation.trace(idxz, idxz_conj)
    3316:  ^^^^^^^^^^^^^^^^^^^
    3317:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3318:  if self.multi_rep[mode] == "Q":
    3319:  ~~~~~~~~~~~~~~^^^^^^
    3320:  IndexError: string index out of range
    ...
    
    3394:  return self.dm()[modes]
    3395:  ~~~~~~~~~^^^^^^^
    3396:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3397:  representation = self.representation.trace(idxz, idxz_conj)
    3398:  ^^^^^^^^^^^^^^^^^^^
    3399:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3400:  if self.multi_rep[mode] == "Q":
    3401:  ~~~~~~~~~~~~~~^^^^^^
    3402:  IndexError: string index out of range
    ...
    
    3479:  rep = self >> self.dual
    3480:  ^^^^^^^^^
    3481:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3482:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3483:  ^^^^^^^^^^^^^^^^^^^
    3484:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3485:  if self.multi_rep[mode] == "Q":
    3486:  ~~~~~~~~~~~~~~^^^^^^
    3487:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3559:  better_cat = cat >> displacements
    3560:  ~~~~^^~~~~~~~~~~~~~~
    3561:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1194, in __rshift__
    3562:  result = super().__rshift__(other)
    3563:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3564:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 877, in __rshift__
    3565:  if not self.multi_rep[mode]:
    3566:  ~~~~~~~~~~~~~~^^^^^^
    3567:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3632:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3633:  res = hook_impl.function(*args)
    3634:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3635:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3636:  result = testfunction(**testargs)
    3637:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3638:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3639:  assert state_in_fock == state_out
    3640:  AssertionError: assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    ...
    
    3707:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3708:  res = hook_impl.function(*args)
    3709:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3710:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3711:  result = testfunction(**testargs)
    3712:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3713:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3714:  assert state_in_fock == state_out
    3715:  AssertionError: assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    ...
    
    3788:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3789:  assert state_in_fock == state_out
    3790:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    3791:  self.representation == other.representation
    3792:  ^^^^^^^^^^^^^^^^^^^^
    3793:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3794:  if self.multi_rep[mode] == "Q":
    3795:  ~~~~~~~~~~~~~~^^^^^^
    3796:  IndexError: string index out of range
    ...
    
    3861:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3862:  res = hook_impl.function(*args)
    3863:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3864:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3865:  result = testfunction(**testargs)
    3866:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3867:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 578, in test_to_from_quadrature
    3868:  assert np.allclose(Atest2, A0)
    3869:  AssertionError: assert False
    ...
    
    3945:  rep = self >> self.dual
    3946:  ^^^^^^^^^
    3947:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3948:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3949:  ^^^^^^^^^^^^^^^^^^^
    3950:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3951:  if self.multi_rep[mode] == "Q":
    3952:  ~~~~~~~~~~~~~~^^^^^^
    3953:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4027:  return math.sum(self._probabilities)
    4028:  ^^^^^^^^^^^^^^^^^^^
    4029:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 681, in _probabilities
    4030:  rep = self.representation.trace(idx_ket, idx_bra)
    4031:  ^^^^^^^^^^^^^^^^^^^
    4032:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4033:  if self.multi_rep[mode] == "Q":
    4034:  ~~~~~~~~~~~~~~^^^^^^
    4035:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4110:  dm = self @ self.adjoint
    4111:  ^^^^^^^^^^^^
    4112:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    4113:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    4114:  ^^^^^^^^^^^^^^^^^^^
    4115:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4116:  if self.multi_rep[mode] == "Q":
    4117:  ~~~~~~~~~~~~~~^^^^^^
    4118:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4190:  assert math.allclose(dm.expectation(k01), res_k01.representation.c[0])
    4191:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 221, in allclose
    4192:  return self._apply("allclose", (array1, array2, atol))
    4193:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4194:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 111, in _apply
    4195:  return attr(*args)
    4196:  ^^^^^^^^^^^
    4197:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_numpy.py", line 73, in allclose
    4198:  raise ValueError("Cannot compare arrays of different shapes.")
    4199:  ValueError: Cannot compare arrays of different shapes.
    ...
    
    4277:  return self.dm()[modes]
    4278:  ~~~~~~~~~^^^^^^^
    4279:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4280:  representation = self.representation.trace(idxz, idxz_conj)
    4281:  ^^^^^^^^^^^^^^^^^^^
    4282:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4283:  if self.multi_rep[mode] == "Q":
    4284:  ~~~~~~~~~~~~~~^^^^^^
    4285:  IndexError: string index out of range
    ...
    
    4363:  return self.dm()[modes]
    4364:  ~~~~~~~~~^^^^^^^
    4365:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4366:  representation = self.representation.trace(idxz, idxz_conj)
    4367:  ^^^^^^^^^^^^^^^^^^^
    4368:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4369:  if self.multi_rep[mode] == "Q":
    4370:  ~~~~~~~~~~~~~~^^^^^^
    4371:  IndexError: string index out of range
    ...
    
    4446:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4447:  ^^^^^^^^^^^^^^^^^
    4448:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4449:  if self.representation.ansatz.batch_size == 1:
    4450:  ^^^^^^^^^^^^^^^^^^^
    4451:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4452:  if self.multi_rep[mode] == "Q":
    4453:  ~~~~~~~~~~~~~~^^^^^^
    4454:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4532:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4533:  ^^^^^^^^^^^^^^^^^
    4534:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4535:  if self.representation.ansatz.batch_size == 1:
    4536:  ^^^^^^^^^^^^^^^^^^^
    4537:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4538:  if self.multi_rep[mode] == "Q":
    4539:  ~~~~~~~~~~~~~~^^^^^^
    4540:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4615:  val = self.func(instance)
    4616:  ^^^^^^^^^^^^^^^^^^^
    4617:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 224, in manual_shape
    4618:  return list(self.representation.array.shape[1:])
    4619:  ^^^^^^^^^^^^^^^^^^^
    4620:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4621:  if self.multi_rep[mode] == "Q":
    4622:  ~~~~~~~~~~~~~~^^^^^^
    4623:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4691:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    4692:  result = testfunction(**testargs)
    4693:  ^^^^^^^^^^^^^^^^^^^^^^^^
    4694:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 85, in test_operation
    4695:  )
    4696:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4697:  if self.multi_rep[mode] == "Q":
    4698:  ~~~~~~~~~~~~~~^^^^^^
    4699:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4770:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4771:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4772:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4773:  self.representation == other.representation
    4774:  ^^^^^^^^^^^^^^^^^^^
    4775:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4776:  if self.multi_rep[mode] == "Q":
    4777:  ~~~~~~~~~~~~~~^^^^^^
    4778:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4849:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4850:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4851:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4852:  self.representation == other.representation
    4853:  ^^^^^^^^^^^^^^^^^^^
    4854:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4855:  if self.multi_rep[mode] == "Q":
    4856:  ~~~~~~~~~~~~~~^^^^^^
    4857:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4928:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4929:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4930:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4931:  self.representation == other.representation
    4932:  ^^^^^^^^^^^^^^^^^^^
    4933:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4934:  if self.multi_rep[mode] == "Q":
    4935:  ~~~~~~~~~~~~~~^^^^^^
    4936:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5007:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5008:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5009:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    5010:  self.representation == other.representation
    5011:  ^^^^^^^^^^^^^^^^^^^
    5012:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5013:  if self.multi_rep[mode] == "Q":
    5014:  ~~~~~~~~~~~~~~^^^^^^
    5015:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5086:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5087:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5088:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    5089:  self.representation == other.representation
    5090:  ^^^^^^^^^^^^^^^^^^^
    5091:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5092:  if self.multi_rep[mode] == "Q":
    5093:  ~~~~~~~~~~~~~~^^^^^^
    5094:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5159:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5160:  res = hook_impl.function(*args)
    5161:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5162:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5163:  result = testfunction(**testargs)
    5164:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5165:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 88, in test_repr
    5166:  assert repr(u_component) == "CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)"
    5167:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5246:  unitary_dual = self.dual
    5247:  ^^^^^^^^^
    5248:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    5249:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    5250:  ^^^^^^^^^^^^^^^^^^^
    5251:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5252:  if self.multi_rep[mode] == "Q":
    5253:  ~~~~~~~~~~~~~~^^^^^^
    5254:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5319:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5320:  res = hook_impl.function(*args)
    5321:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5322:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5323:  result = testfunction(**testargs)
    5324:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5325:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 171, in test_repr
    5326:  assert repr(ch_component) == "CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)"
    5327:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5409:  ret = self.adjoint @ (self @ other)
    5410:  ^^^^^^^^^^^^
    5411:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    5412:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    5413:  ^^^^^^^^^^^^^^^^^^^
    5414:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5415:  if self.multi_rep[mode] == "Q":
    5416:  ~~~~~~~~~~~~~~^^^^^^
    5417:  TypeError: 'NoneType' object is not subscriptable
    5418:  =========================== short test summary info ============================
    5419:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-0.1] - IndexError: string index out of range
    5420:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-x1] - IndexError: string index out of range
    5421:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-0.1] - IndexError: string index out of range
    5422:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-x1] - IndexError: string index out of range
    5423:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_to_quadrature - TypeError: 'NoneType' object is not subscriptable
    5424:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_add - TypeError: 'NoneType' object is not subscriptable
    5425:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_sub - TypeError: 'NoneType' object is not subscriptable
    5426:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_rshift_is_associative - TypeError: 'NoneType' object is not subscriptable
    5427:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_ket - assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    5428:  Full diff:
    5429:  Ket(modes=[0], name=Ket0, repr=Bargmann)
    5430:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_dm - assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    5431:  Full diff:
    5432:  DM(modes=[0], name=DM0, repr=Bargmann)
    5433:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_unitary - TypeError: 'NoneType' object is not subscriptable
    5434:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_channel - TypeError: 'NoneType' object is not subscriptable
    5435:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_bargmann_states - TypeError: 'NoneType' object is not subscriptable
    5436:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_fock_states - TypeError: 'NoneType' object is not subscriptable
    5437:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestBtoQ::test_BtoQ_with_displacement - assert False
    5438:  +  where False = <function allclose at 0x7f0609b24570>(array([2.88622701+0.90985275j]), (0.5637911679864452+0.12948362474926597j))
    5439:  +    where <function allclose at 0x7f0609b24570> = np.allclose
    5440:  +    and   array([2.88622701+0.90985275j]) = <mrmustard.physics.ansatze.PolyExpAnsatz object at 0x7f0595bdf5d0>(0.913257657665166)
    5441:  +    and   (0.5637911679864452+0.12948362474926597j) = <function TestBtoQ.test_BtoQ_with_displacement.<locals>.wavefunction_coh at 0x7f0595bcd3a0>((0.08278448850258002 + (1j * 0.22220253288673375)), 0.913257657665166, 0.24754192856683055)
    5442:  FAILED tests/test_lab_dev/test_states/test_coherent.py::TestCoherent::test_linear_combinations - TypeError: 'NoneType' object is not subscriptable
    5443:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes0] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    5444:  Full diff:
    5445:  - Ket(modes=[0], name=Ket0, repr=Fock)
    5446:  ? ^                   ^  -
    5447:  + Coherent(modes=[0], name=Coherent, repr=Fock)
    5448:  ? ^^^ +++                  ^^^ +++
    5449:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes1] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    5450:  Full diff:
    5451:  - Ket(modes=[0, 1], name=Ket01, repr=Fock)
    5452:  ? ^                      ^  --
    5453:  + Coherent(modes=[0, 1], name=Coherent, repr=Fock)
    5454:  ? ^^^ +++                     ^^^ +++
    5455:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes2] - IndexError: string index out of range
    5456:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes0] - assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5457:  Full diff:
    5458:  - Vacuum(modes=[0], name=Vac, repr=Bargmann)
    5459:  ? ^^^^^^                 ^^^
    5460:  + Ket(modes=[0], name=Ket0, repr=Bargmann)
    5461:  ? ^^^                 ^^^^
    5462:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes1] - assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5463:  Full diff:
    5464:  - Vacuum(modes=[0, 1], name=Vac, repr=Bargmann)
    5465:  ? ^^^^^^                    ^^^
    5466:  + Ket(modes=[0, 1], name=Ket01, repr=Bargmann)
    5467:  ? ^^^                    ^^^^^
    5468:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes2] - assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5469:  Full diff:
    5470:  - Vacuum(modes=[2, 3, 19], name=Vac, repr=Bargmann)
    5471:  ? ^^^^^^                        ^^^
    5472:  + Ket(modes=[2, 3, 19], name=Ket2319, repr=Bargmann)
    5473:  ? ^^^                        ^^^^^^^
    5474:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_quadrature - assert False
    5475:  +  where False = <bound method BackendManager.allclose of Backend(numpy)>(array([[1.+1.2246468e-16j]]), array([[0]]))
    5476:  +    where <bound method BackendManager.allclose of Backend(numpy)> = Backend(numpy).allclose
    5477:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_probability - TypeError: 'NoneType' object is not subscriptable
    5478:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_dm - AssertionError: assert 'DM01' == 'Coherent'
    5479:  - Coherent
    5480:  + DM01
    5481:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5482:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m0-modes0] - IndexError: string index out of range
    5483:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m1-modes0] - IndexError: string index out of range
    5484:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m2-modes0] - IndexError: string index out of range
    5485:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m3-modes0] - IndexError: string index out of range
    5486:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_private_batched_properties - TypeError: 'NoneType' object is not subscriptable
    5487:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_unsafe_batch_zipping - TypeError: 'NoneType' object is not subscriptable
    5488:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes0] - assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    5489:  Full diff:
    5490:  DM(modes=[0], name=DM0, repr=Fock)
    5491:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes1] - assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    5492:  Full diff:
    5493:  DM(modes=[0, 1], name=DM01, repr=Fock)
    5494:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes2] - IndexError: string index out of range
    5495:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_quadrature - assert False
    5496:  +  where False = <function allclose at 0x7f0609b24570>(array([[0.-2.46519033e-32j, 0.+0.00000000e+00j],\n       [0.+0.00000000e+00j, 1.+1.22464680e-16j]]), array([[0, 0],\n       [0, 0]]))
    5497:  +    where <function allclose at 0x7f0609b24570> = np.allclose
    5498:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_L2_norms - TypeError: 'NoneType' object is not subscriptable
    5499:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_probability - TypeError: 'NoneType' object is not subscriptable
    5500:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5501:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_expectation_bargmann_ket - ValueError: Cannot compare arrays of different shapes.
    5502:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_random[modes0] - IndexError: string index out of range
    5503:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_is_physical[modes0] - IndexError: string index out of range
    5504:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_2d - TypeError: 'NoneType' object is not subscriptable
    5505:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_3d - TypeError: 'NoneType' object is not subscriptable
    5506:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_dm - TypeError: 'NoneType' object is not subscriptable
    5507:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_operation - TypeError: 'NoneType' object is not subscriptable
    5508:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[1] - TypeError: 'NoneType' object is not subscriptable
    5509:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[2] - TypeError: 'NoneType' object is not subscriptable
    5510:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[3] - TypeError: 'NoneType' object is not subscriptable
    5511:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[4] - TypeError: 'NoneType' object is not subscriptable
    5512:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[5] - TypeError: 'NoneType' object is not subscriptable
    5513:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5514:  - CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)
    5515:  ?                                     ^^^^^
    5516:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5517:  ?                                     ^^^^
    5518:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_inverse_unitary - TypeError: 'NoneType' object is not subscriptable
    5519:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5520:  - CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)
    5521:  ?                                     ^^^
    5522:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5523:  ?                                     ^^^^
    5524:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_inverse_channel - TypeError: 'NoneType' object is not subscriptable
    5525:  =========== 55 failed, 1513 passed, 22 skipped in 146.83s (0:02:26) ============
    5526:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: pytest

    Failed stage: Run tests [❌]

    Failed test name: TestCircuitComponent::test_from_attributes

    Failure summary:

    The action failed due to multiple test failures in the test_lab_dev and test_states directories. Key
    issues include:

  • IndexError: string index out of range in test_from_attributes and test_get_item tests, indicating an
    attempt to access an index that does not exist.
  • TypeError: 'NoneType' object is not subscriptable in several tests, such as test_from_to_quadrature,
    test_add, test_sub, and others, suggesting that a None value is being accessed as if it were a list
    or other subscriptable type.
  • AssertionError in tests like test_quadrature_ket, test_quadrature_dm, and test_to_from_fock,
    indicating that expected and actual values do not match.
  • ValueError: Cannot compare arrays of different shapes in test_expectation_bargmann_ket, indicating a
    mismatch in array dimensions during comparison.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1033:  tests/test_training/test_opt.py ..................                       [ 96%]
    1034:  tests/test_training/test_riemannian_opt.py ...                           [ 96%]
    1035:  tests/test_training/test_trainer.py ....................                 [ 97%]
    1036:  tests/test_utils/test_argsort.py .                                       [ 97%]
    1037:  tests/test_utils/test_logger.py .....                                    [ 98%]
    1038:  tests/test_utils/test_serialize.py .........                             [ 98%]
    1039:  tests/test_utils/test_settings.py .......                                [ 99%]
    1040:  tests/test_utils/test_typing.py .............                            [100%]
    1041:  =================================== FAILURES ===================================
    ...
    
    1112:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1113:  assert cc1 == cc
    1114:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1115:  self.representation == other.representation
    1116:  ^^^^^^^^^^^^^^^^^^^^
    1117:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1118:  if self.multi_rep[mode] == "Q":
    1119:  ~~~~~~~~~~~~~~^^^^^^
    1120:  IndexError: string index out of range
    ...
    
    1191:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1192:  assert cc1 == cc
    1193:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1194:  self.representation == other.representation
    1195:  ^^^^^^^^^^^^^^^^^^^^
    1196:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1197:  if self.multi_rep[mode] == "Q":
    1198:  ~~~~~~~~~~~~~~^^^^^^
    1199:  IndexError: string index out of range
    ...
    
    1270:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1271:  assert cc1 == cc
    1272:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1273:  self.representation == other.representation
    1274:  ^^^^^^^^^^^^^^^^^^^^
    1275:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1276:  if self.multi_rep[mode] == "Q":
    1277:  ~~~~~~~~~~~~~~^^^^^^
    1278:  IndexError: string index out of range
    ...
    
    1349:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 103, in test_from_attributes
    1350:  assert cc1 == cc
    1351:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    1352:  self.representation == other.representation
    1353:  ^^^^^^^^^^^^^^^^^^^^
    1354:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1355:  if self.multi_rep[mode] == "Q":
    1356:  ~~~~~~~~~~~~~~^^^^^^
    1357:  IndexError: string index out of range
    ...
    
    1426:  result = testfunction(**testargs)
    1427:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1428:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 113, in test_from_to_quadrature
    1429:  cc = CircuitComponent._from_attributes(c.representation, c.wires, c.name)
    1430:  ^^^^^^^^^^^^^^^^
    1431:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1432:  if self.multi_rep[mode] == "Q":
    1433:  ~~~~~~~~~~~~~~^^^^^^
    1434:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1502:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1503:  result = testfunction(**testargs)
    1504:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1505:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 214, in test_add
    1506:  assert d12.representation == d1.representation + d2.representation
    1507:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1508:  if self.multi_rep[mode] == "Q":
    1509:  ~~~~~~~~~~~~~~^^^^^^
    1510:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1578:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1579:  result = testfunction(**testargs)
    1580:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1581:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 220, in test_sub
    1582:  assert s12.representation == s1.representation - s2.representation
    1583:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1584:  if self.multi_rep[mode] == "Q":
    1585:  ~~~~~~~~~~~~~~^^^^^^
    1586:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1658:  result3 = vac012 >> (d0 >> (d1 >> a0 >> a1) >> a2 >> d2)
    1659:  ~~~~~~~~~^^~~~
    1660:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/transformations/base.py", line 267, in __rshift__
    1661:  ret = super().__rshift__(other)
    1662:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1663:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 882, in __rshift__
    1664:  ret._multi_rep[mode] = self.multi_rep[mode]
    1665:  ~~~~~~~~~~~~~~^^^^^^
    1666:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1731:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1732:  res = hook_impl.function(*args)
    1733:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1734:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1735:  result = testfunction(**testargs)
    1736:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1737:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 455, in test_quadrature_ket
    1738:  assert ket == back
    1739:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    ...
    
    1806:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    1807:  res = hook_impl.function(*args)
    1808:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    1809:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    1810:  result = testfunction(**testargs)
    1811:  ^^^^^^^^^^^^^^^^^^^^^^^^
    1812:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components.py", line 461, in test_quadrature_dm
    1813:  assert dm == back
    1814:  AssertionError: assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    ...
    
    1891:  return self.to_quadrature(phi=phi).representation.data
    1892:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1893:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 367, in to_quadrature
    1894:  if isinstance(self.representation, Fock):
    1895:  ^^^^^^^^^^^^^^^^^^^
    1896:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1897:  if self.multi_rep[mode] == "Q":
    1898:  ~~~~~~~~~~~~~~^^^^^^
    1899:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    1977:  ret = self.adjoint @ (self @ other)
    1978:  ^^^^^^^^^^^^
    1979:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    1980:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    1981:  ^^^^^^^^^^^^^^^^^^^
    1982:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    1983:  if self.multi_rep[mode] == "Q":
    1984:  ~~~~~~~~~~~~~~^^^^^^
    1985:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2056:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 59, in test_trace_out_bargmann_states
    2057:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).dm()
    2058:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2059:  result = DM(result.wires.modes, result.representation)
    2060:  ^^^^^^^^^^^^^^^^^^^^^
    2061:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2062:  if self.multi_rep[mode] == "Q":
    2063:  ~~~~~~~~~~~~~~^^^^^^
    2064:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2135:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 79, in test_trace_out_fock_states
    2136:  assert state >> TraceOut([0]) == Coherent([1, 2], x=1).to_fock(7).dm()
    2137:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1202, in __rshift__
    2138:  result = DM(result.wires.modes, result.representation)
    2139:  ^^^^^^^^^^^^^^^^^^^^^
    2140:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2141:  if self.multi_rep[mode] == "Q":
    2142:  ~~~~~~~~~~~~~~^^^^^^
    2143:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2208:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2209:  res = hook_impl.function(*args)
    2210:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2211:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2212:  result = testfunction(**testargs)
    2213:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2214:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_circuit_components_utils.py", line 266, in test_BtoQ_with_displacement
    2215:  assert np.allclose(wavefunction(quad), wavefunction_coh(x + 1j * y, quad, axis_angle))
    2216:  AssertionError: assert False
    ...
    
    2292:  lc = state1 + state2 - state3
    2293:  ~~~~~~~~~~~~~~~~^~~~~~~~
    2294:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 898, in __sub__
    2295:  rep = self.representation - other.representation
    2296:  ^^^^^^^^^^^^^^^^^^^
    2297:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2298:  if self.multi_rep[mode] == "Q":
    2299:  ~~~~~~~~~~~~~~^^^^^^
    2300:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2365:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2366:  res = hook_impl.function(*args)
    2367:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2368:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2369:  result = testfunction(**testargs)
    2370:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2371:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2372:  assert state_in_fock == state_out
    2373:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    ...
    
    2443:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2444:  res = hook_impl.function(*args)
    2445:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2446:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2447:  result = testfunction(**testargs)
    2448:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2449:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2450:  assert state_in_fock == state_out
    2451:  AssertionError: assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    ...
    
    2527:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 142, in test_to_from_fock
    2528:  assert state_in_fock == state_out
    2529:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    2530:  self.representation == other.representation
    2531:  ^^^^^^^^^^^^^^^^^^^^
    2532:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2533:  if self.multi_rep[mode] == "Q":
    2534:  ~~~~~~~~~~~~~~^^^^^^
    2535:  IndexError: string index out of range
    ...
    
    2600:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2601:  res = hook_impl.function(*args)
    2602:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2603:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2604:  result = testfunction(**testargs)
    2605:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2606:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2607:  assert state1 == Vacuum(modes)
    2608:  AssertionError: assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2678:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2679:  res = hook_impl.function(*args)
    2680:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2681:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2682:  result = testfunction(**testargs)
    2683:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2684:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2685:  assert state1 == Vacuum(modes)
    2686:  AssertionError: assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2756:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2757:  res = hook_impl.function(*args)
    2758:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2759:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2760:  result = testfunction(**testargs)
    2761:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2762:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 153, in test_to_from_phase_space
    2763:  assert state1 == Vacuum(modes)
    2764:  AssertionError: assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    ...
    
    2834:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2835:  res = hook_impl.function(*args)
    2836:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2837:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2838:  result = testfunction(**testargs)
    2839:  ^^^^^^^^^^^^^^^^^^^^^^^^
    2840:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 172, in test_to_from_quadrature
    2841:  assert math.allclose(Atest2, A0)
    2842:  AssertionError: assert <tf.Tensor: shape=(), dtype=bool, numpy=False>
    ...
    
    2921:  return math.sum(math.real(self >> self.dual))
    2922:  ^^^^^^^^^
    2923:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    2924:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    2925:  ^^^^^^^^^^^^^^^^^^^
    2926:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    2927:  if self.multi_rep[mode] == "Q":
    2928:  ~~~~~~~~~~~~~~^^^^^^
    2929:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    2994:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    2995:  res = hook_impl.function(*args)
    2996:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    2997:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    2998:  result = testfunction(**testargs)
    2999:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3000:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 202, in test_dm
    3001:  assert dm.name == ket.name
    3002:  AssertionError: assert 'DM01' == 'Coherent'
    ...
    
    3075:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 246, in test_quadrature_batch
    3076:  assert math.allclose(state.quadrature(quad), psi_q)
    3077:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 399, in quadrature
    3078:  if isinstance(self.representation, Fock):
    3079:  ^^^^^^^^^^^^^^^^^^^
    3080:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3081:  if self.multi_rep[mode] == "Q":
    3082:  ~~~~~~~~~~~~~~^^^^^^
    3083:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3157:  return self.dm()[modes]
    3158:  ~~~~~~~~~^^^^^^^
    3159:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3160:  representation = self.representation.trace(idxz, idxz_conj)
    3161:  ^^^^^^^^^^^^^^^^^^^
    3162:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3163:  if self.multi_rep[mode] == "Q":
    3164:  ~~~~~~~~~~~~~~^^^^^^
    3165:  IndexError: string index out of range
    ...
    
    3239:  return self.dm()[modes]
    3240:  ~~~~~~~~~^^^^^^^
    3241:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3242:  representation = self.representation.trace(idxz, idxz_conj)
    3243:  ^^^^^^^^^^^^^^^^^^^
    3244:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3245:  if self.multi_rep[mode] == "Q":
    3246:  ~~~~~~~~~~~~~~^^^^^^
    3247:  IndexError: string index out of range
    ...
    
    3321:  return self.dm()[modes]
    3322:  ~~~~~~~~~^^^^^^^
    3323:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3324:  representation = self.representation.trace(idxz, idxz_conj)
    3325:  ^^^^^^^^^^^^^^^^^^^
    3326:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3327:  if self.multi_rep[mode] == "Q":
    3328:  ~~~~~~~~~~~~~~^^^^^^
    3329:  IndexError: string index out of range
    ...
    
    3403:  return self.dm()[modes]
    3404:  ~~~~~~~~~^^^^^^^
    3405:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    3406:  representation = self.representation.trace(idxz, idxz_conj)
    3407:  ^^^^^^^^^^^^^^^^^^^
    3408:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3409:  if self.multi_rep[mode] == "Q":
    3410:  ~~~~~~~~~~~~~~^^^^^^
    3411:  IndexError: string index out of range
    ...
    
    3488:  rep = self >> self.dual
    3489:  ^^^^^^^^^
    3490:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3491:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3492:  ^^^^^^^^^^^^^^^^^^^
    3493:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3494:  if self.multi_rep[mode] == "Q":
    3495:  ~~~~~~~~~~~~~~^^^^^^
    3496:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3568:  better_cat = cat >> displacements
    3569:  ~~~~^^~~~~~~~~~~~~~~
    3570:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1194, in __rshift__
    3571:  result = super().__rshift__(other)
    3572:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3573:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 877, in __rshift__
    3574:  if not self.multi_rep[mode]:
    3575:  ~~~~~~~~~~~~~~^^^^^^
    3576:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    3641:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3642:  res = hook_impl.function(*args)
    3643:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3644:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3645:  result = testfunction(**testargs)
    3646:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3647:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3648:  assert state_in_fock == state_out
    3649:  AssertionError: assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    ...
    
    3716:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3717:  res = hook_impl.function(*args)
    3718:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3719:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3720:  result = testfunction(**testargs)
    3721:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3722:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3723:  assert state_in_fock == state_out
    3724:  AssertionError: assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    ...
    
    3797:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 550, in test_to_from_fock
    3798:  assert state_in_fock == state_out
    3799:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    3800:  self.representation == other.representation
    3801:  ^^^^^^^^^^^^^^^^^^^^
    3802:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3803:  if self.multi_rep[mode] == "Q":
    3804:  ~~~~~~~~~~~~~~^^^^^^
    3805:  IndexError: string index out of range
    ...
    
    3870:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    3871:  res = hook_impl.function(*args)
    3872:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    3873:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    3874:  result = testfunction(**testargs)
    3875:  ^^^^^^^^^^^^^^^^^^^^^^^^
    3876:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_states/test_states_base.py", line 578, in test_to_from_quadrature
    3877:  assert np.allclose(Atest2, A0)
    3878:  AssertionError: assert False
    ...
    
    3954:  rep = self >> self.dual
    3955:  ^^^^^^^^^
    3956:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    3957:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    3958:  ^^^^^^^^^^^^^^^^^^^
    3959:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    3960:  if self.multi_rep[mode] == "Q":
    3961:  ~~~~~~~~~~~~~~^^^^^^
    3962:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4036:  return math.sum(self._probabilities)
    4037:  ^^^^^^^^^^^^^^^^^^^
    4038:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 681, in _probabilities
    4039:  rep = self.representation.trace(idx_ket, idx_bra)
    4040:  ^^^^^^^^^^^^^^^^^^^
    4041:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4042:  if self.multi_rep[mode] == "Q":
    4043:  ~~~~~~~~~~~~~~^^^^^^
    4044:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4119:  dm = self @ self.adjoint
    4120:  ^^^^^^^^^^^^
    4121:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    4122:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    4123:  ^^^^^^^^^^^^^^^^^^^
    4124:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4125:  if self.multi_rep[mode] == "Q":
    4126:  ~~~~~~~~~~~~~~^^^^^^
    4127:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4199:  assert math.allclose(dm.expectation(k01), res_k01.representation.c[0])
    4200:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 221, in allclose
    4201:  return self._apply("allclose", (array1, array2, atol))
    4202:  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4203:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_manager.py", line 111, in _apply
    4204:  return attr(*args)
    4205:  ^^^^^^^^^^^
    4206:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/math/backend_tensorflow.py", line 78, in allclose
    4207:  raise ValueError("Cannot compare arrays of different shapes.")
    4208:  ValueError: Cannot compare arrays of different shapes.
    ...
    
    4286:  return self.dm()[modes]
    4287:  ~~~~~~~~~^^^^^^^
    4288:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4289:  representation = self.representation.trace(idxz, idxz_conj)
    4290:  ^^^^^^^^^^^^^^^^^^^
    4291:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4292:  if self.multi_rep[mode] == "Q":
    4293:  ~~~~~~~~~~~~~~^^^^^^
    4294:  IndexError: string index out of range
    ...
    
    4372:  return self.dm()[modes]
    4373:  ~~~~~~~~~^^^^^^^
    4374:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 891, in __getitem__
    4375:  representation = self.representation.trace(idxz, idxz_conj)
    4376:  ^^^^^^^^^^^^^^^^^^^
    4377:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4378:  if self.multi_rep[mode] == "Q":
    4379:  ~~~~~~~~~~~~~~^^^^^^
    4380:  IndexError: string index out of range
    ...
    
    4455:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4456:  ^^^^^^^^^^^^^^^^^
    4457:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4458:  if self.representation.ansatz.batch_size == 1:
    4459:  ^^^^^^^^^^^^^^^^^^^
    4460:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4461:  if self.multi_rep[mode] == "Q":
    4462:  ~~~~~~~~~~~~~~^^^^^^
    4463:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4541:  shape = [max(min_shape, d) for d in self.auto_shape()]
    4542:  ^^^^^^^^^^^^^^^^^
    4543:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/states/base.py", line 1055, in auto_shape
    4544:  if self.representation.ansatz.batch_size == 1:
    4545:  ^^^^^^^^^^^^^^^^^^^
    4546:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4547:  if self.multi_rep[mode] == "Q":
    4548:  ~~~~~~~~~~~~~~^^^^^^
    4549:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4624:  val = self.func(instance)
    4625:  ^^^^^^^^^^^^^^^^^^^
    4626:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 224, in manual_shape
    4627:  return list(self.representation.array.shape[1:])
    4628:  ^^^^^^^^^^^^^^^^^^^
    4629:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4630:  if self.multi_rep[mode] == "Q":
    4631:  ~~~~~~~~~~~~~~^^^^^^
    4632:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4700:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    4701:  result = testfunction(**testargs)
    4702:  ^^^^^^^^^^^^^^^^^^^^^^^^
    4703:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 85, in test_operation
    4704:  )
    4705:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4706:  if self.multi_rep[mode] == "Q":
    4707:  ~~~~~~~~~~~~~~^^^^^^
    4708:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4779:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4780:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4781:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4782:  self.representation == other.representation
    4783:  ^^^^^^^^^^^^^^^^^^^
    4784:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4785:  if self.multi_rep[mode] == "Q":
    4786:  ~~~~~~~~~~~~~~^^^^^^
    4787:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4858:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4859:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4860:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4861:  self.representation == other.representation
    4862:  ^^^^^^^^^^^^^^^^^^^
    4863:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4864:  if self.multi_rep[mode] == "Q":
    4865:  ~~~~~~~~~~~~~~^^^^^^
    4866:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    4937:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    4938:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    4939:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    4940:  self.representation == other.representation
    4941:  ^^^^^^^^^^^^^^^^^^^
    4942:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    4943:  if self.multi_rep[mode] == "Q":
    4944:  ~~~~~~~~~~~~~~^^^^^^
    4945:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5016:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5017:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5018:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    5019:  self.representation == other.representation
    5020:  ^^^^^^^^^^^^^^^^^^^
    5021:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5022:  if self.multi_rep[mode] == "Q":
    5023:  ~~~~~~~~~~~~~~^^^^^^
    5024:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5095:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_amplifier.py", line 111, in test_swap_with_attenuator
    5096:  assert Amp((n + 1) / n) >> Att(n / (n + 1)) == Att((n + 1) / (n + 2)) >> Amp(
    5097:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 736, in __eq__
    5098:  self.representation == other.representation
    5099:  ^^^^^^^^^^^^^^^^^^^
    5100:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5101:  if self.multi_rep[mode] == "Q":
    5102:  ~~~~~~~~~~~~~~^^^^^^
    5103:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5168:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5169:  res = hook_impl.function(*args)
    5170:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5171:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5172:  result = testfunction(**testargs)
    5173:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5174:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 88, in test_repr
    5175:  assert repr(u_component) == "CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)"
    5176:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5255:  unitary_dual = self.dual
    5256:  ^^^^^^^^^
    5257:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 202, in dual
    5258:  rep = self.representation.reorder(ib + ob + ik + ok).conj() if self.representation else None
    5259:  ^^^^^^^^^^^^^^^^^^^
    5260:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5261:  if self.multi_rep[mode] == "Q":
    5262:  ~~~~~~~~~~~~~~^^^^^^
    5263:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5328:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
    5329:  res = hook_impl.function(*args)
    5330:  ^^^^^^^^^^^^^^^^^^^^^^^^^
    5331:  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py", line 193, in pytest_pyfunc_call
    5332:  result = testfunction(**testargs)
    5333:  ^^^^^^^^^^^^^^^^^^^^^^^^
    5334:  File "/home/runner/work/MrMustard/MrMustard/tests/test_lab_dev/test_transformations/test_transformations_base.py", line 171, in test_repr
    5335:  assert repr(ch_component) == "CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)"
    5336:  AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    ...
    
    5418:  ret = self.adjoint @ (self @ other)
    5419:  ^^^^^^^^^^^^
    5420:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 183, in adjoint
    5421:  rep = self.representation.reorder(kets + bras).conj() if self.representation else None
    5422:  ^^^^^^^^^^^^^^^^^^^
    5423:  File "/home/runner/work/MrMustard/MrMustard/mrmustard/lab_dev/circuit_components.py", line 269, in representation
    5424:  if self.multi_rep[mode] == "Q":
    5425:  ~~~~~~~~~~~~~~^^^^^^
    5426:  TypeError: 'NoneType' object is not subscriptable
    ...
    
    5530:  mrmustard/utils/settings.py                                                  130      0   100%
    5531:  mrmustard/utils/typing.py                                                     29      0   100%
    5532:  mrmustard/widgets/__init__.py                                                107      2    98%   171-172
    5533:  mrmustard/widgets/css.py                                                       4      0   100%
    5534:  --------------------------------------------------------------------------------------------------------
    5535:  TOTAL                                                                       7488    818    89%
    5536:  Coverage XML written to file coverage.xml
    5537:  =========================== short test summary info ============================
    5538:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-0.1] - IndexError: string index out of range
    5539:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[0.4-x1] - IndexError: string index out of range
    5540:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-0.1] - IndexError: string index out of range
    5541:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_attributes[y1-x1] - IndexError: string index out of range
    5542:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_from_to_quadrature - TypeError: 'NoneType' object is not subscriptable
    5543:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_add - TypeError: 'NoneType' object is not subscriptable
    5544:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_sub - TypeError: 'NoneType' object is not subscriptable
    5545:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_rshift_is_associative - TypeError: 'NoneType' object is not subscriptable
    5546:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_ket - assert Ket(modes=[0]...repr=Bargmann) == Ket(modes=[0]...repr=Bargmann)
    5547:  Full diff:
    5548:  Ket(modes=[0], name=Ket0, repr=Bargmann)
    5549:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_dm - assert DM(modes=[0],...repr=Bargmann) == DM(modes=[0],...repr=Bargmann)
    5550:  Full diff:
    5551:  DM(modes=[0], name=DM0, repr=Bargmann)
    5552:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_unitary - TypeError: 'NoneType' object is not subscriptable
    5553:  FAILED tests/test_lab_dev/test_circuit_components.py::TestCircuitComponent::test_quadrature_channel - TypeError: 'NoneType' object is not subscriptable
    5554:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_bargmann_states - TypeError: 'NoneType' object is not subscriptable
    5555:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestTraceOut::test_trace_out_fock_states - TypeError: 'NoneType' object is not subscriptable
    5556:  FAILED tests/test_lab_dev/test_circuit_components_utils.py::TestBtoQ::test_BtoQ_with_displacement - assert False
    5557:  +  where False = <function allclose at 0x7f51e002c330>(<tf.Tensor: shape=(1,), dtype=complex128, numpy=array([2.19886093+2.24861283j])>, (0.6962607775770144+0.054367905108684805j))
    5558:  +    where <function allclose at 0x7f51e002c330> = np.allclose
    5559:  +    and   <tf.Tensor: shape=(1,), dtype=complex128, numpy=array([2.19886093+2.24861283j])> = <mrmustard.physics.ansatze.PolyExpAnsatz object at 0x7f511418f590>(0.6182863316746321)
    5560:  +    and   (0.6962607775770144+0.054367905108684805j) = <function TestBtoQ.test_BtoQ_with_displacement.<locals>.wavefunction_coh at 0x7f4fe04eeac0>((0.6717495312843422 + (1j * 0.5152088737781293)), 0.6182863316746321, 0.07190119594278899)
    5561:  FAILED tests/test_lab_dev/test_states/test_coherent.py::TestCoherent::test_linear_combinations - TypeError: 'NoneType' object is not subscriptable
    5562:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes0] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0]...t0, repr=Fock)
    5563:  Full diff:
    5564:  - Ket(modes=[0], name=Ket0, repr=Fock)
    5565:  ? ^                   ^  -
    5566:  + Coherent(modes=[0], name=Coherent, repr=Fock)
    5567:  ? ^^^ +++                  ^^^ +++
    5568:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes1] - assert Coherent(mode...nt, repr=Fock) == Ket(modes=[0,...01, repr=Fock)
    5569:  Full diff:
    5570:  - Ket(modes=[0, 1], name=Ket01, repr=Fock)
    5571:  ? ^                      ^  --
    5572:  + Coherent(modes=[0, 1], name=Coherent, repr=Fock)
    5573:  ? ^^^ +++                     ^^^ +++
    5574:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_fock[modes2] - IndexError: string index out of range
    5575:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes0] - assert Ket(modes=[0]...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5576:  Full diff:
    5577:  - Vacuum(modes=[0], name=Vac, repr=Bargmann)
    5578:  ? ^^^^^^                 ^^^
    5579:  + Ket(modes=[0], name=Ket0, repr=Bargmann)
    5580:  ? ^^^                 ^^^^
    5581:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes1] - assert Ket(modes=[0,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5582:  Full diff:
    5583:  - Vacuum(modes=[0, 1], name=Vac, repr=Bargmann)
    5584:  ? ^^^^^^                    ^^^
    5585:  + Ket(modes=[0, 1], name=Ket01, repr=Bargmann)
    5586:  ? ^^^                    ^^^^^
    5587:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_phase_space[modes2] - assert Ket(modes=[2,...repr=Bargmann) == Vacuum(modes=...repr=Bargmann)
    5588:  Full diff:
    5589:  - Vacuum(modes=[2, 3, 19], name=Vac, repr=Bargmann)
    5590:  ? ^^^^^^                        ^^^
    5591:  + Ket(modes=[2, 3, 19], name=Ket2319, repr=Bargmann)
    5592:  ? ^^^                        ^^^^^^^
    5593:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_to_from_quadrature - assert <tf.Tensor: shape=(), dtype=bool, numpy=False>
    5594:  +  where <tf.Tensor: shape=(), dtype=bool, numpy=False> = <bound method BackendManager.allclose of Backend(tensorflow)>(<tf.Tensor: shape=(1, 1), dtype=complex128, numpy=array([[1.+1.2246468e-16j]])>, array([[0]]))
    5595:  +    where <bound method BackendManager.allclose of Backend(tensorflow)> = Backend(tensorflow).allclose
    5596:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_probability - TypeError: 'NoneType' object is not subscriptable
    5597:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_dm - AssertionError: assert 'DM01' == 'Coherent'
    5598:  - Coherent
    5599:  + DM01
    5600:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5601:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m0-modes0] - IndexError: string index out of range
    5602:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m1-modes0] - IndexError: string index out of range
    5603:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m2-modes0] - IndexError: string index out of range
    5604:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_get_item[m3-modes0] - IndexError: string index out of range
    5605:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_private_batched_properties - TypeError: 'NoneType' object is not subscriptable
    5606:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestKet::test_unsafe_batch_zipping - TypeError: 'NoneType' object is not subscriptable
    5607:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes0] - assert DM(modes=[0],...M0, repr=Fock) == DM(modes=[0],...M0, repr=Fock)
    5608:  Full diff:
    5609:  DM(modes=[0], name=DM0, repr=Fock)
    5610:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes1] - assert DM(modes=[0, ...01, repr=Fock) == DM(modes=[0, ...01, repr=Fock)
    5611:  Full diff:
    5612:  DM(modes=[0, 1], name=DM01, repr=Fock)
    5613:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_fock[modes2] - IndexError: string index out of range
    5614:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_to_from_quadrature - assert False
    5615:  +  where False = <function allclose at 0x7f51e002c330>(<tf.Tensor: shape=(2, 2), dtype=complex128, numpy=\narray([[0.+0.0000000e+00j, 0.+0.0000000e+00j],\n       [0.+0.0000000e+00j, 1.+1.2246468e-16j]])>, array([[0, 0],\n       [0, 0]]))
    5616:  +    where <function allclose at 0x7f51e002c330> = np.allclose
    5617:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_L2_norms - TypeError: 'NoneType' object is not subscriptable
    5618:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_probability - TypeError: 'NoneType' object is not subscriptable
    5619:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_quadrature_batch - TypeError: 'NoneType' object is not subscriptable
    5620:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_expectation_bargmann_ket - ValueError: Cannot compare arrays of different shapes.
    5621:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_random[modes0] - IndexError: string index out of range
    5622:  FAILED tests/test_lab_dev/test_states/test_states_base.py::TestDM::test_is_physical[modes0] - IndexError: string index out of range
    5623:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_2d - TypeError: 'NoneType' object is not subscriptable
    5624:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_3d - TypeError: 'NoneType' object is not subscriptable
    5625:  FAILED tests/test_lab_dev/test_states/test_states_visualization.py::TestVisualization::test_visualize_dm - TypeError: 'NoneType' object is not subscriptable
    5626:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_operation - TypeError: 'NoneType' object is not subscriptable
    5627:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[1] - TypeError: 'NoneType' object is not subscriptable
    5628:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[2] - TypeError: 'NoneType' object is not subscriptable
    5629:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[3] - TypeError: 'NoneType' object is not subscriptable
    5630:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[4] - TypeError: 'NoneType' object is not subscriptable
    5631:  FAILED tests/test_lab_dev/test_transformations/test_amplifier.py::TestAmplifier::test_swap_with_attenuator[5] - TypeError: 'NoneType' object is not subscriptable
    5632:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5633:  - CircuitComponent(modes=[0, 1], name=Dgate, repr=Bargmann)
    5634:  ?                                     ^^^^^
    5635:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5636:  ?                                     ^^^^
    5637:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestUnitary::test_inverse_unitary - TypeError: 'NoneType' object is not subscriptable
    5638:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_repr - AssertionError: assert 'CircuitCompo...epr=Bargmann)' == 'CircuitCompo...epr=Bargmann)'
    5639:  - CircuitComponent(modes=[0, 1], name=Att, repr=Bargmann)
    5640:  ?                                     ^^^
    5641:  + CircuitComponent(modes=[0, 1], name=CC01, repr=Bargmann)
    5642:  ?                                     ^^^^
    5643:  FAILED tests/test_lab_dev/test_transformations/test_transformations_base.py::TestChannel::test_inverse_channel - TypeError: 'NoneType' object is not subscriptable
    5644:  ================= 55 failed, 1577 passed in 788.75s (0:13:08) ==================
    5645:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @arsalan-motamedi arsalan-motamedi added the WIP work in progress label Sep 12, 2024
    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: changelog

    Failed stage: check changelog entry [❌]

    Failed test name: ""

    Failure summary:

    The action failed because the command git diff --name-only -r HEAD^1 HEAD | grep
    .github/CHANGELOG.md returned a non-zero exit code. This indicates that the expected file
    .github/CHANGELOG.md was not found in the changes between the current and previous commit.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    511:  HEAD is now at 76191ca Merge adfa877d48666c5f04c51586a5f78ce011567b9c into 1ddafdb29ef5d79517e7652e3dec7dca6d9f476e
    512:  ##[endgroup]
    513:  [command]/usr/bin/git log -1 --format='%H'
    514:  '76191ca9204880074168c659172517ca0aea7249'
    515:  ##[group]Run git diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md
    516:  �[36;1mgit diff --name-only -r HEAD^1 HEAD | grep .github/CHANGELOG.md�[0m
    517:  shell: /usr/bin/bash -e {0}
    518:  ##[endgroup]
    519:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @arsalan-motamedi arsalan-motamedi added the no changelog Pull request does not require a CHANGELOG entry label Sep 12, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    enhancement New feature or request no changelog Pull request does not require a CHANGELOG entry Review effort [1-5]: 4 WIP work in progress
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant