-
Notifications
You must be signed in to change notification settings - Fork 15
WIP: Refactor config toml SG #107
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
base: refactor-config-toml
Are you sure you want to change the base?
Conversation
New Jkl and crosskerr format:
Jkl = { "0-1" = <J01>, "3-5"=<val>, ...}
Remove collapse_type, instead use inline table for decoherence, containing its type, and the decay and decoherence types.
tdrwenski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the decoherence and optim_tolerance changes! That setting update and the code changes look good. I'm not sure about crosskerr/Jkl-- see other comment.
| Jkl = [0.0] | ||
| # Cross-kerr coupling strength for oscillators k<->l ("\xi_kl", multiplying a_k^d a_k a_l^d a_l, GHz). | ||
| # Format: table with keys "k-l" (e.g., "0-1") specifying coupling between oscillators k and l. Unspecified couplings default to zero. E.g. { "0-1" = <val>, "2-4" = <val>} | ||
| crosskerr = { "0-1" = 0.1 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still prefer not to put oscillator indexes into the toml keys. Keys should identify which thing you're configuring, not describe the contents of that thing. And you can't make the key an integer (it must be a string), so by putting the oscillator indexes there you add an extra string parsing step.
How about something like this:
crosskerr = [
{ oscillators = [0, 1], value = 0.1 },
{ oscillators = [1, 2], value = 0.05 }
]
This removes two toml configuration options: * optim_penalty * optim_penalty_param And instead adds three new options to replace them: * optim_penalty_leakage * optim_penalty_weightedcost * optim_penalty_weightedcost_width Before this change, the leakage term and the weighted running cost term were both controlled by the same option (optim_penalty). Now, those options can be specified separately. Their calculation in the timestepper is also split up into two separate functions. Naming of those functions and their treatment in the optimization problem is improved.
Multiple control segments for one oscillator are no longer supported.
Ensures backward compatibility with old cfg files using 'pure'.
Adds a testcase for reading cnot from file. Verified with main branch.
No description provided.