Repository navigation
refactor: replace Logger with logging module and fix timings (#86, #87 F41) - #94
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Oct 17, 2026
ondrik
force-pushed
the
fix/86-logging
branch
from
October 22, 2026 09:47
d88655a to
fda5253
Compare
…es regarding logging (wrong times...)
Since the empty circuit is tried first (#67), Gurobi with FiveTuple on the 2-qubit GHZ circuit fails at depth 2 under the size-limited license ("Model too large for size-limited license"), as CI has it. With Classic, these tests fit the license again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177AhE9SXm3iJ1KP8GTSk6o
ondrik
force-pushed
the
fix/86-logging
branch
from
October 26, 2026 22:09
fda5253 to
defe80c
Compare
ondrik
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the custom
Loggerwith the stdlibloggingmodule and a smallsrc/timing.py. CLI now decides where output goes: by default it prints only the result, the phase times and the circuit.Fixes #86
Part of #87 (fixes F41; F65, the simulator stats, is still open)
Refs #76 (logging only: F14, F32)
What this resolves
#86, F34: every
Synthesizertruncated./synth.logSynthesizer()no longer opens a file. Only the CLI configures logging (logging.basicConfiginmilq).#86, F75: unused verbosity, warnings never reached the console
Logger.verbosityis replaced by a working--verboseflag (see below).Synthesizer.stats(a duplicate of the times) is removed.#87, F41: wrong phase timings
basic,binary,topdownandbottomupnow record encoding time. They used to report 0.pareto-incremental: worker processes send back their solving and parsing times, which used to be lost, and the parent adds them up.encoding + solving + parsing + updating <= fullnow holds in every mode.#76 (logging only, behaviour unchanged)
Solver returned UNKNOWNorUNSATinstead ofUNKNOWN/UNSAT.printto stdTimings
timing.timed(name)is a context manager that adds to a process-widetimesdict. A phase that raises still counts.Each
synthesis()stores its own times insynthesizer.times, with the solving and updating. This replacessynthesizer.logger.get_times().Nested syntheses are handled, so a RUS recovery synthesis can run in-process later:
synthesizer.timesholds only its own share.synthesis(output_qasm=None)is the new default: no files are written. When no ouput_qasm is set, the formula etc. is written into tmp, which is then removed after the synthesis ends, and all the output is on stdout.--log [PATH]synth.logby default); warnings--verbose--log --verbose-ois optional. Without it, the circuit is only printed.Gurobi: the license banner and "Set parameter" lines no longer go to stdout, for both
-s gurobiand-s milp -a gurobi. They appear in the log when there is one.Full suite: 518 passed.