Question

The Code Does not Compute the other elements of Matrix

Hello, I am trying to compute value of probabilitiy distribution The formula is ok, code is working I have no error but some va...

2 meses ago | 1 answer | 0

Question

Computing Matrix in 4d is not Working

Hello, I have these array: A_ax(d,d,b,m) B_by(d,d,b,m) When I have A_ax(2,2,2,2)the code is working and I am getting the co...

3 meses ago | 0 answers | 0

Question

Operator '.*' is not supported for operands of type 'cell'.

Hello, I am getting this error: Operator '.*' is not supported for operands of type 'cell'. Here my code: for a=1:m %d->m ...

3 meses ago | 2 answers | 0

Question

Hold on Is not Working

Hello, my x axis is (which is name is values_x)here: 0.9000 0.9500 0.9600 0.9700 0.9800 0.9900 0.9977 0.9...

3 meses ago | 1 answer | 0

Question

How can I save the elements into a List with a For Loop

Hey, I am trying to my results in a for loop but I can save just the last result How can I solve the problem? function[ rho,gs...

3 meses ago | 1 answer | 0

Question

Giving a Different Value to Elements of Array

Hello, I have a value for A(:,:,3,1) and another value for A(:,:,3,2). Similarly, I have different values for A(:,:,4,1) and...

3 meses ago | 1 answer | 0

Question

How can I remove if statement ?

Hello My idea is easy; d is the dimension and I want to create a block diagonal matrix with size d from the reuslt of 2*2 I ...

3 meses ago | 1 answer | 0

Question

Result of A(:,:,1,1) coming as result of A(:,:,1,2)

Hello, Ihave this code: function [A,B] = trying(d) A=zeros(d,d,2,d); sigma_x = [0,1;1,0]; sigma_z = [1,0;0,-1]; if d...

3 meses ago | 1 answer | 0

Question

Tensor Product According to Input (Dynamically)

Hello: I am trying to use tensor product according to inout number d How can I write this code better? I am asking that becuas...

3 meses ago | 1 answer | 0

Question

Selecting a Randomly Matrix as Part of a Block Diagonal Matrix

Hello, I have 2 matrix which are name temp and temp2 And I want to create a block diagonal Matrix with temp and temp2. However...

3 meses ago | 1 answer | 0

Answered

Creating Matrix with a Dynamic Size

Ok I solved the problem: for l=1:2 A(:,:,1,k) = repmat(projectors_of_sigma_x(:,l)*transpose(projectors_of_sigma_x(:,...

Creating Matrix with a Dynamic Size

Ok I solved the problem: for l=1:2 A(:,:,1,k) = repmat(projectors_of_sigma_x(:,l)*transpose(projectors_of_sigma_x(:,...

3 meses ago | 0

| accepted

Question

Creating Matrix with a Dynamic Size

Hello, I can create 2*2 matrix with the following code but for higher dimension I can not: function [A,B] = CHSH2d(d) A=z...

3 meses ago | 1 answer | 0

Question

Creating Dynamic High Dimensional Block Diagonal Matrix

Hello, I can create a matrix for dimenson = 2. However for even d and d>2, It should be a lock diagonal matrix of the previous...

3 meses ago | 0 answers | 0

Question

Generating Block Matrix Dynamically

Hello, I am generating this matrix in 2d: 0.7071 0.7071 0.7071 0.7071 But for even number (and of course greater than ...

3 meses ago | 1 answer | 0

Question

Unable to perform assignment because the size of the left side is 4-by-4 and the size of the right side is 2-by-4.

Hello, I am trying to create block diagonal if dimension d is greater than 2. However I have this error: Unable to perform ass...

3 meses ago | 0 answers | 0

Question

Parametric Block Diagonal Matrix Unable to perform assignment because the size of the left side is 4-by-4 and the size of the right side is

Hello, I have this code: function [A,B] = CH2d(d) A=zeros(d,d,2,d); B=A; projectors_of_sigma_x = [1/sqrt(2)*[1...

3 meses ago | 0 answers | 0

Question

Second Element is not 1 but It is coming as 1

Hello, I have this matrix: I saved this matrix in a list like : projectors_of_sigma_x_minus_sigma_z = [[(sqrt(2)-1);1],[(-sq...

3 meses ago | 1 answer | 0

Question

Elements of Array Should not be the Same

Hello, I have this value for element of my list: And I have this code: function [A,B] = CHSHmeasurement(d) A=zeros(d,d...

3 meses ago | 1 answer | 0

Question

Why is 0 not valid in mean fucntion?

Hello, I have this function: function [coin, I,evAlice,evBob] = CH_(sigma_x,sigma_z) ev1_of_alice = sigma_x; ev2_of_alic...

3 meses ago | 0 answers | 0

Question

Using a Variable between different functions

Hello, I have this two function. evAlice and evBob were defined in CHSH_ but I need to access themin basis function. But I cou...

3 meses ago | 1 answer | 0

Question

Error Using fprintf Invalid file identifier. Use fopen to generate a valid file identifier.

Hello, I have this script. I = (kron(ev1_of_alice,(ev1_of_bob+ev2_of_bob)))+kron(ev2_of_alice,(ev1_of_bob-ev2_of_bob)); if ~i...

3 meses ago | 2 answers | 0

Question

An Algorithmic Problem for Mathematical Process

Hi All, I have an algorithmic problem and I could not think how can I write in Matlab. I have a variable S which is defined: ...

4 meses ago | 1 answer | 0

Question

Dual SDP Problem from Its Primal

Hey! I am computing a probability distribution from some measurements and I used primal sdp method for that; but now I need to ...

4 meses ago | 0 answers | 0

Question

Mathematical Process and Some measurement ın varargout

I have n matrices of size d*d(first 2 index of the array) for 2 different measurement(third index of the array) with d outcomes(...

4 meses ago | 1 answer | 0

Question

How to give an array with dynamic size as a paramter to fucntion?

Hey! I have a problem. I want to use an array with dynamic size. I mean user can define a size for an array and each element o...

4 meses ago | 1 answer | 0