diff --git a/.settings/module_db.json b/.settings/module_db.json index 2fc22e51..5ca5d743 100644 --- a/.settings/module_db.json +++ b/.settings/module_db.json @@ -1,2338 +1,2856 @@ -{ - "build_number": 7, - "build_date": "20-03-2024 12:51:58", - "git_revision_number": "3be6f3847150d4bb8debee2451522b0b19fa205f", - "modules": [ - { - "name": "PVC", - "class": "PVC", - "module": "modules.applications.optimization.PVC.PVC", - "submodules": [ - { - "name": "Ising", - "class": "Ising", - "args": {}, - "module": "modules.applications.optimization.PVC.mappings.ISING", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "dimod", - "version": "0.12.5" - }, - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "QAOA", - "class": "QAOA", - "args": {}, - "module": "modules.solvers.QAOA", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "scipy", - "version": "1.10.1" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "LocalSimulator", - "class": "LocalSimulator", - "args": { - "device_name": "LocalSimulator" - }, - "module": "modules.devices.braket.LocalSimulator", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionQ", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti Aspen-9", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - } - ] - }, - { - "name": "PennylaneQAOA", - "class": "PennylaneQAOA", - "args": {}, - "module": "modules.solvers.PennylaneQAOA", - "requirements": [ - { - "name": "pennylane", - "version": "0.28.0" - }, - { - "name": "pennylane-lightning", - "version": "0.28.0" - }, - { - "name": "amazon-braket-pennylane-plugin", - "version": "1.5.2" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionq", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", - "class": "OQC", - "args": { - "device_name": "OQC", - "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" - }, - "module": "modules.devices.braket.OQC", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "braket.local.qubit", - "class": "HelperClass", - "args": { - "device_name": "braket.local.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit", - "class": "HelperClass", - "args": { - "device_name": "default.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit.autograd", - "class": "HelperClass", - "args": { - "device_name": "default.qubit.autograd" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "qulacs.simulator", - "class": "HelperClass", - "args": { - "device_name": "qulacs.simulator" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.gpu", - "class": "HelperClass", - "args": { - "device_name": "lightning.gpu" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.qubit", - "class": "HelperClass", - "args": { - "device_name": "lightning.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - } - ] - } - ] - }, - { - "name": "QUBO", - "class": "QUBO", - "args": {}, - "module": "modules.applications.optimization.PVC.mappings.QUBO", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Annealer", - "class": "Annealer", - "args": {}, - "module": "modules.solvers.Annealer", - "requirements": [], - "submodules": [ - { - "name": "Simulated Annealer", - "class": "SimulatedAnnealingSampler", - "args": {}, - "module": "modules.devices.SimulatedAnnealingSampler", - "requirements": [ - { - "name": "dwave-samplers", - "version": "1.0.0" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "GreedyClassicalPVC", - "class": "GreedyClassicalPVC", - "args": {}, - "module": "modules.solvers.GreedyClassicalPVC", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "ReverseGreedyClassicalPVC", - "class": "ReverseGreedyClassicalPVC", - "args": {}, - "module": "modules.solvers.ReverseGreedyClassicalPVC", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "RandomPVC", - "class": "RandomPVC", - "args": {}, - "module": "modules.solvers.RandomClassicalPVC", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - } - ], - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ] - }, - { - "name": "SAT", - "class": "SAT", - "module": "modules.applications.optimization.SAT.SAT", - "submodules": [ - { - "name": "QubovertQUBO", - "class": "QubovertQUBO", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.QubovertQUBO", - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - }, - { - "name": "qubovert", - "version": "1.2.5" - } - ], - "submodules": [ - { - "name": "Annealer", - "class": "Annealer", - "args": {}, - "module": "modules.solvers.Annealer", - "requirements": [], - "submodules": [ - { - "name": "Simulated Annealer", - "class": "SimulatedAnnealingSampler", - "args": {}, - "module": "modules.devices.SimulatedAnnealingSampler", - "requirements": [ - { - "name": "dwave-samplers", - "version": "1.0.0" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "Direct", - "class": "Direct", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.Direct", - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - }, - { - "name": "python-sat", - "version": "0.1.7.dev26" - } - ], - "submodules": [ - { - "name": "ClassicalSAT", - "class": "ClassicalSAT", - "args": {}, - "module": "modules.solvers.ClassicalSAT", - "requirements": [ - { - "name": "python-sat", - "version": "0.1.7.dev26" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "RandomSAT", - "class": "RandomSAT", - "args": {}, - "module": "modules.solvers.RandomClassicalSAT", - "requirements": [ - { - "name": "python-sat", - "version": "0.1.7.dev26" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - } - ] - }, - { - "name": "ChoiQUBO", - "class": "ChoiQUBO", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.ChoiQUBO", - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - } - ], - "submodules": [ - { - "name": "Annealer", - "class": "Annealer", - "args": {}, - "module": "modules.solvers.Annealer", - "requirements": [], - "submodules": [ - { - "name": "Simulated Annealer", - "class": "SimulatedAnnealingSampler", - "args": {}, - "module": "modules.devices.SimulatedAnnealingSampler", - "requirements": [ - { - "name": "dwave-samplers", - "version": "1.0.0" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "DinneenQUBO", - "class": "DinneenQUBO", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.DinneenQUBO", - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - } - ], - "submodules": [ - { - "name": "Annealer", - "class": "Annealer", - "args": {}, - "module": "modules.solvers.Annealer", - "requirements": [], - "submodules": [ - { - "name": "Simulated Annealer", - "class": "SimulatedAnnealingSampler", - "args": {}, - "module": "modules.devices.SimulatedAnnealingSampler", - "requirements": [ - { - "name": "dwave-samplers", - "version": "1.0.0" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "ChoiIsing", - "class": "ChoiIsing", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.ChoiISING", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "dimod", - "version": "0.12.5" - }, - { - "name": "nnf", - "version": "0.4.1" - } - ], - "submodules": [ - { - "name": "QAOA", - "class": "QAOA", - "args": {}, - "module": "modules.solvers.QAOA", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "scipy", - "version": "1.10.1" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "LocalSimulator", - "class": "LocalSimulator", - "args": { - "device_name": "LocalSimulator" - }, - "module": "modules.devices.braket.LocalSimulator", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionQ", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti Aspen-9", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - } - ] - }, - { - "name": "PennylaneQAOA", - "class": "PennylaneQAOA", - "args": {}, - "module": "modules.solvers.PennylaneQAOA", - "requirements": [ - { - "name": "pennylane", - "version": "0.28.0" - }, - { - "name": "pennylane-lightning", - "version": "0.28.0" - }, - { - "name": "amazon-braket-pennylane-plugin", - "version": "1.5.2" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionq", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", - "class": "OQC", - "args": { - "device_name": "OQC", - "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" - }, - "module": "modules.devices.braket.OQC", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "braket.local.qubit", - "class": "HelperClass", - "args": { - "device_name": "braket.local.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit", - "class": "HelperClass", - "args": { - "device_name": "default.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit.autograd", - "class": "HelperClass", - "args": { - "device_name": "default.qubit.autograd" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "qulacs.simulator", - "class": "HelperClass", - "args": { - "device_name": "qulacs.simulator" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.gpu", - "class": "HelperClass", - "args": { - "device_name": "lightning.gpu" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.qubit", - "class": "HelperClass", - "args": { - "device_name": "lightning.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - } - ] - } - ] - }, - { - "name": "DinneenIsing", - "class": "DinneenIsing", - "args": {}, - "module": "modules.applications.optimization.SAT.mappings.DinneenISING", - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - }, - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "dimod", - "version": "0.12.5" - }, - { - "name": "nnf", - "version": "0.4.1" - } - ], - "submodules": [ - { - "name": "QAOA", - "class": "QAOA", - "args": {}, - "module": "modules.solvers.QAOA", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "scipy", - "version": "1.10.1" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "LocalSimulator", - "class": "LocalSimulator", - "args": { - "device_name": "LocalSimulator" - }, - "module": "modules.devices.braket.LocalSimulator", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionQ", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti Aspen-9", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - } - ] - }, - { - "name": "PennylaneQAOA", - "class": "PennylaneQAOA", - "args": {}, - "module": "modules.solvers.PennylaneQAOA", - "requirements": [ - { - "name": "pennylane", - "version": "0.28.0" - }, - { - "name": "pennylane-lightning", - "version": "0.28.0" - }, - { - "name": "amazon-braket-pennylane-plugin", - "version": "1.5.2" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionq", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", - "class": "OQC", - "args": { - "device_name": "OQC", - "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" - }, - "module": "modules.devices.braket.OQC", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "braket.local.qubit", - "class": "HelperClass", - "args": { - "device_name": "braket.local.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit", - "class": "HelperClass", - "args": { - "device_name": "default.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit.autograd", - "class": "HelperClass", - "args": { - "device_name": "default.qubit.autograd" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "qulacs.simulator", - "class": "HelperClass", - "args": { - "device_name": "qulacs.simulator" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.gpu", - "class": "HelperClass", - "args": { - "device_name": "lightning.gpu" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.qubit", - "class": "HelperClass", - "args": { - "device_name": "lightning.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - } - ] - } - ] - } - ], - "requirements": [ - { - "name": "nnf", - "version": "0.4.1" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ] - }, - { - "name": "TSP", - "class": "TSP", - "module": "modules.applications.optimization.TSP.TSP", - "submodules": [ - { - "name": "Ising", - "class": "Ising", - "args": {}, - "module": "modules.applications.optimization.TSP.mappings.ISING", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "dimod", - "version": "0.12.5" - }, - { - "name": "more-itertools", - "version": "9.0.0" - }, - { - "name": "qiskit-optimization", - "version": "0.5.0" - }, - { - "name": "pyqubo", - "version": "1.4.0" - }, - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "dwave_networkx", - "version": "0.8.13" - } - ], - "submodules": [ - { - "name": "QAOA", - "class": "QAOA", - "args": {}, - "module": "modules.solvers.QAOA", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "scipy", - "version": "1.10.1" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "LocalSimulator", - "class": "LocalSimulator", - "args": { - "device_name": "LocalSimulator" - }, - "module": "modules.devices.braket.LocalSimulator", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionQ", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti Aspen-9", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - } - ] - }, - { - "name": "PennylaneQAOA", - "class": "PennylaneQAOA", - "args": {}, - "module": "modules.solvers.PennylaneQAOA", - "requirements": [ - { - "name": "pennylane", - "version": "0.28.0" - }, - { - "name": "pennylane-lightning", - "version": "0.28.0" - }, - { - "name": "amazon-braket-pennylane-plugin", - "version": "1.5.2" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", - "class": "SV1", - "args": { - "device_name": "SV1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" - }, - "module": "modules.devices.braket.SV1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", - "class": "TN1", - "args": { - "device_name": "TN1", - "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" - }, - "module": "modules.devices.braket.TN1", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", - "class": "Ionq", - "args": { - "device_name": "ionq", - "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" - }, - "module": "modules.devices.braket.Ionq", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", - "class": "Rigetti", - "args": { - "device_name": "Rigetti", - "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" - }, - "module": "modules.devices.braket.Rigetti", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", - "class": "OQC", - "args": { - "device_name": "OQC", - "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" - }, - "module": "modules.devices.braket.OQC", - "requirements": [ - { - "name": "amazon-braket-sdk", - "version": "1.35.1" - }, - { - "name": "botocore", - "version": "1.25.7" - }, - { - "name": "boto3", - "version": "1.22.7" - } - ], - "submodules": [] - }, - { - "name": "braket.local.qubit", - "class": "HelperClass", - "args": { - "device_name": "braket.local.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit", - "class": "HelperClass", - "args": { - "device_name": "default.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "default.qubit.autograd", - "class": "HelperClass", - "args": { - "device_name": "default.qubit.autograd" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "qulacs.simulator", - "class": "HelperClass", - "args": { - "device_name": "qulacs.simulator" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.gpu", - "class": "HelperClass", - "args": { - "device_name": "lightning.gpu" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "lightning.qubit", - "class": "HelperClass", - "args": { - "device_name": "lightning.qubit" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "QiskitQAOA", - "class": "QiskitQAOA", - "args": {}, - "module": "modules.solvers.QiskitQAOA", - "requirements": [ - { - "name": "qiskit", - "version": "0.40.0" - }, - { - "name": "qiskit-optimization", - "version": "0.5.0" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "qasm_simulator", - "class": "HelperClass", - "args": { - "device_name": "qasm_simulator" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "qasm_simulator_gpu", - "class": "HelperClass", - "args": { - "device_name": "qasm_simulator_gpu" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - }, - { - "name": "ibm_eagle", - "class": "HelperClass", - "args": { - "device_name": "ibm_eagle" - }, - "module": "modules.devices.HelperClass", - "requirements": [], - "submodules": [] - } - ] - } - ] - }, - { - "name": "QUBO", - "class": "QUBO", - "args": {}, - "module": "modules.applications.optimization.TSP.mappings.QUBO", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "dwave_networkx", - "version": "0.8.13" - } - ], - "submodules": [ - { - "name": "Annealer", - "class": "Annealer", - "args": {}, - "module": "modules.solvers.Annealer", - "requirements": [], - "submodules": [ - { - "name": "Simulated Annealer", - "class": "SimulatedAnnealingSampler", - "args": {}, - "module": "modules.devices.SimulatedAnnealingSampler", - "requirements": [ - { - "name": "dwave-samplers", - "version": "1.0.0" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "GreedyClassicalTSP", - "class": "GreedyClassicalTSP", - "args": {}, - "module": "modules.solvers.GreedyClassicalTSP", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "ReverseGreedyClassicalTSP", - "class": "ReverseGreedyClassicalTSP", - "args": {}, - "module": "modules.solvers.ReverseGreedyClassicalTSP", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - }, - { - "name": "RandomTSP", - "class": "RandomTSP", - "args": {}, - "module": "modules.solvers.RandomClassicalTSP", - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - } - ], - "submodules": [ - { - "name": "Local", - "class": "Local", - "args": {}, - "module": "modules.devices.Local", - "requirements": [], - "submodules": [] - } - ] - } - ], - "requirements": [ - { - "name": "networkx", - "version": "2.8.8" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ] - }, - { - "name": "GenerativeModeling", - "class": "GenerativeModeling", - "module": "modules.applications.QML.generative_modeling.GenerativeModeling", - "submodules": [ - { - "name": "Continuous Data", - "class": "ContinuousData", - "args": {}, - "module": "modules.applications.QML.generative_modeling.data.data_handler.ContinuousData", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "PIT", - "class": "PIT", - "args": {}, - "module": "modules.applications.QML.generative_modeling.transformations.PIT", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "pandas", - "version": "1.5.2" - } - ], - "submodules": [ - { - "name": "CircuitCopula", - "class": "CircuitCopula", - "args": {}, - "module": "modules.circuits.CircuitCopula", - "requirements": [ - { - "name": "scipy", - "version": "1.11.1" - } - ], - "submodules": [ - { - "name": "LibraryQiskit", - "class": "LibraryQiskit", - "args": {}, - "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", - "requirements": [ - { - "name": "qiskit", - "version": "0.40.0" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "QCBM", - "class": "QCBM", - "args": {}, - "module": "modules.training.QCBM", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "cma", - "version": "3.3.0" - }, - { - "name": "tensorboard", - "version": "2.13.0" - }, - { - "name": "tensorboardX", - "version": "2.6.2" - } - ], - "submodules": [] - }, - { - "name": "Inference", - "class": "Inference", - "args": {}, - "module": "modules.training.Inference", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [] - } - ] - } - ] - } - ] - }, - { - "name": "MinMax", - "class": "MinMax", - "args": {}, - "module": "modules.applications.QML.generative_modeling.transformations.MinMax", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "CircuitStandard", - "class": "CircuitStandard", - "args": {}, - "module": "modules.circuits.CircuitStandard", - "requirements": [ - { - "name": "scipy", - "version": "1.11.1" - } - ], - "submodules": [ - { - "name": "LibraryQiskit", - "class": "LibraryQiskit", - "args": {}, - "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", - "requirements": [ - { - "name": "qiskit", - "version": "0.40.0" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "QCBM", - "class": "QCBM", - "args": {}, - "module": "modules.training.QCBM", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "cma", - "version": "3.3.0" - }, - { - "name": "tensorboard", - "version": "2.13.0" - }, - { - "name": "tensorboardX", - "version": "2.6.2" - } - ], - "submodules": [] - }, - { - "name": "Inference", - "class": "Inference", - "args": {}, - "module": "modules.training.Inference", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [] - } - ] - } - ] - }, - { - "name": "CircuitCardinality", - "class": "CircuitCardinality", - "args": {}, - "module": "modules.circuits.CircuitCardinality", - "requirements": [], - "submodules": [ - { - "name": "LibraryQiskit", - "class": "LibraryQiskit", - "args": {}, - "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", - "requirements": [ - { - "name": "qiskit", - "version": "0.40.0" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "QCBM", - "class": "QCBM", - "args": {}, - "module": "modules.training.QCBM", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "cma", - "version": "3.3.0" - }, - { - "name": "tensorboard", - "version": "2.13.0" - }, - { - "name": "tensorboardX", - "version": "2.6.2" - } - ], - "submodules": [] - }, - { - "name": "Inference", - "class": "Inference", - "args": {}, - "module": "modules.training.Inference", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "name": "Discrete Data", - "class": "DiscreteData", - "args": {}, - "module": "modules.applications.QML.generative_modeling.data.data_handler.DiscreteData", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "CircuitCardinality", - "class": "CircuitCardinality", - "args": {}, - "module": "modules.circuits.CircuitCardinality", - "requirements": [], - "submodules": [ - { - "name": "LibraryQiskit", - "class": "LibraryQiskit", - "args": {}, - "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", - "requirements": [ - { - "name": "qiskit", - "version": "0.40.0" - }, - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [ - { - "name": "QCBM", - "class": "QCBM", - "args": {}, - "module": "modules.training.QCBM", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - }, - { - "name": "cma", - "version": "3.3.0" - }, - { - "name": "tensorboard", - "version": "2.13.0" - }, - { - "name": "tensorboardX", - "version": "2.6.2" - } - ], - "submodules": [] - }, - { - "name": "Inference", - "class": "Inference", - "args": {}, - "module": "modules.training.Inference", - "requirements": [ - { - "name": "numpy", - "version": "1.23.5" - } - ], - "submodules": [] - } - ] - } - ] - } - ] - } - ], - "requirements": [] - } - ] +{ + "build_number": 8, + "build_date": "13-05-2024 15:58:02", + "git_revision_number": "1caf302b6d1ff20061b631f42044049e92e7c5dc", + "modules": [ + { + "name": "PVC", + "class": "PVC", + "module": "modules.applications.optimization.PVC.PVC", + "submodules": [ + { + "name": "Ising", + "class": "Ising", + "args": {}, + "module": "modules.applications.optimization.PVC.mappings.ISING", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "dimod", + "version": "0.12.5" + }, + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "QAOA", + "class": "QAOA", + "args": {}, + "module": "modules.solvers.QAOA", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "scipy", + "version": "1.10.1" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "LocalSimulator", + "class": "LocalSimulator", + "args": { + "device_name": "LocalSimulator" + }, + "module": "modules.devices.braket.LocalSimulator", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionQ", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti Aspen-9", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PennylaneQAOA", + "class": "PennylaneQAOA", + "args": {}, + "module": "modules.solvers.PennylaneQAOA", + "requirements": [ + { + "name": "pennylane", + "version": "0.28.0" + }, + { + "name": "pennylane-lightning", + "version": "0.28.0" + }, + { + "name": "amazon-braket-pennylane-plugin", + "version": "1.5.2" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionq", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", + "class": "OQC", + "args": { + "device_name": "OQC", + "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" + }, + "module": "modules.devices.braket.OQC", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "braket.local.qubit", + "class": "HelperClass", + "args": { + "device_name": "braket.local.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit", + "class": "HelperClass", + "args": { + "device_name": "default.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit.autograd", + "class": "HelperClass", + "args": { + "device_name": "default.qubit.autograd" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "qulacs.simulator", + "class": "HelperClass", + "args": { + "device_name": "qulacs.simulator" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.gpu", + "class": "HelperClass", + "args": { + "device_name": "lightning.gpu" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.qubit", + "class": "HelperClass", + "args": { + "device_name": "lightning.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + } + ] + } + ] + }, + { + "name": "QUBO", + "class": "QUBO", + "args": {}, + "module": "modules.applications.optimization.PVC.mappings.QUBO", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Annealer", + "class": "Annealer", + "args": {}, + "module": "modules.solvers.Annealer", + "requirements": [], + "submodules": [ + { + "name": "Simulated Annealer", + "class": "SimulatedAnnealingSampler", + "args": {}, + "module": "modules.devices.SimulatedAnnealingSampler", + "requirements": [ + { + "name": "dwave-samplers", + "version": "1.0.0" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "GreedyClassicalPVC", + "class": "GreedyClassicalPVC", + "args": {}, + "module": "modules.solvers.GreedyClassicalPVC", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "ReverseGreedyClassicalPVC", + "class": "ReverseGreedyClassicalPVC", + "args": {}, + "module": "modules.solvers.ReverseGreedyClassicalPVC", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "RandomPVC", + "class": "RandomPVC", + "args": {}, + "module": "modules.solvers.RandomClassicalPVC", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + } + ], + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ] + }, + { + "name": "SAT", + "class": "SAT", + "module": "modules.applications.optimization.SAT.SAT", + "submodules": [ + { + "name": "QubovertQUBO", + "class": "QubovertQUBO", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.QubovertQUBO", + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + }, + { + "name": "qubovert", + "version": "1.2.5" + } + ], + "submodules": [ + { + "name": "Annealer", + "class": "Annealer", + "args": {}, + "module": "modules.solvers.Annealer", + "requirements": [], + "submodules": [ + { + "name": "Simulated Annealer", + "class": "SimulatedAnnealingSampler", + "args": {}, + "module": "modules.devices.SimulatedAnnealingSampler", + "requirements": [ + { + "name": "dwave-samplers", + "version": "1.0.0" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "Direct", + "class": "Direct", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.Direct", + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + }, + { + "name": "python-sat", + "version": "0.1.7.dev26" + } + ], + "submodules": [ + { + "name": "ClassicalSAT", + "class": "ClassicalSAT", + "args": {}, + "module": "modules.solvers.ClassicalSAT", + "requirements": [ + { + "name": "python-sat", + "version": "0.1.7.dev26" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "RandomSAT", + "class": "RandomSAT", + "args": {}, + "module": "modules.solvers.RandomClassicalSAT", + "requirements": [ + { + "name": "python-sat", + "version": "0.1.7.dev26" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + } + ] + }, + { + "name": "ChoiQUBO", + "class": "ChoiQUBO", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.ChoiQUBO", + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + } + ], + "submodules": [ + { + "name": "Annealer", + "class": "Annealer", + "args": {}, + "module": "modules.solvers.Annealer", + "requirements": [], + "submodules": [ + { + "name": "Simulated Annealer", + "class": "SimulatedAnnealingSampler", + "args": {}, + "module": "modules.devices.SimulatedAnnealingSampler", + "requirements": [ + { + "name": "dwave-samplers", + "version": "1.0.0" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "DinneenQUBO", + "class": "DinneenQUBO", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.DinneenQUBO", + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + } + ], + "submodules": [ + { + "name": "Annealer", + "class": "Annealer", + "args": {}, + "module": "modules.solvers.Annealer", + "requirements": [], + "submodules": [ + { + "name": "Simulated Annealer", + "class": "SimulatedAnnealingSampler", + "args": {}, + "module": "modules.devices.SimulatedAnnealingSampler", + "requirements": [ + { + "name": "dwave-samplers", + "version": "1.0.0" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "ChoiIsing", + "class": "ChoiIsing", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.ChoiISING", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "dimod", + "version": "0.12.5" + }, + { + "name": "nnf", + "version": "0.4.1" + } + ], + "submodules": [ + { + "name": "QAOA", + "class": "QAOA", + "args": {}, + "module": "modules.solvers.QAOA", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "scipy", + "version": "1.10.1" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "LocalSimulator", + "class": "LocalSimulator", + "args": { + "device_name": "LocalSimulator" + }, + "module": "modules.devices.braket.LocalSimulator", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionQ", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti Aspen-9", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PennylaneQAOA", + "class": "PennylaneQAOA", + "args": {}, + "module": "modules.solvers.PennylaneQAOA", + "requirements": [ + { + "name": "pennylane", + "version": "0.28.0" + }, + { + "name": "pennylane-lightning", + "version": "0.28.0" + }, + { + "name": "amazon-braket-pennylane-plugin", + "version": "1.5.2" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionq", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", + "class": "OQC", + "args": { + "device_name": "OQC", + "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" + }, + "module": "modules.devices.braket.OQC", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "braket.local.qubit", + "class": "HelperClass", + "args": { + "device_name": "braket.local.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit", + "class": "HelperClass", + "args": { + "device_name": "default.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit.autograd", + "class": "HelperClass", + "args": { + "device_name": "default.qubit.autograd" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "qulacs.simulator", + "class": "HelperClass", + "args": { + "device_name": "qulacs.simulator" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.gpu", + "class": "HelperClass", + "args": { + "device_name": "lightning.gpu" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.qubit", + "class": "HelperClass", + "args": { + "device_name": "lightning.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + } + ] + } + ] + }, + { + "name": "DinneenIsing", + "class": "DinneenIsing", + "args": {}, + "module": "modules.applications.optimization.SAT.mappings.DinneenISING", + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "dimod", + "version": "0.12.5" + }, + { + "name": "nnf", + "version": "0.4.1" + } + ], + "submodules": [ + { + "name": "QAOA", + "class": "QAOA", + "args": {}, + "module": "modules.solvers.QAOA", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "scipy", + "version": "1.10.1" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "LocalSimulator", + "class": "LocalSimulator", + "args": { + "device_name": "LocalSimulator" + }, + "module": "modules.devices.braket.LocalSimulator", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionQ", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti Aspen-9", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PennylaneQAOA", + "class": "PennylaneQAOA", + "args": {}, + "module": "modules.solvers.PennylaneQAOA", + "requirements": [ + { + "name": "pennylane", + "version": "0.28.0" + }, + { + "name": "pennylane-lightning", + "version": "0.28.0" + }, + { + "name": "amazon-braket-pennylane-plugin", + "version": "1.5.2" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionq", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", + "class": "OQC", + "args": { + "device_name": "OQC", + "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" + }, + "module": "modules.devices.braket.OQC", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "braket.local.qubit", + "class": "HelperClass", + "args": { + "device_name": "braket.local.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit", + "class": "HelperClass", + "args": { + "device_name": "default.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit.autograd", + "class": "HelperClass", + "args": { + "device_name": "default.qubit.autograd" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "qulacs.simulator", + "class": "HelperClass", + "args": { + "device_name": "qulacs.simulator" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.gpu", + "class": "HelperClass", + "args": { + "device_name": "lightning.gpu" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.qubit", + "class": "HelperClass", + "args": { + "device_name": "lightning.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + } + ] + } + ] + } + ], + "requirements": [ + { + "name": "nnf", + "version": "0.4.1" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ] + }, + { + "name": "TSP", + "class": "TSP", + "module": "modules.applications.optimization.TSP.TSP", + "submodules": [ + { + "name": "Ising", + "class": "Ising", + "args": {}, + "module": "modules.applications.optimization.TSP.mappings.ISING", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "dimod", + "version": "0.12.5" + }, + { + "name": "more-itertools", + "version": "9.0.0" + }, + { + "name": "qiskit-optimization", + "version": "0.5.0" + }, + { + "name": "pyqubo", + "version": "1.4.0" + }, + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "dwave_networkx", + "version": "0.8.13" + } + ], + "submodules": [ + { + "name": "QAOA", + "class": "QAOA", + "args": {}, + "module": "modules.solvers.QAOA", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "scipy", + "version": "1.10.1" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "LocalSimulator", + "class": "LocalSimulator", + "args": { + "device_name": "LocalSimulator" + }, + "module": "modules.devices.braket.LocalSimulator", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionQ", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti Aspen-9", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PennylaneQAOA", + "class": "PennylaneQAOA", + "args": {}, + "module": "modules.solvers.PennylaneQAOA", + "requirements": [ + { + "name": "pennylane", + "version": "0.28.0" + }, + { + "name": "pennylane-lightning", + "version": "0.28.0" + }, + { + "name": "amazon-braket-pennylane-plugin", + "version": "1.5.2" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/sv1", + "class": "SV1", + "args": { + "device_name": "SV1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/sv1" + }, + "module": "modules.devices.braket.SV1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:::device/quantum-simulator/amazon/tn1", + "class": "TN1", + "args": { + "device_name": "TN1", + "arn": "arn:aws:braket:::device/quantum-simulator/amazon/tn1" + }, + "module": "modules.devices.braket.TN1", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony", + "class": "Ionq", + "args": { + "device_name": "ionq", + "arn": "arn:aws:braket:us-east-1::device/qpu/ionq/Harmony" + }, + "module": "modules.devices.braket.Ionq", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3", + "class": "Rigetti", + "args": { + "device_name": "Rigetti", + "arn": "arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3" + }, + "module": "modules.devices.braket.Rigetti", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy", + "class": "OQC", + "args": { + "device_name": "OQC", + "arn": "arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy" + }, + "module": "modules.devices.braket.OQC", + "requirements": [ + { + "name": "amazon-braket-sdk", + "version": "1.35.1" + }, + { + "name": "botocore", + "version": "1.25.7" + }, + { + "name": "boto3", + "version": "1.22.7" + } + ], + "submodules": [] + }, + { + "name": "braket.local.qubit", + "class": "HelperClass", + "args": { + "device_name": "braket.local.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit", + "class": "HelperClass", + "args": { + "device_name": "default.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "default.qubit.autograd", + "class": "HelperClass", + "args": { + "device_name": "default.qubit.autograd" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "qulacs.simulator", + "class": "HelperClass", + "args": { + "device_name": "qulacs.simulator" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.gpu", + "class": "HelperClass", + "args": { + "device_name": "lightning.gpu" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "lightning.qubit", + "class": "HelperClass", + "args": { + "device_name": "lightning.qubit" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "QiskitQAOA", + "class": "QiskitQAOA", + "args": {}, + "module": "modules.solvers.QiskitQAOA", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit-optimization", + "version": "0.5.0" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "qasm_simulator", + "class": "HelperClass", + "args": { + "device_name": "qasm_simulator" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + }, + { + "name": "qasm_simulator_gpu", + "class": "HelperClass", + "args": { + "device_name": "qasm_simulator_gpu" + }, + "module": "modules.devices.HelperClass", + "requirements": [], + "submodules": [] + } + ] + } + ] + }, + { + "name": "QUBO", + "class": "QUBO", + "args": {}, + "module": "modules.applications.optimization.TSP.mappings.QUBO", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "dwave_networkx", + "version": "0.8.13" + } + ], + "submodules": [ + { + "name": "Annealer", + "class": "Annealer", + "args": {}, + "module": "modules.solvers.Annealer", + "requirements": [], + "submodules": [ + { + "name": "Simulated Annealer", + "class": "SimulatedAnnealingSampler", + "args": {}, + "module": "modules.devices.SimulatedAnnealingSampler", + "requirements": [ + { + "name": "dwave-samplers", + "version": "1.0.0" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "GreedyClassicalTSP", + "class": "GreedyClassicalTSP", + "args": {}, + "module": "modules.solvers.GreedyClassicalTSP", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "ReverseGreedyClassicalTSP", + "class": "ReverseGreedyClassicalTSP", + "args": {}, + "module": "modules.solvers.ReverseGreedyClassicalTSP", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + }, + { + "name": "RandomTSP", + "class": "RandomTSP", + "args": {}, + "module": "modules.solvers.RandomClassicalTSP", + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + } + ], + "submodules": [ + { + "name": "Local", + "class": "Local", + "args": {}, + "module": "modules.devices.Local", + "requirements": [], + "submodules": [] + } + ] + } + ], + "requirements": [ + { + "name": "networkx", + "version": "2.8.8" + }, + { + "name": "numpy", + "version": "1.23.5" + } + ] + }, + { + "name": "GenerativeModeling", + "class": "GenerativeModeling", + "module": "modules.applications.QML.generative_modeling.GenerativeModeling", + "submodules": [ + { + "name": "Continuous Data", + "class": "ContinuousData", + "args": {}, + "module": "modules.applications.QML.generative_modeling.data.data_handler.ContinuousData", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "PIT", + "class": "PIT", + "args": {}, + "module": "modules.applications.QML.generative_modeling.transformations.PIT", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "pandas", + "version": "1.5.2" + } + ], + "submodules": [ + { + "name": "CircuitCopula", + "class": "CircuitCopula", + "args": {}, + "module": "modules.circuits.CircuitCopula", + "requirements": [ + { + "name": "scipy", + "version": "1.11.1" + } + ], + "submodules": [ + { + "name": "LibraryQiskit", + "class": "LibraryQiskit", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "CustomQiskitNoisyBackend", + "class": "CustomQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PresetQiskitNoisyBackend", + "class": "PresetQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + } + ] + } + ] + }, + { + "name": "MinMax", + "class": "MinMax", + "args": {}, + "module": "modules.applications.QML.generative_modeling.transformations.MinMax", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "CircuitStandard", + "class": "CircuitStandard", + "args": {}, + "module": "modules.circuits.CircuitStandard", + "requirements": [ + { + "name": "scipy", + "version": "1.11.1" + } + ], + "submodules": [ + { + "name": "LibraryQiskit", + "class": "LibraryQiskit", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "CustomQiskitNoisyBackend", + "class": "CustomQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PresetQiskitNoisyBackend", + "class": "PresetQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + } + ] + }, + { + "name": "CircuitCardinality", + "class": "CircuitCardinality", + "args": {}, + "module": "modules.circuits.CircuitCardinality", + "requirements": [], + "submodules": [ + { + "name": "LibraryQiskit", + "class": "LibraryQiskit", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "CustomQiskitNoisyBackend", + "class": "CustomQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PresetQiskitNoisyBackend", + "class": "PresetQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "name": "Discrete Data", + "class": "DiscreteData", + "args": {}, + "module": "modules.applications.QML.generative_modeling.data.data_handler.DiscreteData", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [ + { + "name": "CircuitCardinality", + "class": "CircuitCardinality", + "args": {}, + "module": "modules.circuits.CircuitCardinality", + "requirements": [], + "submodules": [ + { + "name": "LibraryQiskit", + "class": "LibraryQiskit", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.LibraryQiskit", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "CustomQiskitNoisyBackend", + "class": "CustomQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + }, + { + "name": "PresetQiskitNoisyBackend", + "class": "PresetQiskitNoisyBackend", + "args": {}, + "module": "modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend", + "requirements": [ + { + "name": "qiskit", + "version": "0.45.0" + }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ], + "submodules": [ + { + "name": "QCBM", + "class": "QCBM", + "args": {}, + "module": "modules.training.QCBM", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "cma", + "version": "3.3.0" + }, + { + "name": "tensorboard", + "version": "2.13.0" + }, + { + "name": "tensorboardX", + "version": "2.6.2" + } + ], + "submodules": [] + }, + { + "name": "Inference", + "class": "Inference", + "args": {}, + "module": "modules.training.Inference", + "requirements": [ + { + "name": "numpy", + "version": "1.23.5" + } + ], + "submodules": [] + } + ] + } + ] + } + ] + } + ], + "requirements": [] + } + ] } \ No newline at end of file diff --git a/.settings/requirements_full.txt b/.settings/requirements_full.txt index 4168d82b..b9130d94 100644 --- a/.settings/requirements_full.txt +++ b/.settings/requirements_full.txt @@ -1,30 +1,32 @@ -seaborn==0.13.0 -networkx==2.8.8 -inquirer==3.1.2 -packaging==23.1 -pyyaml==6.0 -typing-extensions==4.6.3 -sphinx==6.2.1 -sphinx-rtd-theme==1.2.0 -numpy==1.23.5 -dimod==0.12.5 -amazon-braket-sdk==1.35.1 -scipy==1.11.1 -botocore==1.25.7 -boto3==1.22.7 -pennylane==0.28.0 -pennylane-lightning==0.28.0 -amazon-braket-pennylane-plugin==1.5.2 -dwave-samplers==1.0.0 -nnf==0.4.1 -qubovert==1.2.5 -python-sat==0.1.7.dev26 -more-itertools==9.0.0 -qiskit-optimization==0.5.0 -pyqubo==1.4.0 -dwave_networkx==0.8.13 -qiskit==0.40.0 -pandas==1.5.2 -cma==3.3.0 -tensorboard==2.13.0 -tensorboardX==2.6.2 +seaborn==0.13.0 +networkx==2.8.8 +inquirer==3.1.2 +packaging==23.1 +pyyaml==6.0 +typing-extensions==4.6.3 +sphinx==6.2.1 +sphinx-rtd-theme==1.2.0 +numpy==1.23.5 +dimod==0.12.5 +amazon-braket-sdk==1.35.1 +scipy==1.11.1 +botocore==1.25.7 +boto3==1.22.7 +pennylane==0.28.0 +pennylane-lightning==0.28.0 +amazon-braket-pennylane-plugin==1.5.2 +dwave-samplers==1.0.0 +nnf==0.4.1 +qubovert==1.2.5 +python-sat==0.1.7.dev26 +more-itertools==9.0.0 +qiskit-optimization==0.5.0 +pyqubo==1.4.0 +dwave_networkx==0.8.13 +qiskit==0.45.0 +pandas==1.5.2 +qiskit-ibmq-provider==0.19.2 +cma==3.3.0 +tensorboard==2.13.0 +tensorboardX==2.6.2 +qiskit_aer==0.11.2 diff --git a/src/modules/applications/QML/generative_modeling/data/data_handler/DataHandler.py b/src/modules/applications/QML/generative_modeling/data/data_handler/DataHandler.py index 15492edd..b46b1603 100644 --- a/src/modules/applications/QML/generative_modeling/data/data_handler/DataHandler.py +++ b/src/modules/applications/QML/generative_modeling/data/data_handler/DataHandler.py @@ -14,6 +14,7 @@ import pickle import os +from qiskit import qpy import numpy as np import pandas as pd @@ -25,7 +26,7 @@ class DataHandler(Core, ABC): """ - The task of the DataHandler module is to translate the application’s data + The task of the DataHandler module is to translate the application’s data and problem specification into preproccesed format. """ @@ -150,6 +151,10 @@ def postprocess(self, input_data: dict, config: dict, **kwargs): with open(f"{store_dir_iter}/training_results-{kwargs['rep_count']}.pkl", 'wb') as f: pickle.dump(input_data, f) + if "circuit_transpiled" in list(input_data.keys()): + with open(f"{store_dir_iter}/transpiled_circuit_{kwargs['rep_count']}.qpy", 'wb') as f: + qpy.dump(input_data.pop("circuit_transpiled"), f) + # Save variables transformed space if "Transformation" in list(input_data.keys()): self.metrics.add_metric_batch({"KL_best": input_data["KL_best_transformed"]}) @@ -164,7 +169,7 @@ def postprocess(self, input_data: dict, config: dict, **kwargs): @abstractmethod def data_load(self, gen_mod: dict, config: dict) -> dict: """ - Helps to ensure that the model can effectively learn the underlying + Helps to ensure that the model can effectively learn the underlying patterns and structure of the data, and produce high-quality outputs. :param gen_mod: dictionary with collected information of the previous modules @@ -207,12 +212,12 @@ def evaluate(self, solution: any) -> (dict, float): @staticmethod def tb_to_pd(logdir: str, rep: str) -> None: """ - Converts TensorBoard event files in the specified log directory + Converts TensorBoard event files in the specified log directory into a pandas DataFrame and saves it as a pickle file. :param logdir: path to the log directory containing TensorBoard event files - :type logdir: str - + :type logdir: str + """ event_acc = EventAccumulator(logdir) event_acc.Reload() diff --git a/src/modules/applications/QML/generative_modeling/mappings/CustomQiskitNoisyBackend.py b/src/modules/applications/QML/generative_modeling/mappings/CustomQiskitNoisyBackend.py new file mode 100644 index 00000000..c16a10d7 --- /dev/null +++ b/src/modules/applications/QML/generative_modeling/mappings/CustomQiskitNoisyBackend.py @@ -0,0 +1,398 @@ +# Copyright 2021 The QUARK Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from typing import Union +import logging +from time import perf_counter + +from qiskit import QuantumCircuit +from qiskit.circuit import Parameter +from qiskit.compiler import transpile, assemble +from qiskit.transpiler import CouplingMap +from qiskit.providers import Backend +from qiskit import Aer +from qiskit_aer import AerSimulator +from qiskit_aer import noise +from qiskit_aer.noise import NoiseModel +# from qiskit_ibm_runtime import QiskitRuntimeService +import numpy as np + +from modules.training.QCBM import QCBM +from modules.training.Inference import Inference +from modules.applications.QML.generative_modeling.mappings.Library import Library + +logging.getLogger("NoisyQiskit").setLevel(logging.WARNING) + + +def split_string(s): + return s.split(' ', 1)[0] + + +class CustomQiskitNoisyBackend(Library): + """ + This module maps a library-agnostic gate sequence to a qiskit circuit + """ + + def __init__(self): + """ + Constructor method + """ + super().__init__("NoisyQiskit") + self.submodule_options = ["QCBM", "Inference"] + + circuit_transpiled = None + + @staticmethod + def get_requirements() -> list[dict]: + """ + Returns requirements of this module + + :return: list of dict with requirements of this module + :rtype: list[dict] + """ + return [ + { + "name": "qiskit", + "version": "0.45.0" + }, + # { + # "name": "qiskit_ibm_runtime", + # "version": "0.10.0" + # }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ] + + def get_parameter_options(self) -> dict: + """ + Returns the configurable settings for the Qiskit Library. + + :return: + .. code-block:: python + + return { + "backend": { + "values": ["aer_statevector_simulator_gpu", "aer_statevector_simulator_cpu", + "cusvaer_simulator (only available in cuQuantum applicance)", + "aer_simulator_gpu", + "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1"], + "description": "Which backend do you want to use? (aer_statevector_simulator + uses the measurement probability vector, the others are shot based)" + }, + + "n_shots": { + "values": [100, 1000, 10000, 1000000], + "description": "How many shots do you want use for estimating the PMF of the model? + (If the aer_statevector_simulator selected, + only relevant for studying generalization)" + } + } + + """ + value_list = [] + value_list.append('Custom configurations') + value_list.append('No noise') + return { + "backend": { + "values": ["aer_simulator_gpu", "aer_simulator_cpu"], + "description": "Which backend do you want to use? " + "In the NoisyQiskit module only aer_simulators can be used." + }, + + "simulation_method": { + "values": ["automatic", "statevector", "density_matrix", "cpu_mps"], # TODO Change names! + "description": "What simulation method should be used?" + }, + + "n_shots": { + "values": [100, 1000, 10000, 1000000], + "description": "How many shots do you want use for estimating the PMF of the model?" + # (If the aer_statevector_simulator selected, only relevant for studying generalization)" + }, + + "transpile_optimization_level": { + "values": [1, 2, 3, 0], + "description": "Switch between different optimization levels in the Qiskit transpile routine. " + "1: light optimization, 2: heavy optimization, 3: even heavier optimization, " + "0: no optimization. Level 1 recommended as standard option." + }, + + "noise_configuration": { + "values": value_list, + "description": "What noise configuration do you want to use?" + }, + "custom_readout_error": { + "values": [0, 0.005, 0.01, 0.02, 0.05, 0.07, 0.1, 0.2], + "description": "Add a custom readout error." + }, + "two_qubit_depolarizing_errors": { + "values": [0, 0.005, 0.01, 0.02, 0.05, 0.07, 0.1, 0.2] + , + "description": "Add a custom 2-qubit gate depolarizing error." + }, + "one_qubit_depolarizing_errors": { + "values": [0, 0.0001, 0.0005, 0.001, 0.005, 0.007, 0.01, 0.02] + , + "description": "Add a 1-qubit gate depolarizing error." + }, + "qubit_layout": { + # "values": [None, 'linear', 'circle', 'fully_connected', 'ibm_brisbane'], + "values": [None, 'linear', 'circle', 'fully_connected'], + "description": "How should the qubits be connected in the simulated chip: coupling_map " + } + } + + def get_default_submodule(self, option: str) -> Union[QCBM, Inference]: + + if option == "QCBM": + return QCBM() + elif option == "Inference": + return Inference() + else: + raise NotImplementedError(f"Option {option} not implemented") + + def sequence_to_circuit(self, input_data: dict) -> dict: + """ + Maps the gate sequence, that specifies the architecture of a quantum circuit + to its Qiskit implementation. + + :param input_data: Collected information of the benchmarking process + :type input_data: dict + :return: Same dictionary but the gate sequence is replaced by it Qiskit implementation + :rtype: dict + """ + n_qubits = input_data["n_qubits"] + gate_sequence = input_data["gate_sequence"] + circuit = QuantumCircuit(n_qubits, n_qubits) + param_counter = 0 + for gate, wires in gate_sequence: + if gate == "Hadamard": + circuit.h(wires[0]) + elif gate == "X": + circuit.x(wires[0]) + elif gate == "SX": + circuit.sx(wires[0]) + elif gate == "RZ_PI/2": + circuit.rz(np.pi / 2, wires[0]) + elif gate == "CNOT": + circuit.cnot(wires[0], wires[1]) + elif gate == "ECR": + circuit.ecr(wires[0], wires[1]) + elif gate == "RZ": + circuit.rz(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RX": + circuit.rx(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RY": + circuit.ry(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RXX": + circuit.rxx(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "RYY": + circuit.ryy(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "RZZ": + circuit.rzz(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "CRY": + circuit.cry(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "Barrier": + circuit.barrier() + elif gate == "Measure": + circuit.measure(wires[0], wires[0]) + else: + raise NotImplementedError(f"Gate {gate} not implemented") + + input_data["circuit"] = circuit + input_data.pop("gate_sequence") + logging.info(param_counter) + return input_data + + @staticmethod + def select_backend(config: str) -> dict: + """ + This method configures the backend + + :param config: Name of a backend + :type config: str + :return: Configured qiskit backend + :rtype: qiskit.providers.Backend + """ + + if config == "aer_simulator_gpu": + # from qiskit import Aer # pylint: disable=C0415 + backend = Aer.get_backend("aer_simulator") + backend.set_options(device="GPU") + + elif config == "aer_simulator_cpu": + # from qiskit import Aer # pylint: disable=C0415 + backend = Aer.get_backend("aer_simulator") + backend.set_options(device="CPU") + + else: + raise NotImplementedError(f"Device Configuration {config} not implemented") + + return backend + + def get_execute_circuit(self, circuit: QuantumCircuit, backend: Backend, config: str, config_dict: dict) \ + -> callable: # pylint: disable=W0221 + """ + This method combines the qiskit circuit implementation and the selected backend and returns a function, + that will be called during training. + + :param circuit: Qiskit implementation of the quantum circuit + :type circuit: qiskit.circuit.QuantumCircuit + :param backend: Configured qiskit backend + :type backend: qiskit.providers.Backend + :param config: Name of a backend + :type config: str + :param config_dict: Contains information about config + :type config_dict: dict + :return: Method that executes the quantum circuit for a given set of parameters + :rtype: callable + """ + n_shots = config_dict["n_shots"] + n_qubits = circuit.num_qubits + start = perf_counter() + + backend = self.decompile_noisy_config(config_dict, n_qubits) + logging.info(f'Backend in Use: {backend=}') + optimization_level = self.get_transpile_routine(config_dict['transpile_optimization_level']) + seed_transp = 42 # Remove seed if wanted + logging.info(f'Using {optimization_level=} with seed: {seed_transp}') + circuit_transpiled = transpile(circuit, backend=backend, optimization_level=optimization_level, + seed_transpiler=seed_transp) + logging.info(f'Circuit operations before transpilation: {circuit.count_ops()}') + logging.info(f'Circuit operations before transpilation: {circuit_transpiled.count_ops()}') + logging.info(perf_counter() - start) + + + if config in ["aer_simulator_cpu", "aer_simulator_gpu"]: + def execute_circuit(solutions): + + all_circuits = [circuit_transpiled.bind_parameters(solution) for solution in solutions] + qobjs = assemble(all_circuits, backend=backend) + jobs = backend.run(qobjs, shots=n_shots) + samples_dictionary = [jobs.result().get_counts(circuit).int_outcomes() for circuit in all_circuits] + samples = [] + for result in samples_dictionary: + target_iter = np.zeros(2 ** n_qubits) + result_keys = list(result.keys()) + result_vals = list(result.values()) + target_iter[result_keys] = result_vals + target_iter = np.asarray(target_iter) + samples.append(target_iter) + samples = np.asarray(samples) + pmfs = samples / n_shots + + return pmfs, samples + + return execute_circuit, circuit_transpiled + + + @staticmethod + def split_string(s): + return s.split(' ', 1)[0] + + def decompile_noisy_config(self, config_dict, num_qubits): + backend_config = config_dict['backend'] + device = 'GPU' if 'gpu' in backend_config else 'CPU' + simulation_method, device = self.get_simulation_method_and_device(device, config_dict['simulation_method']) + + backend = self.get_custom_config(config_dict, num_qubits) \ + if config_dict['noise_configuration'] == "Custom configurations" else Aer.get_backend("aer_simulator") + + backend.set_options(device=device, method=simulation_method) + self.log_backend_options(backend) + + return backend + + def get_simulation_method_and_device(self, device, simulation_config): + simulation_method = { + "statevector": "statevector", + "density_matrix": "density_matrix", + "cpu_mps": "matrix_product_state" + }.get(simulation_config, 'automatic') + + if simulation_config == "cpu_mps": + device = 'CPU' + + return simulation_method, device + + def get_transpile_routine(self, transpile_config): + return transpile_config if transpile_config in [0, 1, 2, 3] else 1 + + def get_custom_config(self, config_dict, num_qubits): + noise_model = self.build_noise_model(config_dict) + coupling_map = self.get_coupling_map(config_dict, num_qubits) + backend = AerSimulator(noise_model=noise_model, + coupling_map=coupling_map) if coupling_map is not None else AerSimulator( + noise_model=noise_model) + return backend + + def build_noise_model(self, config_dict): + noise_model = NoiseModel() + if config_dict['custom_readout_error']: + readout_error = config_dict['custom_readout_error'] + noise_model.add_all_qubit_readout_error( + [[1 - readout_error, readout_error], [readout_error, 1 - readout_error]]) + + self.add_quantum_errors(noise_model, config_dict) + return noise_model + + def add_quantum_errors(self, noise_model, config_dict): + if config_dict['two_qubit_depolarizing_errors'] is not None: + two_qubit_error = noise.depolarizing_error(config_dict['two_qubit_depolarizing_errors'], 2) + for gate in ['cx', 'ecr', 'rxx']: + noise_model.add_all_qubit_quantum_error(two_qubit_error, gate) + + if config_dict['one_qubit_depolarizing_errors'] is not None: + one_qubit_error = noise.depolarizing_error(config_dict['one_qubit_depolarizing_errors'], 1) + for gate in ['sx', 'x', 'rx', 'ry', 'rz', 'h', 's']: + noise_model.add_all_qubit_quantum_error(one_qubit_error, gate) + + def get_coupling_map(self, config_dict, num_qubits): + layout = config_dict['qubit_layout'] + if layout == 'linear': + return CouplingMap.from_line(num_qubits) + elif layout == 'circle': + return CouplingMap.from_ring(num_qubits) + elif layout == 'fully_connected': + return CouplingMap.from_full(num_qubits) + # elif layout == "ibm_brisbane": + # service = QiskitRuntimeService() + #backend = service.backend("ibm_brisbane") + # logging.info(f'Loaded with IBMQ Account {backend.name}, {backend.version}, {backend.num_qubits}') + # return backend.coupling_map + elif layout is None: + logging.info('No coupling map specified, using default.') + return None + else: + raise ValueError(f"Unknown qubit layout: {layout}") + + def log_backend_options(self, backend): + logging.info(f'Backend configuration: {backend.configuration()}') + logging.info(f'Simulation method: {backend.options.method}') diff --git a/src/modules/applications/QML/generative_modeling/mappings/Library.py b/src/modules/applications/QML/generative_modeling/mappings/Library.py index 35b23e9a..14bf3f2f 100644 --- a/src/modules/applications/QML/generative_modeling/mappings/Library.py +++ b/src/modules/applications/QML/generative_modeling/mappings/Library.py @@ -61,16 +61,15 @@ def preprocess(self, input_data: dict, config: Config, **kwargs): :return: Dictionary including the function to execute the quantum cicrcuit on a simulator or on quantum hardware :rtype: (dict, float) """ - start = start_time_measurement() output = self.sequence_to_circuit(input_data) backend = self.select_backend(config["backend"]) - output["execute_circuit"] = self.get_execute_circuit( + output["execute_circuit"], output['circuit_transpiled'] = self.get_execute_circuit( output["circuit"], backend, config["backend"], - config["n_shots"]) + config_dict=config) output["backend"] = config["backend"] output["n_shots"] = config["n_shots"] logging.info("Library created") @@ -101,7 +100,7 @@ def sequence_to_circuit(self, input_data): @staticmethod @abstractmethod - def get_execute_circuit(circuit: QuantumCircuit, backend: Backend, config: str, n_shots: int): + def get_execute_circuit(circuit: QuantumCircuit, backend: Backend, config: str, config_dict: dict): pass @staticmethod diff --git a/src/modules/applications/QML/generative_modeling/mappings/LibraryQiskit.py b/src/modules/applications/QML/generative_modeling/mappings/LibraryQiskit.py index c10fea18..8149496d 100644 --- a/src/modules/applications/QML/generative_modeling/mappings/LibraryQiskit.py +++ b/src/modules/applications/QML/generative_modeling/mappings/LibraryQiskit.py @@ -14,7 +14,7 @@ from typing import Union import logging - +# from qiskit_ibm_runtime import QiskitRuntimeService, Sampler from qiskit import QuantumCircuit from qiskit.circuit import Parameter from qiskit.compiler import transpile, assemble @@ -51,12 +51,20 @@ def get_requirements() -> list[dict]: return [ { "name": "qiskit", - "version": "0.40.0" + "version": "0.45.0" }, + # { + # "name": "qiskit_ibm_runtime", + # "version": "0.10.0" + # }, { "name": "numpy", "version": "1.23.5" }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } ] def get_parameter_options(self) -> dict: @@ -67,32 +75,32 @@ def get_parameter_options(self) -> dict: .. code-block:: python return { - "backend": { - "values": ["aer_statevector_simulator_gpu", "aer_statevector_simulator_cpu", - "cusvaer_simulator (only available in cuQuantum applicance)", - "aer_simulator_gpu", - "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1"], - "description": "Which backend do you want to use? (aer_statevector_simulator - uses the measurement probability vector, the others are shot based)" - }, - - "n_shots": { - "values": [100, 1000, 10000, 1000000], - "description": "How many shots do you want use for estimating the PMF of the model? - (If the aer_statevector_simulator selected, - only relevant for studying generalization)" - } - } + "backend": { + "values": ["aer_statevector_simulator_gpu", "aer_statevector_simulator_cpu", + "cusvaer_simulator (only available in cuQuantum applicance)", "aer_simulator_gpu", + "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1", + "simulator_statevector IBM Quantum Platform", "ibm_brisbane IBM Quantum Platform"], + "description": "Which backend do you want to use? (aer_statevector_simulator\ + uses the measurement probability vector, the others are shot based)" + }, + + "n_shots": { + "values": [100, 1000, 10000, 1000000], + "description": "How many shots do you want use for estimating the PMF of the model?\ + (If the aer_statevector_simulator selected, only relevant for studying generalization)" + } + } """ return { "backend": { "values": ["aer_statevector_simulator_gpu", "aer_statevector_simulator_cpu", "cusvaer_simulator (only available in cuQuantum applicance)", "aer_simulator_gpu", - "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1"], + "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1", "ibm_brisbane IBM Quantum Platform"], "description": "Which backend do you want to use? (aer_statevector_simulator\ uses the measurement probability vector, the others are shot based)" }, + #TODO Discuss: Use IBM Eagle (so 1 of 3) or IBM Brisbane so one specific? "n_shots": { "values": [100, 1000, 10000, 1000000], @@ -217,6 +225,18 @@ def select_backend(config: str) -> dict: backend = Aer.get_backend('statevector_simulator') backend.set_options(device="CPU") + # elif config == "simulator_statevector IBM Quantum Platform": + # define token here once + # service = QiskitRuntimeService(token='TOKEN') + # service = QiskitRuntimeService() + # backend = service.get_backend('simulator_statevector') + + # elif config == "ibm_brisbane IBM Quantum Platform": + #define token here once + #service = QiskitRuntimeService(token='TOKEN') + # service = QiskitRuntimeService() + # backend = service.get_backend('ibm_brisbane') + elif config == "ionQ_Harmony": from modules.devices.braket.Ionq import Ionq # pylint: disable=C0415 from qiskit_braket_provider import AWSBraketBackend, AWSBraketProvider # pylint: disable=C0415 @@ -249,22 +269,24 @@ def select_backend(config: str) -> dict: return backend @staticmethod - def get_execute_circuit(circuit: QuantumCircuit, backend: Backend, config: str, n_shots: int) -> callable: + def get_execute_circuit(circuit: QuantumCircuit, backend: Backend, config: str, config_dict: dict) \ + -> callable: # pylint: disable=W0221,R0915 """ - This method combnines the qiskit circuit implemenation and the selected backend and returns a function, - that will be called during training. + This method combines the qiskit circuit implementation and the selected backend and returns a function, + that will be called during training. - :param circuit: Qiskit implementation of the quantum circuit + :param circuit: Qiskit implementation of the quantum circuit :type circuit: qiskit.circuit.QuantumCircuit :param backend: Configured qiskit backend :type backend: qiskit.providers.Backend :param config: Name of a backend :type config: str - :param n_shots: The number of times the circuit is run - :type n_shots: int + :param config_dict: Contains information about config + :type config_dict: dict :return: Method that executes the quantum circuit for a given set of parameters :rtype: callable """ + n_shots = config_dict["n_shots"] n_qubits = circuit.num_qubits circuit_transpiled = transpile(circuit, backend=backend) @@ -324,4 +346,27 @@ def execute_circuit(solutions): pmfs = samples / n_shots return pmfs, samples - return execute_circuit + elif config in ["simulator_statevector IBM Quantum Platform", "ibm_brisbane IBM Quantum Platform"]: + def execute_circuit(solutions, *kwargs): + + """ + This function will submit the circuits with different parameter individually. + If you want to deploy a circuit to ibm for inference, we recommend using a Jupyter Notebook. + """ + # all_circuits = [circuit_transpiled.bind_parameters(solution) for solution in solutions] + # service = QiskitRuntimeService() + samples_dictionary = [] + samples = [] + for result in samples_dictionary: + target_iter = np.zeros(2 ** n_qubits) + result_keys = list(result.keys()) + result_vals = np.abs(list(result.values())) + # To ensure no negative values from the quasi ditribution are taken. + target_iter[result_keys] = result_vals + target_iter = np.asarray(target_iter) + samples.append(target_iter) + samples = np.asarray(samples) + pmfs = samples + return pmfs, samples + + return execute_circuit, circuit_transpiled diff --git a/src/modules/applications/QML/generative_modeling/mappings/PresetQiskitNoisyBackend.py b/src/modules/applications/QML/generative_modeling/mappings/PresetQiskitNoisyBackend.py new file mode 100644 index 00000000..b2155d99 --- /dev/null +++ b/src/modules/applications/QML/generative_modeling/mappings/PresetQiskitNoisyBackend.py @@ -0,0 +1,380 @@ +# Copyright 2021 The QUARK Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from typing import Union +import logging +from time import perf_counter + +from qiskit import QuantumCircuit +from qiskit.circuit import Parameter +from qiskit.providers.fake_provider import FakeProviderForBackendV2 +from qiskit.providers.fake_provider import * +from qiskit.compiler import transpile, assemble +from qiskit.providers import Backend +from qiskit import Aer +from qiskit_aer import AerSimulator +from qiskit_aer.noise import NoiseModel +# from qiskit_ibm_runtime import QiskitRuntimeService +import numpy as np + +from modules.training.QCBM import QCBM +from modules.training.Inference import Inference +from modules.applications.QML.generative_modeling.mappings.Library import Library + +logging.getLogger("NoisyQiskit").setLevel(logging.WARNING) + + +class PresetQiskitNoisyBackend(Library): + """ + This module maps a library-agnostic gate sequence to a qiskit circuit. + """ + + def __init__(self): + """ + Constructor method + """ + super().__init__("PresetQiskitNoisyBackend") + self.submodule_options = ["QCBM", "Inference"] + + circuit_transpiled = None + + @staticmethod + def get_requirements() -> list[dict]: + """ + Returns requirements of this module + + :return: list of dict with requirements of this module + :rtype: list[dict] + """ + return [ + { + "name": "qiskit", + "version": "0.45.0" + }, + # { + # "name": "qiskit_ibm_runtime", + # "version": "0.10.0" + # }, + { + "name": "qiskit_aer", + "version": "0.11.2" + }, + { + "name": "numpy", + "version": "1.23.5" + }, + { + "name": "qiskit-ibmq-provider", + "version": "0.19.2" + } + ] + + def get_parameter_options(self) -> dict: + """ + Returns the configurable settings for the Qiskit Library. + + :return: + .. code-block:: python + + return { + "backend": { + "values": ["aer_statevector_simulator_gpu", "aer_statevector_simulator_cpu", + "cusvaer_simulator (only available in cuQuantum applicance)", + "aer_simulator_gpu", + "aer_simulator_cpu", "ionQ_Harmony", "Amazon_SV1"], + "description": "Which backend do you want to use? (aer_statevector_simulator + uses the measurement probability vector, the others are shot based)" + }, + + "n_shots": { + "values": [100, 1000, 10000, 1000000], + "description": "How many shots do you want use for estimating the PMF of the model? + (If the aer_statevector_simulator selected, + only relevant for studying generalization)" + } + } + + """ + + provider = FakeProviderForBackendV2() + backends = provider.backends() + value_list = [] + value_list.append('No noise') + # value_list.append('ibm_osaka 127 Qubits') + # value_list.append('ibm_brisbane 127 Qubits') + for backend in backends: + if backend.num_qubits >= 6: + value_list.append(f'{backend.name} V{backend.version} {backend.num_qubits} Qubits') + + return { + "backend": { + "values": ["aer_simulator_gpu", "aer_simulator_cpu"], + "description": "Which backend do you want to use? " + "In the NoisyQiskit Module only aer_simulators can be used." + }, + + "simulation_method": { + "values": ["automatic", "statevector", "density_matrix", "cpu_mps"], # TODO Change names + "description": "What simulation methode should be used" + }, + + "n_shots": { + "values": [100, 1000, 10000, 1000000], + "description": "How many shots do you want use for estimating the PMF of the model?" + # (If the aer_statevector_simulator selected, only relevant for studying generalization)" + }, + + "transpile_optimization_level": { + "values": [1, 2, 3, 0], + "description": "Switch between different optimization levels in the Qiskit transpile routine. " + "1: light optimization, 2: heavy optimization, 3: even heavier optimization, " + "0: no optimization. Level 1 recommended as standard option." + }, + + "noise_configuration": { + "values": value_list, + "description": "What noise configuration do you want to use?" + } + } + + def get_default_submodule(self, option: str) -> Union[QCBM, Inference]: + + if option == "QCBM": + return QCBM() + elif option == "Inference": + return Inference() + else: + raise NotImplementedError(f"Option {option} not implemented") + + def sequence_to_circuit(self, input_data: dict) -> dict: + """ + Maps the gate sequence, that specifies the architecture of a quantum circuit + to its Qiskit implementation. + + :param input_data: Collected information of the benchmarking process + :type input_data: dict + :return: Same dictionary but the gate sequence is replaced by it Qiskit implementation + :rtype: dict + """ + n_qubits = input_data["n_qubits"] + gate_sequence = input_data["gate_sequence"] + circuit = QuantumCircuit(n_qubits, n_qubits) + param_counter = 0 + for gate, wires in gate_sequence: + if gate == "Hadamard": + circuit.h(wires[0]) + elif gate == "X": + circuit.x(wires[0]) + elif gate == "SX": + circuit.sx(wires[0]) + elif gate == "RZ_PI/2": + circuit.rz(np.pi / 2, wires[0]) + elif gate == "CNOT": + circuit.cnot(wires[0], wires[1]) + elif gate == "ECR": + circuit.ecr(wires[0], wires[1]) + elif gate == "RZ": + circuit.rz(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RX": + circuit.rx(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RY": + circuit.ry(Parameter(f"x_{param_counter:03d}"), wires[0]) + param_counter += 1 + elif gate == "RXX": + circuit.rxx(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "RYY": + circuit.ryy(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "RZZ": + circuit.rzz(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "CRY": + circuit.cry(Parameter(f"x_{param_counter:03d}"), wires[0], wires[1]) + param_counter += 1 + elif gate == "Barrier": + circuit.barrier() + elif gate == "Measure": + circuit.measure(wires[0], wires[0]) + else: + raise NotImplementedError(f"Gate {gate} not implemented") + + input_data["circuit"] = circuit + input_data.pop("gate_sequence") + logging.info(param_counter) + return input_data + + @staticmethod + def select_backend(config: str) -> dict: + """ + This method configures the backend + + :param config: Name of a backend + :type config: str + :return: Configured qiskit backend + :rtype: qiskit.providers.Backend + """ + + if config == "aer_simulator_gpu": + # from qiskit import Aer # pylint: disable=C0415 + backend = Aer.get_backend("aer_simulator") + backend.set_options(device="GPU") + + elif config == "aer_simulator_cpu": + # from qiskit import Aer # pylint: disable=C0415 + backend = Aer.get_backend("aer_simulator") + backend.set_options(device="CPU") + + else: + raise NotImplementedError(f"Device Configuration {config} not implemented") + + return backend + + def get_execute_circuit(self, circuit: QuantumCircuit, backend: Backend, config: str, + config_dict: dict) -> callable: # pylint: disable=W0221 + """ + This method combines the qiskit circuit implementation and the selected backend and returns a function, + that will be called during training. + + :param circuit: Qiskit implementation of the quantum circuit + :type circuit: qiskit.circuit.QuantumCircuit + :param backend: Configured qiskit backend + :type backend: qiskit.providers.Backend + :param config: Name of a backend + :type config: str + :param config_dict: Contains information about config + :type config_dict: dict + :return: Method that executes the quantum circuit for a given set of parameters + :rtype: callable + """ + n_shots = config_dict["n_shots"] + n_qubits = circuit.num_qubits + start = perf_counter() + + backend = self.decompile_noisy_config(config_dict, n_qubits) + logging.info(f'Backend in Use: {backend=}') + optimization_level = self.get_transpile_routine(config_dict['transpile_optimization_level']) + seed_transp = 42 # Remove seed if wanted + logging.info(f'Using {optimization_level=} with seed: {seed_transp}') + circuit_transpiled = transpile(circuit, backend=backend, optimization_level=optimization_level, + seed_transpiler=seed_transp) + logging.info(f'Circuit operations before transpilation: {circuit.count_ops()}') + logging.info(f'Circuit operations before transpilation: {circuit_transpiled.count_ops()}') + logging.info(perf_counter() - start) + + if config in ["aer_simulator_cpu", "aer_simulator_gpu"]: + def execute_circuit(solutions): + + all_circuits = [circuit_transpiled.bind_parameters(solution) for solution in solutions] + qobjs = assemble(all_circuits, backend=backend) + jobs = backend.run(qobjs, shots=n_shots) + samples_dictionary = [jobs.result().get_counts(circuit).int_outcomes() for circuit in all_circuits] + samples = [] + for result in samples_dictionary: + target_iter = np.zeros(2 ** n_qubits) + result_keys = list(result.keys()) + result_vals = list(result.values()) + target_iter[result_keys] = result_vals + target_iter = np.asarray(target_iter) + samples.append(target_iter) + samples = np.asarray(samples) + pmfs = samples / n_shots + + return pmfs, samples + + return execute_circuit, circuit_transpiled + + @staticmethod + def split_string(s): + return s.split(' ', 1)[0] + + def decompile_noisy_config(self, config_dict, num_qubits): + backend_config = config_dict['backend'] + device = 'GPU' if 'gpu' in backend_config else 'CPU' + simulation_method, device = self.get_simulation_method_and_device(device, config_dict['simulation_method']) + backend = self.select_backend_configuration(config_dict['noise_configuration'], num_qubits) + + self.configure_backend(backend, device, simulation_method) + self.log_backend_info(backend) + + return backend + + def select_backend_configuration(self, noise_configuration, num_qubits): + if "fake" in noise_configuration: + return self.get_FakeBackend(noise_configuration, num_qubits) + elif noise_configuration == "No noise": + return Aer.get_backend("aer_simulator") + elif noise_configuration in ['ibm_brisbane 127 Qubits', 'ibm_osaka 127 Qubits']: + logging.warning("Not yet implemented. Please check upcoming QUARK versions.") + raise ValueError(f"Noise configuration '{noise_configuration}' not yet implemented.") + # return self.get_ibm_backend(noise_configuration) + else: + raise ValueError(f"Unknown noise configuration: {noise_configuration}") + + # def get_ibm_backend(self, backend_name): + # service = QiskitRuntimeService() + # backend_identifier = backend_name.replace(' 127 Qubits', '').lower() + # backend = service.backend(backend_identifier) + # noise_model = NoiseModel.from_backend(backend) + # logging.info(f'Loaded with IBMQ Account {backend.name}, {backend.version}, {backend.num_qubits}') + # simulator = AerSimulator.from_backend(backend) + # simulator.noise_model = noise_model + # return simulator + + def configure_backend(self, backend, device, simulation_method): + backend.set_options(device=device) + backend.set_options(method=simulation_method) + + def log_backend_info(self, backend): + logging.info(f'Backend configuration: {backend.configuration()}') + logging.info(f'Simulation method: {backend.options.method}') + + def get_simulation_method_and_device(self, device, simulation_config): + simulation_methods = { + "statevector": "statevector", + "density_matrix": "density_matrix", + "cpu_mps": "matrix_product_state" + } + simulation_method = simulation_methods.get(simulation_config, 'automatic') + if simulation_config == "cpu_mps": + device = 'CPU' + return simulation_method, device + + def get_transpile_routine(self, transpile_config): + return transpile_config if transpile_config in [0, 1, 2, 3] else 1 + + def get_FakeBackend(self, noise_configuration, num_qubits): + backend_name = str(self.split_string(noise_configuration)) + provider = FakeProviderForBackendV2() + try: + backend = provider.get_backend(backend_name) + except TypeError: + logging.info("qiskit.providers.fake_provider.FakeProviderForBackendV2.get_backend overwritten. " + "Will be addressed with upcoming qiskit upgrade.") + filtered_backends = [backend for backend in provider._backends if # pylint: disable=W0212 + backend.name == backend_name] + if not filtered_backends: + raise FileNotFoundError() # pylint: disable=W0707 + backend = filtered_backends[0] + + if num_qubits > backend.num_qubits: + logging.warning( + f'Requested number of qubits ({num_qubits}) exceeds the backend capacity. Using default aer_simulator.') + return Aer.get_backend("aer_simulator") + + noise_model = NoiseModel.from_backend(backend) + logging.info(f'Using {backend_name} with coupling map: {backend.coupling_map}') + logging.info(f'Using {backend_name} with noise model: {noise_model}') + return AerSimulator.from_backend(backend) diff --git a/src/modules/applications/QML/generative_modeling/transformations/MinMax.py b/src/modules/applications/QML/generative_modeling/transformations/MinMax.py index 34e3cd84..0ef1a14a 100644 --- a/src/modules/applications/QML/generative_modeling/transformations/MinMax.py +++ b/src/modules/applications/QML/generative_modeling/transformations/MinMax.py @@ -132,6 +132,7 @@ def reverse_transform(self, input_data: dict) -> (any, float): n_qubits = input_data["n_qubits"] n_registers = self.transform_config["n_registers"] KL_best_transformed = min(input_data["KL"]) + circuit_transpiled = input_data['circuit_transpiled'] array_bins = Transformation.compute_discretization_efficient(n_qubits, n_registers) transformed_samples = Transformation.generate_samples_efficient(best_results, array_bins, n_registers, @@ -170,7 +171,8 @@ def reverse_transform(self, input_data: dict) -> (any, float): "histogram_generated_original": histogram_generated_original, "histogram_generated": histogram_generated_transformed, "KL_best_transformed": KL_best_transformed, - "store_dir_iter": input_data["store_dir_iter"] + "store_dir_iter": input_data["store_dir_iter"], + "circuit_transpiled": circuit_transpiled } return reverse_config_trans diff --git a/src/modules/applications/QML/generative_modeling/transformations/PIT.py b/src/modules/applications/QML/generative_modeling/transformations/PIT.py index dee21acd..e1a08177 100644 --- a/src/modules/applications/QML/generative_modeling/transformations/PIT.py +++ b/src/modules/applications/QML/generative_modeling/transformations/PIT.py @@ -132,6 +132,7 @@ def reverse_transform(self, input_data: dict) -> (any, float): n_registers = self.transform_config["n_registers"] KL_best_transformed = min(input_data["KL"]) best_results = input_data["best_sample"] + circuit_transpiled = input_data['circuit_transpiled'] array_bins = self.compute_discretization_efficient(n_qubits, n_registers) transformed_samples = self.generate_samples_efficient(best_results, array_bins, n_registers, noisy=True) @@ -169,7 +170,8 @@ def reverse_transform(self, input_data: dict) -> (any, float): "histogram_generated_original": histogram_generated_original, "histogram_generated": histogram_generated_transformed, "KL_best_transformed": KL_best_transformed, - "store_dir_iter": input_data["store_dir_iter"] + "store_dir_iter": input_data["store_dir_iter"], + "circuit_transpiled": circuit_transpiled } return reverse_config_trans diff --git a/src/modules/circuits/CircuitCardinality.py b/src/modules/circuits/CircuitCardinality.py index a533adcf..c594c64a 100644 --- a/src/modules/circuits/CircuitCardinality.py +++ b/src/modules/circuits/CircuitCardinality.py @@ -16,6 +16,9 @@ from modules.circuits.Circuit import Circuit from modules.applications.QML.generative_modeling.mappings.LibraryQiskit import LibraryQiskit +from modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend import PresetQiskitNoisyBackend +from modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend import CustomQiskitNoisyBackend + class CircuitCardinality(Circuit): @@ -30,7 +33,7 @@ def __init__(self): Constructor method """ super().__init__("CircuitCardinality") - self.submodule_options = ["LibraryQiskit"] + self.submodule_options = ["LibraryQiskit", "CustomQiskitNoisyBackend", "PresetQiskitNoisyBackend"] def get_parameter_options(self) -> dict: """ @@ -58,6 +61,10 @@ def get_parameter_options(self) -> dict: def get_default_submodule(self, option: str) -> LibraryQiskit: if option == "LibraryQiskit": return LibraryQiskit() + elif option == "PresetQiskitNoisyBackend": + return PresetQiskitNoisyBackend() + elif option == "CustomQiskitNoisyBackend": + return CustomQiskitNoisyBackend() else: raise NotImplementedError(f"Option {option} not implemented") diff --git a/src/modules/circuits/CircuitCopula.py b/src/modules/circuits/CircuitCopula.py index c1f97225..847bbd5b 100644 --- a/src/modules/circuits/CircuitCopula.py +++ b/src/modules/circuits/CircuitCopula.py @@ -19,6 +19,8 @@ from modules.circuits.Circuit import Circuit from modules.applications.QML.generative_modeling.mappings.LibraryQiskit import LibraryQiskit +from modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend import PresetQiskitNoisyBackend +from modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend import CustomQiskitNoisyBackend class CircuitCopula(Circuit): @@ -33,7 +35,7 @@ def __init__(self): Constructor method """ super().__init__("DiscreteCopula") - self.submodule_options = ["LibraryQiskit"] + self.submodule_options = ["LibraryQiskit", "CustomQiskitNoisyBackend", "PresetQiskitNoisyBackend"] @staticmethod def get_requirements() -> list[dict]: @@ -76,6 +78,10 @@ def get_parameter_options(self) -> dict: def get_default_submodule(self, option: str) -> LibraryQiskit: if option == "LibraryQiskit": return LibraryQiskit() + elif option == "PresetQiskitNoisyBackend": + return PresetQiskitNoisyBackend() + elif option == "CustomQiskitNoisyBackend": + return CustomQiskitNoisyBackend() else: raise NotImplementedError(f"Option {option} not implemented") diff --git a/src/modules/circuits/CircuitStandard.py b/src/modules/circuits/CircuitStandard.py index 86903fe1..e80349ef 100644 --- a/src/modules/circuits/CircuitStandard.py +++ b/src/modules/circuits/CircuitStandard.py @@ -16,6 +16,8 @@ from modules.circuits.Circuit import Circuit from modules.applications.QML.generative_modeling.mappings.LibraryQiskit import LibraryQiskit +from modules.applications.QML.generative_modeling.mappings.PresetQiskitNoisyBackend import PresetQiskitNoisyBackend +from modules.applications.QML.generative_modeling.mappings.CustomQiskitNoisyBackend import CustomQiskitNoisyBackend class CircuitStandard(Circuit): @@ -29,7 +31,7 @@ def __init__(self): Constructor method """ super().__init__("DiscreteStandard") - self.submodule_options = ["LibraryQiskit"] + self.submodule_options = ["LibraryQiskit", "CustomQiskitNoisyBackend", "PresetQiskitNoisyBackend"] @staticmethod def get_requirements() -> list[dict]: @@ -72,6 +74,10 @@ def get_parameter_options(self) -> dict: def get_default_submodule(self, option: str) -> LibraryQiskit: if option == "LibraryQiskit": return LibraryQiskit() + elif option == "PresetQiskitNoisyBackend": + return PresetQiskitNoisyBackend() + elif option == "CustomQiskitNoisyBackend": + return CustomQiskitNoisyBackend() else: raise NotImplementedError(f"Option {option} not implemented") diff --git a/src/modules/solvers/QiskitQAOA.py b/src/modules/solvers/QiskitQAOA.py index fb8b1b35..3ac64b07 100644 --- a/src/modules/solvers/QiskitQAOA.py +++ b/src/modules/solvers/QiskitQAOA.py @@ -23,7 +23,7 @@ from qiskit.circuit.library import TwoLocal from qiskit.opflow import PauliSumOp from qiskit_optimization.applications import OptimizationApplication -from qiskit_ibm_runtime import QiskitRuntimeService +# from qiskit_ibm_runtime import QiskitRuntimeService from modules.solvers.Solver import * from utils import start_time_measurement, end_time_measurement @@ -39,7 +39,8 @@ def __init__(self): Constructor method """ super().__init__() - self.submodule_options = ["qasm_simulator", "qasm_simulator_gpu", "ibm_eagle"] + # self.submodule_options = ["qasm_simulator", "qasm_simulator_gpu", "ibm_eagle"] + self.submodule_options = ["qasm_simulator", "qasm_simulator_gpu"] @staticmethod def get_requirements() -> list[dict]: @@ -52,7 +53,7 @@ def get_requirements() -> list[dict]: return [ { "name": "qiskit", - "version": "0.40.0" + "version": "0.45.0" }, { "name": "qiskit-optimization", @@ -71,9 +72,9 @@ def get_default_submodule(self, option: str) -> Core: elif option == "qasm_simulator_gpu": from modules.devices.HelperClass import HelperClass # pylint: disable=C0415 return HelperClass("qasm_simulator_gpu") - elif option == "ibm_eagle": - from modules.devices.HelperClass import HelperClass # pylint: disable=C0415 - return HelperClass("ibm_eagle") + # elif option == "ibm_eagle": + # from modules.devices.HelperClass import HelperClass # pylint: disable=C0415 + # return HelperClass("ibm_eagle") else: raise NotImplementedError(f"Device Option {option} not implemented") @@ -222,11 +223,11 @@ def _get_quantum_instance(device_wrapper: any) -> any: logging.info("Using GPU simulator") backend.set_options(device='GPU') backend.set_options(method='statevector_gpu') - elif device_wrapper.device == 'ibm_eagle': - logging.info("Using IBM Eagle") - ibm_quantum_token = os.environ.get('ibm_quantum_token') - service = QiskitRuntimeService(channel="ibm_quantum", token=ibm_quantum_token) - backend = service.least_busy(operational=True, simulator=False, min_num_qubits=127) + # elif device_wrapper.device == 'ibm_eagle': + # logging.info("Using IBM Eagle") + # ibm_quantum_token = os.environ.get('ibm_quantum_token') + # service = QiskitRuntimeService(channel="ibm_quantum", token=ibm_quantum_token) + # backend = service.least_busy(operational=True, simulator=False, min_num_qubits=127) else: logging.info("Using CPU simulator") backend.set_options(device='CPU') diff --git a/src/modules/training/QCBM.py b/src/modules/training/QCBM.py index 770613b3..1636524b 100644 --- a/src/modules/training/QCBM.py +++ b/src/modules/training/QCBM.py @@ -190,6 +190,8 @@ def setup_training(self, input_data, config) -> tuple: self.loss_func = self.kl_divergence elif config['loss'] == "NLL": self.loss_func = self.nll + elif config['loss'] == "MMD": + self.loss_func = self.mmd else: raise NotImplementedError("Loss function not implemented") @@ -304,14 +306,16 @@ def data_visualization(self, loss_epoch, pmfs_model, samples, epoch): else: counts = samples[int(index)] - metrics = self.generalization_metrics.get_metrics(counts.get() if GPU else counts) + metrics = self.generalization_metrics.get_metrics(counts if GPU else counts) for (key, value) in metrics.items(): self.writer.add_scalar(f"metrics/{key}", value, epoch) nll = self.nll(best_pmf.reshape([1, -1]), self.target) kl = self.kl_divergence(best_pmf.reshape([1, -1]), self.target) + mmd = self.mmd(best_pmf.reshape([1, -1]), self.target) self.writer.add_scalar("metrics/NLL", nll.get() if GPU else nll, epoch) self.writer.add_scalar("metrics/KL", kl.get() if GPU else kl, epoch) + self.writer.add_scalar("metrics/MMD", mmd.get() if GPU else mmd, epoch) self.ax.clear() self.ax.imshow( diff --git a/src/modules/training/Training.py b/src/modules/training/Training.py index fbe61a96..5457f702 100644 --- a/src/modules/training/Training.py +++ b/src/modules/training/Training.py @@ -111,6 +111,16 @@ def nll(self, pmf_model, pmf_target): pmf_model[pmf_model == 0] = 1e-8 return -np.sum(pmf_target * np.log(pmf_model), axis=1) + def mmd(self, pmf_model, pmf_target): + pmf_model[pmf_model == 0] = 1e-8 + sigma = 1/pmf_model.shape[1] # TODO Improve scaling sigma and revise Formula + kernel_distance = np.exp((-np.square(pmf_model - pmf_target) / (sigma ** 2))) + mmd = 2 - 2 * np.mean(kernel_distance, axis=1) + # The correct formula would take the transformed distances of both distributions into account. Since we are + # not sampling from the distribution but using the probability mass function we can skip this step since the + # sum of both, a modified version of the Gaussian kernel is used. + return mmd + class Timing: """ This module is an abstraction of time measurement for for both CPU and GPU processes