It's a complete code. Try pasting the code from my last post into https://www.onlinegdb.com/online_c++_compiler or any other IDE and the error comes out the same every time "main.cpp:12:16: error: reference to ‘negate’ is ambiguous".
#include <iostream>
#include<vector>
using namespace std;
vector<int> negate (vector<int> a) {
a.insert(a.begin(), -1);
return a;
}
vector<vector<int>> negate (vector<vector<int>> a) {
for (int i=0; i<a.size(); i++)
a = negate(a[i]); // reference to 'negate' is ambiguous...
vector<OP> negate (vector<OP> a) {
a.insert(a.begin(), neg);
return a;
}
vector<vector<OP>> negate (vector<vector<OP>> a) {
for (int i=0; i<a.size(); i++)
a[i] = negate(a[i]); // reference to 'negate' is ambiguous?
return a;
}
OP is an enum here. Why can't C++...
Hi.
I wrote a little algorithm that calculates some physics equations for education purposes and it's in C++. I'd like to make it avaiable by creating a website and put that code in it so it either interprets the C++ code or preferrably works with an executable (but then how would it be...
I did and as you pointed out there is a substantial body of literature. I'm a slow reader and an even slower learner. We don't go by any textbook at uni and I have no idea what purification might possibly entail.
After all, we're not tensor-crossing with any other space so tracing one space...
Show that this dephasing operation is Markovian
$$E_t(\rho)=\left(\frac{1+e^{-t}}{2}\right)\rho + \left(\frac{1-e^{-t}}{2}\right)Z\rho Z$$
The operation is supposed to be Markovian when
$$E_g E_h = E_{g+h}$$
So this is what I get when I apply this multiplication
$$
E_g...
I'm trying to find the purification of this density matrix
$$\rho=\cos^2\theta \ket{0}\bra{0} + \frac{\sin^2\theta}{2} \left(\ket{1}\bra{1} + \ket{2}\bra{2} \right)
$$
So I think the state (the purification) we're looking for is such Psi that
$$
\ket{\Psi}\bra{\Psi}=\rho
$$
But I'm not...