Saravanan666/pypi-org huggingface dataset:
Package: qcompress
DescriptionQCompress is a Python framework for the quantum autoencoder (QAE) algorithm. Using the code, the user can execute instances of the algorithm on either a quantum simulator or a quantum processor provided by Rigetti Computing’sQuantum Cloud Services. For a more in-depth description of QCompress (including the naming convention for the types of qubits involved in the QAE circuit), clickhere.For more information about the algorithm, seeRomero et al. Note that we deviate from the training technique used in the original paper and instead introduce two alternative autoencoder training schemes that require lower-depth circuits (seeSim et al).FeaturesThis code is based on an olderversionwritten during Rigetti Computing’s hackathon in April 2018. Since then, we’ve updated and enhanced the code, supporting the following features:Executability on Rigetti’s quantum processor(s)Several training schemes for the autoencoderUse of theRESEToperation for the encoding qubits (lowers qubit requirement)User-definable training circuit and/or classical optimization routineInstallationThere are a few options for installing QCompress:To install QCompress usingpip, execute:pipinstallqcompressTo install QCompress usingconda, execute:condainstall-crigetti-chsim13372qcompressTo instead install QCompress from source, clone this repository,cdinto it, and run:gitclonehttps://github.com/hsim13372/QCompresscdQCompresspython-mpipinstall-e.Try executingimport qcompressto test the installation in your terminal.Note that the pyQuil version used requires Python 3.6 or later. For installation on a user QMI, please clickhere.ExamplesWe provide several Jupyter notebooks to demonstrate the utility of QCompress. We recommend going through the notebooks in the order shown in the table (top-down).NotebookFeature(s)qae_h2_demo.ipynbSimulates the compression of the ground states of the hydrogen molecule. Uses OpenFermion and grove to generate data. Demonstrates the “halfway” training scheme.qae_two_qubit_demo.ipynbSimulates the compression of a two-qubit data set. Outlines how to run an instance on an actual device. Demonstrates the “full with reset” training scheme.run_landscape_scan.ipynbShows user how to run landscape scans for small (few-parameter) instances. Demonstrates setup of the “full with no reset” training scheme.DisclaimerWe note that there is a lot of room for improvement and fixes. Please feel free to submit issues and/or pull requests!How to citeWhen using QCompress for research projects, please cite:Sukin Sim, Yudong Cao, Jonathan Romero, Peter D. Johnson and Alán Aspuru-Guzik.A framework for algorithm deployment on cloud-based quantum computers.arXiv:1810.10576. 2018.AuthorsSukin (Hannah) Sim(Harvard),Zapata Computing, Inc.
Package: qconf-py
Description for setup.pyUsage: python setup.py build
which will generate the qconf_py library in build/lib.linux-x86_64-X.X as qconf_py.soParamters of Extension:
name : the full name of the extension, including any packages ? ie. not a filename or pathname, but Python dotted name;sources : list of source filenames, relative to the distribution root (where the setup script lives), in Unix form (slash- separated) for portability. Source files may be C, C++, SWIG (.i), platform-specific resource files, or whatever else is recognized by the build_ext command as source for a Python extension.

include_dirs : list of directories to search for C/C++ header files (in Unix form for portability);

extra_objects : list of extra files to link with (eg. object files not implied by ¡®sources¡¯, static library that must be explicitly specified, binary resource files, etc.)

library_dirs : list of directories to search for C/C++ libraries at link time

