{"id":27778,"library":"ga-vqc","title":"Genetic Algorithm for VQC ansatz search","description":"GA-VQC provides a genetic algorithm to automatically search for optimal variational quantum circuit (VQC) ansätze for quantum machine learning tasks. Version 1.0.14 is the latest; development appears to be active on GitHub.","status":"active","version":"1.0.14","language":"python","source_language":"en","source_url":"https://github.com/tcoulvert/GA_Ansatz_Search","tags":["quantum computing","genetic algorithm","VQC","ansatz search","quantum machine learning"],"install":[{"cmd":"pip install ga-vqc","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Numerical operations","package":"numpy","optional":false},{"reason":"Machine learning utilities","package":"scikit-learn","optional":false},{"reason":"Quantum computing backend","package":"qiskit","optional":false}],"imports":[{"note":"Module name uses lowercase 'gavqc', not hyphen or underscore.","wrong":"from ga_vqc import GenAlg","symbol":"GenAlg","correct":"from gavqc import GenAlg"},{"note":"VQCAnsatz is exported from top-level gavqc.","wrong":"from ga_vqc.ansatz import VQCAnsatz","symbol":"VQCAnsatz","correct":"from gavqc import VQCAnsatz"}],"quickstart":{"code":"from gavqc import GenAlg\nfrom qiskit.circuit import QuantumCircuit\nfrom qiskit.circuit.library import RealAmplitudes\nimport numpy as np\n\n# Example: optimize a simple circuit structure\nansatz = RealAmplitudes(2, reps=1)\nX = np.random.rand(10, 2)\ny = np.random.randint(0, 2, 10)\n\nga = GenAlg(\n    ansatz=ansatz,\n    X=X, y=y,\n    generations=10,\n    population_size=10,\n    mutation_rate=0.1\n)\nga.run()\nprint(\"Best fitness:\", ga.best_fitness)\nprint(\"Best circuit:\", ga.best_circuit)","lang":"python","description":"Minimal example to run genetic algorithm for VQC ansatz search."},"warnings":[{"fix":"Use 'from gavqc import ...' instead of 'import ga_vqc'.","message":"Import path changed: module name is 'gavqc' (not 'ga_vqc' or 'ga-vqc').","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Access results via the GenAlg instance after calling run().","message":"GenAlg.run() modifies the instance; best circuit stored in GenAlg.best_circuit attribute.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Qiskit 0.45+.","message":"Support for Qiskit <0.45 is dropped.","severity":"deprecated","affected_versions":">=1.0.10"}],"env_vars":null,"search_vec":"'1.0.14':30 'activ':38 'algorithm':2,13,44 'ansatz':5,46 'ansätz':23 'appear':35 'automat':15 'circuit':21 'comput':42 'develop':34 'ga':8 'ga-vqc':7 'genet':1,12,43 'github':40 'latest':33 'learn':27,50 'machin':26,49 'optim':18 'provid':10 'quantum':20,25,41,48 'search':6,16,47 'task':28 'variat':19 'version':29 'vqc':4,9,22,45","created_at":"2026-05-09T05:52:02.517859+00:00","updated_at":"2026-05-09T05:52:02.517859+00:00","problems":{"verify_error":"× Failed to build `qulacs-gpu==0.3.1`\n  ├─▶ The build backend returned an error\n  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit\n      status: 1)\n\n      [stdout]\n      running bdist_wheel\n      running build\n      running build_ext\n\n      [stderr]\n      /home/xor/.cache/uv/b"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/tcoulvert/GA_Ansatz_Search","docs":null,"changelog":null,"pypi":"https://pypi.org/project/ga-vqc/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-06","install_tag":null}}