toqito icon indicating copy to clipboard operation
toqito copied to clipboard

Move channel dim to channel props

Open vprusso opened this issue 1 year ago • 4 comments

It seems as if the helper/channel_dim.py file should live instead in channel_props/channel_dim.py as this is a property of a given quantum channel.

vprusso avatar Jul 13 '24 15:07 vprusso

This is a duplicate of #244

The failures in #680 are identical to the attempts I made to resolve the issue. Still don't know the cause behind TypeError: 'module' object is not callable

purva-thakre avatar Jul 14 '24 15:07 purva-thakre

Okay, so I think I fixed this issue. Changes the import pattern a bit, but it works. Let me know what you think, @purva-thakre

vprusso avatar Jul 15 '24 17:07 vprusso

Yes, but shouldn't we be consistent with all the other input patterns? I think the issue I ran into was the problem persists if we apply the same input pattern to all of them. If we use ruff for formatting, it will catch these differences.

I say we keep this or the other issue open to understand why one input pattern works while the other doesn't.

purva-thakre avatar Jul 15 '24 21:07 purva-thakre

Yes, I agree. It's definitely an awkward hack that is not consistent with the way we do things elsewhere. It's a difficult bug to diagnose as running the tests for channel_props/ works fine without altering the pattern but then trying to run all the tests seems to fail if that pattern is not used. It's probably some "circular-import-type-thing" but it's not obvious to me what it is.

Agree with keeping the issue open and attempting to fix properly.

vprusso avatar Jul 15 '24 21:07 vprusso