libraries : list of library names (not filenames or paths) to link against
Package: qcos
腾讯云对象存储库，支持命令行安装通过pip安装:pip install qcos配置使用官方的命令行工具CLI配置secret_id, scret_key代码中使用参照源码，比较简单, 调用方式:from qcos import Client
client = Client(secret_id, secret_key, region, bucket)
# 根据路径上传
client.put_local('a.txt', local_path)
# 直接上传内容
client.put_object('a.txt', data='content')
# 检查文件是否存在
client.head_object('a.txt')命令行格式:qcos 本地文件夹 region bucket cos文件夹路径比如:qcos ./build ap-beijing testbucket-10000 /
Package: qcparse
qcparseA library for parsing Quantum Chemistry output files into structured data objects and converting structured input objects into program-native input files. Uses data structures fromqcio.qcparseworks in harmony with a suite of other quantum chemistry tools for fast, structured, and interoperable quantum chemistry.The QC Suite of Programsqcio- Beautiful and user friendly data structures for quantum chemistry.qcparse- A library for efficient parsing of quantum chemistry data into structuredqcioobjects and conversion ofqcioinput objects to program-native input files.qcop- A package for operating quantum chemistry programs usingqciostandardized data structures. Compatible withTeraChem,psi4,QChem,NWChem,ORCA,Molpro,geomeTRICand many more.BigChem- A distributed application for running quantum chemistry calculations at scale across clusters of computers or the cloud. Bring multi-node scaling to your favorite quantum chemistry program.ChemCloud- Aweb applicationand associatedPython clientfor exposing a BigChem cluster securely over the internet.✨ Basic UsageInstallation:python-mpipinstallqcparseParse a file into aSinglePointResultsobject with a single line of code.fromqcparseimportparse# May pass a path or the contents of a file as string/bytesresults=parse("terachem","/path/to/stdout.log")Theresultsobject will be aqcio.SinglePointResultsobject. Rundir(results)inside a Python interpreter to see the various values you can access. A few prominent values are shown here as an example:fromqcparseimportparseresults=parse("/path/to/tc.out","terachem")results.energyresults.gradient# If a gradient calcresults.hessian# If a hessian calcresults.calcinfo_nmo# Number of molecular orbitalsParsed values can be written to disk like this:withopen("results.json","w")asf:f.write(result.model_dumps_json())And read from disk like this:fromqcioimportSinglePointResultsresults=SinglePointResults.open("results.json")You can also runqcparsefrom the command line like this:qcparse-h# Get help message for cliqcparseterachem./path/to/tc.out>results.json# Parse TeraChem stdout to json💻 ContributingPlease see thecontributing guidefor details on how to contribute new parsers to this project :)If there's data you'd like parsed from output files or want to support input files for a new program, please open an issue in this repo explaining the data items you'd like parsed and include an example output file containing the data, likethis.
Package: qc-parser
QC parser for SMaHTParses outputs of different QC tools and unifies them for the SMaHT portalInstallationSimply runpip install qc-parserto install the package. You need at least Python 3.8.To develop this package, clone this repo, make surepoetryis installed on your system and runmake install.UsageAfter installation the following command can be run from the command line:parse-qc \
    -n 'BAM Quality Metrics' \
    --metrics samtools /PATH/samtools.stats.txt \
    --metrics picard_CollectInsertSizeMetrics /PATH/picard_cis_metrics.txt \
    --additional-files /PATH/additional_output_1.pdf \
    --additional-files /PATH/additional_output_2.tsv \
    --output-zip metrics.zip
    --output-json qc_values.jsonIn this example, the tool will parse the Samtools output file/PATH/samtools.stats.txtand the Picard output file/PATH/picard_cis_metrics.txt. The values that are extracted from both files are specified insrc/metrics_to_extract.py. All metrics are combined and stored inqc_values.jsonthat is compatible with Tibanna_ff's generic QC functionality.Themetrics.zipwill contain the following files:samtools.stats.txt
picard_cis_metrics.txt
additional_output_1.pdf
additional_output_2.tsvThe currently supported QC tools are:samtools_statspicard_CollectAlignmentSummaryMetricspicard_CollectInsertSizeMetricspicard_CollectWgsMetricsbamStats.pyfastqcrnaseqqc (RNA-SeQC)DevelopmentIf you want toextract a new metric from an already supported QC tool, add the metric to thesrc/metrics_to_extract.pyin the appropriate section.If you want toadd suuport for a new QC tool, you need to add a parser tosrc/MetricsParser.pyand add the metrics you want to extract from the tool tosrc/metrics_to_extract.py.TestsThe commandmake testwill run local tests.
Package: qc-procrustes
ProcrustesThe Procrustes library provides a set of functions for transforming a matrix to make it
as similar as possible to a target matrix. For more information, visitProcrustes Documentation.CitationPlease use the following citation in any publication using Procrustes library:"Procrustes: A Python Library to Find Transformationsthat Maximize the Similarity Between
Matrices.", F. Meng, M. Richer, A. Tehrani, J. La, T. D. Kim, P. W. Ayers, F. Heidar-Zadeh,JOURNAL XXX.DependenciesThe following dependencies are required to run Procrustes properly,Python >= 3.6:http://www.python.org/NumPy >= 1.18.5:http://www.numpy.org/SciPy >= 1.5.0:http://www.scipy.org/PyTest >= 5.3.4:https://docs.pytest.org/PyTest-Cov >= 2.8.0:https://pypi.org/project/pytest-cov/InstallationTo install Procrustes using the conda package management system, installminicondaoranacondafirst, and then:# Create and activate myenv conda environment (optional, but recommended)condacreate-nmyenvpython=3.6condaactivatemyenv# Install the stable release.condainstall-ctheochem/label/devqc-procrustesTo install Procrustes with pip, you may want to create avirtual environment, and then:# Install the stable release.pipinstallqc-procrustesSeehttps://procrustes.readthedocs.io/en/latest/usr_doc_installization.htmlfor full details.
Package: qcpy
qcPy is a Python framework for conveniently handling quantum-chemical calculations and the post-processing of the acquired data.For more general information on qcPy see itshomepage.InstallationInstall the package by running:pip install qcpyContributeSource Code:https://github.com/tillbiskup/qcpySupportIf you are having issues, please contact the package authors via GitHub and/or file a bug report there.LicenseThe project licensed under the BSD license.
Package: qcrash
AboutA PyQt/PySide framework for reporting application crash (unhandled exception)
and/or let the user report an issue/feature request.Featuresmultiple builtin backends for reporting bugs:github_backend: let you create issues on githubemail_backend: let you send an email with the crash report.highly configurable, you can create your own backend, set your own formatter,…a thread safe exception hook mechanism with a way to setup your own functionScreenshotsScreenshots taken on KDE Plasma 5Report dialogReview report before submittingGithub integrationLICENSEQCrash is licensed under the MIT license.Installationpip install qcrashUsageBasic usage:importqcrash.apiasqcrash# setup our own function to collect system info and application logqcrash.get_application_log=my_app.get_application_logqcrash.get_system_information=my_app.get_system_info# configure backendsgithub=qcrash.backends.GithubBackend('ColinDuquesnoy','QCrash')email=qcrash.backends.EmailBackend('colin.duquesnoy@gmail.com')qcrash.install_backend([github,email])# install exception hookqcrash.install_except_hook()# or show the report dialog manuallyqcrash.show_report_dialog()Some more detailedexamplesare available. Also have a look at theAPI documentation.Dependencieskeyringgithubpy(embedded into the package)TestingTo run the tests, just run the following command:python setup.py test
Package: qcrepocleaner
Here are the tools to clean up the CCDB of the QC.Entry pointIt iso2-qc-repo-cleaner. See the long comment at the beginning.Usageusage: o2-qc-repo-cleaner [-h] [--config CONFIG] [--config-git] [--config-consul CONFIG_CONSUL] [--log-level LOG_LEVEL] 
                          [--dry-run] [--only-path ONLY_PATH] [--workers WORKERS]ConfigurationThe fileconfig.yamlcontains the CCDB URL and the rules to be followed to clean up the database. An example is provided along this README (config.yaml).
A typical rule in the config file looks like:- object_path: qc/ITS/.*
    delay: 240
    policy: 1_per_hourThere can be any number of these rules. The order is important as we use the first matching rule for each element in the QCDB (caveat the use of the flagcontinue_with_next_rule, see below).object_path: a pattern to be matched to know if the rule appliesdelay: the duration in minutes of the grace period during which an object is not removed, even if it matches the above path.policy: the name of a policy to apply on the matching objects. Here are the currently available policies (full description in the corresponding files):1_per_hour: keep the first and extend its validity to 1 hour, remove everything in the next hour, repeat.1_per_run: requires the "Run" or "RunNumber" metadata to be set. Keep only the most recent version of an object for a given run.last_only: keep only the last version, remove everything else.none_kept: keep none, remove everythingskip: keep everythingfrom_timestamp: the rule only applies to versions whosevalid_fromis older than this timestampto_timestamp: the rule only applies to versions whosevalid_fromis younger than this timestampcontinue_with_next_rule: ifTrue, the next matching rule is also applied.xyz: any extra argument necessary for a given policy. This is the case of the argumentdelete_when_no_runrequired by the policy1_per_run.The configuration for ccdb-test is describedhere.Unit Testscd QualityControl/Framework/script/RepoCleaner ; python3 -m unittest discoverand to test only one of them:python3 -m unittest tests/test_NewProduction.py -k test_2_runsIn particular there is a test for theproductionrule that is pretty extensive. It hits the ccdb though and it needs the following path to be truncated:qc/TST/MO/repo/test*Other testsMost of the classes and Rules have a main to help test them. To run do e.g.python3 1_per_run.py.InstallationCMake will install the python scripts in bin and the config file in etc.ExamplePYTHONPATH=./rules:$PYTHONPATH ./o2-qc-repo-cleaner --dry-run --config config-test.yaml --dry-run --only-path qc/DAQ --log-level 10DevelopmentTo install locallycd Framework/script/RepoCleaner
python3 -m pip install .Upload new versionPrerequisiteCreate an account onhttps://pypi.orgCreate new versionUpdate version number insetup.pypython3 setup.py sdist bdist_wheelpython3 -m twine upload --repository pypi dist/*
Package: qcrop
QCropA basic PyQt image cropping tool.Installpip install qcropUsageAs an applicationStart with the command:qcrop path/to/image.extThe supported image formats arethose handled by the Qt framework: BMP, GIF, JPG, PNG, PBM, PGM, PPM, XBM and XPM.As a python moduleSample code:fromPyQt5.QtGuiimportQPixmapfromqcrop.uiimportQCroporiginal_image=QPixmap(...)crop_tool=QCrop(original_image)status=crop_tool.exec()ifstatus==Qt.Accepted:cropped_image=crop_tool.image# else crop_tool.image == original_imageUser interfaceUse the mouse to select the image area to crop. You can also use the X, Y, Width and Height fields to precisely adjust the area (you can use mouse wheel hovering the field).Click the reset button to set the crop area to the full image.Once done click ok to validate the crop, cancel to go back to the original image.
Package: qcs-api-client
QCS API ClientA client library for accessing theRigetti QCS API.UsageSynchronous Usagefromqcs_api_client.clientimportbuild_sync_clientfromqcs_api_client.modelsimportListReservationsResponsefromqcs_api_client.operations.syncimportlist_reservationswithbuild_sync_client()asclient:response:ListReservationsResponse=list_reservations(client=client).parsedAsynchronous Usagefromqcs_api_client.clientimportbuild_async_clientfromqcs_api_client.modelsimportListReservationsResponsefromqcs_api_client.operations.asyncioimportlist_reservations# Within an event loop:asyncwithbuild_async_client()asclient:response:ListReservationsResponse=awaitlist_reservations(client=client).parsedConfigurationBy default, initializing your client withbuild_sync_clientorbuild_async_clientwill
useQCSClientConfiguation.loadto load default configuration values. This function accepts:A profile name (env:QCS_PROFILE_NAME). The name of the profile referenced in your settings
file. If not provided,QCSClientConfiguation.loadwill evaluate this to adefault_profile_nameset in your settings file or "default".A settings file path (env:QCS_SETTINGS_FILE_PATH). A path to the current user's settings file in TOML format. If not provided,QCSClientConfiguation.loadwill evaluate this to~/.qcs/settings.toml.A secrets file path (env:QCS_SECRETS_FILE_PATH). A path to the current user's secrets file in TOML format. If not provided,QCSClientConfiguation.loadwill evaluate this to~/.qcs/secrets.toml. The user should have write access to this file, as the client will attempt to update the file with refreshed access tokens as necessary.If you need to specify a custom profile name or path you can initialize your client accordingly:fromqcs_api_client.clientimportbuild_sync_client,QCSClientConfigurationfromqcs_api_client.modelsimportListReservationsResponsefromqcs_api_client.operations.syncimportlist_reservationsconfiguration=QCSClientConfiguration.load(profile_name='custom',secrets_file_path='./path/to/custom/secrets.toml',settings_file_path='./path/to/custom/settings.toml',)withbuild_sync_client(configuration=configuration)asclient:response:ListReservationsResponse=list_reservations(client=client).parsedDevelopmentThe source code for this repository is synchronized from another source. No commits made directly to GitHub will be retained.
Package: qcSim
qcSim is a Python package for the simulation of quantum computers based on the
quantum circuit model.
The goal of this simulator is to provide a simple and understandable syntax that allows
even people who have only recently started working with quantum computing to implement
simple quantum algorithms. This rather practical component should make it easier for
beginners to understand the complex topic of quantum computing.
The simulator was primarily programmed to implement quantum machine learning and quantum
optimization subroutines. Some examples can be found in the folder “example subroutines”.
The focus was to clearly show the lower time complexity of quantum algorithms compared
to their classical counterparts.
Package: qcs-sdk-python
QCS SDK Python⚠️ In Developmentqcs-sdk-pythonprovides an interface to RigettiQuantum Cloud Services(QCS), allowing users
to compile and run Quil programs on Rigetti quantum processors. Internally, it is powered by theQCS Rust SDK.While this package can be used directly,pyQuiloffers more functionality and a
higher-level interface for building and executing Quil programs. This package is still in early development and breaking changes should be expected between minor versions.DocumentationDocumentation for the current release ofqcs_sdkis publishedhere. Every version ofqcs_sdkshipswith type stubsthat can provide type hints and documentation to Python tooling and editors.TroubleshootingEnabling Debug loggingThis package integrates with Python'slogging facilitythrough a Rust crate calledpyo3_log. The quickest way to get started is to just enable debug logging:importlogginglogging.basicConfig(level=logging.DEBUG)Because this is implemented with Rust, there are some important differences in regards to log levels and filtering.TheTRACElog levelRust has aTRACElog level that doesn't exist in Python. It is less severe thanDEBUGand is set to a value of 5. While theDEBUGlevel is recommended for troubleshooting, you can choose to targetTRACElevel logs and below like so:importlogginglogging.basicConfig(level=5)Runtime Configuration and Cachingpyo3_logcaches loggers and their level filters to improve performance. This means that logger re-configuration done at runtime may cause unexpected logging behavior in certain situations. If this is a concern,this section of the pyo3_log documentationgoes into more detail.These caches can be reset using the following:qcs_sdk.reset_logging()This will allow the logging handlers to pick up the most recently-applied configuration from the Python side.Filtering LogsBecause the logs are emitted from a Rust library, the logger names will correspond to the fully qualified path of the Rust module in the library where the log occurred. These fully qualified paths all have their own logger, and have to be configured individually.For example, say you wanted to disable the following log:DEBUG:hyper.proto.h1.io:flushed 124 bytesYou could get the logger forhyper.proto.h1.ioand disable it like so:logging.getLogger("hyper.proto.h1.io").disabled=TrueThis can become cumbersome, since there are a handful of libraries all logging from a handful of modules that you may not be concerned with. A less cumbersome, but more heavy handed approach is to apply a filter to all logging handlers at runtime. For example, if you only cared about logs from aqcslibrary, you could setup a log filter like so:classQCSLogFilter(logging.Filter):deffilter(self,record)->bool:return"qcs"inrecord.nameforhandlerinlogging.root.handlers:handler.addFilter(QCSLogFilter())This applies to all logs, so you may want to tune thefiltermethod to include other logs you care about. See the caching section above for important information about the application of these filters.
Package: qc.statusmessage
IntroductionSometimes in web application development the need arises to show a status message
or similar notices to a user. This can of course be easily done in some success page
but sometimes this page is rendered by a different request because of a redirect.
In these cases you can use some query parameters or similar methods but that’s not
always easy to use or might even have security problems.qc.statusmessagetries to solve this problem by giving you aMessageListobject
which is put into the WSGI environment on ingress and processed on egress to store a list of
messages inside a cookie.For information on how to use it check out theonline documentationor
check out thesource code repository.ChangelogNext release1.0b3 - July 20th 2009Bugfixesfixed link to PyPI package in documentation [cs]fixed handling of broken cookies [cs]1.0b1 - March 15th 2009Initial release
Package: qc-syn
Quantum Circuit Synthesis Environment for Reinforcement LearningThis project provides a quantum circuit synthesis environment for reinforcement learning. The environment is built on top of the Gymnasium framework.InstallationTo install the environment, you need to have Python and pip installed on your system. If you don't have them installed, you can download them from the official Python website.Once you have Python and pip installed, you can install the environment by running the following command in your terminal:pipinstallqc_synUsageTo create a new instance of the environment, you can use thegym.makefunction:importgymnasiumasgymimportqc_synenv=gym.make("qc_syn/QuantumCircuit-v0",qubit_count=4)observation,info=env.reset()for_inrange(1000):action=env.action_space.sample()# agent policy that uses the observation and infoobservation,reward,terminated,truncated,info=env.step(action)ifterminatedortruncated:observation,info=env.reset()env.close()ContributingContributions are welcome! Please feel free to submit a pull request.LicenseThis project is licensed under the terms of the MIT license.