Skip to content

ValueError when running the TQA method with optimization and Statevector for the MIS problem #41

@Joel323

Description

@Joel323

Environment

  • Qiskit version: 1.4.4
  • Python version: 3.11.13
  • Operating system: Rocky Linux 8.10 (Green Obsidian)

What is happening?

I get a ValueError: The QAOA Circuit does not have the correct number of parameters after running the TQA method with posteriot re-optimization and Statevector evaluation for the MIS problem.

How can we reproduce the issue?

Execute the TQA method with posterior optimization using Statevector evaluator using the config file below (method JSON file), and using --problem_class mis when running the pipeline via command line. A command example can be found below.

Method JSON file:

{
    "trainer_chain": [
        {
            "trainer": "TQATrainer",
            "trainer_init": {
                "evaluator": "StatevectorEvaluator",
                "evaluator_init": {}
            },
            "train_kwargs": {}
        },
        {
            "trainer": "ScipyTrainer",
            "trainer_init": {
                "evaluator": "StatevectorEvaluator",
                "evaluator_init": {},
                "minimize_args": {"options": {"maxiter": 100, "rhobeg": 0.2}}
            },
            "train_kwargs": {
                "result": {
                    "optimized_params": "params0"
                }
            }
        }
    ],
    "description": "TQATrainer with StatevectorEvaluator"
}

Command example:

python -m train --input INPUT_FILE --config METHOD_FILE --save --save_dir SAVE_DIR --save_file SAVE_FILE --problem_class mis --train_kwargs0 reps:2

What should happen?

The ValueError should not be happening

Any suggestions?

No response

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