Skip to content

Without output_qasm, pareto-incremental still writes pareto_front/ and pareto_front.pdf #112

Open

Description

@ondrik

docs/reference.md:92 says:

Without output_qasm, no files are written: the circuit and the last formula go to a temporary directory that is removed when synthesis() returns.

The synthesis() docstring (src/synth.py:776) says the same ("None writes no files"). For mode="pareto-incremental" this isn't true. Every point of the front still goes to pareto_front/ and the plot to pareto_front.pdf, both in the working directory (src/pareto.py:116 and src/pareto.py:135-138).

Minimal example (in an empty directory, with yices2 configured):

import sys
sys.path.insert(0, "/path/to/milq/src")
from synth import Synthesizer

# no output_qasm: per the docs, no files should be written
Synthesizer().synthesis(qasm_file="/path/to/milq/benchmarks/ghz/2.qasm", vectors="zero", solving="smt",
                        solver="yices2", mode="pareto-incremental", pareto_timeout=60, max_depth=2)

Afterwards the directory contains:

pareto_front.pdf
pareto_front/pareto_2_2_2.000_1.qasm
pareto_front/pareto_2_2_2.000_2.qasm

docs/usage.md already mentions these files, and the behaviour predates the logging rewrite (#94), which added the sentence. There are two ways to fix it:

  1. Docs only: add an exception for pareto-incremental to the reference and the docstring.
  2. Code: without output_qasm, put pareto_front/ and the plot in the temporary directory too, so the sentence becomes true.

Found on master e5a5216.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions