Skip to content

Conversation

@mtfishman
Copy link
Member

@mtfishman mtfishman commented Jan 23, 2025

To-do:

  • Split off parts that are specific to ITensor, and rename the package to QuantumOperatorDefinitions.jl.
  • Add tests.
  • Generalize generic state constructors to accept domain sizes as an alternative to site types, i.e. Vector(StateName("1"), 3) == [0, 1, 0] as an alternative notation to Vector(StateName("1"), SiteType("Qudit"; length=3)).
  • Bring back op/state definitions, with one layer that accepts integer sizes and site types, and another that accepts Index objects and constructs ITensors. That will allow the simpler notation op("X", 3) to make a 3x3 X operator.
  • Bring back string parsing of operators, i.e. OpName("X * Y") == OpName("X") * OpName("Y") (implemented in a new function opexpr("X * Y") == OpName("X") * OpName("Y") but that isn't used in OpName/op constructors yet).

Future PRs:

@codecov
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 28.04233% with 272 lines in your changes missing coverage. Please review.

Project coverage is 24.65%. Comparing base (c04f2fc) to head (6cce957).

Files with missing lines Patch % Lines
src/op.jl 42.94% 97 Missing ⚠️
src/sitetypes/electron.jl 0.00% 83 Missing ⚠️
src/sitetypes/qubit.jl 6.06% 31 Missing ⚠️
src/state.jl 58.69% 19 Missing ⚠️
src/sitetypes/spinone.jl 0.00% 15 Missing ⚠️
src/sitetype.jl 30.76% 9 Missing ⚠️
src/sitetypes/fermion.jl 0.00% 9 Missing ⚠️
src/sitetypes/tj.jl 0.00% 7 Missing ⚠️
src/sitetypes/qudit.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main       #3       +/-   ##
===========================================
+ Coverage   12.73%   24.65%   +11.91%     
===========================================
  Files          21       10       -11     
  Lines         683      430      -253     
===========================================
+ Hits           87      106       +19     
+ Misses        596      324      -272     
Flag Coverage Δ
docs 24.65% <28.04%> (+13.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtfishman mtfishman changed the title [WIP] Rewrite Rewrite Jan 24, 2025
@mtfishman mtfishman merged commit 8f6a233 into main Jan 24, 2025
10 checks passed
@mtfishman mtfishman deleted the rewrite branch January 24, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants