ProjectQ | open source software framework for quantum computing
kandi X-RAY | ProjectQ Summary
kandi X-RAY | ProjectQ Summary
ProjectQ: An open source software framework for quantum computing
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Checks if the given gate is available
- Return the reST representation of this module
- Decompose the slave gate
- Recognize a rotation matrix
- Test if a matrix is equal to a given matrix
- Resolve linkcode
- Recursively get attr
- Generate a zoo profile
- Returns a LaTeX representation of the circuit
- Allocate a new qubit
- Check if a meta tag is supported
- Allocate n_qubits
- This function runs a teleport
- Run the inverse qFT operator
- Compute the histogram of the given qubits
- Run Grover
- Run the circuit
- Get probabilities for a qubit
- Return a LaTeX representation of the circuit
- Build all the extensions
- Get the probability of a qubit
- Run the halfadder
- Decompose a CnU
- Gets the probability of a qubit
- Allocate a new qubit
- Run the entangle
- Checks if the given command is available
ProjectQ Key Features
ProjectQ Examples and Code Snippets
Community Discussions
Trending Discussions on ProjectQ
QUESTION
I've been trying to decompose the projectQ objects and I could manage to decompose non controlled gates, and daggered gates. But I noticed that the object of a controlled version of a gate is the exact same as the object of that gate.
The code generating these objects:
...ANSWER
Answered 2019-Feb-26 at 08:24The control qubits are only added to the command after it is received by the ControlEngine
further down the chain after the MainEngine
. For implementation details see "3.2.1 Implementation of meta instructions" here.
To implement a testing engine such as this one, that can be used to check that indeed control qubits are added right after the MainEngine
, you could do the following:
QUESTION
I'm trying to make a conda recipe for ProjectQ. Something weird is going on during the build process under both linux and osx. I can build and install the package by hand (i.e. using 'python setup.py install' from the cloned git repo directory). However, when I make a recipe that does exactly the same thing, it fails. On both linux and osx.
My build recipe is here. What is particularly weird is that even though I specify python 3.6.* under the build requirements in the meta.yaml file, the conda-build procedure names the package "projectq-v0.3.0-py27_0", and when it installs the package, it tries to do so in one of the python 2.7 directories, which is what I assume makes it fail.
So clearly I'm doing something dumb, but I can't for the life of me figure out what. Can anyone see anything I've done wrong? Thanks in advance.
...ANSWER
Answered 2017-May-09 at 15:43I figured this out. Thanks to everyone who took the time to look over my question. There was truly no way that anyone could have figured this out for me, since it was rather specific to the package I was installing. I'm going to try to summarize what I've learned in case someone else runs into anything different.
- First, as I noted in one of the comments, if you're specifying a specific version requirement under the build, you had better specify the same version requirement under run. Initially I had "python 3.6.*" specified under build, but just "python" under run. This caused the package to be named something ending with "-py27_0", since the package name, understandably, depends upon what's required to run it, not to build it.
- The really tricky thing was to understand that there were additional requirements specified in the setup.py script that were being installed automatically when I ran "python setup.py install" by hand, but were not being run when I tried to build under conda. Once I added these requirements to the meta.yaml recipe, everything builds and tests fine.
So, the lessons are to be consistent with your conda requirements between build and run, and make sure you have all of the requirements listed, including bonus requirements that may be specified in the setup.py file.
Thanks again to all who looked at this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ProjectQ
You can use ProjectQ like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page